Project

General

Profile

Bug #6679

throttle: transient unit test failure

Added by Sage Weil almost 6 years ago. Updated over 5 years ago.

Status:
Resolved
Priority:
High
Assignee:
Category:
common
Target version:
-
Start date:
10/29/2013
Due date:
% Done:

100%

Source:
Q/A
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:

Description

test/common/Throttle.cc:191: Failure
Value of: throttle_max / 2
Actual: 5
Expected: throttle.get_current()
Which is: 15
[ FAILED ] ThrottleTest.wait (11 ms)


http://gitbuilder.sepia.ceph.com/gitbuilder-ceph-tarball-precise-amd64-notcmalloc/log.cgi?log=9b4cb6d468c470019174c9d841ba31f7e36254d2

Related issues

Related to Ceph - Bug #6130: SharedPtrRegistry_all.wait_lookup_or_create fails inconsistently Resolved 08/26/2013

Associated revisions

Revision e57239e9 (diff)
Added by Loic Dachary over 5 years ago

common: fix rare race condition in Throttle unit tests

The thread created to test Throttle race conditions updates a value (
throttle.get_current() ) that is tested by the main gtest thread but is
not protected by a lock. Instead of adding a lock, the main thread tests
the value after pthread_join() on the child thread.

http://tracker.ceph.com/issues/6679 fixes #6679

Signed-off-by: Loic Dachary <>

History

#1 Updated by Loic Dachary over 5 years ago

  • Assignee set to Loic Dachary

#2 Updated by Loic Dachary over 5 years ago

  • Status changed from New to Verified

Reproduced with

$ while : ; do ./unittest_throttle --gtest_filter=ThrottleTest.wait > /tmp/1 2>&1 && echo -n . || break ; done

.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
tail -20 /tmp/1
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from ThrottleTest
[ RUN      ] ThrottleTest.wait
Trying (3) with delay 1us
test/common/Throttle.cc:191: Failure
Value of: throttle_max / 2
  Actual: 5
Expected: throttle.get_current()
Which is: 15
[  FAILED  ] ThrottleTest.wait (0 ms)
[----------] 1 test from ThrottleTest (0 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (0 ms total)
[  PASSED  ] 0 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] ThrottleTest.wait

 1 FAILED TEST

#3 Updated by Loic Dachary over 5 years ago

  • % Done changed from 0 to 90

#4 Updated by Loic Dachary over 5 years ago

  • Status changed from Verified to Need Review

#5 Updated by Loic Dachary over 5 years ago

  • Status changed from Need Review to Resolved
  • % Done changed from 90 to 100

Also available in: Atom PDF