-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
miniflare segfaults during startup on Ubuntu 22.04 (jammy) #651
Comments
I was able to fix this by adding |
Hey! 👋 This is very concerning, cloudflare/workerd#793 and cloudflare/workerd#800 should mean you don't need to install |
hey @mrbbot, yes — I had exactly the same impression from reading those bugs. Our worker code is quite complex, so I can't share it, but I can provide some more context:
|
Hey! Thanks for the additional information. Unfortunately, I'm still unable to reproduce this issue with Something that may help identity the issue is running a debug build of $ docker run -it --rm --platform=linux/amd64 mcr.microsoft.com/playwright:v1.36.2-jammy /bin/bash
$ docker cp path/to/unzipped/workerd <container_id>:/home/pwuser/workerd To actually symbolize the stack traces, you'll need $ more llvm-symbolizer.sh
#!/bin/bash
cp /dev/stdin "stack-$RANDOM.txt"
$ chmod +x llvm-symbolizer.sh
$ export LLVM_SYMBOLIZER=$PWD/llvm-symbolizer.sh
# Reproduce issue
$ npx wrangler dev ... Then |
the plot thickens: i've just experienced this segfault with libc++1 being installed, and not in a docker container. I can repro this issue on a fresh install of Ubuntu 22.04, with even the most trivial worker script. It looks like it's a race condition; see below here is the symbolicated segfault:
|
ok, even more digging, with repro steps
#!/bin/bash
for i in {1..10}
do
LLVM_SYMBOLIZER=$(which llvm-symbolizer) wrangler dev --port=$((9100+i)) &
done
sleep 10s
num_alive=$(pgrep "workerd" | wc -l)
echo "num_alive: $num_alive"
pkill -f "node_modules"
name = ""
main = "./index.js"
compatibility_date = "2022-05-03"
export default {
fetch() {
return new Response('Hello worker!', {
headers: {
'content-type': 'text/plain',
},
});
},
}; If you run that on macOS, all 10 dev servers will successfully boot. If you run that on ubuntu 22.04, 1-9 of them will fail to boot. As a workaround, I'm running wrangler with
|
Hey! 👋 Apologies for the delayed follow-up, I've forwarded this to the runtime team. We also hit this error recently when trying to upgrade |
I'm observing signal 11: segmentation fault errors intermittently running
|
Fixes a race between initializing the InspectorService::isolates field on the inspector service thread and Server::InspectorServiceIsolateRegistrar::registerIsolate inserting an isolate into the InspectorSerivce::isolates field on a worker thread. This change ensures that the InspectorService instance is initialized before worker threads can start registering isolates. Test: manual check repro steps in cloudflare/miniflare#651 no longer cause crashes. Bug: #1075 Bug: cloudflare/miniflare#651 Bug: EW-7716
Fixes a race between initializing the InspectorService::isolates field on the inspector service thread and Server::InspectorServiceIsolateRegistrar::registerIsolate inserting an isolate into the InspectorSerivce::isolates field on a worker thread. This change ensures that the InspectorService instance is initialized before worker threads can start registering isolates. Test: manual check repro steps in cloudflare/miniflare#651 no longer repro. Bug: #1075 Bug: cloudflare/miniflare#651 Bug: EW-7716
Fixes a race between initializing the InspectorService::isolates field on the inspector service thread and Server::InspectorServiceIsolateRegistrar::registerIsolate inserting an isolate into the InspectorSerivce::isolates field on a worker thread. This change ensures that the InspectorService instance is initialized before worker threads can start registering isolates. Test: manual check repro steps in cloudflare/miniflare#651 no longer repro. Bug: #1075 Bug: cloudflare/miniflare#651 Bug: EW-7716
Fixes a race between initializing the InspectorService::isolates field on the inspector service thread and Server::InspectorServiceIsolateRegistrar::registerIsolate inserting an isolate into the InspectorSerivce::isolates field on a worker thread. This change ensures that the InspectorService instance is initialized before worker threads can start registering isolates. Test: manual check repro steps in cloudflare/miniflare#651 no longer repro. Bug: #1075 Bug: cloudflare/miniflare#651 Bug: EW-7716
Hey! 👋 The fix for this has now been released in |
Still getting similar error with
|
The text was updated successfully, but these errors were encountered: