Skip to content
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

SIGSEGV with watchman #1419

Open
jack-beanstalk-2022 opened this issue Dec 24, 2024 · 2 comments
Open

SIGSEGV with watchman #1419

jack-beanstalk-2022 opened this issue Dec 24, 2024 · 2 comments

Comments

@jack-beanstalk-2022
Copy link

I am using Metro with watchman 2024.12.02.00, I got

  Metro:FileMap Error: Command failed: watchman list-capabilities --output-encoding=json --no-spawn
  Metro:FileMap *** Aborted at 1735069258 (Unix time, try 'date -d @1735069258') ***
  Metro:FileMap *** Signal 11 (SIGSEGV) (0x0) received by PID 90 (pthread TID 0x7ffffcb8f4c0) (linux TID 90) (code: address not mapped to object), stack trace: ***
  Metro:FileMap (error retrieving stack trace)
  Metro:FileMap
  Metro:FileMap     at genericNodeError (node:internal/errors:983:15)
  Metro:FileMap     at wrappedFn (node:internal/errors:537:14)
  Metro:FileMap     at ChildProcess.exithandler (node:child_process:414:12)
  Metro:FileMap     at ChildProcess.emit (node:events:513:28)
  Metro:FileMap     at maybeClose (node:internal/child_process:1101:16)
  Metro:FileMap     at Socket.<anonymous> (node:internal/child_process:457:11)
  Metro:FileMap     at Socket.emit (node:events:513:28)
  Metro:FileMap     at Pipe.<anonymous> (node:net:351:12) +117ms

The problem is the "--no-spawn" option, I got segmentation fault on a terminal when I do

watchman shutdown-server
watchman list-capabilities --no-spawn
zsh: segmentation fault  watchman list-capabilities --no-spawn

Code pointer:

'--no-spawn', // The client can answer this, so don't spawn a server

Question: is this due to my watchman version? Or should this --no-spawn option be removed?

@robhogan
Copy link
Contributor

robhogan commented Dec 24, 2024

Huh, interesting! --no-spawn is a documented Watchman option that prevents it starting a server just because we've asked it what capabilities it supports. It wouldn't break things to remove it, but it'd mean Watchman starts unnecessarily in rare cases.

This looks like a watchman bug. What's your platform and how did you install watchman?

@jack-beanstalk-2022
Copy link
Author

The first error log is from a ubuntu container running on the cloud
The terminal error is from macOS

watchman version 2024.12.02.00 installed by home-brew

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants