[JIRA] Created: (LBCORE-166) RenameUtil not truncating file if delete fails during rollover

RenameUtil not truncating file if delete fails during rollover -------------------------------------------------------------- Key: LBCORE-166 URL: http://jira.qos.ch/browse/LBCORE-166 Project: logback-core Issue Type: Bug Components: Rolling Affects Versions: 0.9.24 Environment: Microsoft Windows XP SP2 OAS 10.1.3.4 Java 1.5.0_14 Reporter: Jose David Barrio Assignee: Logback dev list Priority: Minor Attachments: RenameUtil.patch When using logback under Windows over Oracle Application Server, if you redeploy the web application, the log file is keep open by some reason so when a new rollover happens it fails to rename the log file. Currently RenameUtil does: - Try to rename log file. - If rename fails then rename by copy (copy plus delete). If for some reason deletion fails the log file keeps all its content so I just added a truncate if deletion fails: - Try to rename log file. - If rename fails then rename by copy (copy plus delete). - If delete fails then truncate file. I do have a patch file if it's useful. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCORE-166?page=com.atlassian.jira.plugin.system.i... ] Jose David Barrio updated LBCORE-166: ------------------------------------- Attachment: RenameUtil.patch
RenameUtil not truncating file if delete fails during rollover --------------------------------------------------------------
Key: LBCORE-166 URL: http://jira.qos.ch/browse/LBCORE-166 Project: logback-core Issue Type: Bug Components: Rolling Affects Versions: 0.9.24 Environment: Microsoft Windows XP SP2 OAS 10.1.3.4 Java 1.5.0_14 Reporter: Jose David Barrio Assignee: Logback dev list Priority: Minor Attachments: RenameUtil.patch
When using logback under Windows over Oracle Application Server, if you redeploy the web application, the log file is keep open by some reason so when a new rollover happens it fails to rename the log file. Currently RenameUtil does: - Try to rename log file. - If rename fails then rename by copy (copy plus delete). If for some reason deletion fails the log file keeps all its content so I just added a truncate if deletion fails: - Try to rename log file. - If rename fails then rename by copy (copy plus delete). - If delete fails then truncate file. I do have a patch file if it's useful.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCORE-166?page=com.atlassian.jira.plugin.system.i... ] manas kelshikar commented on LBCORE-166: ---------------------------------------- We have also experienced this issue while using dm server on windows. In our case we are using a RollingFileAppender with FixedWindowRollingPolicy and SizeBasedTriggeringPolicy so when a rename failure is followed by a delete failure there is a 'continuous' copy of the file leading to massive system I/O. This is a pretty severe problem and its priority should be bumped up from Minor. I will update the bug with logback configuration and also with output from an attached statuslistener.
RenameUtil not truncating file if delete fails during rollover --------------------------------------------------------------
Key: LBCORE-166 URL: http://jira.qos.ch/browse/LBCORE-166 Project: logback-core Issue Type: Bug Components: Rolling Affects Versions: 0.9.24 Environment: Microsoft Windows XP SP2 OAS 10.1.3.4 Java 1.5.0_14 Reporter: Jose David Barrio Assignee: Logback dev list Priority: Minor Attachments: RenameUtil.patch
When using logback under Windows over Oracle Application Server, if you redeploy the web application, the log file is keep open by some reason so when a new rollover happens it fails to rename the log file. Currently RenameUtil does: - Try to rename log file. - If rename fails then rename by copy (copy plus delete). If for some reason deletion fails the log file keeps all its content so I just added a truncate if deletion fails: - Try to rename log file. - If rename fails then rename by copy (copy plus delete). - If delete fails then truncate file. I do have a patch file if it's useful.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCORE-166?page=com.atlassian.jira.plugin.system.i... ] Ceki Gulcu commented on LBCORE-166: ----------------------------------- Which version of logback are you using?
RenameUtil not truncating file if delete fails during rollover --------------------------------------------------------------
Key: LBCORE-166 URL: http://jira.qos.ch/browse/LBCORE-166 Project: logback-core Issue Type: Bug Components: Rolling Affects Versions: 0.9.24 Environment: Microsoft Windows XP SP2 OAS 10.1.3.4 Java 1.5.0_14 Reporter: Jose David Barrio Assignee: Logback dev list Priority: Minor Attachments: RenameUtil.patch
When using logback under Windows over Oracle Application Server, if you redeploy the web application, the log file is keep open by some reason so when a new rollover happens it fails to rename the log file. Currently RenameUtil does: - Try to rename log file. - If rename fails then rename by copy (copy plus delete). If for some reason deletion fails the log file keeps all its content so I just added a truncate if deletion fails: - Try to rename log file. - If rename fails then rename by copy (copy plus delete). - If delete fails then truncate file. I do have a patch file if it's useful.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCORE-166?page=com.atlassian.jira.plugin.system.i... ] manas kelshikar updated LBCORE-166: ----------------------------------- Attachment: logbackStatus.txt The pasted pattern is repeated a few times in the logs. SInce this was a test run with atleast a 50times less load than our load test environment logback seems to have managed to recovered and I/O came back under control very quickly. However, our load test environment was experiencing 50MB/s I/O writes which pretty much meant that the system was doing nothing but write to the filesystem. 13:58:59,075 |-WARN in c.q.l.co.rolling.helper.RenameUtil - Failed to rename file [serviceability\logs\com.test.foo.client.epapp-1.0.0\log.log] to [serviceability\logs\com.test.foo.client.epapp-1.0.0\log_1.log]. 13:58:59,075 |-WARN in c.q.l.co.rolling.helper.RenameUtil - Attempting to rename by copying. 13:58:59,122 |-WARN in c.q.l.co.rolling.helper.RenameUtil - Could not delete serviceability/logs/com.test.foo.client.epapp-1.0.0/log.log Will attache the logback config shortly.
RenameUtil not truncating file if delete fails during rollover --------------------------------------------------------------
Key: LBCORE-166 URL: http://jira.qos.ch/browse/LBCORE-166 Project: logback-core Issue Type: Bug Components: Rolling Affects Versions: 0.9.24 Environment: Microsoft Windows XP SP2 OAS 10.1.3.4 Java 1.5.0_14 Reporter: Jose David Barrio Assignee: Logback dev list Priority: Minor Attachments: logbackStatus.txt, RenameUtil.patch
When using logback under Windows over Oracle Application Server, if you redeploy the web application, the log file is keep open by some reason so when a new rollover happens it fails to rename the log file. Currently RenameUtil does: - Try to rename log file. - If rename fails then rename by copy (copy plus delete). If for some reason deletion fails the log file keeps all its content so I just added a truncate if deletion fails: - Try to rename log file. - If rename fails then rename by copy (copy plus delete). - If delete fails then truncate file. I do have a patch file if it's useful.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCORE-166?page=com.atlassian.jira.plugin.system.i... ] manas kelshikar commented on LBCORE-166: ---------------------------------------- @Ceki - The dm server(2.0.4) that we are using ships with logback 0.9.18.
RenameUtil not truncating file if delete fails during rollover --------------------------------------------------------------
Key: LBCORE-166 URL: http://jira.qos.ch/browse/LBCORE-166 Project: logback-core Issue Type: Bug Components: Rolling Affects Versions: 0.9.24 Environment: Microsoft Windows XP SP2 OAS 10.1.3.4 Java 1.5.0_14 Reporter: Jose David Barrio Assignee: Logback dev list Priority: Minor Attachments: logbackStatus.txt, RenameUtil.patch
When using logback under Windows over Oracle Application Server, if you redeploy the web application, the log file is keep open by some reason so when a new rollover happens it fails to rename the log file. Currently RenameUtil does: - Try to rename log file. - If rename fails then rename by copy (copy plus delete). If for some reason deletion fails the log file keeps all its content so I just added a truncate if deletion fails: - Try to rename log file. - If rename fails then rename by copy (copy plus delete). - If delete fails then truncate file. I do have a patch file if it's useful.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCORE-166?page=com.atlassian.jira.plugin.system.i... ] Ceki Gulcu commented on LBCORE-166: ----------------------------------- Upgrade to logback version 0.9.28 and the problem will go away.
RenameUtil not truncating file if delete fails during rollover --------------------------------------------------------------
Key: LBCORE-166 URL: http://jira.qos.ch/browse/LBCORE-166 Project: logback-core Issue Type: Bug Components: Rolling Affects Versions: 0.9.24 Environment: Microsoft Windows XP SP2 OAS 10.1.3.4 Java 1.5.0_14 Reporter: Jose David Barrio Assignee: Logback dev list Priority: Minor Attachments: logbackStatus.txt, RenameUtil.patch
When using logback under Windows over Oracle Application Server, if you redeploy the web application, the log file is keep open by some reason so when a new rollover happens it fails to rename the log file. Currently RenameUtil does: - Try to rename log file. - If rename fails then rename by copy (copy plus delete). If for some reason deletion fails the log file keeps all its content so I just added a truncate if deletion fails: - Try to rename log file. - If rename fails then rename by copy (copy plus delete). - If delete fails then truncate file. I do have a patch file if it's useful.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCORE-166?page=com.atlassian.jira.plugin.system.i... ] manas kelshikar commented on LBCORE-166: ---------------------------------------- Thanks! Appreciate your awesome response time.
RenameUtil not truncating file if delete fails during rollover --------------------------------------------------------------
Key: LBCORE-166 URL: http://jira.qos.ch/browse/LBCORE-166 Project: logback-core Issue Type: Bug Components: Rolling Affects Versions: 0.9.24 Environment: Microsoft Windows XP SP2 OAS 10.1.3.4 Java 1.5.0_14 Reporter: Jose David Barrio Assignee: Logback dev list Priority: Minor Attachments: logbackStatus.txt, RenameUtil.patch
When using logback under Windows over Oracle Application Server, if you redeploy the web application, the log file is keep open by some reason so when a new rollover happens it fails to rename the log file. Currently RenameUtil does: - Try to rename log file. - If rename fails then rename by copy (copy plus delete). If for some reason deletion fails the log file keeps all its content so I just added a truncate if deletion fails: - Try to rename log file. - If rename fails then rename by copy (copy plus delete). - If delete fails then truncate file. I do have a patch file if it's useful.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
participants (3)
-
Ceki Gulcu (JIRA)
-
Jose David Barrio (JIRA)
-
manas kelshikar (JIRA)