-
Notifications
You must be signed in to change notification settings - Fork 424
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
[Bug]: Occasional segfault when throwing an error from inside a coforall #26652
Comments
Note that switching to a For example
This always seems to give the correct result. Even with |
Where the difference is... the lack of For users bumping into this (and Arkouda), what would be an acceptable workaround? Could we have a racy flag that'll be set to |
The difference is the lack of an
This sounds possible? In essence making the body of the on statement one giant Option A proc bar() throws {
var err: owned Error? = nil;
coforall l in Locales with (ref err) do on l {
try {
var x = new C(l.id);
if l.id == 1 then throw new Error("exception");
writeln("printing ", l.id, ": ", x);
} catch e {
err = e;
}
}
if err != nil then throw err;
} Option B
Option C
These all still segfault every other run or so. |
Have you tried it with |
I see the same issue with CHPL_COMM=ofi (using mpirun on a Mac as well as slurm on an EX) It sporadically hits a segfault.
|
Noting that the segfault occurs during a call to Using the option B code, I'm able to reproduce the segfault. If I remove the writeln() in the coforall body in bar(), no segfault. If I instead remove the definition of If I instead remove the |
Summary of Problem
Description:
When throwing an error from inside a coforall, I am seeing it sometimes crashes with a segfault at a few places in our runtime. Sometimes the code runs to completion and sometimes it hits a segfault. The likelihood of a segfault increases with the number of locales, I find that with 4 locales I get one about every other run.
Is this issue currently blocking your progress?
yes
Steps to Reproduce
Source Code:
Compile command:
chpl foo.chpl
Execution command:
./foo -nl 4
Example output
Example output with GASNET_BACKTRACE=1
Expected correct output
Configuration Information
chpl --version
: 2.4 prerelease$CHPL_HOME/util/printchplenv --anonymize
:gcc --version
orclang --version
: LLVM 19, clang 14The text was updated successfully, but these errors were encountered: