Skip to content
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

ArrayOutOfBoundsException in Log4jFixedFormatter #1418

Closed
ppkarwasz opened this issue Apr 8, 2023 · 0 comments · Fixed by #1419
Closed

ArrayOutOfBoundsException in Log4jFixedFormatter #1418

ppkarwasz opened this issue Apr 8, 2023 · 0 comments · Fixed by #1419
Labels
bug Incorrect, unexpected, or unintended behavior of existing code
Milestone

Comments

@ppkarwasz
Copy link
Contributor

The current buffer used by Log4jFixedFormatter is too small for formats that contain a timezone specifier, since the size of the buffer is equal to the patterns length and a Z pattern produces 5 characters.

@ppkarwasz ppkarwasz added the bug Incorrect, unexpected, or unintended behavior of existing code label Apr 8, 2023
@ppkarwasz ppkarwasz added this to the 2.20.1 milestone Apr 8, 2023
ppkarwasz added a commit to ppkarwasz/logging-log4j2 that referenced this issue Apr 8, 2023
ppkarwasz added a commit to ppkarwasz/logging-log4j2 that referenced this issue Aug 2, 2023
LuciferYang added a commit to apache/spark that referenced this issue Oct 23, 2023
### What changes were proposed in this pull request?
This pr aims upgrade log4j from 2.20.0 to 2.21.0.

### Why are the changes needed?
Support for the zstd compression algorithm has been added in the new version: apache/logging-log4j2#1508 | apache/logging-log4j2#1514
Meanwhile, the new version starts to use Java 11 for building, and the runtime version is still compatible with Java 8: apache/logging-log4j2#1369
The new version also brings some bug fixes, such as:
- Fixed logging of java.sql.Date objects by appending it before Log4J tries to call java.util.Date.toInstant() on it: apache/logging-log4j2#1366
- Fixed concurrent date-time formatting issue in PatternLayout: apache/logging-log4j2#1485
- Fixed buffer size in Log4jFixedFormatter date time formatter: apache/logging-log4j2#1418
- Fixed the propagation of synchronous action failures in RollingFileManager and FileRenameAction: apache/logging-log4j2#1445 | apache/logging-log4j2#1549
- Fixed RollingFileManager to propagate failed synchronous actions correctly: apache/logging-log4j2#1445
and more.

The complete release note is as follows:
- https://github.com/apache/logging-log4j2/releases/tag/rel%2F2.21.0

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?
Pass GitHub Actions

### Was this patch authored or co-authored using generative AI tooling?
No

Closes #43478 from LuciferYang/SPARK-45625.

Authored-by: yangjie01 <yangjie01@baidu.com>
Signed-off-by: yangjie01 <yangjie01@baidu.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Incorrect, unexpected, or unintended behavior of existing code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant