Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-7904101

intermittent failure in StreamsTest.agentvm.ok

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • None
    • tools
    • None

      During Debian builds[1], we have observed an intermittent failure in StreamsTest in Agent mode.

      The issue is caused by the race condition:
      1) jtreg launches the agent VM and reads the child's process input and output[2], starting a separate thread.
      2) DoAction[2] reads the captured data and feeds it into the test result[3].

      The output capture thread[1] might not start in time to read the output, or it might hand off data too late, causing missing or misplaced log lines.

      copyAgentProcessStream's thread and captureProcessStreams should synchronise with each other. When setting a section we should be sure that the capture thread is started, and when clearing section we should ensure that there is no more data to read from the child process.

      [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1115694#17
      [2] https://github.com/openjdk/jtreg/blob/34ccc66ec89651637811678a17d3f810b4ac0780/src/share/classes/com/sun/javatest/regtest/exec/Agent.java#L189
      [3] https://github.com/openjdk/jtreg/blob/34ccc66ec89651637811678a17d3f810b4ac0780/src/share/classes/com/sun/javatest/regtest/exec/Agent.java#L385
      [4] https://github.com/openjdk/jtreg/blob/34ccc66ec89651637811678a17d3f810b4ac0780/src/share/classes/com/sun/javatest/regtest/exec/Agent.java#L412C13-L412C34

            Unassigned Unassigned
            vpetko Vladimir Petko
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: