[SERVER-414] Memory corruption on initial pre-allocation Created: 12/Nov/09  Updated: 12/Jul/10  Resolved: 12/Jul/10

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

Type: Bug Priority: Trivial - P5
Reporter: Alexey Zilber Assignee: Eliot Horowitz (Inactive)
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Linux Centos 5.2, on AWS m1.large instance. Rightscale kernel: Linux ip-10-212-139-127 2.6.21.7-2.fc8xen #1 SMP Fri Feb 15 12:34:28 EST 2008 x86_64 x86_64 x86_64 GNU/Linux


Participants:

 Description   

Using MongoDB 1.1.3 static build for x86_64

During pre-allocation of data on initial startup I hit ctrl-c. I may have hit ctrl-c more then once, but I'm unable to replicate this error. The fact that it happened, bothers me.

  1. ./mongod --master --dbpath /mnt/mdata --oplogSize 10240
    Thu Nov 12 00:20:05 Mongo DB : starting : pid = 26118 port = 27017 dbpath = /mnt/mdata master = 1 slave = 0 64-bit
    Thu Nov 12 00:20:05 db version v1.1.3, pdfile version 4.5
    Thu Nov 12 00:20:05 git version: aa8b12e13fbbdfb293d94786dcc0df589cabef99
    Thu Nov 12 00:20:05 sys info: Linux ofc-n1.10gen.com 2.6.23.17-88.fc7 #1 SMP Thu May 15 00:02:29 EDT 2008 x86_64
    Thu Nov 12 00:20:05 waiting for connections on port 27017
    Thu Nov 12 00:20:05 ******
    Thu Nov 12 00:20:05 creating replication oplog of size: 10240MB (use --oplogSize to change)
    Thu Nov 12 00:20:05 ******
    Thu Nov 12 00:20:05 allocating new datafile /mnt/mdata/local.ns, filling with zeroes...
    Thu Nov 12 00:20:05 done allocating datafile /mnt/mdata/local.ns, size: 16MB, took 0.041 secs
    Thu Nov 12 00:20:05 allocating new datafile /mnt/mdata/local.0, filling with zeroes...
    Thu Nov 12 00:20:06 done allocating datafile /mnt/mdata/local.0, size: 64MB, took 0.106 secs
    Thu Nov 12 00:20:06 allocating new datafile /mnt/mdata/local.1, filling with zeroes...
    Thu Nov 12 00:20:09 done allocating datafile /mnt/mdata/local.1, size: 2047MB, took 3.608 secs
    Thu Nov 12 00:20:09 allocating new datafile /mnt/mdata/local.2, filling with zeroes...
    Thu Nov 12 00:20:26 done allocating datafile /mnt/mdata/local.2, size: 2047MB, took 16.412 secs
    Thu Nov 12 00:20:26 allocating new datafile /mnt/mdata/local.3, filling with zeroes...
    Thu Nov 12 00:21:02 done allocating datafile /mnt/mdata/local.3, size: 2047MB, took 36.285 secs
    Thu Nov 12 00:21:02 allocating new datafile /mnt/mdata/local.4, filling with zeroes...
    Thu Nov 12 00:21:35 done allocating datafile /mnt/mdata/local.4, size: 2047MB, took 33.08 secs
    Thu Nov 12 00:21:35 allocating new datafile /mnt/mdata/local.5, filling with zeroes...
    Thu Nov 12 00:21:38 got kill or ctrl c signal 2 (Interrupt), will terminate after current cmd ends
    Thu Nov 12 00:21:59 done allocating datafile /mnt/mdata/local.5, size: 2047MB, took 23.977 secs
    Thu Nov 12 00:21:59 now exiting
    Thu Nov 12 00:21:59 dbexit:
    Thu Nov 12 00:21:59 Assertion: shutdown in progress
    Thu Nov 12 00:21:59 local.oplog.$main exception in initAndListen std::exception: shutdown in progress, terminating
    Thu Nov 12 00:21:59 shutdown: going to flush oplog...
    Thu Nov 12 00:21:59 shutdown: going to close sockets...
    Thu Nov 12 00:21:59 shutdown: waiting for fs...
    Thu Nov 12 00:21:59 shutdown: closing all files...
    Thu Nov 12 00:21:59 dbexit: ; exiting immediately
    Thu Nov 12 00:21:59 closeAllFiles() finished
    Thu Nov 12 00:21:59 shutdown: removing fs lock...
    ERROR: Client::shutdown not called!
    Thu Nov 12 00:21:59 dbexit: really exiting now
      • glibc detected *** ./mongod: double free or corruption (!prev): 0x0000000000b00640 ***
        ======= Backtrace: =========
        [0x767b82]
        [0x76c3c7]
        [0x5f1a2e]
        [0x751d39]
        [0x51e95c]
        [0x578ea1]
        [0x57f66e]
        [0x7495c0]
        [0x4001b9]
        ======= Memory map: ========
        00400000-008d0000 r-xp 00000000 08:10 9994248 /mnt/mongodb-linux-x86_64-static-1.1.3/bin/mongod
        00acf000-00ae3000 rw-p 004cf000 08:10 9994248 /mnt/mongodb-linux-x86_64-static-1.1.3/bin/mongod
        00ae3000-00b54000 rw-p 00ae3000 00:00 0 [heap]
        40000000-40001000 ---p 40000000 00:00 0
        40001000-40a01000 rw-p 40001000 00:00 0
        40a01000-40a02000 ---p 40a01000 00:00 0
        40a02000-41402000 rw-p 40a02000 00:00 0
        41402000-41403000 ---p 41402000 00:00 0
        41403000-41e03000 rw-p 41403000 00:00 0
        2aaaaaaab000-2aaaaaaac000 rw-p 2aaaaaaab000 00:00 0
        7fffb615c000-7fffb6172000 rw-p 7fffb615c000 00:00 0 [stack]
        ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vdso]
        Thu Nov 12 00:22:00 Got signal: 6 (Aborted).
        Thu Nov 12 00:22:00 Backtrace:
        0x575369 0x588ae0 0x588aad 0x751540 0x760fbb 0x767b82 0x76c3c7 0x5f1a2e 0x751d39 0x51e95c 0x578ea1 0x57f66e 0x7495c0 0x4001b9
        [0x575369]
        [0x588ae0]
        [0x588aad]
        [0x751540]
        [0x760fbb]
        [0x767b82]
        [0x76c3c7]
        [0x5f1a2e]
        [0x751d39]
        [0x51e95c]
        [0x578ea1]
        [0x57f66e]
        [0x7495c0]
        [0x4001b9]

At this point I had to CTRL-Z and kill -9 the process.
dmesg showed no memory errors.



 Comments   
Comment by Eliot Horowitz (Inactive) [ 16/Jan/10 ]

There was some stuff added to make a little nicer - and I still can't reproduce.
Pushing once more then will close.

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