InnoDB crash recovery starts recv_writer_thread to keep track of page flushing. As part of startup, recv_recovery_from_checkpoint_finish() would normally wait for this thread to exit, by waiting for !recv_writer_thread_active.
However, it is possible that on a busy system, recv_writer_thread will not get scheduled for execution before recv_recovery_from_checkpoint_finish() executes the test. In this case, recv_writer_thread() could start executing later than it should. Ultimately this could end in an assertion failure, as was observed on buildbot for the recently added test innodb.log_file:
A simple fix would be to initialize `recv_writer_thread_active=true` in the thread creator, similar to what was done in
MDEV-11638 some time ago.