-
Notifications
You must be signed in to change notification settings - Fork 8
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
Known Issue: Reusing the result of aot.compile leads to segfault upon Python exiting #42
Comments
Thanks to the magic of Repro steps:
I worry that this bug may be probabilistic so maybe |
Infuriating plot twist: Compiling TVM with GDB flags makes this error go away. It appears to be necessary to repeat calls a specific number of times to trigger the segfaults. It does not seem to be completely deterministic. |
Managed to trigger a segfault (in the same manner, by repeating calls to a given compiled function in the tests) with GDB flags on, got this backtrace that is identical to the last one:
|
Here is a test case from the unit tests, which passes:
However, this case results in a segfault when the Python interpreter exits (all tests pass):
The GDB backtrace reveals the following:
There seems to be some kind of nasty interaction happening somewhere inside TVM's memory (I have also had this happen upon exiting Python). This was done on TVM commit
5046ff25116d66032f5d1b69d240f0a655a1ed92
; I do not know exactly which TVM commit this bug begins with.Note also that the bug can be inconsistent: Sometimes duplicating one call to a compiled function will succeed; other times, I will have to duplicate a different compiled function to get a segfault.
The text was updated successfully, but these errors were encountered: