chapel-lang / chapel

a Productive Parallel Programming Language
https://chapel-lang.org
Other
1.79k stars 421 forks source link

[Bug]: Compiling with `--library-python` and `--lldb` fails when generating the header file #25672

Open lydia-duncan opened 3 months ago

lydia-duncan commented 3 months ago

Summary of Problem

Description: I was trying to debug the python library compilation of another bug, but couldn't get to the piece of code I wanted to execute because of the following error during closeLibraryHelperFile:

error: moving beautified file

This same error does not occur when compiling the program without --lldb. It impacts any testing getting compiled into a Python library.

Is this issue currently blocking your progress? This prevents most debugging of Python interop

Steps to Reproduce

Source Code:

Any library python code, I was able to demonstrate it with test/interop/python/testing.chpl

Compile command: chpl --library --library-python --lldb foo.chpl

Execution command: N/A

Associated Future Test(s): I'm not sure how to make a future for lldb

Configuration Information

lydia-duncan commented 3 months ago

Jade mentioned in chat that they've encountered similar issues when trying to debug any code in makeBinary or codegenPartTwo. From Jade:

I believe it has to do with how lldb follows forked children. I've never been able to work around it (other than using gdb), but maybe you can set lldbs forking mode?

I tried settings set target.process.follow-fork-mode child but that didn't seem to help