byebug: Thread hanging when used with Capybara.
When using pry-byebug to try to debug some feature tests, I’ve run into what I believe is a deadlock. Whenever I try to use Capybara’s finder API my thread hangs indefinitely. I saw this deivid-rodriguez/pry-byebug#69 and tried removing pry-byebug to no avail. I did some digging and it looks to be with byebug itself. As per your request from the referenced thread, I’m creating this new issue in the byebug repo.
System Details
ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-darwin14] rbenv 0.4.0 OSX Yosemite 10.10.5
Tested Versions
This issue sprung up somewhat recently (within the last month or so), but I’ve just worked around it. In light of this, I tried running byebug versions 7.0.0 up through the latest on master but the issue remained the same.
Reproduction
I’ve created a sample application with a minimal reproduction: https://github.com/donald-s/byebug_bug.
- Clone the repo
- Install Qt 5 (if you don’t already have it) for capybara-webkit
- Run
bundle install - Run
rspec spec/features/home_spec.rband watch it pass (ensuring no issues with Capybara) - Finally, uncomment
byebug, run the test again with the above command, and runpage.find('h1')when the debugger opens.
Expected Behavior
Capybara returns an object or raises an error.
Observed Behavior
Thread running byebug hangs indefinitely.
I removed byebug and pry-byebug from the repo I originally discovered this in and things work as expected.
About this issue
- Original URL
- State: open
- Created 9 years ago
- Reactions: 6
- Comments: 39 (15 by maintainers)
Commits related to this issue
- Include pry and byebug, but not pry-byebug Previously we were using pry-byebug ~> 1.0 to avoid behaviour of newer byebug versions which locks all threads when the debugger is entered. This made debug... — committed to jhawthorn/solidus by jhawthorn 8 years ago
- Include pry and byebug, but not pry-byebug Previously we were using pry-byebug ~> 1.0 to avoid behaviour of newer byebug versions which locks all threads when the debugger is entered. This made debug... — committed to jhawthorn/solidus by jhawthorn 8 years ago
- Include pry and byebug, but not pry-byebug Previously we were using pry-byebug ~> 1.0 to avoid behaviour of newer byebug versions which locks all threads when the debugger is entered. This made debug... — committed to peterberkenbosch/solidus by jhawthorn 8 years ago
- Include pry and byebug, but not pry-byebug Previously we were using pry-byebug ~> 1.0 to avoid behaviour of newer byebug versions which locks all threads when the debugger is entered. This made debug... — committed to TommyJohnWear/solidus by jhawthorn 8 years ago
Hi Deivid, sorry for the delay in getting to this. I’ve been swamped. It may be a couple of more weeks before I’m able to get to it. I’d still love to take a crack at it if that works.
Just wanted to thank @donald-s for all the research and effort put in here. ❤️ 💛 💜
Yes. I’m trying to figure out where a good spot to start looking in byebug would be. Any ideas?