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.

[BUG] BrokenPipe Crash

See original GitHub issue

Issue

Setup:

deno 1.6.3 (release, x86_64-unknown-linux-gnu) v8 8.8.294 typescript 4.1.3

  • Opine Version: 1.0.0

Uncaught BrokenPipe: Broken pipe (os error 32)

Details

Hello, it’s been a while since Opine crashed randomly with a system error, at the time it was on my mac, now on my windows and also on a linux server, the error returned is still the same:

error: Uncaught (in promise) BrokenPipe: Broken pipe (os error 32)
    at unwrapResponse (deno:runtime/js/10_dispatch_minimal.js:59:13)
    at sendAsync (deno:runtime/js/10_dispatch_minimal.js:98:12)
    at async write (deno:runtime/js/12_io.js:117:20)
    at async BufWriter.write (bufio.ts:499:29)
    at async writeResponse (_io.ts:273:15)
    at async Proxy.respond (server.ts:84:7)
    at async Response.end (response.ts:256:7)

Maybe you have to surround Opine with a try catch? The crash occurs with any code that uses opine, however I noticed that the more routes there are, the more often it happens

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
asos-craigmortencommented, Jul 23, 2021

Ah nice @Tc-001 that will be useful for repro + figuring out if fix. Can probably add a “racing server” like integration test similar to what the std/http module has for these kind of edge cases in real world apps.

1reaction
Tc-001commented, Jul 23, 2021

Thanks for the fast reply!

For future reference, I could reproduce it by

app.get("/",  function(req, res) {
  res.send("a ".repeat(9999999));
});

and spamming F5 in firefox. This cancels the previous load before re-requesting the page. There is probably a better way, but this worked in a pinch.

Read more comments on GitHub >

github_iconTop Results From Across the Web

55422 - Chromium crashes with broken pipe - Monorail
Issue 55422: Chromium crashes with broken pipe. Reported by schedule antho. ... It does look like it's fixed, if it was the geolocation...
Read more >
[Bug] Broken Pipe error while changing worlds #353 - GitHub
SkyblockAddons gives a broken pipe error while changing worlds within skyblock. This doesn't appear to be an issue in any other gamemode ...
Read more >
1205203 - firefox SIGPIPE broken pipe crash - Bugzilla@Mozilla
It seems the version of Firefox built by Mozilla (the official binary) works better, and I haven't gotten crashes with the stock version...
Read more >
Error 32 (Broken pipe) dispatching to Wayland display.
Description of problem: When I run GnuCash, and go to Tools | Import Map Editor, GnuCash exits with errors displayed like: Gdk-Message: 23:29:42.004:...
Read more >
What causes the Broken Pipe Error? - Stack Overflow
With a big write, you are bigger than the MTU and the system spots the problem quicker. If you ignore the SIGPIPE signal,...
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