[SERVER-21020] SelfDeletingCase in background_job_test is non-deterministic Created: 14/Oct/15  Updated: 17/Nov/15  Resolved: 05/Nov/15

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: 3.2.0-rc3

Type: Bug Priority: Minor - P4
Reporter: Max Hirschhorn Assignee: Andrew Morrow (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Platform B (10/30/15), Platform C (11/20/15)
Participants:

 Description   

Task
Logs

[cpp_unit_test:background_job_test] 2015-10-13T22:33:29.484+0000 2015-10-13T22:33:29.483+0000 I -        [main] going to run suite: BackgroundJobBasic
[cpp_unit_test:background_job_test] 2015-10-13T22:33:29.484+0000 2015-10-13T22:33:29.483+0000 I -        [main]    going to run test: NormalCase
[cpp_unit_test:background_job_test] 2015-10-13T22:33:29.484+0000 2015-10-13T22:33:29.483+0000 I -        [main]    going to run test: TimeOutCase
[cpp_unit_test:background_job_test] 2015-10-13T22:33:31.544+0000 2015-10-13T22:33:31.521+0000 I -        [main]    going to run test: SelfDeletingCase
[cpp_unit_test:background_job_test] 2015-10-13T22:33:32.643+0000 2015-10-13T22:33:32.539+0000 I -        [main] FAIL: SelfDeletingCase  Expected GLOBAL_val == 1 (0 == 1) @src/mongo/util/background_job_test.cpp:109



 Comments   
Comment by Githook User [ 05/Nov/15 ]

Author:

{u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@mongodb.com'}

Message: SERVER-21020 Make BackgroundJob unit tests deterministic
Branch: master
https://github.com/mongodb/mongo/commit/6c6f74c1d0e05bd14740c33ed703320b3c09d5ae

Comment by Geert Bosch [ 03/Nov/15 ]

See also failure in https://evergreen.mongodb.com/task/mongodb_mongo_master_linux_64_repeated_execution_unittests_8a3acb42742182c5e314636041c2df368232bbc5_15_11_03_15_56_46

[cpp_unit_test:background_job_test] 2015-11-03T17:08:38.197+0000 Starting Program build/opt/mongo/util/background_job_test...
build/opt/mongo/util/background_job_test
[cpp_unit_test:background_job_test] 2015-11-03T17:08:38.271+0000 2015-11-03T17:08:38.257+0000 I -        [main] going to run suite: BackgroundJobBasic
[cpp_unit_test:background_job_test] 2015-11-03T17:08:38.272+0000 Program build/opt/mongo/util/background_job_test started with pid 30071.
[cpp_unit_test:background_job_test] 2015-11-03T17:08:38.272+0000 2015-11-03T17:08:38.257+0000 I -        [main] 	 going to run test: NormalCase
[cpp_unit_test:background_job_test] 2015-11-03T17:08:38.272+0000 2015-11-03T17:08:38.261+0000 I -        [main] 	 going to run test: TimeOutCase
[cpp_unit_test:background_job_test] 2015-11-03T17:08:40.517+0000 2015-11-03T17:08:40.517+0000 I -        [main] 	 going to run test: SelfDeletingCase
[cpp_unit_test:background_job_test] 2015-11-03T17:08:41.527+0000 2015-11-03T17:08:41.526+0000 I -        [main] FAIL: SelfDeletingCase	Expected GLOBAL_val == 1 (0 == 1) @src/mongo/util/background_job_test.cpp:109
[cpp_unit_test:background_job_test] 2015-11-03T17:08:41.527+0000 2015-11-03T17:08:41.527+0000 I -        [main] 	 DONE running tests
[cpp_unit_test:background_job_test] 2015-11-03T17:08:41.527+0000 2015-11-03T17:08:41.527+0000 I -        [main] going to run suite: BackgroundJobLifeCycle
[cpp_unit_test:background_job_test] 2015-11-03T17:08:41.528+0000 2015-11-03T17:08:41.527+0000 I -        [main] 	 going to run test: Go
[cpp_unit_test:background_job_test] 2015-11-03T17:08:41.528+0000 2015-11-03T17:08:41.527+0000 I -        [main] Assertion: 17234:backgroundJob already running: BackgroundLifeCycle::CannotCallGoAgain
[cpp_unit_test:background_job_test] 2015-11-03T17:08:41.677+0000 2015-11-03T17:08:41.677+0000 I CONTROL  [main]
[cpp_unit_test:background_job_test] 2015-11-03T17:08:41.678+0000  0x55be72 0x513a44 0x5061a8 0x50625c 0x50c016 0x4b2048 0x4fd3db 0x4b1e9a 0x5000b6 0x501455 0x50520a 0x2b421345c9f4 0x4b1a29
[cpp_unit_test:background_job_test] 2015-11-03T17:08:41.678+0000 ----- BEGIN BACKTRACE -----
[cpp_unit_test:background_job_test] 2015-11-03T17:08:41.680+0000 {"backtrace":[{"b":"400000","o":"15BE72"},{"b":"400000","o":"113A44"},{"b":"400000","o":"1061A8"},{"b":"400000","o":"10625C"},{"b":"400000","o":"10C016"},{"b":"400000","o":"B2048"},{"b":"400000","o":"FD3DB"},{"b":"400000","o":"B1E9A"},{"b":"400000","o":"1000B6"},{"b":"400000","o":"101455"},{"b":"400000","o":"10520A"},{"b":"2B421343F000","o":"1D9F4"},{"b":"400000","o":"B1A29"}],"processInfo":{ "mongodbVersion" : "3.2.0-rc1-84-g8a3acb4", "gitVersion" : "8a3acb42742182c5e314636041c2df368232bbc5", "compiledModules" : [], "uname" : { "sysname" : "Linux", "release" : "2.6.18-194.el5xen", "version" : "#1 SMP Tue Mar 16 22:01:26 EDT 2010", "machine" : "x86_64" }, "somap" : [ { "elfType" : 2, "b" : "400000" }, { "b" : "2B4212683000", "path" : "/lib64/librt.so.1", "elfType" : 3 }, { "b" : "2B421288C000", "path" : "/lib64/libdl.so.2", "elfType" : 3 }, { "b" : "2B4212A90000", "path" : "/usr/lib64/libstdc++.so.6", "elfType" : 3 }, { "b" : "2B4212D91000", "path" : "/lib64/libm.so.6", "elfType" : 3 }, { "b" : "2B4213014000", "path" : "/lib64/libgcc_s.so.1", "elfType" : 3 }, { "b" : "2B4213222000", "path" : "/lib64/libpthread.so.0", "elfType" : 3 }, { "b" : "2B421343F000", "path" : "/lib64/libc.so.6", "elfType" : 3 }, { "b" : "2B4212465000", "path" : "/lib64/ld-linux-x86-64.so.2", "elfType" : 3 } ] }}
[cpp_unit_test:background_job_test] 2015-11-03T17:08:41.680+0000  background_job_test(_ZN5mongo15printStackTraceERSo+0x32) [0x55be72]
[cpp_unit_test:background_job_test] 2015-11-03T17:08:41.681+0000  background_job_test(_ZN5mongo10logContextEPKc+0x134) [0x513a44]
[cpp_unit_test:background_job_test] 2015-11-03T17:08:41.681+0000  background_job_test(_ZN5mongo11msgassertedEiPKc+0x88) [0x5061a8]
[cpp_unit_test:background_job_test] 2015-11-03T17:08:41.681+0000  background_job_test(+0x10625C) [0x50625c]
[cpp_unit_test:background_job_test] 2015-11-03T17:08:41.681+0000  background_job_test(_ZN5mongo13BackgroundJob2goEv+0x286) [0x50c016]
[cpp_unit_test:background_job_test] 2015-11-03T17:08:41.681+0000  background_job_test(+0xB2048) [0x4b2048]
[cpp_unit_test:background_job_test] 2015-11-03T17:08:41.682+0000  background_job_test(_ZN5mongo8unittest4Test3runEv+0x1B) [0x4fd3db]
[cpp_unit_test:background_job_test] 2015-11-03T17:08:41.682+0000  background_job_test(+0xB1E9A) [0x4b1e9a]
[cpp_unit_test:background_job_test] 2015-11-03T17:08:41.682+0000  background_job_test(_ZN5mongo8unittest5Suite3runERKSsi+0x646) [0x5000b6]
[cpp_unit_test:background_job_test] 2015-11-03T17:08:41.682+0000  background_job_test(_ZN5mongo8unittest5Suite3runERKSt6vectorISsSaISsEERKSsi+0x495) [0x501455]
[cpp_unit_test:background_job_test] 2015-11-03T17:08:41.682+0000  background_job_test(main+0x6A) [0x50520a]
[cpp_unit_test:background_job_test] 2015-11-03T17:08:41.683+0000  libc.so.6(__libc_start_main+0xF4) [0x2b421345c9f4]
[cpp_unit_test:background_job_test] 2015-11-03T17:08:41.683+0000  background_job_test(_ZNSt15basic_streambufIcSt11char_traitsIcEE6xsputnEPKcl+0x39) [0x4b1a29]
[cpp_unit_test:background_job_test] 2015-11-03T17:08:41.683+0000 -----  END BACKTRACE  -----
[cpp_unit_test:background_job_test] 2015-11-03T17:08:41.683+0000 2015-11-03T17:08:41.677+0000 I -        [main] 	 DONE running tests
[cpp_unit_test:background_job_test] 2015-11-03T17:08:41.684+0000 2015-11-03T17:08:41.677+0000 I -        [main] **************************************************
[cpp_unit_test:background_job_test] 2015-11-03T17:08:41.684+0000 2015-11-03T17:08:41.677+0000 I -        [main] BackgroundJobBasic             | tests:    3 | fails:    1 | assert calls:          0 | time secs:  3.269
[cpp_unit_test:background_job_test] 2015-11-03T17:08:41.684+0000 	SelfDeletingCase	Expected GLOBAL_val == 1 (0 == 1) @src/mongo/util/background_job_test.cpp:109
[cpp_unit_test:background_job_test] 2015-11-03T17:08:41.685+0000 2015-11-03T17:08:41.677+0000 I -        [main] BackgroundJobLifeCycle         | tests:    1 | fails:    0 | assert calls:          0 | time secs:  0.150
[cpp_unit_test:background_job_test] 2015-11-03T17:08:41.685+0000 2015-11-03T17:08:41.677+0000 I -        [main] TOTALS                         | tests:    4 | fails:    1 | assert calls:          0 | time secs:  3.419
[cpp_unit_test:background_job_test] 2015-11-03T17:08:41.685+0000 2015-11-03T17:08:41.677+0000 I -        [main] Failing tests:
[cpp_unit_test:background_job_test] 2015-11-03T17:08:41.685+0000 2015-11-03T17:08:41.677+0000 I -        [main] 	 BackgroundJobBasic/SelfDeletingCase Failed
[cpp_unit_test:background_job_test] 2015-11-03T17:08:41.686+0000 2015-11-03T17:08:41.677+0000 I -        [main] FAILURE - 1 tests in 1 suites failed

Comment by Andrew Morrow (Inactive) [ 18/Oct/15 ]

The test is non-deterministic: https://github.com/mongodb/mongo/blob/master/src/mongo/util/background_job_test.cpp#L108

Comment by Max Hirschhorn [ 14/Oct/15 ]

Assigning to Drew for initial triage. I've only seen it fail the one time, but scheduled some runs on the repeated execution build variant.

https://evergreen.mongodb.com/task_history/mongodb-mongo-master/unittests?revision=55638987e46cfd9a562b69490118950067c3148d#/background_job_test=fail

Generated at Thu Feb 08 03:56:00 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.