-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Add guard task to ensure log messages are dropped when the process isn't a Quarkus application #14386
Conversation
…n't a Quarkus application Fixes: quarkusio#14295
The JDK 11 test failure is completely unrelated:
It looks like there is some kind of race condition in the test |
/cc @Sanne for the test failure above ^ |
hum thanks yes I can see a possible race. I'll open a different issue: If this happens again while I haven't fixed it, feel free to disable the test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies, but: I think using a timer is a monumentally bad idea. Let's try to find some other approach - even examining the stack trace would be a better idea IMO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies, but: I think using a timer is a monumentally bad idea. Let's try to find some other approach - even examining the stack trace would be a better idea IMO.
I absolutely agree it's bad :). If you think the stacktrace approach is better, then I'm all for it. I thought of it myself, but I didn't go through with it because I thought the performance penalty would be high... |
I don't think it would be terrible. The main challenge is that the stack is not necessarily predictable; you'd have to do some experimentation to see. |
OK, I'll check |
Another thing about the stack based approach, is that I am not sure that we'll be able to tell a Quarkus application is being run by examining the stack. I am thinking about the case of tests where maven surefire launches a test jar and our logging is started very very early. In that case I think even when |
I also wanted to note that generating an |
I've probably missed something, but why do we worry about "non-Quarkus applications" at all? |
The problem is that merely the presence of Quarkus on the test classpath, leads to non Quarkus tests causing OOM errors because log messages get queued and never released |
I don't know if there is any good automatic solution to this. Can't we just tell the user to specify -Djava.util.logging.manager=java.util.logging.LogManager and be done with it? |
Yeah... The complexity of an acceptable solution outweighs the usefulness of addressing the issue. |
Fixes: #14295
This solution really sucks but I couldn't come up with anything better that