Skip to content
This repository has been archived by the owner on Mar 3, 2020. It is now read-only.

Crashing against current Master - Broken Pipe #777

Closed
nritholtz opened this issue May 15, 2015 · 22 comments
Closed

Crashing against current Master - Broken Pipe #777

nritholtz opened this issue May 15, 2015 · 22 comments
Assignees
Labels
Milestone

Comments

@nritholtz
Copy link
Contributor

Webkit Debug output of crashing tests when ran against lastest commit, 7bedbc0, in master. As you can tell, the tests are running against a remote server.

All system information is included in the Webkit Debug output.

@jferris
Copy link
Contributor

jferris commented May 15, 2015

It seems likely that we're trying to free an already-deleted reference.

@nritholtz does this reliably crash for you on master but reliably work on a previous commit? If so, is there any way you could pinpoint the commit? The commit you linked to simply updated a NEWS file, and it seems unlikely for that to be the culprit.

Narrowing it down to a more specific test case would also be very valuable.

@jferris jferris added this to the 1.6.0 milestone May 15, 2015
@nritholtz
Copy link
Contributor Author

I'll try to run it against previous versions, since it is failing consistently on a specific test.

Unfortunately, it will take a little while since this is a bump upgrade from 1.3.0.

I will let you know.

@nritholtz
Copy link
Contributor Author

@jferris f8f2048 is the offending commit
Works fine against previous commit, e49176b

Also, I'm working with proprietary code, otherwise I would've created this issue initially w a branch for a test scenario. Sorry about that.

@jferris
Copy link
Contributor

jferris commented May 15, 2015

Thanks. The commit that's causing issues is fortunately pretty small, so we may be able to debug with a few rounds.

I remember an earlier issue where the logger was causing issues because the URL string was somehow deleted. Based on that, I tried disabling just the logger change from that commit and pushed to a branch called jf-reset-crash.

Could you give that branch a shot?

@nritholtz
Copy link
Contributor Author

@jferris Just tried it against your new commit but unfortunately it crashed again.

@jferris
Copy link
Contributor

jferris commented May 15, 2015

@nritholtz hmm, okay. I pushed another commit with some debugging statements in the reset statement. Can you give that a shot? That will hopefully tell us where the crash is occurring.

@nritholtz
Copy link
Contributor Author

@jferris Tell me if you want the entire debug log, but here is what I think you want as the relevant log:

Received "Reset()"
Started "Reset()"
Beginning reset
Pending replies: 1
Aborting pending replies
    Portal User: auto1431657538
      end of file reached (EOFError)
      /home/qa/.rvm/gems/ruby-2.1.0@automated_testing/bundler/gems/capybara-webkit-9240ce857f8c/lib/capybara/webkit/connection.rb:55:in `read_nonblock'
      /home/qa/.rvm/gems/ruby-2.1.0@automated_testing/bundler/gems/capybara-webkit-9240ce857f8c/lib/capybara/webkit/connection.rb:55:in `read'
      /home/qa/.rvm/gems/ruby-2.1.0@automated_testing/bundler/gems/capybara-webkit-9240ce857f8c/lib/capybara/webkit/connection.rb:46:in `gets'
      /home/qa/.rvm/gems/ruby-2.1.0@automated_testing/bundler/gems/capybara-webkit-9240ce857f8c/lib/capybara/webkit/browser.rb:287:in `check'
      /home/qa/.rvm/gems/ruby-2.1.0@automated_testing/bundler/gems/capybara-webkit-9240ce857f8c/lib/capybara/webkit/browser.rb:210:in `command'
      /home/qa/.rvm/gems/ruby-2.1.0@automated_testing/bundler/gems/capybara-webkit-9240ce857f8c/lib/capybara/webkit/browser.rb:38:in `reset!'
      /home/qa/.rvm/gems/ruby-2.1.0@automated_testing/bundler/gems/capybara-webkit-9240ce857f8c/lib/capybara/webkit/driver.rb:254:in `reset!'
      /home/qa/.rvm/gems/ruby-2.1.0@automated_testing/gems/capybara-2.4.1/lib/capybara/session.rb:103:in `reset!'
      /home/qa/.rvm/gems/ruby-2.1.0@automated_testing/gems/capybara-2.4.1/lib/capybara.rb:257:in `block in reset_sessions!'
      /home/qa/.rvm/gems/ruby-2.1.0@automated_testing/gems/capybara-2.4.1/lib/capybara.rb:257:in `each'
      /home/qa/.rvm/gems/ruby-2.1.0@automated_testing/gems/capybara-2.4.1/lib/capybara.rb:257:in `reset_sessions!'
      /home/qa/.rvm/gems/ruby-2.1.0@automated_testing/gems/capybara-2.4.1/lib/capybara/cucumber.rb:8:in `After'

@jferris
Copy link
Contributor

jferris commented May 18, 2015

@nritholtz thanks. That confirms my suspicion. I'll see if I can replicate this locally and push up a fix later this week.

@jferris jferris self-assigned this May 18, 2015
@jferris jferris added the bug label May 18, 2015
@mhoran
Copy link
Collaborator

mhoran commented May 19, 2015

@jferris, perhaps it would make sense to listen to the destroyed() signal from the reply? Maybe some of these replies are getting aborted elsewhere, or not finishing for some reason -- and we have a stale reference?

@jferris
Copy link
Contributor

jferris commented May 19, 2015

Perhaps it would make sense to listen to the destroyed() signal from the reply?

That sounds like a good idea. It's definitely the abort call that's crashing it, so it must be that the replies are getting deleted without emitting finished.

@jwg2s
Copy link

jwg2s commented May 19, 2015

Is the recommended short-term solution here to downgrade to 1.5.0? Getting this on 1.5.1

@jferris
Copy link
Contributor

jferris commented May 19, 2015

@jwg2s that will probably work for you. The only change in 1.5.1 was a fix for a crash in 1.5.0, but it unfortunately introduced a new crash. Hopefully you won't hit the other crash on 1.5.0. I'll try to get a fix for this out sometime this week.

@jferris jferris modified the milestones: 1.5.2, 1.6.0 May 19, 2015
@jwg2s
Copy link

jwg2s commented May 19, 2015

Downgrading worked for us, will look for the next update and then upgrade again. Thanks for the help!

@jferris
Copy link
Contributor

jferris commented May 22, 2015

@nritholtz could you try the latest commit on that branch? I think I've managed to reproduce the crash.

@vkatz-ninthdecimal
Copy link

@jferris, we have had sporadic broken pipe issues in our tests for months now. i just tried your recent commit, and it looks like it may have fixed them!

@nritholtz
Copy link
Contributor Author

Tried it a few times and it looks good.

@vkatz-ninthdecimal
Copy link

Hrm, actually i was wrong. we are still getting broken pipe issues

@vkatz-ninthdecimal
Copy link

@jferris, should i open a new issue or add stuff here?

@jferris
Copy link
Contributor

jferris commented May 22, 2015

@vkatz-ninthdecimal if you could open a new issue, that would be great.

@nritholtz
Copy link
Contributor Author

Hey @jferris,

Any update on getting this into a release?

@jferris
Copy link
Contributor

jferris commented Jun 3, 2015

I was running into some issues on CI, and I haven't had a chance to address it. My next likely opportunity to work on this is Friday.

@jferris
Copy link
Contributor

jferris commented Jun 5, 2015

Fixed by #781. Will be released in 1.5.2.

@jferris jferris closed this as completed Jun 5, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants