Bug #16369

Segfault : crashed on child side of fork pre-exec thread_pool.rb

Added by j15e (Jean-Philippe Doyle) 8 months ago. Updated about 1 month ago.

Third Party's Issue
Target version:
ruby -v:
ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-darwin18]


It occurs at random in development on my rails 6 app with puma server, so unfortunately I do not have very reproducible steps.

Maybe someone with more knowledge of ruby crash reports could suggest some hints?


console.txt (467 KB) console.txt j15e (Jean-Philippe Doyle), 11/26/2019 12:48 AM
ruby_2019-11-25-193430_jpdoyle-mbp-636.crash (113 KB) ruby_2019-11-25-193430_jpdoyle-mbp-636.crash j15e (Jean-Philippe Doyle), 11/26/2019 12:49 AM

Updated by j15e (Jean-Philippe Doyle) 8 months ago

After a bit more research, I think this might be the same issue as so feel free to close if that is the case

Updated by jeremyevans0 (Jeremy Evans) about 1 month ago

  • Status changed from Open to Third Party's Issue

This crashes inside the pg gem: My guess is you are not disconnecting before forking and you end up sharing connections between processes, which can easily cause segfaults. Always disconnect database connections before forking if using a forking webserver.

If you can reproduce the example with just the pg gem and without forking, you should try reporting the issue to the pg gem maintainers:

Also available in: Atom PDF