[SERVER-695] mutex assertion on shutdown is ugly Created: 03/Mar/10  Updated: 12/Jul/16  Resolved: 15/Mar/10

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 1.3.4

Type: Improvement Priority: Minor - P4
Reporter: Aaron Staple Assignee: Aaron Staple
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-2652 pthread_mutex_lock assertion on shutdown Closed
Participants:

 Description   

Assertion failed: (!pthread_mutex_destroy(&m)), function ~mutex, file /opt/local/include/boost/thread/pthread/mutex.hpp, line 45.
Wed Mar 3 01:41:06 Got signal: 6 (Abort trap).
Wed Mar 3 01:41:06 Backtrace:
0x57c13 0x17e423 0x91fa82bb 0xffffffff 0x15f4a1 0x18179d 0x1817c9 0x18752a 0x1bf6
0 mongod 0x00057c13 _ZN5mongo15printStackTraceERSo + 33
1 mongod 0x0017e423 _ZN5mongo10abruptQuitEi + 337
2 libSystem.B.dylib 0x91fa82bb _sigtramp + 43
3 ??? 0xffffffff 0x0 + 4294967295
4 mongod 0x0015f4a1 _ZN5mongo9sleepsecsEi + 45
5 mongod 0x0018179d _ZN5mongo14_initAndListenEiPKc + 1963
6 mongod 0x001817c9 _ZN5mongo13initAndListenEiPKc + 33
7 mongod 0x0018752a main + 23364
8 mongod 0x00001bf6 start + 54
Wed Mar 3 01:41:06 dbexit: ; exiting immediately

We allow mutexes to be held on shutdown, but boost doesn't like this. We've solved in the past by ensuring that boost mutexes that may be held at shutdown are never destroyed. We should use code to ensure that this the default whenever someone adds a new mutex.



 Comments   
Comment by auto [ 15/Mar/10 ]

Author:

{'login': 'astaple', 'name': 'Aaron', 'email': 'aaron@10gen.com'}

Message: SERVER-695 add StaticObserver to more binaries
http://github.com/mongodb/mongo/commit/f097370033273ad79f061a066657fed2362972a0

Comment by auto [ 15/Mar/10 ]

Author:

{'login': 'astaple', 'name': 'Aaron', 'email': 'aaron@10gen.com'}

Message: SERVER-695 expose boost object to work better with older boost versions
http://github.com/mongodb/mongo/commit/c457973dc696823afbdd4ab19d49c3995d98f04e

Comment by auto [ 15/Mar/10 ]

Author:

{'login': 'astaple', 'name': 'Aaron', 'email': 'aaron@10gen.com'}

Message: Revert "Revert "SERVER-695 don't destroy static global mutexes""

This reverts commit eb7cde3e751b02eae055a922af8985fe52c807fa.

Conflicts:

db/instance.h
http://github.com/mongodb/mongo/commit/c971842a5598d50ce178840b33282a832b9d5d82

Comment by auto [ 10/Mar/10 ]

Author:

{'login': 'astaple', 'name': 'Aaron', 'email': 'aaron@10gen.com'}

Message: Revert "SERVER-695 don't destroy static global mutexes"

This reverts commit 714ec2fdc8e9c8dc1c2cdf5486afdbc185beef14.
http://github.com/mongodb/mongo/commit/eb7cde3e751b02eae055a922af8985fe52c807fa

Comment by auto [ 10/Mar/10 ]

Author:

{'login': 'astaple', 'name': 'Aaron', 'email': 'aaron@10gen.com'}

Message: Revert "SERVER-695 older boost too"

This reverts commit d9b3fbe120d49dd905055fefed4db98122172ca3.
http://github.com/mongodb/mongo/commit/26b6ffe30a81e80cafd427ca0c78e072ff918f23

Comment by auto [ 10/Mar/10 ]

Author:

{'login': 'astaple', 'name': 'Aaron', 'email': 'aaron@10gen.com'}

Message: SERVER-695 older boost too
http://github.com/mongodb/mongo/commit/d9b3fbe120d49dd905055fefed4db98122172ca3

Comment by auto [ 10/Mar/10 ]

Author:

{'login': 'astaple', 'name': 'Aaron', 'email': 'aaron@10gen.com'}

Message: SERVER-695 don't destroy static global mutexes
http://github.com/mongodb/mongo/commit/714ec2fdc8e9c8dc1c2cdf5486afdbc185beef14

Generated at Thu Feb 08 02:54:54 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.