question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Reproducible hang in busboy

See original GitHub issue

I’ve been investigating an occasional hang in our application, and tracked it down to what appears to be a busboy issue. There is a test case (client and server) in this repository. See the README in that repository for instructions and some discussion. A couple of key points from there:

  • The problem only seems to occur when using the .pipe() method of the file object. Listening for data and end events works as expected, without hanging.
  • It seems to depend on how the request is split across TCP/IP packets. Sending the terminator string in the same chunk as the final field also makes it work without hanging.

Issues of this sort seem to have been reported before (e.g. #116, mscdex/connect-busboy#15; probably others) without any resolution being reached. I hope having a simple test case will make it easier to find the root cause.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
mscdexcommented, Jan 9, 2019

Thanks for repro repo! I ended up at the same conclusion as you, however I made the fix in a slightly different place because a file.push(null) may not translate to 'end' being emitted immediately if the file stream is paused IIRC, so it may not be safe to resume parsing until we see 'end'.

1reaction
jaydensericcommented, Jan 9, 2019

@mscdex thanks for the quick fix, graphql-upload consumers had noticed this subtle issue but we couldn’t pin it down at the time.

But why is this release semver v0.3.0 instead of v0.2.15?

And could you please release v1.0.0. Consumers won’t get fixes like this without every library author manually changing their busboy v0.x dependency and publishing a new release:

screen shot 2019-01-10 at 10 32 46 am
Read more comments on GitHub >

github_iconTop Results From Across the Web

node.js - Busboy hangs (in express.js) - Stack Overflow
Ok, I found the reason why it hanged. I mistekaly forgot close the connection, below lines: busboy.on('finish', function() { res.
Read more >
Diagnostic Test - Innovative Food Safety Solutions
Reproducible for instructional use only. Not for individual sale. page 1 of 17. Practice Tests and Answer Keys. Diagnostic Test.
Read more >
Jupyter cells hang on execution. : r/vscode - Reddit
Hi, I'm having a weird problem where execution of Python code cells in the Jupyter notebook hangs constantly (maybe every second attempt ...
Read more >
Nature, woman and lyrical ambiguity in Shen Congwen's writing ...
While nature connotes the cosmic and the universal, "[TEXT NOT REPRODUCIBLE IN ASCII]" (pattern, literature) is regarded as "born together with Heaven and...
Read more >
Under Siege 2: Dark Territory (1995) - Quotes - IMDb
Get what I'm trying to say to you here bus boy? ... [a mercenary bungees from the train to Ryback, hanging on a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found