Net/HTTP EINVAL error after twitter auth redirect

Hello

This error has just appeared out of nowhere, and it appears to occur
during a newrelic call while authenticating against Twitter (devise,
omniauth). Up until now this has worked without problems. Disabling
new_relic makes the problem go away AFAICT.

See log below, full version in attachment.

Main setup: MacOS X 10.6.8, Ruby 1.9.3-p362, Rails 3.2.8, Unicorn 4.5.0,
Ngnix 1.2.6

Not sure what else to mention, please advise.

Thanks,
Michel

==========

/Users/deployer/.rbenv/versions/1.9.3-p362/lib/ruby/1.9.1/net/http.rb:761:
[BUG] pthread_cond_wait: Invalid argument (EINVAL)
ruby 1.9.3p362 (2012-12-25 revision 38607) [i386-darwin10.8.0]

– Control frame information

c:0035 p:---- s:0164 b:0164 l:000163 d:000163 CFUNC :initialize
c:0034 p:---- s:0162 b:0162 l:000161 d:000161 CFUNC :open
c:0033 p:0029 s:0157 b:0157 l:000f78 d:000156 BLOCK
/Users/deployer/.rbenv/versions/1.9.3-p362/lib/ruby/1.9.1/net/http.rb:762
c:0032 p:0031 s:0155 b:0155 l:000154 d:000154 METHOD
/Users/deployer/.rbenv/versions/1.9.3-p362/lib/ruby/1.9.1/timeout.rb:54
c:0031 p:0026 s:0143 b:0143 l:000142 d:000142 METHOD
/Users/deployer/.rbenv/versions/1.9.3-p362/lib/ruby/1.9.1/timeout.rb:99
c:0030 p:0038 s:0137 b:0137 l:000f78 d:000f78 METHOD
/Users/deployer/.rbenv/versions/1.9.3-p362/lib/ruby/1.9.1/net/http.rb:762
c:0029 p:0011 s:0129 b:0129 l:000128 d:000128 METHOD
/Users/deployer/.rbenv/versions/1.9.3-p362/lib/ruby/1.9.1/net/http.rb:755
c:0028 p:0048 s:0126 b:0126 l:000125 d:000125 METHOD
/Users/deployer/.rbenv/versions/1.9.3-p362/lib/ruby/1.9.1/net/http.rb:744
c:0027 p:0025 s:0123 b:0123 l:000122 d:000122 METHOD
/Users/deployer/.rbenv/versions/1.9.3-p362/lib/ruby/1.9.1/net/http.rb:1284
c:0026 p:0015 s:0116 b:0116 l:000104 d:000115 BLOCK
/deployed/site_1/shared/bundle/ruby/1.9.1/gems/newrelic_rpm-3.5.6.46/lib/new_relic/agent/instrumentation/net
c:0025 p:0024 s:0114 b:0114 l:000113 d:000113 METHOD
/deployed/site_1/shared/bundle/ruby/1.9.1/gems/newrelic_rpm-3.5.6.46/lib/new_relic/agent/method_tracer.rb:23
c:0024 p:0103 s:0105 b:0105 l:000104 d:000104 METHOD
/deployed/site_1/shared/bundle/ruby/1.9.1/gems/newrelic_rpm-3.5.6.46/lib/new_relic/agent/instrumentation/net
c:0023 p:0014 s:0099 b:0099 l:002238 d:000098 BLOCK
/deployed/site_1/shared/bundle/ruby/1.9.1/gems/newrelic_rpm-3.5.6.46/lib/new_relic/agent/new_relic_service.r
c:0022 p:0111 s:0097 b:0097 l:000b58 d:000b58 METHOD
/Users/deployer/.rbenv/versions/1.9.3-p362/lib/ruby/1.9.1/timeout.rb:68
c:0021 p:0207 s:0085 b:0085 l:002238 d:002238 METHOD
/deployed/site_1/shared/bundle/ruby/1.9.1/gems/newrelic_rpm-3.5.6.46/lib/new_relic/agent/new_relic_service.r
c:0020 p:0134 s:0077 b:0077 l:000076 d:000076 METHOD
/deployed/site_1/shared/bundle/ruby/1.9.1/gems/newrelic_rpm-3.5.6.46/lib/new_relic/agent/new_relic_service.r
c:0019 p:0018 s:0065 b:0065 l:000064 d:000064 METHOD
/deployed/site_1/shared/bundle/ruby/1.9.1/gems/newrelic_rpm-3.5.6.46/lib/new_relic/agent/new_relic_service.r
c:0018 p:0229 s:0061 b:0061 l:000060 d:000060 METHOD
/deployed/site_1/shared/bundle/ruby/1.9.1/gems/newrelic_rpm-3.5.6.46/lib/new_relic/agent/agent.rb:948
c:0017 p:0071 s:0054 b:0054 l:000053 d:000053 METHOD
/deployed/site_1/shared/bundle/ruby/1.9.1/gems/newrelic_rpm-3.5.6.46/lib/new_relic/agent/agent.rb:1014
c:0016 p:0009 s:0047 b:0047 l:001ed4 d:000046 BLOCK
/deployed/site_1/shared/bundle/ruby/1.9.1/gems/newrelic_rpm-3.5.6.46/lib/new_relic/agent/agent.rb:514
c:0015 p:---- s:0045 b:0045 l:000044 d:000044 FINISH
c:0014 p:---- s:0043 b:0043 l:000042 d:000042 CFUNC :call
c:0013 p:0011 s:0040 b:0040 l:000034 d:000039 BLOCK
/deployed/site_1/shared/bundle/ruby/1.9.1/gems/newrelic_rpm-3.5.6.46/lib/new_relic/agent/worker_loop.rb:70
c:0012 p:0019 s:0038 b:0038 l:000037 d:000037 METHOD
internal:prelude:10
c:0011 p:0019 s:0035 b:0035 l:000034 d:000034 METHOD
/deployed/site_1/shared/bundle/ruby/1.9.1/gems/newrelic_rpm-3.5.6.46/lib/new_relic/agent/worker_loop.rb:69
c:0010 p:0172 s:0030 b:0030 l:000029 d:000029 METHOD
/deployed/site_1/shared/bundle/ruby/1.9.1/gems/newrelic_rpm-3.5.6.46/lib/new_relic/agent/worker_loop.rb:40
c:0009 p:0048 s:0024 b:0024 l:001ed4 d:001ed4 METHOD
/deployed/site_1/shared/bundle/ruby/1.9.1/gems/newrelic_rpm-3.5.6.46/lib/new_relic/agent/agent.rb:513
c:0008 p:0043 s:0021 b:0021 l:000009 d:000020 BLOCK
/deployed/site_1/shared/bundle/ruby/1.9.1/gems/newrelic_rpm-3.5.6.46/lib/new_relic/agent/agent.rb:586
c:0007 p:0025 s:0019 b:0019 l:000018 d:000018 METHOD
/deployed/site_1/shared/bundle/ruby/1.9.1/gems/newrelic_rpm-3.5.6.46/lib/new_relic/agent.rb:300
c:0006 p:0017 s:0016 b:0016 l:000009 d:000015 BLOCK
/deployed/site_1/shared/bundle/ruby/1.9.1/gems/newrelic_rpm-3.5.6.46/lib/new_relic/agent/agent.rb:578
c:0005 p:0007 s:0014 b:0014 l:000013 d:000013 METHOD
/deployed/site_1/shared/bundle/ruby/1.9.1/gems/newrelic_rpm-3.5.6.46/lib/new_relic/agent/agent.rb:556
c:0004 p:0011 s:0010 b:0010 l:000009 d:000009 METHOD
/deployed/site_1/shared/bundle/ruby/1.9.1/gems/newrelic_rpm-3.5.6.46/lib/new_relic/agent/agent.rb:577
c:0003 p:0012 s:0006 b:0006 l:001698 d:000005 BLOCK
/deployed/site_1/shared/bundle/ruby/1.9.1/gems/newrelic_rpm-3.5.6.46/lib/new_relic/agent/agent.rb:604
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:---- s:0002 b:0002 l:000001 d:000001 TOP

Hi Michel,

Since the problem only seems to exhibit itself with the New Relic
enabled,
I’d suggest filing a support ticket via support.newrelic.com. If you can
include your newrelic.yml file plus a debug log file (by setting
log_level
in newrelic.yml up to ‘debug’ temporarily and then reproducing the
issue),
that will likely cut down on the initial back-and-forth.

Also, you mention that ‘Up until now this has worked without problems’ -
do
you have any specifics about what changed when this stopped working
(e.g.
did you recently enable New Relic, or upgrade versions of the
newrelic_rpm
gem, or upgrade any other gems)?

Cheers,
Ben

Hello,

No I haven’t changed anything in the code wrt new relic, but it is
really hard to pinpoint any other changes since it happened during a
deploy to a staging environment after quite a bit of development.
Either way, this is not the first time I have encountered weird net/http
related problems surrounding the twitter auth callbacks, (like “no
server/node given” even when it clearly is), so I’m not 100% sure new
relic is the culprit.

I will see if it stabilizes now and then do some more experiments.

Thanks,
Michel

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs