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

Segfault on macOS Sequoia, Julia 1.11.3, Python 3.12, JuliaCall 0.9.23 #591

Open
protogeezer opened this issue Jan 27, 2025 · 0 comments
Open
Labels
bug Something isn't working

Comments

@protogeezer
Copy link

protogeezer commented Jan 27, 2025

Affects: PythonCall

Describe the bug
Segfault after pyimport followed by a referenced to the imported module. Identical to #586 but on macOS.

Note: This bug is not present with Python 3.11. See additional context.

Please include the steps required to reproduce the bug. This should include not just code but all the steps required to reproduce the bug

julia> using PythonCall

julia> re = pyimport("re")
Python: <module 're' from '/opt/Anaconda3/lib/python3.12/re/__init__.py'>

julia> 

julia> re.
[11963] signal 11 (2): Segmentation fault: 11
in expression starting at none:0
_PyObject_LookupSpecial at /opt/anaconda3/bin/python3.12 (unknown line)
PyObject_Dir at /opt/anaconda3/bin/python3.12 (unknown line)
PyObject_Dir at /Users/sjbespa/.julia/packages/PythonCall/Nr75f/src/C/pointers.jl:303 [inlined]
macro expansion at /Users/sjbespa/.julia/packages/PythonCall/Nr75f/src/Core/Py.jl:132 [inlined]
pydir at /Users/sjbespa/.julia/packages/PythonCall/Nr75f/src/Core/builtins.jl:216
propertynames at /Users/sjbespa/.julia/packages/PythonCall/Nr75f/src/Core/Py.jl:293
unknown function (ip: 0x11ed2c397)
...

Your system
Please provide detailed information about your system:

  • The operating system
  • The version of Julia, Python, PythonCall, JuliaCall and any other affected packages
  • If an issue with PythonCall, the output of Base.versioninfo(), Pkg.status() and CondaPkg.status().
  • If an issue with JuliaCall, the output of pip list or conda list and juliapkg.status().
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.11.3 (2025-01-21)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> versioninfo()
Julia Version 1.11.3
Commit d63adeda50d (2025-01-21 19:42 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: macOS (arm64-apple-darwin24.0.0)
  CPU: 10 × Apple M1 Max
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, apple-m1)
Threads: 8 default, 0 interactive, 4 GC (on 8 virtual cores)
Environment:
  JULIA_NUM_THREADS = 8
  JULIA_CONDAPKG_BACKEND = Null
  JULIA_PYTHONCALL_EXE = /opt/Anaconda3/bin/python3
Status `~/.julia/environments/v1.11/Project.toml`
⌅ [5ae59095] Colors v0.12.11
  [8f4d0f93] Conda v1.10.2
  [150eb455] CoordinateTransformations v0.6.3 `/Volumes/gps-mbp/CoordinateTransformations#ISOSpherical`
  [497a8b3b] DoubleFloats v1.4.2
  [53c48c17] FixedPointNumbers v0.8.5
  [23992714] MAT v0.10.7
  [10e44e05] MATLAB v0.8.4
  [51fcb6bd] NamedColors v0.2.2
  [2f6b4ddb] NelderMead v0.4.0
⌃ [429524aa] Optim v1.10.0
  [f27b6e38] Polynomials v4.0.13
⌃ [6099a3de] PythonCall v0.9.23
  [274fc56d] PythonPlot v1.0.5
  [6038ab10] Rotations v1.7.1
  [90137ffa] StaticArrays v1.9.10
Python 3.12.8 | packaged by Anaconda, Inc. | (main, Dec 11 2024, 10:37:40) [Clang 14.0.6 ] on darwin

Additional context
Machine and Julia environment the same as above. Example works with Anaconda Python 3.11.11:

Python 3.11.11 (main, Dec 11 2024, 10:25:04) [Clang 14.0.6 ] on darwin
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.11.3 (2025-01-21)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> using PythonCall

julia> re = pyimport("re")
Python: <module 're' from '/opt/Anaconda3/lib/python3.11/re/__init__.py'>

julia> words = re.findall("[a-zA-Z]+", "PythonCall.jl is very useful!")
Python: ['PythonCall', 'jl', 'is', 'very', 'useful']
@protogeezer protogeezer added the bug Something isn't working label Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant