Project

General

Profile

Bug #43402

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

Added by Mark Nelson 11 months ago. Updated 6 months 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:

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.

History

#2 Updated by Kefu Chai 11 months ago

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

#3 Updated by Sebastian Wagner 6 months ago

  • Status changed from Fix Under Review to Resolved

Also available in: Atom PDF