[GitHub] [maven-surefire] kriegaex edited a comment on pull request #343: SUREFIRE-1881 Adds additional debug log and fork connection timeout
kriegaex edited a comment on pull request #343: URL: https://github.com/apache/maven-surefire/pull/343#issuecomment-871135077 @Tibor17, I built M6 snapshot locally in your branch, then ran the tests on both branches of my simple [reproducer project](https://github.com/kriegaex/Maven_Surefire_PrintToConsoleProblems), which you already know. Findings: * `mvn clean test` passed now on branch _master_. * `mvn clean verify` still hangs on branch [_use-agent_](https://github.com/kriegaex/Maven_Surefire_PrintToConsoleProblems/tree/use-agent) after some output is written to the console. Probably something is still not 100% right. The log output: ```text [INFO] Scanning for projects... [INFO] [INFO] --< de.scrum-master:surefire-print-console-problems >--- [INFO] Building surefire-print-console-problems 1.0-SNAPSHOT [INFO] [ jar ]- (...) [INFO] --- maven-failsafe-plugin:3.0.0-M6-SNAPSHOT:integration-test (integration-test) @ surefire-print-console-problems --- [INFO] [INFO] --- [INFO] T E S T S [INFO] --- [INFO] [Agent OUT] Hello world! [INFO] [Transformer OUT] className = java/lang/invoke/MethodHandleImpl, loader = null [INFO] [Transformer OUT] className = java/lang/invoke/MethodHandleImpl$1, loader = null [INFO] [Transformer OUT] className = java/lang/invoke/MethodHandleImpl$2, loader = null [INFO] [Transformer OUT] className = java/util/function/Function, loader = null [INFO] [Transformer OUT] className = java/lang/invoke/MethodHandleImpl$3, loader = null [INFO] [Transformer OUT] className = java/lang/invoke/MethodHandleImpl$4, loader = null [INFO] [Transformer OUT] className = java/lang/ClassValue, loader = null [INFO] [Transformer OUT] className = java/lang/ClassValue$Entry, loader = null [INFO] [Transformer OUT] className = java/lang/ClassValue$Identity, loader = null [INFO] [Transformer OUT] className = java/lang/ClassValue$Version, loader = null [INFO] [Transformer OUT] className = java/lang/invoke/MemberName$Factory, loader = null [INFO] [Transformer OUT] className = java/lang/invoke/MethodHandleStatics, loader = null [INFO] [Transformer OUT] className = java/lang/invoke/MethodHandleStatics$1, loader = null [INFO] [Transformer OUT] className = sun/misc/PostVMInitHook, loader = null [INFO] [Transformer OUT] className = sun/misc/PostVMInitHook$2, loader = null [INFO] [Transformer OUT] className = jdk/internal/util/EnvUtils, loader = null [INFO] [Transformer OUT] className = sun/misc/PostVMInitHook$1, loader = null [INFO] [Transformer OUT] className = sun/usagetracker/UsageTrackerClient, loader = null [INFO] [Transformer OUT] className = java/util/concurrent/atomic/AtomicBoolean, loader = null [INFO] [Transformer OUT] className = sun/usagetracker/UsageTrackerClient$1, loader = null [INFO] [Transformer OUT] className = sun/usagetracker/UsageTrackerClient$4, loader = null [INFO] [Transformer OUT] className = sun/usagetracker/UsageTrackerClient$2, loader = null [INFO] [Transformer OUT] className = sun/usagetracker/UsageTrackerClient$3, loader = null [INFO] [Transformer OUT] className = java/lang/StringCoding$StringEncoder, loader = null [INFO] [Transformer OUT] className = java/io/FileOutputStream$1, loader = null [INFO] [Transformer OUT] className = sun/launcher/LauncherHelper, loader = null [INFO] [Transformer OUT] className = java/util/concurrent/ConcurrentHashMap$ForwardingNode, loader = null [INFO] [Transformer OUT] className = org/apache/maven/surefire/booter/ForkedBooter, loader = sun.misc.Launcher$AppClassLoader@18b4aac2 [INFO] [Transformer OUT] className = sun/launcher/LauncherHelper$FXHelper, loader = null [INFO] [Transformer OUT] className = java/lang/Class$MethodArray, loader = null [INFO] [Transformer OUT] className = org/apache/maven/surefire/api/report/StackTraceWriter, loader = sun.misc.Launcher$AppClassLoader@18b4aac2 [INFO] [Transformer OUT] className = java/lang/reflect/InvocationTargetException, loader = null [INFO] [Transformer OUT] className = org/apache/maven/surefire/api/provider/CommandListener, loader = sun.misc.Launcher$AppClassLoader@18b4aac2 [INFO] [Transformer OUT] className = java/security/AccessControlException, loader = null [INFO] [Transformer OUT] className = java/lang/SecurityException, loader = null [INFO] [Transformer OUT] className = java/util/concurrent/ScheduledExecutorService, loader = null [INFO] [Transformer OUT] className = java/util/concurrent/ExecutorService, loader = null [INFO] [Transformer OUT] className = java/util/concurrent/Executor, loader = null [INFO] [Transformer OUT] className = org/apache/maven/surefire/api/report/ReporterFactory, loader = sun.misc.La
[GitHub] [maven-surefire] kriegaex edited a comment on pull request #343: SUREFIRE-1881 Adds additional debug log and fork connection timeout
kriegaex edited a comment on pull request #343: URL: https://github.com/apache/maven-surefire/pull/343#issuecomment-836122555 Concerning `E2ETest::endToEndTest`, it hangs at `assertThat( awaitHandlerFinished.await( 30L, TimeUnit.SECONDS ) ).isTrue();`. This is true even if I set `final int totalCalls = 1;`, i.e. assuming that whatever the test does is actually happening, the countdown latch is never set correctly. It looks like a concurrency issue at first glance. Maybe later I have time to take another look. For now, my impression is that maybe nothing is slow but the test needs to be adjusted to your code changes. I would lie to tell you that I understand what the tests in `E2ETest` do exactly, so my hunch could be wrong. What I do see, though, is that the code inside `EventHandler h` is never ever called. I added both breakpoints and debug logs and nothing ever happens there. --- **Update:** It seems, in `SurefireForkChannel`, you set `private final Bindings bindings = new Bindings( 3 );`, but in `E2ETest::endToEndTest` you only call `bindEventHandler`, not `bindCommandReader`, i.e. the binding never counts down to 0 and `job()` is never called. What that all means, I have no clue. I just see that things do not happen which probably are supposed to. -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [maven-surefire] kriegaex edited a comment on pull request #343: SUREFIRE-1881 Adds additional debug log and fork connection timeout
kriegaex edited a comment on pull request #343: URL: https://github.com/apache/maven-surefire/pull/343#issuecomment-836122555 Concerning `E2ETest::endToEndTest`, it hangs at `assertThat( awaitHandlerFinished.await( 30L, TimeUnit.SECONDS ) ).isTrue();`. This is true even if I set `final int totalCalls = 1;`, i.e. assuming that whatever the test does is actually happening, the countdown latch is never set correctly. It looks like a concurrency issue at first glance. Maybe later I have time to take another look. For now, my impression is that maybe nothing is slow but the test needs to be adjusted to your code changes. I would lie to tell you that I understand what the tests in `E2ETest` do exactly, so my hunch could be wrong. What I do see, though, is that the code inside `EventHandler h` is never ever called. I added both breakpoints and debug logs and nothing ever happens there. -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [maven-surefire] kriegaex edited a comment on pull request #343: SUREFIRE-1881 Adds additional debug log and fork connection timeout
kriegaex edited a comment on pull request #343: URL: https://github.com/apache/maven-surefire/pull/343#issuecomment-836122555 Concerning `E2ETest::endToEndTest`, it hangs at `assertThat( awaitHandlerFinished.await( 30L, TimeUnit.SECONDS ) ).isTrue();`. This is true even if I set `final int totalCalls = 1;`, i.e. assuming that whatever the test does is actually happening, the countdown latch is never set correctly. It looks like a concurrency issue at first glance. Maybe later I have time to take another look. For now, my impression is that maybe nothing is slow but the test needs to be adjusted to your code changes. -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [maven-surefire] kriegaex edited a comment on pull request #343: SUREFIRE-1881 Adds additional debug log and fork connection timeout
kriegaex edited a comment on pull request #343: URL: https://github.com/apache/maven-surefire/pull/343#issuecomment-836107707 To me it looks as if the whole `SurefireForkChannel.AcceptanceHandler` implementation and usage are not done yet, which is why `E2ETest::shouldNotVerifyClient` fails: * The handler's `complete` method is never called and even if the test would do it, the `completed` method would not be called. * Because the result is only exposed as `Completable` and not as `CompletionHandler`, the test could not call it either. * Even if the `completed` method was called from inside `SurefireForkChannel::connectToClient`, the test would have no way of accessing `SurefireForkChannel.AcceptanceHandler.messageOfInvalidSessionIdException`, because the state is not exposed. * The result is that `InvalidSessionException` is never thrown. Sorry, I explained a lot in one paragraph, but you know the code better than me and probably understand what I mean. So this is unfinished work. Can you explain why started refactoring the code to use the completion handler within the confines of this bugfix? I am not seeing (yet), what you are aiming at, i.e. which benefit it is meant to provide. As for the test timing out, I did not inspect it yet. First I wanted to see why the other test fails. -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [maven-surefire] kriegaex edited a comment on pull request #343: SUREFIRE-1881 Adds additional debug log and fork connection timeout
kriegaex edited a comment on pull request #343: URL: https://github.com/apache/maven-surefire/pull/343#issuecomment-836107707 To me it looks as if the whole `SurefireForkChannel.AcceptanceHandler` implementation and usage are not done yet, which is why `E2ETest::shouldNotVerifyClient` fails: * The handler's `complete` method is never called and even if the test would do it, the `completed` method would not be called. * Because the result is only exposed as `Completable` and not as `CompletionHandler`, the test could not call it either. * Even if the `completed` method was called from inside `SurefireForkChannel::connectToClient`, the test would have no way of accessing `SurefireForkChannel.AcceptanceHandler.messageOfInvalidSessionIdException`, because the state is not exposed. * The result is that `InvalidSessionException` is never thrown. Sorry, I explained a lot in one paragraph, but you know the code better than me and probably understand what I mean. So this is unfinished work. As for the test timing out, I did not inspect it yet. First I wanted to see why the other test fails. -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [maven-surefire] kriegaex edited a comment on pull request #343: SUREFIRE-1881 Adds additional debug log and fork connection timeout
kriegaex edited a comment on pull request #343: URL: https://github.com/apache/maven-surefire/pull/343#issuecomment-813381043 @Tibor17, on my local Windows workstation (JDK 11) as well as on Ubuntu Linux in WSL (JDK 14) both branches, i.e. the one with `-verbose:class` and the one with the Java agent, run their respective tests flawlessly. The log output looks as expected, no hangs. This looks like some impressive progress, great job! **Update:** Java 8 and Java 16 also looking good on Windows, both branches. -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [maven-surefire] kriegaex edited a comment on pull request #343: SUREFIRE-1881 Adds additional debug log and fork connection timeout
kriegaex edited a comment on pull request #343: URL: https://github.com/apache/maven-surefire/pull/343#issuecomment-810956819 Oh, and one more thing. Just in case someone wants to bring up the issue of me not being friendly anymore: I admit to it. But I was so patient over in the Surefire issue, explaining so much, delivering so much data. @Tibor17 has just been either ignorant or dismissive of all I did to make life easier for him as a maintainer, helping him to pinpoint the issue. This is why my patience was wearing thin and now I am just trying to push this forward. I am friendly and polite with persons who grant me the same courtesy. The condescending way you treated me has not helped me feel comfortable in collaborating with you. Despite all that, I am still collaborating. I am just not being courteous or nice anymore. Sorry for that, but I am a human being too besides being what you call "just a Scrum Master". -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [maven-surefire] kriegaex edited a comment on pull request #343: SUREFIRE-1881 Adds additional debug log and fork connection timeout
kriegaex edited a comment on pull request #343: URL: https://github.com/apache/maven-surefire/pull/343#issuecomment-810956819 Oh, and one more thing. Just in case someone wants to bring up the issue of me not being friendly anymore: I admit to it. But I was so patient over in the Surefire issue, explaining so much, delivering so much data. @Tibor17 has just been either ignorant or dismissive of all I did to make life easier for him as a maintainer, helping him to pinpoint the issue. This is why my patience was wearing thin and now I am just trying to push this forward. I am friendly and polite with persons who grant me the same courtesy. The condescending way you treated me has not helped me feel comfortable in collaborating with you. Despite all that, I am still collaborating. I am just not being courteous or nice anymore. Sorry for that, but I am a human being too. -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [maven-surefire] kriegaex edited a comment on pull request #343: SUREFIRE-1881 Adds additional debug log and fork connection timeout
kriegaex edited a comment on pull request #343: URL: https://github.com/apache/maven-surefire/pull/343#issuecomment-810952849 > @kriegaex > This code is right! What the heck, @Tibor17? Again, you did not read my comment carefully or misinterpret it. I was not commenting the code in this PR at all but **my own** last changes in my reproducer project. As for this PR, even I as a hobby programmer can see at first glance that the PR is work in progress and in its current state not meant to be merged but just to produce some insights into what might be going wrong. It is a debugging tool, nothing more! @reinhapa IMO only created a PR from his fork because it is easy for you to check out and comment on. So you mentioning that it makes build time out is not helpful, because it is not a surprise either. We are both just trying to help you debug this, because you seem to be unwilling to do it alone. Sorry for trying to support you in this imperfect way, as you seem to know everything better (even if you don't) and seem to know how to solve the problem (even if you don't) or else put the blame on my sample project or this PR which both just try to reproduce the problem. -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org