Multisite migrator is running using 2 processes
Running migrations and seeds for default database(s)
[mutex.cc : 2443] RAW: Check w->waitp->cond == nullptr failed: Mutex::Fer while waiting on Condition
rake aborted!
Parallel::DeadWorker: Parallel::DeadWorker (Parallel::DeadWorker)
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/parallel-1.27.0/lib/parallel.rb:83:in 'Parallel::Worker#work'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/parallel-1.27.0/lib/parallel.rb:545:in 'block (4 levels) in Parallel.work_in_processe
s'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/parallel-1.27.0/lib/parallel.rb:660:in 'Parallel.with_instrumentation'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/parallel-1.27.0/lib/parallel.rb:544:in 'block (3 levels) in Parallel.work_in_processe
s'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/parallel-1.27.0/lib/parallel.rb:532:in 'block (2 levels) in Parallel.work_in_processe
s'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/parallel-1.27.0/lib/parallel.rb:219:in 'block (4 levels) in Parallel.in_threads'
Caused by:
EOFError: end of file reached (EOFError)
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/parallel-1.27.0/lib/parallel.rb:81:in 'Parallel::Worker#work'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/parallel-1.27.0/lib/parallel.rb:545:in 'block (4 levels) in Parallel.work_in_processe
s'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/parallel-1.27.0/lib/parallel.rb:660:in 'Parallel.with_instrumentation'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/parallel-1.27.0/lib/parallel.rb:544:in 'block (3 levels) in Parallel.work_in_processe
s' /var/www/discourse/vendor/bundle/ruby/3.4.0/gems/parallel-1.27.0/lib/parallel.rb:532:in 'block (2 levels) in Parallel.work_in_processe
s'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/parallel-1.27.0/lib/parallel.rb:219:in 'block (4 levels) in Parallel.in_threads'
Tasks: TOP => multisite:migrate
(See full trace by running task with --trace)
Migration failed --> RC = 1
Are you running the official Discourse docker images? I just ran multisite:migrate on our own hosting and it ran without an issue. Any insights into the environment you ran the migration in will be helpful for me to debug this.
No, running our own environment, and I found the culprit.
We were running multiple rake tasks in the same command (RAILS_ENV=production bundle exec rake db:seed_fu multisite:migrate multisite:seed_fu).
The db:seed_fu was there to work around a 10-year-old bug. When I run it separately, the problem disappears. And thanks to your comment above, I now understand what was going on.