You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "HaitaoDeng (via GitHub)" <gi...@apache.org> on 2023/02/02 12:23:19 UTC

[GitHub] [logging-log4j2] HaitaoDeng opened a new issue, #1261: Logs Cannot Be Written After VM File Handles Are Used Up

HaitaoDeng opened a new issue, #1261:
URL: https://github.com/apache/logging-log4j2/issues/1261

   ## 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)
   Logs After Fault Recovery:
   ![image](https://user-images.githubusercontent.com/31698031/216322528-f534ed67-6255-429b-b6b2-b9d18f02a9bb.png)
   
   ```
   [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](https://user-images.githubusercontent.com/31698031/216323422-e0d06759-5848-4187-be55-8e81c977a29d.png)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Logs Cannot Be Written After VM File Handles Are Used Up (logging-log4j2)

Posted by "HaitaoDeng (via GitHub)" <gi...@apache.org>.
HaitaoDeng commented on issue #1261:
URL: https://github.com/apache/logging-log4j2/issues/1261#issuecomment-1467690843

   > Once the file rollover fails the Appender is essentially dead as it no longer has an open stream. This is not unique to RandomAccessFile as all file appenders will face this. I really don't see a good way to fix this.
   
   IOException handling,when Stream Closed, randomAccessFile is set to null. A new access file will be created next time. Is this OK?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [logging-log4j2] rgoers commented on issue #1261: Logs Cannot Be Written After VM File Handles Are Used Up

Posted by "rgoers (via GitHub)" <gi...@apache.org>.
rgoers commented on issue #1261:
URL: https://github.com/apache/logging-log4j2/issues/1261#issuecomment-1424400863

   Once the file rollover fails the Appender is essentially dead as it no longer has an open stream. This is not unique to RandomAccessFile as all file appenders will face this. I really don't see a good way to fix this. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org