[SERVER-4024] AssertionException handling request, closing client connection Created: 05/Oct/11  Updated: 15/Aug/12  Resolved: 11/Apr/12

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

Type: Bug Priority: Major - P3
Reporter: Y. Wayne Huang Assignee: Ben Becker
Resolution: Duplicate Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

ubuntu 10.04 x86_64


Operating System: ALL
Participants:

 Description   

/usr/bin/mongod(_ZN5mongo11msgassertedEiPKc+0x112) [0x587512]
/usr/bin/mongod(_ZN5mongo15receivedGetMoreERNS_10DbResponseERNS_7MessageERNS_5CurOpE+0x41c) [0x8806fc]
/usr/bin/mongod(_ZN5mongo16assembleResponseERNS_7MessageERNS_10DbResponseERKNS_11HostAndPortE+0xf6a) [0x88526a]
/usr/bin/mongod(_ZN5mongo16MyMessageHandler7processERNS_7MessageEPNS_21AbstractMessagingPortEPNS_9LastErrorE+0x76) [0xa96a46]
/usr/bin/mongod(_ZN5mongo3pms9threadRunEPNS_13MessagingPortE+0x287) [0x635dd7]
/lib/libpthread.so.0(+0x69ca) [0x7fac0a7fb9ca]
/lib/libc.so.6(clone+0x6d) [0x7fac09daa70d]
Logstream::get called in uninitialized state
Wed Oct 5 12:27:18 [conn3057] AssertionException handling request, closing client connection: 13073 shutting down
Logstream::get called in uninitialized state
Wed Oct 5 12:27:18 Socket flush send() errno:9 Bad file descriptor 10.177.205.133:27017
Logstream::get called in uninitialized state
Wed Oct 5 12:27:18 caught exception (socket exception) in destructor (~PiggyBackData)
mongod: /opt/extra/include/boost/thread/pthread/mutex.hpp:50: void boost::mutex::lock(): Assertion `!pthread_mutex_lock(&m)' failed.
Wed Oct 5 12:27:18 Got signal: 6 (Aborted).

Wed Oct 5 12:27:18 Backtrace:
0xa83fc9 0x7fac09cf7af0 0x7fac09cf7a75 0x7fac09cfb5c0 0x7fac09cf0941 0x67cf92 0x67a681 0x67aa94 0x881031 0x881710 0x636182 0x7fac0a7fb9ca 0x7fac09daa70d
/usr/bin/mongod(_ZN5mongo10abruptQuitEi+0x399) [0xa83fc9]
/lib/libc.so.6(+0x33af0) [0x7fac09cf7af0]
/lib/libc.so.6(gsignal+0x35) [0x7fac09cf7a75]
/lib/libc.so.6(abort+0x180) [0x7fac09cfb5c0]
/lib/libc.so.6(__assert_fail+0xf1) [0x7fac09cf0941]
/usr/bin/mongod(_ZN5boost12shared_mutex11lock_sharedEv+0x182) [0x67cf92]
/usr/bin/mongod(_ZN5mongo9MongoFile9_flushAllEb+0x91) [0x67a681]
/usr/bin/mongod(_ZN5mongo9MongoFile8flushAllEb+0x14) [0x67aa94]
/usr/bin/mongod(_ZN5mongo14shutdownServerEv+0x691) [0x881031]
/usr/bin/mongod(_ZN5mongo6dbexitENS_8ExitCodeEPKcb+0x2a0) [0x881710]
/usr/bin/mongod(_ZN5mongo3pms9threadRunEPNS_13MessagingPortE+0x632) [0x636182]
/lib/libpthread.so.0(+0x69ca) [0x7fac0a7fb9ca]
/lib/libc.so.6(clone+0x6d) [0x7fac09daa70d]

Logstream::get called in uninitialized state
Wed Oct 5 12:27:18 [conn3680] got request after shutdown()
Wed Oct 5 12:27:18 Invalid access at address: 0

Wed Oct 5 12:27:18 Got signal: 11 (Segmentation fault).

      • glibc detected *** /usr/bin/mongod: free(): corrupted unsorted chunks: 0x0000000002db3430 ***


 Comments   
Comment by Ben Becker [ 11/Apr/12 ]

It appears that the double free is encountered after a call to dbexit(). This is likely due to static destruction during shutdown (see SERVER-5542), and should be fixed in v2.1. Closing this as a duplicate for now, but please feel free to reopen with more information.

Comment by Ben Becker [ 09/Feb/12 ]

Hi Marcos,

Could you post the full backtrace and any asserts and exceptions before the 'free(): corrupted unsorted chunks' message from the log file? If there are a lot of entries in the log file, could you paste it into gist?

Comment by Marcos [ 08/Feb/12 ]

Got look alike segfaults, happening in a per week basis... archlinux x64 VM, mongodb 2.0.2

mongod: *** glibc detected *** /usr/bin/mongod: free(): corrupted unsorted chunks: 0x0000000001b439b0 ***

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