-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NativeImageTest fails because the LauncherUtil is unable to determine the status of the running process #17767
Comments
Could you share a small reproducer? That would allow us to check if it's environment related. |
/cc @geoand |
Can you also try with |
@geoand I will try that with our current project but I think that an update to 2.0.0 will break a couple of other things. |
@gsmet Sorry, that it took a while, but here we go: https://github.com/GAlexMES/quarkus-native-testing You should see the error when you run I figured out, that the problem has something to do with However: It worked in this configuration before I updated to 1.13.7. I will try to investigate if we can work around that specific slf4j version in the next days. Nevertheless I think Quarkus should be compatible to newer slf4j versions. @geoand I was not able to update Quarkus to 2.0.0. in this service because there are too many broken dependencies. That seems like a topic for another day ;) |
Undertstood |
@gsmet Therefor we added the set the logging provider to slf4j Thats why we switched to the new slf4j version which also requires the new logback version. That construct then worked for quite some time until the I hope that helps to figure it out. If you need anything else let me now :) |
Unfortunately unless have an actual test application, it will be very hard to figure out the problem |
@geoand I added a link to the github where I added the application where the native test is failing yesterday. What exactly do you need that is not in that repository? |
Ah, I hadn't seen that. |
So it seems like your application doesn't write to the logs until it's closed. Now given that what you are doing with logging is non standard, I don't really know how you could get around the problem |
I don't see why using a different logging provided is "non standard". I added one to the Repo and added a |
It seems that the native application does not dump the logs to the file, whether you log manually or not (I tried this by removing the logging code in your Other than that, What are you trying to test exactly? |
@geoand In this example I am not testing anything, just reproducing the issue. In the real application I am doing integration testing. All of that worked in 1.12.x and also works in 1.13.x. Just the tests are failing. |
@geoand any news on this topic? |
Not really no. I don't know what's going an the application doesn't dump the logs to the file |
Do you need any more support or are you just dropping it? |
I personally I am not looking into it (as the application does not use standard logging - other applications I tried worked just fine), others are obiously free to check |
Any update about it, i have the same issue :/ |
I would encourage folks to test |
I take simpe starter on quarkus site MacOs BigSur version 11.4 Logs after /mvnw verify -Pnative ` [INFO] |
What does |
There no here , what i see in |
Are you using any peculiar logging settings? |
With the latest quarkus version? |
Quarkus 2.2.1.Final The only logs I get are what's listed in: #17767 (comment)
|
Thanks. And you said it always fails after 20 seconds? |
It seems to be consistently around that timeframe. The log reports elapsed times that vary from what I see on a stop-watch when I try to time it. In real life it seems like it's closer to 25-30s after failsafe first starts logging that it's running, but I've not been super scientific about it. Really it's pretty bothersome to reproduce since I have to throttle the tar out of my system, or use an oversubscribed cloud-based build. |
Also confirmed on 2.2.2.Final. |
Understood, thanks |
One last think (hopefully), when you run: java -javaagent:/app/.m2/repository/org/jacoco/org.jacoco.agent/0.8.7/org.jacoco.agent-0.8.7-runtime.jar=destfile=/app/target/jacoco-quarkus.exec,append=true,exclclassloader=*QuarkusClassLoader -Dquarkus.http.port=8081 -Dquarkus.http.ssl-port=8444 -Dtest.url=http://localhost:8081 -Dquarkus.log.file.path=/app/target/quarkus.log -Dquarkus.log.file.enable=true -Dquarkus.profile=it -jar, /app/target/quarkus-app/quarkus-run.jar manually, how does the application behave? |
… log file check Relates to: quarkusio#17767 (comment)
When my system is throttled, it takes a while to start, but it starts and runs just fine. |
#20129 should likely take care of it |
I'm building / testing now from main. Any chance this can end up in a maintenance release on 2.2 soon? |
This fix will likely be part of |
I've locally branched off the upstream 2.2, cherrypicked in e1bb4f2, and I'm still seeing the same behavior. |
I get exceptions that the JVM failed to be created -- because the paths (absolute with Again, if the system isn't constrained, things work as expected, too. But under load (sysload > ~3) things go sideways. |
You can set the Quarkus logging to DEBUG in your application.properties and run the test with that |
Setting Quarkus logging to DEBUG didn't change the outcome.
Shouldn't
|
#20101 fixed the issue of |
I do not see wait-time arguments when running the integration tests using either or both of those properties. |
I don't think you are running from main, because the |
My local quarkus platform build was using 2.2.1.Final... |
Ok, finally getting everything to use 999-SNAPSHOT, and I can confirm this solves the issue. |
Awesome 👍. Thanks for checking! |
This was already done for native launcher, but it was mistakenly left out for these launch modes. Relates to quarkusio#17767 (cherry picked from commit bdfb7bf)
… log file check Relates to: quarkusio#17767 (comment) (cherry picked from commit e1bb4f2)
This was already done for native launcher, but it was mistakenly left out for these launch modes. Relates to quarkusio#17767 (cherry picked from commit bdfb7bf)
… log file check Relates to: quarkusio#17767 (comment) (cherry picked from commit e1bb4f2)
Describe the bug
After upgrading from Quarkus 1.12 to 1.13 not even a native image smoke test works anymore.
When Using the
@NativeImageTest
the test failes before the first test step is executed.The exceptions says:
This is happening (according to LauncherUtil) when the Quarkus Application is not reporting its address within 10 seconds.
According to the logs the application started and I can see the address and port like that:
Expected behavior
The tests is starting.
Actual behavior
The test is not starting but failing with the described exception.
Output of
uname -a
orver
Output of
java -version
Quarkus version or git rev
1.13.6
Build tool (ie. output of
mvnw --version
orgradlew --version
)gradle 7.0.2
The text was updated successfully, but these errors were encountered: