oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
74.18k stars 2.77k forks source link

running bun server in pm2 now crashes: ENXIO: No such device or address, SIGHUP #4327

Open CodeFromAnywhere opened 1 year ago

CodeFromAnywhere commented 1 year ago

What version of Bun is running?

0.8.1

What platform is your computer?

Linux 5.15.0-79-generic x86_64 x86_64

What steps can reproduce the bug?

What is the expected behavior?

pm2 works

What do you see instead?

it crashes (see screenshot)

Screenshot 2023-08-25 at 15 12 27

Additional information

I don't know how to make it easy to reproduce, as this is my entire server. But maybe it also happens on a smaller server? Anyway, the server worked fine before on bun 0.7.3

CodeFromAnywhere commented 1 year ago

Can confirm that it runs on 0.7.3 so it's a regression happening in 0.8.1

PS: also got some weird looking errors related to https://www.npmjs.com/package/@swc/core (binding errors) and also a (maybe unrelated) SIGSEGV error. As a temporary solution I have downgraded bun back to 0.7.3 in production, using curl -fsSL https://bun.sh/install | bash -s -- bun-v0.7.3.

bnussman commented 1 year ago

I am experiencing this when running my server with concurrently.

Edit: I actually was able to bypass this issue by running concurrently with bun by doing bun --bun concurrently

CodeFromAnywhere commented 1 year ago

Not sure if 0.8.1 changed in the meantime (I've downgraded to 0.7.3 and upgraded again just now) but now I'm getting error: script "start" exited with code 11 (SIGSEGV) without changing anything.

The curious thing is:

Conclusion: Still have no idea how to fix and thus I'm stuck at 0.7.3

Jarred-Sumner commented 1 year ago

We will fix this in Bun v0.8.2

In the meantime, make sure your linux distro has /dev/ mounted. On alpine, it might not be mounted by default

jakebailey commented 1 year ago

This is fixed by #4378, right?

jdgriffith commented 1 year ago

I'm still experiencing this issue on 1.0 and on a ubuntu box. Reverting to 7.3 gives me a stable runtime again though.

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.2 LTS"

Screenshot 2023-09-08 at 11 30 52 AM Screenshot 2023-09-08 at 11 31 40 AM