After mysqloptimize sometimes one of the tables is marked as crashed

Description

Sometimes at nightly cron-jobs doing "mysqloptimize" one of the tables get marked "crashed" and automatic repair fails.
The last one is caused by related bug.

I tried to force the error by stressing the database with inserts/reads during mysqloptimize, but I was unable to get it crashed at the moment. But it happens sometimes at night (when the cron job runs).
The script which consists of
mysqlcheck -s -A
mysqloptimize -s -A
mysqlanalyze -s -A

is running for years without any problem. The problem first occured after update from MariaDB 5.5 to 10.0.19.
If this is relevant: all tables have Aria engine.

I still expect some racing condition - as a "user" I'm not familiar when a table is marked "crashed" - but there must be some condition when some lock, or gathering the lock interfears with this state after lock is removed.

Environment

Linux

Assignee

Sergey Vojtovich

Reporter

Marc

Labels

None

Components

Sprint

None

Fix versions

Affects versions

Priority

Critical
Configure