java-native-access / java-native-access/jna

JDK 19/20 CI intermittent failures / flaky test

Open
#1,546 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Java
Stars
8.9k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

https://github.com/java-native-access/jna/actions/runs/5801959465/job/15727351939
https://github.com/java-native-access/jna/actions/runs/5875801992/job/15948144145?pr=1544

    [junit] Testsuite: com.sun.jna.CallbacksTest
    [junit] JNA: Can't attach native thread to VM for callback: -1 (check stacksize for callbacks)
    [junit] Tests run: 53, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 4.508 sec
    [junit] 
    [junit] Testcase: testInvokeCallback(com.sun.jna.CallbacksTest):	FAILED
    [junit] Existing native function wrapper should be reused expected same:<Proxy interface to native function@0x7f4d400093b0 (com.sun.jna.CallbacksTest$TestLibrary$Int32CallbackX)> was not:<Proxy interface to native function@0x7f4d400093b0 (com.sun.jna.CallbacksTest$TestLibrary$Int32CallbackX)>
    [junit] junit.framework.AssertionFailedError: Existing native function wrapper should be reused expected same:<Proxy interface to native function@0x7f4d400093b0 (com.sun.jna.CallbacksTest$TestLibrary$Int32CallbackX)> was not:<Proxy interface to native function@0x7f4d400093b0 (com.sun.jna.CallbacksTest$TestLibrary$Int32CallbackX)>
    [junit] 	at com.sun.jna.CallbacksTest.testInvokeCallback(CallbacksTest.java:969)
    [junit] Test com.sun.jna.CallbacksTest FAILED
    [junit] 	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with com.sun.jna.CallbacksTest.testInvokeCallback at CallbacksTest.java:969 and review the linked CI runs for the JDK 19/20 failures. Reproduce the intermittent callback-thread and native function wrapper failure, then verify the test passes reliably on the affected JDK versions.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, java
Domain
ci-cd, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.