Project

General

Profile

Actions

Bug #43402

closed

Python 3.6 + ceph_argparse.py RadosThreads may not fully exit before is_alive() is called

Added by Mark Nelson over 4 years ago. Updated almost 4 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
ceph cli
Target version:
% Done:

0%

Source:
Development
Tags:
Backport:
Regression:
Yes
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Running the ceph command from a recent pull of master where python 3.6 is used always results in an exception being thrown on one of our incerta test boxes:

[perf@incerta01 log]$ ceph -w
Traceback (most recent call last):
  File "/usr/local/bin/ceph", line 1267, in <module>
    retval = main()
  File "/usr/local/bin/ceph", line 980, in main
    conffile=conffile)
  File "/usr/local/lib/python3.6/site-packages/ceph_argparse.py", line 1336, in run_in_thread
    raise Exception("timed out")

This appears to be the result of calling is_alive() immediately after join where a thread hasn't fully finished exiting yet. On my system inserting a short sleep is enough to resolve the issue, though this may not resolve the situation on all platforms:

time.sleep(.01)

A better option might be a short loop with multiple sleeps and retries of is_alive() before finally giving up. Someone who knows python better than I do may have a superior solution. As it is, this appears to block all usage of the ceph command.

Actions #2

Updated by Kefu Chai over 4 years ago

  • Status changed from New to Fix Under Review
  • Assignee set to Mark Nelson
  • Pull request ID set to 32379
Actions #3

Updated by Sebastian Wagner almost 4 years ago

  • Status changed from Fix Under Review to Resolved
Actions

Also available in: Atom PDF