runner fails when twistd.pid exists but is empty

RESOLVED FIXED

Status

Release Engineering
General
RESOLVED FIXED
3 years ago
7 months ago

People

(Reporter: coop, Assigned: mrrrgn)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

3 years ago
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)

Updated

3 years ago
Assignee: nobody → winter2718
(Assignee)

Comment 1

3 years ago
Created attachment 8540556 [details] [diff] [review]
runner.bbtask.pidfile.diff

This is fixing up the issue on my testers.
Attachment #8540556 - Flags: review?(coop)
(Assignee)

Comment 2

3 years ago
Created attachment 8540557 [details] [diff] [review]
runner.bbtask.pidfile.diff

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)
(Reporter)

Updated

3 years ago
Attachment #8540557 - Flags: review?(coop) → review+
(Assignee)

Updated

3 years ago
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
(Assignee)

Updated

3 years ago
Attachment #8540557 - Flags: checked-in+
Component: Tools → General
Product: Release Engineering → Release Engineering
You need to log in before you can comment on or make changes to this bug.