Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
ceph
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
certo
ceph
Commits
83f5ccce
Commit
83f5ccce
authored
Dec 27, 2020
by
Vladimir Bashkirtsev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use a safe value for timeout
parent
ecaf92e4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
ceph-15.2.4-fix_ceph_thread_timeout.patch
ceph-15.2.4-fix_ceph_thread_timeout.patch
+7
-4
No files found.
ceph-15.2.4-fix_ceph_thread_timeout.patch
View file @
83f5ccce
diff -uNr ceph-15.2.4/src/pybind/ceph_argparse.py ceph-15.2.4-fix_ceph_thread_timeout/src/pybind/ceph_argparse.py
--- ceph-15.2.4/src/pybind/ceph_argparse.py 2020-07-01 01:10:51.000000000 +0930
+++ ceph-15.2.4-fix_ceph_thread_timeout/src/pybind/ceph_argparse.py 2020-1
1-18 18:57:39.711443174
+1030
@@ -1317,9 +1317,
8
@@
+++ ceph-15.2.4-fix_ceph_thread_timeout/src/pybind/ceph_argparse.py 2020-1
2-27 14:15:28.161241445
+1030
@@ -1317,9 +1317,
11
@@
if timeout == 0 or timeout == None:
# python threading module will just get blocked if timeout is `None`,
# otherwise it will keep polling until timeout or thread stops.
- # wait for INT32_MAX, as python 3.6.8 use int32_t to present the
- # timeout in integer when converting it to nanoseconds
- timeout = (1 << (32 - 1)) - 1
+ # wait for 5 seconds, as python 3.6.8 use float to present the timeout
+ timeout = 5.0
+ # timeout in integer when converting it to nanoseconds, but since
+ # python3 uses `int64_t` for the deadline before timeout expires,
+ # we have to use a safe value which does not overflow after being
+ # added to current time in microseconds.
+ timeout = 24 * 60 * 60
t = RadosThread(func, *args, **kwargs)
# allow the main thread to exit (presumably, avoid a join() on this
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment