Issue Details (XML | Word | Printable)

Key: CORE-5838
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Vlad Khorsun
Reporter: Sergey Borisov
Votes: 0
Watchers: 2

If you were logged in you would be able to see more operations.
Firebird Core

Rotated Trace files locked by engine

Created: 31/May/18 10:53 AM   Updated: 15/Jun/20 05:10 AM
Component/s: TRACEMGR
Affects Version/s: 3.0.4
Fix Version/s: 4.0 RC 1

File Attachments: None
Image Attachments:

1. screenshot.PNG
(59 kB)
Environment: TEST

QA Status: Deferred
Test Details:
Can not be implemented using current fbtest package: we have no ability to restart FB during tests for turning on/off system audit.
Probably will be implemented after developing additional batch scenario for this.

 Description  « Hide
Firebird 3.0.4 Classic on Windows OS running with system trace audit with log rotation param max_log_size = 50.

For many rotated files (not all) the engine still has a lock of the file, so they can not be opened for viewing. Within 6 hours we have 8 such files.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Vlad Khorsun added a comment - 31/May/18 11:42 AM
Could you confirm that all such files are locked by idle Firebird Classic processes ?

Sergey Borisov added a comment - 31/May/18 12:01 PM
Yes, look the screenshot.
Firebird PID=2512 lock file fb_trace.2018-05-31T12-11-06.log.

Vlad Khorsun added a comment - 31/May/18 12:09 PM
Are you sure PID 2512 is idle ?

You may check it using monitoring tables.

Also, what happens with fb_trace.2018-05-31T12-11-06.log file when any audited event occurs in
attachment handled by PID 2512 (no need to disconnect it, just run some query, etc) ?

Sergey Borisov added a comment - 31/May/18 12:37 PM
Yes, PID 2512 was in idle.
select A.Mon$state from mon$attachments A Where A.mon$server_pid in (2512)
return 0.

After running query and commiting transaction on that connection (PID 2512) , the lock disappeared.

Vlad Khorsun added a comment - 31/May/18 12:45 PM
Thank for confirmation

Sean Leyne added a comment - 31/May/18 01:35 PM
Edited to clarify issue

Vlad Khorsun added a comment - 19/May/20 03:32 PM
Fix is committed into v4.
Tested on Windows mostly, please test it carefully.