-
Notifications
You must be signed in to change notification settings - Fork 107
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
Neko thread usage causes seg faults during global free #281
Comments
tobil4sk
added a commit
to HaxeFoundation/haxelib
that referenced
this issue
Apr 4, 2023
On Ubuntu, threads can cause seg faults, see: HaxeFoundation/neko#281
tobil4sk
added a commit
to tobil4sk/haxec
that referenced
this issue
Apr 4, 2023
Haxelib was causing CI failures in the Ubuntu runners due to a threading issue with neko: HaxeFoundation/neko#281
kLabz
pushed a commit
to HaxeFoundation/haxe
that referenced
this issue
Apr 4, 2023
* Patch haxelib to avoid segmentation faults Haxelib was causing CI failures in the Ubuntu runners due to a threading issue with neko: HaxeFoundation/neko#281 * Update haxelib for run.n fix
tobil4sk
added a commit
to HaxeFoundation/haxelib
that referenced
this issue
Apr 6, 2023
On Ubuntu, threads can cause seg faults, see: HaxeFoundation/neko#281
We just had a similar crash on Windows, so looks like it's not specific to Linux:
-1073741819 is equivalent to 0xC0000005, which is |
This sample seems to reproduce the seg fault some of the time, at least on my windows machine: function main() {
final streamsLock = new sys.thread.Lock();
sys.thread.Thread.create(function() {
Sys.sleep(0.2);
streamsLock.release();
});
sys.thread.Thread.create(function() {
Sys.sleep(0.2);
streamsLock.release();
});
streamsLock.wait();
streamsLock.wait();
}
|
tobil4sk
changed the title
Neko threads cause seg faults in Ubuntu github actions environment
Neko thread usage causes seg faults during global free
Aug 31, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ever since haxelib was updated to use threads on neko, it has been segfaulting randomly in github actions. e.g.
I haven't been able to reproduce at all on any local systems, but I did some troubleshooting and I found that the seg fault occurs after the main function is completed, at some point after this call, but before the program closes: https://github.com/HaxeFoundation/neko/blob/master/vm/main.c#L342.
I managed to download the core dump and load it, and it says that the seg fault comes from line 46 here:
neko/vm/callback.c
Lines 44 to 48 in 9076cfa
I later added a printf here and confirmed that during the segfault, vm is a null pointer. Perhaps there is a finaliser that is getting called after the main function has already finished or something?
Full backtrace
Here is the code in haxelib that uses threads: https://github.com/HaxeFoundation/haxelib/blob/4.1.x/src/haxelib/client/Vcs.hx#L162-L177
The text was updated successfully, but these errors were encountered: