Closed Bug 1114807 Opened 10 years ago Closed 9 years ago

runner fails when twistd.pid exists but is empty

Categories

(Release Engineering :: General, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: coop, Assigned: mrrrgn)

Details

Attachments

(1 file, 1 obsolete file)

I'm not sure how we got into this state on a slave (specifically talos-linux64-ix-007, but likely other slaves as well), but when the twistd.pid file exists but is empty, i.e. doesn't actually contain the process number, runner hits the following exception:

File "/opt/runner/tasks.d/4-buildbot.py", line 74, in <module>
main()
File "/opt/runner/tasks.d/4-buildbot.py", line 43, in main
if buildbot_process_id():
File "/opt/runner/tasks.d/4-buildbot.py", line 30, in buildbot_process_id
pid = int(f.read())
ValueError: invalid literal for int() with base 10: ''

I think the safest thing to do in this case would be to remove the twistd.pid file and *then* reboot, unless we have some other way tell if buildbot is already running.
Assignee: nobody → winter2718
Attached patch runner.bbtask.pidfile.diff (obsolete) — Splinter Review
This is fixing up the issue on my testers.
Attachment #8540556 - Flags: review?(coop)
There was a small boo-boo on the last patch (cast to integer was left outside of the try statement).
Attachment #8540556 - Attachment is obsolete: true
Attachment #8540556 - Flags: review?(coop)
Attachment #8540557 - Flags: review?(coop)
Attachment #8540557 - Flags: review?(coop) → review+
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Attachment #8540557 - Flags: checked-in+
Component: Tools → General
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: