race condition when rotating logs
Bug #481512 reported by
Gary Poster
This bug affects 4 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
Critical
|
Unassigned | ||
ZConfig |
Fix Released
|
Medium
|
aboubacar |
Bug Description
lpnet 13 reported a segfault. Diagnostic details are here:
- https:/
- https:/
As Michael describes in the first comment below, this appears to be caused by a race condition: writing logs while rotating them. (See thread 6 and thread 1 in second pastebin.)
The next challenge is to figure out what can be done about this, barring the removal of in-app logrotation.
Related branches
lp:~henninge/launchpad/bug-481512-reopen-logs
- Gary Poster (community): Approve
-
Diff: 12 lines (+1/-1)1 file modifiedversions.cfg (+1/-1)
lp:~lifeless/zconfig/bug-481512
Ready for review
for merging
into
lp:~fdrake/zconfig/trunk
- Curtis Hovey (community): Approve (code)
- Fred Drake: Pending requested
-
Diff: 100 lines (+41/-33)2 files modifiedZConfig/components/logger/loghandler.py (+41/-16)
ZConfig/components/logger/tests/test_logger.py (+0/-17)
summary: |
- segfault on lpnet13 + race condition when rotating logs |
description: | updated |
Changed in launchpad-foundations: | |
status: | New → Triaged |
importance: | Undecided → Low |
importance: | Low → High |
description: | updated |
tags: | added: canonical-losa-lp |
Changed in launchpad: | |
status: | Triaged → In Progress |
assignee: | nobody → Henning Eggers (henninge) |
Changed in zconfig: | |
status: | New → In Progress |
assignee: | nobody → Henning Eggers (henninge) |
tags: | added: no-qa |
Changed in launchpad: | |
status: | Fix Committed → Fix Released |
tags: | removed: escalated |
tags: | added: webapp-infrastructure |
information type: | Public → Private |
information type: | Private → Public |
Changed in zconfig: | |
assignee: | Fred Drake (fdrake) → aboubacar (aboubacar12) |
To post a comment you must log in.
gdb-ing suggests very strongly that this is a fclose/fwrite race at logrotate time: thread 6 is waiting to reacquire the GIL having just closed something, the python stacktrace very much suggesting a log file and thread 1 is writing to something, the python stacktrace very much suggesting a log file.