MySQL Replication stuck at 'preparing'
I also had the same issue using Mariadb 10.4 master-slave replication. 
I was using the setting innodb_thread_concurrency in the config file with a non-zero value. I updated it to:

innodb_thread_concurrency = 0


And now it's working again.