Hi,
We have noticed (random?) failures on aarch64-linux-gnu with
Fortran runtime error: After restarting images 4001 times, no common state
on shared memory could be reached. Giving up...
FAIL: gfortran.dg/coarray/event_1.f90 -fcoarray=lib -pthread -O2
-lcaf_shmem -lrt execution test
Since the error message was introduced with this patch, I'm wondering
whether the problem is related, or why it wouldn't appear before the
patch... Sorry I'm not familiar with fortran/coarray so there might be
something obvious with memory consumption / too many cores (32).
Looking at the patch, I think I noticed a mistake:
+static bool
+startWorker (image *im __attribute__ ((unused)),
+ char ***argv __attribute__ ((unused)))
+{
+#ifdef HAVE_FORK
+ caf_shmem_pid new_pid;
+ if ((new_pid = fork ()))
+ {
+ im->supervisor->images[im->image_num]
+ = (image_tracker) {new_pid, IMAGE_OK};
+ return false;
+ }
+ else
+ {
+ if (new_pid == -1)
+ caf_runtime_error ("error spawning child\n");
[...]
The if (new_pid == -1)
is misplaced, since we enter the else{} clause only when new_pid == 0.
I have another question: could you clarify what 210 means in:
+ if (WEXITSTATUS (chstatus) == 210)
Thanks,
Christophe
On Tue, Feb 24, 2026 at 10:38 PM Jerry D <[email protected]> wrote:
> Ref: https://gcc.gnu.org/pipermail/fortran/2026-February/063551.html
>
> See attached.
>
> Awaiting approval.