Bug 989574 - rubygems-2.0.5-100.fc19 breaks my Rails application
Summary: rubygems-2.0.5-100.fc19 breaks my Rails application
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: rubygems
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Jeroen van Meeuwen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-29 14:46 UTC by Miloslav Trmač
Modified: 2013-11-10 07:05 UTC (History)
5 users (show)

Fixed In Version: rubygems-2.0.12-110.fc19
Clone Of:
Environment:
Last Closed: 2013-10-27 03:59:03 UTC
Type: Bug
Embargoed:


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

Description Miloslav Trmač 2013-07-29 14:46:07 UTC
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-30 00:36:13 UTC
At least unless we can get how to reproduce your issue, we cannot resolve it...

Comment 2 Miloslav Trmač 2013-07-30 18:11:18 UTC
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 12:40:09 UTC
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 14:09:34 UTC
(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 07:47:50 UTC
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 11:45:15 UTC
(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 08:57:27 UTC
Would you try if the following works?

http://koji.fedoraproject.org/scratch/mtasaka/task_6061347/

Comment 8 Mamoru TASAKA 2013-10-15 08:58:43 UTC
(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 17:33:50 UTC
(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-16 02:13:52 UTC
(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-16 03:13:59 UTC
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-16 03:14:30 UTC
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 19:37:53 UTC
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 13:57:02 UTC
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 13:57:10 UTC
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-27 03:59:03 UTC
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 05:37:45 UTC
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 07:05:31 UTC
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.