[SERVER-4743] seg fault running evald.js in v8 buildbot Created: 23/Jan/12  Updated: 11/Jul/16  Resolved: 15/Feb/12

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

Type: Bug Priority: Major - P3
Reporter: Aaron Staple Assignee: Antoine Girbal
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

<http://buildbot.mongodb.org/builders/Linux%2064-bit%20v8/builds/2942/steps/test/logs/stdio>

 
Sun Jan 22 12:07:48 [conn284] going to kill op: op: 1333484.0
Sun Jan 22 12:07:48 Invalid access at address: 0 from thread: conn291
 
Sun Jan 22 12:07:48 Got signal: 11 (Segmentation fault).
 
Sun Jan 22 12:07:48 Backtrace:
0x514384 0x518dcf 0x34dee0e540 0xb04fbc 0xab4896 0xa8f0a8 0xaabc99 0x174a18f4afea 
 /home/yellow/buildslave/Linux_64bit_v8/mongo/mongod(_ZN5mongo10abruptQuitEi+0x3d4) [0x514384]
 /home/yellow/buildslave/Linux_64bit_v8/mongo/mongod(_ZN5mongo24abruptQuitWithAddrSignalEiP7siginfoPv+0x27f) [0x518dcf]
 /lib64/libpthread.so.0 [0x34dee0e540]
 /home/yellow/buildslave/Linux_64bit_v8/mongo/mongod [0xb04fbc]
 /home/yellow/buildslave/Linux_64bit_v8/mongo/mongod(_ZN5mongo7V8Scope11mongoToLZV8ERKNS_7BSONObjEbb+0x126) [0xab4896]
 /home/yellow/buildslave/Linux_64bit_v8/mongo/mongod(_ZN5mongo18internalCursorNextEPNS_7V8ScopeERKN2v89ArgumentsE+0x108) [0xa8f0a8]
 /home/yellow/buildslave/Linux_64bit_v8/mongo/mongod(_ZN5mongo7V8Scope10v8CallbackERKN2v89ArgumentsE+0x79) [0xaabc99]
 [0x174a18f4afea]



 Comments   
Comment by Antoine Girbal [ 15/Feb/12 ]

could not reproduce directly.
Suspicion is that it was due to the allocation of a new BSONObj from another one on the stack.
There is no copy constructor specified so default should be bit copy, which does not properly handle shared_ptr.
This is the only object dynamically allocated in this code path.
Use of BSONHolder is better anyway since metadata can be easily stored inside.

Comment by auto [ 26/Jan/12 ]

Author:

{u'login': u'agirbal', u'name': u'agirbal', u'email': u'antoine@10gen.com'}

Message: SERVER-4743: use the bsonHolder for metadata
Branch: master
https://github.com/mongodb/mongo/commit/0f66d4037d400711a5dace3e3c0d96eabdd922e8

Comment by auto [ 26/Jan/12 ]

Author:

{u'login': u'agirbal', u'name': u'agirbal', u'email': u'antoine@10gen.com'}

Message: - SERVER-4743: use the bsonHolder for metadata
Branch: master
https://github.com/mongodb/mongo/commit/62f26893978ffe1dae12e7711a26a9646724c500

Comment by auto [ 26/Jan/12 ]

Author:

{u'login': u'agirbal', u'name': u'agirbal', u'email': u'antoine@10gen.com'}

Message: SERVER-4743: seg fault running evald.js in v8 buildbot
Branch: master
https://github.com/mongodb/mongo/commit/f79baf5a19ab3a06ea83a2dba482ae9a5e002b16

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