Bug 989574 - rubygems-2.0.5-100.fc19 breaks my Rails application
rubygems-2.0.5-100.fc19 breaks my Rails application
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: rubygems (Show other bugs)
19
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Jeroen van Meeuwen
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-29 10:46 EDT by Miloslav Trmač
Modified: 2013-11-10 02:05 EST (History)
5 users (show)

See Also:
Fixed In Version: rubygems-2.0.12-110.fc19
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-26 23:59:03 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
pstack output (4.23 KB, text/plain)
2013-07-29 10:46 EDT, Miloslav Trmač
no flags Details
Ruby backtrace (2.45 KB, patch)
2013-07-30 14:11 EDT, Miloslav Trmač
no flags Details | Diff

  None (edit)
Description Miloslav Trmač 2013-07-29 10:46:07 EDT
Created attachment 779959 [details]
pstack output

Description of problem:
After updating to rubygems-2.0.5-100.fc19 , my Rails application hangs on processing the first request / doesn't respond in a reasonable time.

This is fully reproducible, donwgrade back to rubygems-2.0.3-14.fc19 resolves the problem.


Attached is a basic backtrace of the hanging rails process; I suppose this isn't too useful, I'd be happy to supply any additional information you may need.
Comment 1 Mamoru TASAKA 2013-07-29 20:36:13 EDT
At least unless we can get how to reproduce your issue, we cannot resolve it...
Comment 2 Miloslav Trmač 2013-07-30 14:11:18 EDT
Created attachment 780789 [details]
Ruby backtrace

(In reply to Mamoru TASAKA from comment #1)
> At least unless we can get how to reproduce your issue, we cannot resolve
> it...

I was hoping to avoid having you set up a postgresql database...

I've failed in a quick attempt to create a fresh reproducer has failed (in that it's not obvious how to get (rails new foo --skip-bundle) to produce something that runs, so far I've managed to only get execjs complaining about a missing JS backend).


FWIW, here is a Ruby backtrace based on http://www.mikeperham.com/2012/06/02/debugging-with-thread-dumps/ .

This indicates that the difference is /usr/share/rubygems/rubygems/core_ext/kernel_require.rb introducing Kernel.ACTIVATION_MONITOR.

Namely, _all of Rails runs within a (rubygems) Kernel.require_, i.e. with Kernel.ACTIVATION_MONITOR held by the initial thread (TID-40uis).  Then, when a request arrives, webrick creates another thread (TID-exbac), which attempts to call Kernel.require from another thread, and that blocks on Kernel.ACTIVATION_MONITOR.

I don't know enough to say which of the two components is being unreasonable.
Comment 3 Vít Ondruch 2013-09-03 08:40:09 EDT
I wouldn't be surprised if that is caused by [1]. I met this issue with shindo [2]. Not sure what can trigger the issue on your side, though. May be your Gemfile may help to identify the offender. Or you might want to try different web server, such as thin or passenger.


[1] https://github.com/rubygems/rubygems/commit/c721203e30963daea81f3267ca8492acf2165483
[2] https://github.com/geemus/shindo/issues/12
Comment 4 Miloslav Trmač 2013-09-03 10:09:34 EDT
(In reply to Vít Ondruch from comment #3)
> I wouldn't be surprised if that is caused by [1].

Yes, that seems to be the lock I described above.

(I still don't have a simple reproducer I'm afraid, due to #1003920.)
Comment 5 Vít Ondruch 2013-10-14 03:47:50 EDT
It seems to be resolved upstream [1, 2]. Unfortunately not in 2.0 branch yet :/


[1] https://github.com/rubygems/rubygems/issues/640
[2] https://github.com/rubygems/rubygems/commit/16fc8e8b90830644cf5eed6b71c7ec2dac4ec5fc
Comment 6 Miloslav Trmač 2013-10-14 07:45:15 EDT
(In reply to Vít Ondruch from comment #5)
> It seems to be resolved upstream [1, 2].

Thanks for watching this issue, I really appreciate it.

(In the meantime, (yum downgrade) is a reasonable workaround in my situation, at least for F19 where there is something readily available to downgrade to, so this is not an urgent issue for me.)
Comment 7 Mamoru TASAKA 2013-10-15 04:57:27 EDT
Would you try if the following works?

http://koji.fedoraproject.org/scratch/mtasaka/task_6061347/
Comment 8 Mamoru TASAKA 2013-10-15 04:58:43 EDT
(In reply to Mamoru TASAKA from comment #7)
> Would you try if the following works?
> 
> http://koji.fedoraproject.org/scratch/mtasaka/task_6061347/

Note that at least for fog-1.15.0 test case with shindo 0.3.6 (not 0.3.8),
the issue seems unreproducible with the above.
Comment 9 Miloslav Trmač 2013-10-15 13:33:50 EDT
(In reply to Mamoru TASAKA from comment #7)
> Would you try if the following works?
> 
> http://koji.fedoraproject.org/scratch/mtasaka/task_6061347/

Yes, that works correctly.
Comment 10 Mamoru TASAKA 2013-10-15 22:13:52 EDT
(In reply to Miloslav Trmač from comment #9)
> (In reply to Mamoru TASAKA from comment #7)
> > Would you try if the following works?
> > 
> > http://koji.fedoraproject.org/scratch/mtasaka/task_6061347/
> 
> Yes, that works correctly.

Thank you for confirming.
Comment 11 Fedora Update System 2013-10-15 23:13:59 EDT
rubygems-2.0.12-110.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/rubygems-2.0.12-110.fc20
Comment 12 Fedora Update System 2013-10-15 23:14:30 EDT
rubygems-2.0.12-110.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/rubygems-2.0.12-110.fc19
Comment 13 Fedora Update System 2013-10-18 15:37:53 EDT
Package rubygems-2.0.12-110.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing rubygems-2.0.12-110.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-19264/rubygems-2.0.12-110.fc19
then log in and leave karma (feedback).
Comment 14 Fedora Update System 2013-10-26 09:57:02 EDT
rubygems-2.1.9-111.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/FEDORA-2013-19623/rubygems-2.1.9-111.fc20
Comment 15 Fedora Update System 2013-10-26 09:57:10 EDT
rubygems-2.1.9-111.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/FEDORA-2013-19623/rubygems-2.1.9-111.fc20
Comment 16 Fedora Update System 2013-10-26 23:59:03 EDT
rubygems-2.0.12-110.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 17 Fedora Update System 2013-10-27 01:37:45 EDT
rubygems-2.0.12-110.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 18 Fedora Update System 2013-11-10 02:05:31 EST
rubygems-2.1.9-111.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.