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

Fix segmentation fault on laplacian computation with python backend #29

Open
lorenzovarese opened this issue Aug 28, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@lorenzovarese
Copy link
Collaborator

Bug Report: Segmentation Fault in gt2py_fo_exec Test Suite for Python Backend

Description

In the test suite for gt2py_fo_exec, the test methods related to the Python backend are currently commented out due to a segmentation fault that occurs when the test suite is executed with these tests enabled. Below is a detailed description of the issue and the steps to reproduce it.

Steps to Reproduce

  1. Uncomment the following line in gt2pt_fo_exec.jl:

    testwrapper(setup_cartesian_offset_provider, test_lap, "py", constant_cartesian_field) # TODO: fix segmentation fault on py backend
  2. Run the test suite using the following command:

    julia --project=. --threads 8 test/gt2py_fo_exec.jl

Environment

  • Operating System: macOS
  • Processor: Apple M2
  • Memory: 16 GB RAM
  • Julia Version: 1.10.4 (Homebrew installation)

Error Message

When running the test suite with the Python backend tests enabled, the following segmentation fault is encountered:

Executing 'test_lap' with args: py, constant_cartesian_field
Testset GT2Py fo exec: Test Failed at
[39957] signal (11.2): Segmentation fault: 11
in expression starting at /Users/lorenzovarese/CSCS/GridTools.jl/test/gt2py_fo_exec.jl:709
gc_mark_and_steal at /opt/homebrew/Cellar/julia/1.10.4/lib/julia/libjulia-internal.1.10.4.dylib (unknown line)
gc_mark_loop_parallel at /opt/homebrew/Cellar/julia/1.10.4/lib/julia/libjulia-internal.1.10.4.dylib (unknown line)
jl_gc_mark_threadfun at /opt/homebrew/Cellar/julia/1.10.4/lib/julia/libjulia-internal.1.10.4.dylib (unknown line)
_pthread_start at /usr/lib/system/libsystem_pthread.dylib (unknown line)
Allocations: 34692194 (Pool: 34657804; Big: 34390); GC: 50
[2]    39957 segmentation fault  julia --project=. --threads 8 test/gt2py_fo_exec.jl

Additional Information

This issue is consistently reproducible on my local development machine with the specifications listed above. The segmentation fault seems to be related to garbage collection (gc_mark_and_steal) and threading.

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