dweiss commented on PR #13453:
URL: https://github.com/apache/lucene/pull/13453#issuecomment-2155466471

   It appears random because there are multiple runners and messages are 
proxied back to the console interleaved with everything else. I managed to 
debug this by running with ``--max-workers 1`` and in debug mode. Then I can 
see that:
   ```
   2024-06-07T21:46:31.079+0200 [DEBUG] 
[org.gradle.api.internal.tasks.testing.junit.AbstractJUnitTestClassProcessor] 
Executing test class org.apache.lucene.codecs.TestCodecLoadingDeadlock
   2024-06-07T21:46:31.293+0200 [ERROR] [system.err] Jun 07, 2024 9:46:31 PM 
org.apache.lucene.internal.vectorization.VectorizationProvider lookup
   2024-06-07T21:46:31.293+0200 [ERROR] [system.err] WARNING: Java vector 
incubator module is not readable. For optimal vector performance, pass 
'--add-modules jdk.incubator.vector' to enable Vector API.
   ```
   TestCodecLoadingDeadlock forks a subprocess, which inherits IO - this 
bypasses System.out/err, which I presume is redirected for tests, and logs 
directly to the worker's system error descriptor, which in turn shows up on the 
console.
   
   The other message is from :lucene:codecs:test. The way tests are executed 
for that project is that it runs without modules - see modules.gradle:
   ```
         // TODO: the tests of these projects currently don't compile or work in
         // module-path mode. Make the modular paths extension use class path 
only.
         if (sourceSet.name == SourceSet.TEST_SOURCE_SET_NAME && project.path 
in [
           // Circular dependency between artifacts or source set outputs,
           // causing package split issues at runtime.
           ":lucene:core",
           ":lucene:codecs",
           ":lucene:test-framework",
         ]) {
           modularPaths.mode = ModularPathsExtension.Mode.CLASSPATH_ONLY
         }
   ```
   
   Yet, the defaults-tests.gradle appends enable-native-access and the JVM 
complains about it (rightfully).
   
   So it seems like everything is actually explainable. It is really annoying 
that forked test JVMs cram their syserrs directly to gradle console - makes 
debugging very difficult. But at least they show up, which is an improvement 
(?).
   
   I think a follow-up issue should be to correct the test to not inherit IO 
but redirect somewhere else and to either enable modular mode for the codecs 
module or add proper exclusion to enable-native-access.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to