https://bugzilla.novell.com/show_bug.cgi?id=738050
https://bugzilla.novell.com/show_bug.cgi?id=738050#c0
Summary: server:database/mongodb: Failure on db.dropDatabase() using the RPM version Classification: openSUSE Product: openSUSE.org Version: unspecified Platform: x86-64 OS/Version: SLES 11 Status: NEW Severity: Normal Priority: P5 - None Component: 3rd party software AssignedTo: asn@cryptomilk.org ReportedBy: patrick.meinusch@seitenbau.net QAContact: opensuse-communityscreening@forge.provo.novell.com Found By: --- Blocker: ---
to reproduce:
1. install mongodb-2.0.1-5.2.x86_64.rpm from http://download.opensuse.org/repositories/server:/database/SLE_11_SP1/x86_64... 2. start mongod: /etc/init.d/mongodb start 3. open a mongo shell to localhost:27017 4. use new database: use testdb (optional) 5. insert document to a collection: db.coll.insert( { "key":"value" } ) 6. try to drop database: db.dropDatabase()
expected: database is dropped without any error
got: database is dropped but getting this error: in shell: { "errmsg" : "exception: assertion db/pdfile.cpp:2158", "code" : 0, "ok" : 0 }
in log: Wed Dec 21 13:31:23 [conn1] dropDatabase newdb Wed Dec 21 13:31:23 [conn1] removeJournalFiles Wed Dec 21 13:31:23 [conn1] Assertion failure i <= DiskLoc::MaxFiles db/pdfile.cpp 2158 0x56ec5e 0x577d4f 0x811b9a 0x8121d8 0x8a0fdc 0x89d661 0x89df85 0x88df2a 0x89071b 0x7f54fa 0x973c3c 0x60c06a 0x7f1841eb45f0 0x7f184065684d /usr/sbin/mongod(_ZN5mongo12sayDbContextEPKc+0x9e) [0x56ec5e] /usr/sbin/mongod(_ZN5mongo8assertedEPKcS1_j+0xbf) [0x577d4f] /usr/sbin/mongod(_ZN5mongo19_applyOpToDataFilesEPKcRNS_6FileOpEbRKSs+0x45a) [0x811b9a] /usr/sbin/mongod(_ZN5mongo16_deleteDataFilesEPKc+0xc8) [0x8121d8]
/usr/sbin/mongod(_ZN5mongo15CmdDropDatabase3runERKSsRNS_7BSONObjEiRSsRNS_14BSONObjBuilderEb+0xec) [0x8a0fdc]
/usr/sbin/mongod(_ZN5mongo11execCommandEPNS_7CommandERNS_6ClientEiPKcRNS_7BSONObjERNS_14BSONObjBuilderEb+0x871) [0x89d661]
/usr/sbin/mongod(_ZN5mongo12_runCommandsEPKcRNS_7BSONObjERNS_11_BufBuilderINS_16TrivialAllocatorEEERNS_14BSONObjBuilderEbi+0x565) [0x89df85]
/usr/sbin/mongod(_ZN5mongo11runCommandsEPKcRNS_7BSONObjERNS_5CurOpERNS_11_BufBuilderINS_16TrivialAllocatorEEERNS_14BSONObjBuilderEbi+0x3a) [0x88df2a]
/usr/sbin/mongod(_ZN5mongo8runQueryERNS_7MessageERNS_12QueryMessageERNS_5CurOpES1_+0x12eb) [0x89071b]
/usr/sbin/mongod(_ZN5mongo16assembleResponseERNS_7MessageERNS_10DbResponseERKNS_11HostAndPortE+0x6fa) [0x7f54fa]
/usr/sbin/mongod(_ZN5mongo16MyMessageHandler7processERNS_7MessageEPNS_21AbstractMessagingPortEPNS_9LastErrorE+0xdc) [0x973c3c] /usr/sbin/mongod(_ZN5mongo3pms9threadRunEPNS_13MessagingPortE+0x29a) [0x60c06a] /lib64/libpthread.so.0(+0x75f0) [0x7f1841eb45f0] /lib64/libc.so.6(clone+0x6d) [0x7f184065684d] Wed Dec 21 13:31:23 [conn1] command newdb.$cmd command: { dropDatabase: 1.0 } ntoreturn:1 reslen:99 113ms
When using the binary package from mongodb.org this bug is not reproducible
https://bugzilla.novell.com/show_bug.cgi?id=738050
https://bugzilla.novell.com/show_bug.cgi?id=738050#c1
Matti Linnanvuori matti.linnanvuori@portalify.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |matti.linnanvuori@portalify | |.com
--- Comment #1 from Matti Linnanvuori matti.linnanvuori@portalify.com 2012-05-03 07:40:29 UTC --- Version 2.0.4 still has this bug:
mongo MongoDB shell version: 2.0.4 connecting to: test
use db
switched to db db
db.dropDatabase();
{ "errmsg" : "exception: assertion db/pdfile.cpp:2158", "code" : 0, "ok" : 0 }
bye
https://bugzilla.novell.com/show_bug.cgi?id=738050
https://bugzilla.novell.com/show_bug.cgi?id=738050#c2
Tuure Laurinolli tuure.laurinolli@portalify.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |tuure.laurinolli@portalify. | |com
--- Comment #2 from Tuure Laurinolli tuure.laurinolli@portalify.com 2012-05-03 10:30:55 UTC --- This is apparently caused by line 182 in pdfile.cpp. The file removal operation always returns true no matter what what the actual result was, which causes the loop around pdfile.cpp:2158 to overrun and hit the assert.
Looking at MongoDB github and the source RPMs from http://software.opensuse.org/download.html?project=server:database&packa..., it appears that this issue has never existed in the official tree. It is indeed introduced by void_return.patch in the OpenSUSE packaging.
https://bugzilla.novell.com/show_bug.cgi?id=738050
https://bugzilla.novell.com/show_bug.cgi?id=738050#c3
Florian Baumann flo@noqqe.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |flo@noqqe.de
--- Comment #3 from Florian Baumann flo@noqqe.de 2014-05-08 09:12:53 UTC --- Thanks Tuure for figuring this out.
It looks like this is still an issue in the opensuse rpm for mongodb. The steps from above are reproducable.
We're running
SUSE Linux Enterprise Server 11 (x86_64) VERSION = 11 PATCHLEVEL = 3
and the mongodb rpm at version 2.4.3-10.7.
https://bugzilla.novell.com/show_bug.cgi?id=738050
https://bugzilla.novell.com/show_bug.cgi?id=738050#c
Florian Baumann flo@noqqe.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - None |P2 - High
http://bugzilla.novell.com/show_bug.cgi?id=738050
Swamp Workflow Management swamp@suse.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Whiteboard| |maint:running:60274:low
http://bugzilla.novell.com/show_bug.cgi?id=738050
Swamp Workflow Management swamp@suse.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Whiteboard|maint:running:60274:low |maint:running:60274:low | |maint:released:sle11-sp3-cl | |4:60293
http://bugzilla.novell.com/show_bug.cgi?id=738050
--- Comment #5 from Swamp Workflow Management swamp@suse.de --- SUSE-RU-2015:0416-1: An update that has three recommended fixes can now be installed.
Category: recommended (low) Bug References: 738050,907748,913692 CVE References: Sources used: SUSE Cloud 4 (src): crowbar-barclamp-ceilometer-1.8+git.1418890767.5605ddf-0.7.1, mongodb-2.4.3-0.21.1
http://bugzilla.novell.com/show_bug.cgi?id=738050 http://bugzilla.novell.com/show_bug.cgi?id=738050#c7
Andreas Schneider asn@cryptomilk.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |WONTFIX
--- Comment #7 from Andreas Schneider asn@cryptomilk.org --- This is from 2011. If it hasen't be fixed, it wont be fixed anymore.