gfuji / cpan.org wrote:
> The very line that the issue raised is here: https://github.com/ruby/ruby/blob/v2_4_2/thread_pthread.c#L260

OK, that means a pthread_mutex is held while destroy is
happening.  Unfortunately we can't look at the Sidekiq-pro
source code...

If there's many Mutex objects being destroyed and you can try
Ruby 2.5, that might fix the problem because I reimplemented the
Ruby Mutex class to not rely on native mutexes at all.

Otherwise, there's th->interrupt_lock which might get destroyed
when the thread dies.

Can you get a core dump and see if it's th->interrupt_lock or
something else being destroyed while locked?

Do you get this during normal running or during shutdown?

Are there a lot of signals hitting the process when this happens?

> /usr/local/rbenv/versions/2.4.2/bin/ruby(thread_start_func_2+0x98d) [0x558eb74a0e9d] thread_pthread.c:260
> /usr/local/rbenv/versions/2.4.2/bin/ruby(thread_start_func_1+0xd0) [0x558eb74a0fd0] thread_pthread.c:887
> /lib/x86_64-linux-gnu/libpthread.so.0(start_thread+0xca) [0x7f9c1bf536ba]

Not enough info there about what's getting destroyed, unfortunately...

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>