Skip to content

Logs Cannot Be Written After VM File Handles Are Used Up #1261

@HaitaoDeng

Description

@HaitaoDeng

Description

Fault injection: VM file handles are used up, and logs cannot be printed after the fault is rectified. IOException: Stream Closed.
[A clear and concise description of what the bug is.]

Configuration

Version: [Log4j version]
2.71.1
Operating system: [OS and version]
linux
JDK: [JDK distribution and version]
openjdk 1.8

Logs

Logs during fault injection:
image
Logs After Fault Recovery:
image

[Stacktraces, errors, etc. relevant applications logs.]

Reproduction

[An isolated test reproducing the test.
JUnit tests similar to the ones in the code base are extremely appreciated.]

org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager#writeToDestination
randomAccessFile should check whether The Stream is closed。
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    appendersAffects one or more Appender pluginsbugIncorrect, unexpected, or unintended behavior of existing code

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions