Segmentation fault in MongoDB shell

Bug #789213 reported by Andrew
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
mongodb (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: mongodb

A segmentation fault occurs when I query via the MongoDB shell:

 $ mongo askubuntu
 MongoDB shell version: 1.6.3
 Fri May 27 09:25:04 *** warning: spider monkey build without utf8 support. consider rebuilding with utf8 support
 connecting to: askubuntu
 > printjson(db.questions.findOne({}))
 error:non ascii character detected
 > printjson(db.questions.findOne({}))
 Fri May 27 09:25:20 mongo got signal 11 (Segmentation fault), stack trace:

 Fri May 27 09:25:20 0x45e03f 0x457694 0x7f69ec0ebd80 0x7f69ed04fcfa 0x7f69ecfc149e 0x7f69ecfc1592 0x7f69ecfc1632 0x4d836b 0x45a67c 0x45b1d6 0x7f69ec0d6eff 0x456449
  /usr/lib/mongodb/mongo(_ZN5mongo15printStackTraceERSo+0x1f) [0x45e03f]
  /usr/lib/mongodb/mongo(_Z12quitAbruptlyi+0x324) [0x457694]
  /lib/x86_64-linux-gnu/libc.so.6(+0x33d80) [0x7f69ec0ebd80]
  /usr/lib/xulrunner-2.0/libmozjs.so(+0xdacfa) [0x7f69ed04fcfa]
  /usr/lib/xulrunner-2.0/libmozjs.so(JS_EvaluateUCScriptForPrincipals+0xbe) [0x7f69ecfc149e]
  /usr/lib/xulrunner-2.0/libmozjs.so(JS_EvaluateScriptForPrincipals+0x72) [0x7f69ecfc1592]
  /usr/lib/xulrunner-2.0/libmozjs.so(JS_EvaluateScript+0x22) [0x7f69ecfc1632]
  /usr/lib/mongodb/mongo(_ZN5mongo7SMScope4execERKSsS2_bbbi+0x16b) [0x4d836b]
  /usr/lib/mongodb/mongo(_Z5_mainiPPc+0x19dc) [0x45a67c]
  /usr/lib/mongodb/mongo(main+0x26) [0x45b1d6]
  /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xff) [0x7f69ec0d6eff]
  /usr/lib/mongodb/mongo() [0x456449]

Querying via the simple REST interface returns:

 $ wget 'http://localhost:28017/askubuntu/questions/?limit=1' -qO -
 {
   "offset" : 0,
   "rows": [
     { "_id" : 44925, "up_vote_count" : 5, "last_activity_date" : 1306265695, "title" : "How can I create a filesystem \"view\" of a folder that excludes certain files?", "down_vote_count" : 0, "creation_date" : 1306248242, "question_answers_url" : "/questions/44925/answers", "favorite_count" : 0, "answer_count" : 2, "tags" : [ "filesystem", "mount", "backup" ], "question_comments_url" : "/questions/44925/comments", "community_owned" : false, "score" : 5, "view_count" : 60, "owner" : { "reputation" : 7011, "user_type" : "registered", "email_hash" : "48b9e694b655c6d990b58c93a666c40d", "user_id" : 1859, "display_name" : "ændrük" }, "question_timeline_url" : "/questions/44925/timeline", "answers" : [ { "question_id" : 44925, "up_vote_count" : 2, "last_activity_date" : 1306250655, "title" : "How can I create a filesystem \"view\" of a folder that excludes certain files?", "down_vote_count" : 0, "creation_date" : 1306250172, "last_edit_date" : 1306250655, "community_owned" : false, "answer_id" : 44933, "score" : 2, "answer_comments_url" : "/answers/44933/comments", "accepted" : false, "view_count" : 60, "owner" : { "reputation" : 24772, "user_type" : "moderator", "email_hash" : "f0af40756420859b5b63cbceb6d30505", "user_id" : 449, "display_name" : "Oli" } }, { "question_id" : 44925, "up_vote_count" : 1, "last_activity_date" : 1306265695, "title" : "How can I create a filesystem \"view\" of a folder that excludes certain files?", "down_vote_count" : 0, "creation_date" : 1306265695, "community_owned" : false, "answer_id" : 44974, "score" : 1, "answer_comments_url" : "/answers/44974/comments", "accepted" : false, "view_count" : 60, "owner" : { "reputation" : 7011, "user_type" : "registered", "email_hash" : "48b9e694b655c6d990b58c93a666c40d", "user_id" : 1859, "display_name" : "ændrük" } } ] }
   ],

   "total_rows" : 1 ,
   "query" : {} ,
   "millis" : 0
 }

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: mongodb 1:1.6.3-1ubuntu2
ProcVersionSignature: Ubuntu 2.6.38-8.42-generic 2.6.38.2
Uname: Linux 2.6.38-8-generic x86_64
Architecture: amd64
Date: Fri May 27 09:26:46 2011
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Beta amd64 (20110413)
ProcEnviron:
 LANGUAGE=en_US:en
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: mongodb
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Andrew (andrewkvalheim) wrote :
Changed in mongodb (Ubuntu):
status: New → Confirmed
Revision history for this message
tor-henning (tor-henning) wrote :

Same happens to me on identical HW and release, which makes the mongoDB shell useless.

Possible fix: http://groups.google.com/group/mongodb-user/browse_thread/thread/e8b858078101933d/d37702e60ee94c71?show_docid=d37702e60ee94c71&fwc=1

Revision history for this message
Julian Perelli (jperelli) wrote :

Same here. It seems that the ubuntu package is shipped without utf8 support.
Would it be possible to fix it for the new ubuntu version, or maybe for any natty upgrade?

The error for me:

> db.inmuebles.find();
error:non ascii character detected
> db.inmuebles.find();
Wed Sep 7 15:54:44 mongo got signal 11 (Segmentation fault), stack trace:

Wed Sep 7 15:54:44 0x45e03f 0x457694 0x7f3451d98d80 0x7f3452cfccfa 0x7f3452c6e49e 0x7f3452c6e592 0x7f3452c6e632 0x4d836b 0x45a67c 0x45b1d6 0x7f3451d83eff 0x456449
 /usr/lib/mongodb/mongo(_ZN5mongo15printStackTraceERSo+0x1f) [0x45e03f]
 /usr/lib/mongodb/mongo(_Z12quitAbruptlyi+0x324) [0x457694]
 /lib/x86_64-linux-gnu/libc.so.6(+0x33d80) [0x7f3451d98d80]
 /usr/lib/xulrunner-2.0/libmozjs.so(+0xdacfa) [0x7f3452cfccfa]
 /usr/lib/xulrunner-2.0/libmozjs.so(JS_EvaluateUCScriptForPrincipals+0xbe) [0x7f3452c6e49e]
 /usr/lib/xulrunner-2.0/libmozjs.so(JS_EvaluateScriptForPrincipals+0x72) [0x7f3452c6e592]
 /usr/lib/xulrunner-2.0/libmozjs.so(JS_EvaluateScript+0x22) [0x7f3452c6e632]
 /usr/lib/mongodb/mongo(_ZN5mongo7SMScope4execERKSsS2_bbbi+0x16b) [0x4d836b]
 /usr/lib/mongodb/mongo(_Z5_mainiPPc+0x19dc) [0x45a67c]
 /usr/lib/mongodb/mongo(main+0x26) [0x45b1d6]
 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xff) [0x7f3451d83eff]
 /usr/lib/mongodb/mongo() [0x456449]

Revision history for this message
Julian Perelli (jperelli) wrote :

oops, I forgot to mention, it's the same package and distribution, but it's not an alpha version.
DistroRelease: Ubuntu 11.04
Package: mongodb 1:1.6.3-1ubuntu2
Uname: Linux 2.6.38-11-generic #48-Ubuntu SMP Fri Jul 29 19:02:55 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

Revision history for this message
Julian Perelli (jperelli) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.