Closed
Bug 752951
Opened 12 years ago
Closed 12 years ago
if we timeout ttest.py, bcontroller.py can still hang around
Categories
(Testing :: Talos, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: jmaher, Assigned: jmaher)
References
Details
Attachments
(1 file, 1 obsolete file)
611 bytes,
patch
|
wlach
:
review+
|
Details | Diff | Splinter Review |
it looks like we can hit a condition where bcontroller.py hangs and the talos test terminates. In that scenario, we need to kill the process if it exists in our error handling and cleanup routines.
Assignee | ||
Comment 1•12 years ago
|
||
Comment 2•12 years ago
|
||
Comment on attachment 622033 [details] [diff] [review] kill bcontroller.py at the end of talos. (1.0) Review of attachment 622033 [details] [diff] [review]: ----------------------------------------------------------------- The idea is right, but IMO we should just call kill() on the Popen object that represents bcontroller, instead of using talos's abstractions. Less code, easier to understand.
Attachment #622033 -
Flags: review?(wlachance) → review-
Assignee | ||
Comment 3•12 years ago
|
||
much simpler.
Attachment #622033 -
Attachment is obsolete: true
Attachment #622052 -
Flags: review?(wlachance)
Comment 4•12 years ago
|
||
Comment on attachment 622052 [details] [diff] [review] kill bcontroller.py at the end of talos. (2.0) No need for the "if process:". There is no circumstance where process could be None. Other than that, looks fine.
Attachment #622052 -
Flags: review?(wlachance) → review+
Assignee | ||
Comment 5•12 years ago
|
||
http://hg.mozilla.org/build/talos/rev/8ee9b373ea24
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Comment 6•12 years ago
|
||
Note that on python 2.4 (which we still use for windows) there is no Popen.kill method: Traceback (most recent call last): File "run_tests.py", line 640, in ? main() File "run_tests.py", line 637, in main test_file(arg, options, parser.parsed) File "run_tests.py", line 574, in test_file browser_dump, counter_dump, print_format = mytest.runTest(browser_config, test) File "c:\talos-slave\talos-data\talos\ttest.py", line 343, in runTest process.kill() AttributeError: 'Popen' object has no attribute 'kill' We should not deploy this until this is fixed. Probably the thing to do is try: os.kill(process.pid, signal.SIGKILL) except: # do something!
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 7•12 years ago
|
||
I can take this as a ridealong to bug 704654 if desired
Comment 8•12 years ago
|
||
actually since we don't want to guess or rely on what os.kill does on windows, and we don't really care about windows which is the only case we have py 2.4, maybe just checking if .kill exists is sufficient: if hasattr(process, 'kill'): process.kill() This line of code also seems to be the problem with https://bugzilla.mozilla.org/show_bug.cgi?id=753526 although that is mac. If I kill processes that don't exist on linux, i get no errors
See Also: → 753526
Comment 9•12 years ago
|
||
in addition you can get oserror no such process when doing this. in linux and mac this is errno 3. in windows im not sure how/if this shows itself.
Comment 10•12 years ago
|
||
should be fixed with bug 704654: http://hg.mozilla.org/build/talos/rev/1680be7af3bf#l11.13 It'd be nice to have a better solution for this, but I think/hope this will do for now. mozprocess ftw
Status: REOPENED → RESOLVED
Closed: 12 years ago → 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•