storage/tokudb/ha_tokudb.cc:315 release: Assertion `Handlerton: _use_count != 0 ' failed (errno=0)
Tokudb handlerton _use_count inaccurate on server shutdown due to double cancel of background job.
Forwarded by Rich Prohaska from https://jira.mariadb.org/browse/MDEV-10327
here is the sequence of operations
job is created.
job is queued to run on background.
before the job runs, it is cancelled. the state of the job is cancelled AND it is still on the background job queue.
the tokudb handlerton is shutdown. the job manager is destroyed. all of the queued jobs are cancelled. the job that was previously cancelled is cancelled AGAIN.