-
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
FORMAT_FAILURE when using Log.errorf or Log.infof with throwable, message and string parameter containing { #45444
Comments
Fixed in 3.15.3. See #44540 |
The OP is saying it's reproducible with 3.17.5 so it looks like we haven't fully fixed things. |
@Skrethel can you confirm you can only reproduce it in dev mode for 3.17.5? I got it working with tests and prod mode but it's failing in dev mode for me. |
Funny I can't reproduce with 999-SNAPSHOT, maybe something in |
Probably 3.17 is missing #44565 |
I've tested on 3.17.5 and it reproduces in dev mode. |
I can confirm that backporting 8fe3c76 to 3.17 solves the problem |
Sorry I've missed the part about checking dev mode only. |
Yeah, so I think the bug is in JBoss Log Manager even if the commit pointed by @gastaldi also fixes the issue: When translating the message from printf to messageformat, we should escape the parameters or we can end up with a parameter injecting something that won't work with the new format. In the case of the OP, when the translation occurs, we end up with |
The ship has sailed for 3.17.6 and 3.15.3 but we'll fix it in the next round. |
Thanks a lot for raising this with an easy way to reproduce it! |
@gsmet I actually think the problem more lies in quarkus/core/deployment/src/main/java/io/quarkus/deployment/logging/LoggingResourceProcessor.java Lines 440 to 445 in dbdfcea
The
And the
I'm not sure what the log manager can do about this. I think the |
@jamezp my debugging session showed the log record was changed prior to that in the code I pointed out in JBoss Log Manager. |
@jamezp if you want, we can do a quick call tomorrow? I'm in Europe/Paris timezone, we can sync on Zulip or Slack maybe? |
Note: the issue is with 3.17, you won't have the issue with main. |
We had a discussion with @jamezp and the issue is indeed in JBoss Log Manager: the @jamezp is going to fix it. We will backport the other commit from David though as it's better to avoid this code path anyway. |
For tracking purposes I've filed https://issues.redhat.com/browse/LOGMGR-356. |
Describe the bug
Reproducible on Quarkus 3.13.0 and 3.17.5 by adding following log message. Parameter must contain "{" for error to reproduce.
Expected behavior
Quarkus should log specified message with the stacktrace from provided throwable.
Actual behavior
Quarkus throws following error
How to Reproduce?
Add following log message and run the code
Output of
uname -a
orver
Linux REDACTED 5.14.0-547.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Dec 30 20:10:38 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Output of
java -version
OpenJDK 64-Bit Server VM Corretto-21.0.5.11.1 (build 21.0.5+11-LTS, mixed mode, sharing)
Quarkus version or git rev
3.17.5
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.9.9 (8e8579a9e76f7d015ee5ec7bfcdc97d260186937)
Additional information
No response
The text was updated successfully, but these errors were encountered: