)]}'
{
  "commit": "4eda76ca63df945f4c22d76aeca263bd9457887d",
  "tree": "bd39fb48370d428e58cd564df4310fb6d3e6de47",
  "parents": [
    "1b961bf9d7e76de9a36f93d8749dbe7fae302246"
  ],
  "author": {
    "name": "Jerry DeLisle",
    "email": "jvdelisle@gcc.gnu.org",
    "time": "Wed Sep 30 19:26:47 2026 -0700"
  },
  "committer": {
    "name": "Jerry DeLisle",
    "email": "jvdelisle@gcc.gnu.org",
    "time": "Tue Oct 06 16:03:34 2026 -0700"
  },
  "message": "libgfortran: [PR127684] caf_shmem: SYNC IMAGES hang on terminated image\n\nSYNC IMAGES hung when an image of the image set stopped or failed while\nanother image of the set was waiting in the statement.\n\nAn image that found a stopped or failed image in its set returned at once\nwith STAT\u003d, without counting the statement for the other images of the\nset, so an image already waiting for it was never released.  The\nsupervisor, the parent process that starts the images and waits for them\nto exit, also woke the waiting images without holding the table lock, so\na wakeup could be lost.\n\nEach image now counts the statement for every active image of its set,\nalso when one of them has stopped, so that corresponding statements keep\npairing (F2023 11.7.4).  With a stopped image the statement then only has\nthe effect of SYNC MEMORY, and failed images are skipped (F2023 11.7.11).\nEvery change of an image\u0027s status to stopped or failed now goes through\nthe new notify_image_terminated, which holds the table lock and wakes\nevery image waiting in SYNC IMAGES.  The image sets its own status in\nSTOP or FAIL IMAGE; the supervisor sets it when an image exited or was\nkilled by a signal without doing so.  The Windows version of the\nsupervisor is not changed.\n\nAssisted-by: Claude Opus 5.5\n\n\tPR libfortran/127684\n\nlibgfortran/ChangeLog:\n\n\t* caf/shmem.c (_gfortran_caf_sync_images): Do not return early for\n\ta stopped or failed image.  Check the images only when one of them\n\tterminated.\n\t(mark_stopped): Use notify_image_terminated.\n\t(_gfortran_caf_fail_image): Likewise.\n\t* caf/shmem/supervisor.c (supervisor_main_loop): Likewise.  Do not\n\tsignal the images waiting in sync_table.\n\t* caf/shmem/sync.c (stopped_image_in): New function.\n\t(sync_table): Return whether an image of the set terminated.  Stop\n\twaiting when an image of the set stopped.\n\t(notify_image_terminated): New function.\n\t* caf/shmem/sync.h (sync_table): Return bool.\n\t(notify_image_terminated): Declare.\n\ngcc/testsuite/ChangeLog:\n\n\t* gfortran.dg/coarray/sync_images_failed_1.f90: New test.\n\t* gfortran.dg/coarray/sync_images_stopped_2.f90: New test.\n\t* gfortran.dg/coarray/sync_images_stopped_3.f90: New test.\n",
  "tree_diff": [
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "c076ee4d88eb71c9e7f990bb213397bb4ca0feb5",
      "new_mode": 33188,
      "new_path": "gcc/testsuite/gfortran.dg/coarray/sync_images_failed_1.f90"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "5d5ac61c83f8467346e90ec1f1bf9dc1f895be2d",
      "new_mode": 33188,
      "new_path": "gcc/testsuite/gfortran.dg/coarray/sync_images_stopped_2.f90"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "f479a7a0196ce02d263c48f61b45baff530aab02",
      "new_mode": 33188,
      "new_path": "gcc/testsuite/gfortran.dg/coarray/sync_images_stopped_3.f90"
    },
    {
      "type": "modify",
      "old_id": "08ae3113da5a302f8601176041755fda311ec951",
      "old_mode": 33188,
      "old_path": "libgfortran/caf/shmem.c",
      "new_id": "7fb23f05e6c34fbababd4f62c07a712f92184c92",
      "new_mode": 33188,
      "new_path": "libgfortran/caf/shmem.c"
    },
    {
      "type": "modify",
      "old_id": "246f98aab63151ef7fbf975a4dc55c6a38c457d5",
      "old_mode": 33188,
      "old_path": "libgfortran/caf/shmem/supervisor.c",
      "new_id": "41e2c1600631b7f5c03d1116855513ab0ff2b33f",
      "new_mode": 33188,
      "new_path": "libgfortran/caf/shmem/supervisor.c"
    },
    {
      "type": "modify",
      "old_id": "9deb31f0871dcaf0888879c287eb6cc9ad973de4",
      "old_mode": 33188,
      "old_path": "libgfortran/caf/shmem/sync.c",
      "new_id": "e3041a3c1287bcf41a4cb0195feb47f99c3ae4af",
      "new_mode": 33188,
      "new_path": "libgfortran/caf/shmem/sync.c"
    },
    {
      "type": "modify",
      "old_id": "d7b9699284096e1d2c2cab5e24742af3e6004bca",
      "old_mode": 33188,
      "old_path": "libgfortran/caf/shmem/sync.h",
      "new_id": "b359c17cbe3ad86d199bd283e3ac804fb202f6db",
      "new_mode": 33188,
      "new_path": "libgfortran/caf/shmem/sync.h"
    }
  ]
}
