[SERVER-723] access current ops isn't thread safe Created: 09/Mar/10  Updated: 12/Jul/16  Resolved: 29/Jul/10

Status: Closed
Project: Core Server
Component/s: Concurrency
Affects Version/s: 1.3.3
Fix Version/s: 1.5.7

Type: Bug Priority: Minor - P4
Reporter: Kyle Banker Assignee: Eliot Horowitz (Inactive)
Resolution: Done Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

To reproduce, start a long-running script that inserts large documents into a collection.

Then run:

ab -n10000 -c2 http://127.0.0.1:28017/

You'll get assertions like these. Not sure how to explain this, but it's definitely triggered by hitting the web server.

Tue Mar 9 11:30:34 MiniWebServer: connection accepted from 127.0.0.1:64941
Tue Mar 9 11:30:34 MiniWebServer: connection accepted from 127.0.0.1:65073
Tue Mar 9 11:30:34 MiniWebServer: connection accepted from 127.0.0.1:65201
Tue Mar 9 11:30:34 MiniWebServer: connection accepted from 127.0.0.1:65328
Tue Mar 9 11:30:34 Assertion: 10330:Element extends past end of object
0x10005b7d7 0x10000d4e8 0x10000d70f 0x100127cf3 0x10012cbd4 0x10016925e 0x100169ae6 0x100125357 0x1001eca64 0x7fff86d52f8e 0x7fff86d52e41
0 mongod 0x000000010005b7d7 _ZN5mongo11msgassertedEiPKc + 455
1 mongod 0x000000010000d4e8 _ZNK5mongo7BSONObj8toStringEv + 280
2 mongod 0x000000010000d70f _ZN5mongolsERSoRKNS_7BSONObjE + 31
3 mongod 0x0000000100127cf3 _ZN5mongo11DbWebServer15doUnlockedStuffERSt18basic_stringstreamIcSt11char_traitsIcESaIcEE + 1683
4 mongod 0x000000010012cbd4 _ZN5mongo11DbWebServer9doRequestEPKcSsRSsRiRSt6vectorISsSaISsEERKNS_8SockAddrE + 788
5 mongod 0x000000010016925e _ZN5mongo13MiniWebServer8acceptedEiRKNS_8SockAddrE + 238
6 mongod 0x0000000100169ae6 _ZN5mongo13MiniWebServer3runEv + 854
7 mongod 0x0000000100125357 _ZN5mongo15webServerThreadEv + 711
8 mongod 0x00000001001eca64 thread_proxy + 132
9 libSystem.B.dylib 0x00007fff86d52f8e _pthread_start + 331
10 libSystem.B.dylib 0x00007fff86d52e41 thread_start + 13
Tue Mar 9 11:30:34 MiniWebServer: connection accepted from 127.0.0.1:65457
Tue Mar 9 11:30:34 MiniWebServer: connection accepted from 127.0.0.1:49200



 Comments   
Comment by auto [ 29/Jul/10 ]

Author:

{'login': 'erh', 'name': 'Eliot Horowitz', 'email': 'eliot@10gen.com'}

Message: use checksum to make curop threadsafe SERVER-723
http://github.com/mongodb/mongo/commit/9c95e894eecfd2b42d8fa44162f9f7adc2d76117

Comment by beawesomeinstead [ 10/Mar/10 ]

Here's an example rake task that relies on mongo_ext, mongo_mapper and ccsv.

http://pastie.org/private/zkhgcrd9rpfs5qnmb6ebua

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