Logs Cannot Be Written After VM File Handles Are Used Up #1261
Labels
appenders
Affects one or more Appender plugins
bug
Incorrect, unexpected, or unintended behavior of existing code
waiting-for-maintainer
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](https://user-images.githubusercontent.com/31698031/216322128-9663949c-9f07-4b5f-a3df-ac307c42171f.png)
![image](https://user-images.githubusercontent.com/31698031/216322528-f534ed67-6255-429b-b6b2-b9d18f02a9bb.png)
Logs After Fault Recovery:
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
![image](https://user-images.githubusercontent.com/31698031/216323422-e0d06759-5848-4187-be55-8e81c977a29d.png)
randomAccessFile should check whether The Stream is closed。
The text was updated successfully, but these errors were encountered: