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

Segmentation fault: 11 with ruff 0.2.0 #9823

Closed
jetli opened this issue Feb 5, 2024 · 12 comments · Fixed by #9834
Closed

Segmentation fault: 11 with ruff 0.2.0 #9823

jetli opened this issue Feb 5, 2024 · 12 comments · Fixed by #9834
Labels
bug Something isn't working cli Related to the command-line interface

Comments

@jetli
Copy link

jetli commented Feb 5, 2024

when run ruff 0.2.0, it always return an error msg: Segmentation fault: 11, but ruff 0.1.15 is ok.

$ ruff --version
Segmentation fault: 11

OS: macOS 11.7.10
python: 3.8.9 in virtual env

@qarmin
Copy link

qarmin commented Feb 5, 2024

Can you run it under gdb?

gdb ruff
run --version
bt

@MichaReiser
Copy link
Member

@jetli, what shell are you using? Is it ZSH? #9824

@charliermarsh
Copy link
Member

How strange. Does running with --no-cache change anything? (I assume not, but worth a try.)

@jetli
Copy link
Author

jetli commented Feb 5, 2024

not zsh, just bash. it crashes even with no options.

$ ruff
Segmentation fault: 11

installation log:

Collecting ruff
  Using cached ruff-0.2.0-py3-none-macosx_10_12_x86_64.whl (7.3 MB)
Installing collected packages: ruff
  Attempting uninstall: ruff
    Found existing installation: ruff 0.1.15
    Uninstalling ruff-0.1.15:
      Successfully uninstalled ruff-0.1.15
Successfully installed ruff-0.2.0

@charliermarsh
Copy link
Member

Do you know what version of macOS you’re on? Perhaps this is related to our upgrade to use the Apple Silicon runners.

@charliermarsh
Copy link
Member

Oh sorry, you said macOS 11 above. I’m guessing there’s something incompatible there.

@zanieb
Copy link
Member

zanieb commented Feb 5, 2024

Could you share the output of the uname -a command?

@Gankra
Copy link

Gankra commented Feb 5, 2024

I can reproduce this on my old EOL x64 macbook (macos 11 has been eol for 4 months, but i think this issue can plausibly manifest on 12/13).

The crash stack includes lots of things like ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) which is a pretty clear sign the crash is during the dynamic linking of the executable on load. This is probably a symptom of binaries compiled against the macos 14 sdk (the default for github's new apple silicon runners) being run on an older OS.

@charliermarsh
Copy link
Member

@Gankra - Do you think this is an issue for ARM macbooks on macos 11, 12, 13? Or just x86? Or can't say at this point?

@Gankra
Copy link

Gankra commented Feb 5, 2024

I would expect the issue to happen equally on both platforms, with OS version being the primary issue -- but that's purely a guess, and the only thing I can think to do is to find people with macbooks running those versions to try (I guess you could write some github CI jobs to spawn some of those OSes and try to run the binary?).

I can send you the full crash log but it doesn't obviously indicate what symbol was trying to be loaded (only skimmed it).

@MichaReiser MichaReiser added bug Something isn't working cli Related to the command-line interface labels Feb 5, 2024
@charliermarsh
Copy link
Member

@Gankra - FYI, it looks like these binaries work okay on macOS 12 and macOS 13: #9835

@charliermarsh
Copy link
Member

Now I'm more tempted not to change this given that macOS 11 is EOL :(

charliermarsh added a commit that referenced this issue Feb 5, 2024
## Summary

Sadly, the Apple Silicon runners use macOS 14 and produce binaries that
segfault when run on macOS 11 (at least), and possibly on macOS 12
and/or macOS 13.

macOS 11 is EOL, but it doesn't seem like a good tradeoff to speed up
our release builds at the expense of user support and compatibility.

This reverts commit f0066e1.

Closes #9823.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cli Related to the command-line interface
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants