Re: Random crash when sending USR2 + QUIT signals to Unicorn process

2017-10-03 Thread Xuanzhong Wei
Thanks for quick response! Here is the compiler version: gcc version 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC) Furthermore, although I was not able to re-produce the issue with codes caused the problem, I generated some core files of normal and abnormal masters and workers. Here is a glimpse of `ru

Re: Random crash when sending USR2 + QUIT signals to Unicorn process

2017-10-03 Thread Eric Wong
Xuanzhong Wei wrote: > We have the same issue here. > > IMHO, it is a bug introduced by 979ebcf91705709be5041a3be4514e5f1f6ec02c. > The `mark_ary` get GCed before we add it to the ruby's global_list > since we are doing memory allocations before calling rb_global_variable. > > A simple test can

Re: Random crash when sending USR2 + QUIT signals to Unicorn process

2017-10-03 Thread Xuanzhong Wei
We have the same issue here. IMHO, it is a bug introduced by 979ebcf91705709be5041a3be4514e5f1f6ec02c. The `mark_ary` get GCed before we add it to the ruby's global_list since we are doing memory allocations before calling rb_global_variable. A simple test can be found here: https://github.com/az

Re: Random crash when sending USR2 + QUIT signals to Unicorn process

2017-08-07 Thread Eric Wong
Jeremy Evans wrote: > On 07/24 01:25, Eric Wong wrote: > > Jeremy Evans wrote: > > > Running with GC.stress didn't catch the error for me. But I'm using a > > > fairly old compiler (GCC 4.2.1, the OpenBSD default), so this may be > > > something that only shows up on a newer compiler that does m

Re: Random crash when sending USR2 + QUIT signals to Unicorn process

2017-08-06 Thread Jeremy Evans
On 07/24 01:25, Eric Wong wrote: > Jeremy Evans wrote: > > Running with GC.stress didn't catch the error for me. But I'm using a > > fairly old compiler (GCC 4.2.1, the OpenBSD default), so this may be > > something that only shows up on a newer compiler that does more > > optimizations. > > Per

Re: Random crash when sending USR2 + QUIT signals to Unicorn process

2017-07-23 Thread Eric Wong
Jeremy Evans wrote: > Running with GC.stress didn't catch the error for me. But I'm using a > fairly old compiler (GCC 4.2.1, the OpenBSD default), so this may be > something that only shows up on a newer compiler that does more > optimizations. Pere: just curious if you've had a chance to test

Re: Random crash when sending USR2 + QUIT signals to Unicorn process

2017-07-17 Thread Jeremy Evans
On 07/15 12:56, Jeremy Evans wrote: > On 07/15 04:45, Eric Wong wrote: > > Jeremy Evans wrote: > > > All of Sequel's postgres adapter tests still pass with this, so I merged > > > this into the master branch. I'll do some more testing of my apps, but > > > unless I run into problems I plan to rel

Re: Random crash when sending USR2 + QUIT signals to Unicorn process

2017-07-15 Thread Jeremy Evans
On 07/15 04:45, Eric Wong wrote: > Jeremy Evans wrote: > > All of Sequel's postgres adapter tests still pass with this, so I merged > > this into the master branch. I'll do some more testing of my apps, but > > unless I run into problems I plan to release this as sequel_pg 1.7.1 > > early next we

Re: Random crash when sending USR2 + QUIT signals to Unicorn process

2017-07-14 Thread Eric Wong
Jeremy Evans wrote: > All of Sequel's postgres adapter tests still pass with this, so I merged > this into the master branch. I'll do some more testing of my apps, but > unless I run into problems I plan to release this as sequel_pg 1.7.1 > early next week. Thanks for the update. Btw, did you g

Re: Random crash when sending USR2 + QUIT signals to Unicorn process

2017-07-14 Thread Jeremy Evans
On 07/15 12:15, Eric Wong wrote: > Jeremy Evans wrote: > > Thanks for this patch. I'm not an RB_GC_GUARD expert, but the changes > > look fine to me. The existing RB_GC_GUARD calls were added by me in > > 2012 to fix an earlier segfault.[1] This is the first reported > > RB_GC_GUARD-related segfa

Re: Random crash when sending USR2 + QUIT signals to Unicorn process

2017-07-14 Thread Eric Wong
Jeremy Evans wrote: > Thanks for this patch. I'm not an RB_GC_GUARD expert, but the changes > look fine to me. The existing RB_GC_GUARD calls were added by me in > 2012 to fix an earlier segfault.[1] This is the first reported > RB_GC_GUARD-related segfault in sequel_pg since then. No worries; I

Re: Random crash when sending USR2 + QUIT signals to Unicorn process

2017-07-14 Thread Jeremy Evans
On 07/14 09:16, Eric Wong wrote: > Pere Joan Martorell wrote: > > I suspect that the conflicting gem was 'sequel_pg' (sequel_pg > > overwrites the inner loop of the Sequel postgres adapter row fetching > > code with a C version. The C version is significantly faster than the > > pure ruby version

Re: Random crash when sending USR2 + QUIT signals to Unicorn process

2017-07-14 Thread Eric Wong
Pere Joan Martorell wrote: > I suspect that the conflicting gem was 'sequel_pg' (sequel_pg > overwrites the inner loop of the Sequel postgres adapter row fetching > code with a C version. The C version is significantly faster than the > pure ruby version that Sequel uses by default), but given I d

Re: Random crash when sending USR2 + QUIT signals to Unicorn process

2017-07-14 Thread Pere Joan Martorell
2017-07-13 21:34 GMT+02:00 Eric Wong : > +Cc: Philip and Jonathan since they encountered this three years > ago, but we never heard back from them: > > https://bogomips.org/unicorn-public/?q=T_NODE+d:..20170713 > > > Pere Joan Martorell wrote: >> > /home/deployer/.rbenv/versions/2.4.1/lib

Re: Random crash when sending USR2 + QUIT signals to Unicorn process

2017-07-13 Thread Eric Wong
+Cc: Philip and Jonathan since they encountered this three years ago, but we never heard back from them: https://bogomips.org/unicorn-public/?q=T_NODE+d:..20170713 Pere Joan Martorell wrote: > > /home/deployer/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/unicorn-5.3.0/lib/unicorn/htt