Infinite loop
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 1.9k
- Forks
- 113
- PR merge metrics
- No merged PRs in 30d
Description
A Rails app I'm working on occasionally hangs, with the process becoming unresponsive and having to be killed.
We've also seen the same issue within the rails console and command-line scripts. In these cases a Ctrl-C causes the execution to either continue or end. But within the rails app we have to kill the process. We've removed some exception logging which was triggering the issue.
Using gdb and some manual testing, I've managed to identify that the issue is triggered whenever there is a NoMethodError generated by a call to an object and we are logging the exception message.
The gdb stack trace showed that a thread seems to be repeatedly calling methods in Correctable. When I remove the call to super.dup in to_s, to supply a hard-coded value instead, the issue went away.
We're currently on ruby-2.6.5 and Did You Mean 1.3.0.
I've tried upgrading to Did You Mean 1.5.0 but this doesn't seem to fix the issue. I also hit build/bundler issues similar to these which I've not been able to fully resolve.
We're looking to upgrade to newer ruby but I'm not sure if that will resolve the underlying problem as I gather its using version 1.5.0, but it might avoid the travis issues.
I've also been trying to disable the gem completely for the moment but setting RUBYOPT='--disable-did_you_mean' when running bundle exec rails s doesn't seem to work.
Any advice on other things I can try to either identify the cause or disable the gem?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the hang when a NoMethodError message is logged under Ruby 2.6.5 and Did You Mean 1.3.0. Inspect the Correctable call stack around to_s and the super.dup behavior described in the report. Done means identifying the recursion cause and confirming that exception logging no longer hangs the process.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100