From: merch-redmine@... Date: 2020-05-29T22:10:59+00:00 Subject: [ruby-core:98583] [Ruby master Bug#16369] Segfault : crashed on child side of fork pre-exec thread_pool.rb Issue #16369 has been updated by jeremyevans0 (Jeremy Evans). Status changed from Open to Third Party's Issue This crashes inside the pg gem: `https://github.com/ged/ruby-pg/blob/v1.1.4/ext/pg_connection.c#L3221-L3240`. 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: https://github.com/ged/ruby-pg/issues ---------------------------------------- Bug #16369: Segfault : crashed on child side of fork pre-exec thread_pool.rb https://bugs.ruby-lang.org/issues/16369#change-85896 * Author: j15e (Jean-Philippe Doyle) * Status: Third Party's Issue * Priority: Normal * ruby -v: ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-darwin18] * Backport: 2.5: UNKNOWN, 2.6: UNKNOWN ---------------------------------------- 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? ---Files-------------------------------- console.txt (467 KB) ruby_2019-11-25-193430_jpdoyle-mbp-636.crash (113 KB) -- https://bugs.ruby-lang.org/ Unsubscribe: