RFR: 8303612: runtime/StackGuardPages/TestStackGuardPagesNative.java fails with exit code 139

mazhen duke at openjdk.org
Wed Sep 3 10:09:45 UTC 2025


On Mon, 1 Sep 2025 04:32:05 GMT, David Holmes <dholmes at openjdk.org> wrote:

> I would suggest filing a new bug for the CentOS hang and create a new PR of the change here, with that new bug ID.

Thank you, that plan sounds great.

I don't yet have an account on bugs.openjdk.org to file the new bug.

Would you mind creating the JBS issue for this hang? I've drafted all the necessary information below to help.

---

### **Suggested JBS Issue Content**

**Title:**
`runtime/StackGuardPages/TestStackGuardPagesNative.java hangs on some platforms`

**Description:**

The `TestStackGuardPagesNative.java` test hangs and times out on some Linux distributions (e.g., CentOS 7) during the `test_native_overflow_initial` scenario.

This issue is a regression introduced by the "hardening" fix in `JDK-8295344`. That fix correctly replaced a recursive implementation in `exeinvoke.c` (which caused stack corruption, see `JDK-8293452`) with an iterative `for(;;)` loop.

However, this unbounded loop relies on an incidental `SIGSEGV` (e.g., `SEGV_MAPERR`) to terminate. On platforms like CentOS 7, this signal does not occur in a timely manner, causing the native process to hang indefinitely.

The proposed solution is to make the iterative loop bounded by checking against the previously recorded overflow depth (`_kp_rec_count`). This retains the benefit of the iterative approach (no stack corruption) while fixing the hang, making the test's behavior deterministic and platform-independent.

---

Once the new bug ID is available, I will close this current PR and open a new one with the fix, linked to the new ID, as you suggested.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/25689#issuecomment-3248587960


More information about the hotspot-runtime-dev mailing list