[SERVER-25036] Solaris 11.3 x86 Failed to inizialize JSContext Created: 13/Jul/16  Updated: 13/Aug/16  Resolved: 27/Jul/16

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

Type: Bug Priority: Major - P3
Reporter: Daniel Heitepriem Assignee: Jonathan Reams
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-22927 mongo dies with Segmentation fault in... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:

Install MongoDB 3.3.9 on fresh Solaris installation
Install MongoDB and start it
Try to connect to Console using
./mongodb-solaris-x86_64-3.3.9/bin/mongo --port 27017

Sprint: Platforms 17 (07/15/16), Platforms 18 (08/05/16)
Participants:

 Description   

I downloaded the latest Development version (3.3.9) because it says that the Bug SERVER-22927 was fixed within this version.

So I tried to connect to the console using this command:

*/opt/mongo/bin/mongo --port 27017*

and got this error:

MongoDB shell version: 3.3.9
exception: Failed to initialize JSContext

A few information regarding my setup:
Solaris 11.3 64-bit on a x86 platform



 Comments   
Comment by Daniel Heitepriem [ 28/Jul/16 ]

Alright, everything is now working as it should, using version 3.3.10

MongoDB shell version: 3.3.10
connecting to: 127.0.0.1:3306/test
MongoDB server version: 3.3.10
Welcome to the MongoDB shell.
For interactive help, type "help".
For more comprehensive documentation, see
        http://docs.mongodb.org/
Questions? Try the support group
        http://groups.google.com/group/mongodb-user
Server has startup warnings: 
2016-07-28T07:49:12.096+0200 I CONTROL  [initandlisten] 
2016-07-28T07:49:12.096+0200 I CONTROL  [initandlisten] ** NOTE: This is a development version (3.3.10) of MongoDB.
2016-07-28T07:49:12.096+0200 I CONTROL  [initandlisten] **       Not recommended for production.
2016-07-28T07:49:12.096+0200 I CONTROL  [initandlisten] 
2016-07-28T07:49:12.096+0200 I CONTROL  [initandlisten] ** WARNING: Access control is not enabled for the database.
2016-07-28T07:49:12.096+0200 I CONTROL  [initandlisten] **          Read and write access to data and configuration is unrestricted.
2016-07-28T07:49:12.096+0200 I CONTROL  [initandlisten] 
2016-07-28T07:49:12.096+0200 I CONTROL  [initandlisten] 
2016-07-28T07:49:12.096+0200 I CONTROL  [initandlisten] ** WARNING: soft rlimits too low. Number of files is 256, should be at least 1000
> db.version();
3.3.10
>

Regards,
Daniel Heitepriem

Comment by Daniel Heitepriem [ 27/Jul/16 ]

Hi acm,
thank you very much for your investigations. I will try it tomorrow (CEST) with version 3.3.10 and will open a new ticket if the problem still exists.

Regards,
Daniel Heitepriem

Comment by Andrew Morrow (Inactive) [ 27/Jul/16 ]

The fix version is indeed wrong:

> git tag --contains 4398dfaceec83ce195f2c27847535dc3b10b0ee4
r3.3.10

Comment by Jonathan Reams [ 27/Jul/16 ]

Actually looking at this again, I think the fix made it into 3.3.10 and not 3.3.9. When I run with 3.3.9, I see the JSContext failure you reported, but not in 3.3.10 - I think our fixVersion is just wrong for SERVER-22927. If you still see problems in 3.3.10, we can re-open this ticket.

Comment by Jonathan Reams [ 27/Jul/16 ]

semirben, I'm having trouble reproducing this. I'm running on stock Oracle Solaris 11.3 for x86_64:

mongodb@solaris:~$ cat /etc/release
                             Oracle Solaris 11.3 X86
  Copyright (c) 1983, 2015, Oracle and/or its affiliates.  All rights reserved.
                            Assembled 06 October 2015
mongodb@solaris:~$ uname -a
SunOS solaris 5.11 11.3 i86pc i386 i86pc
mongodb@solaris:~$ ./mongodb-solaris-x86_64-3.3.10/bin/mongo
MongoDB shell version: 3.3.10
connecting to: 127.0.0.1:27017/test
2016-07-27T14:22:00.844+0000 I NETWORK  [thread1] connection accepted from 127.0.0.1:37339 #1 (1 connection now open)
MongoDB server version: 3.3.10
Server has startup warnings:
2016-07-27T14:21:56.126+0000 I CONTROL  [initandlisten]
2016-07-27T14:21:56.126+0000 I CONTROL  [initandlisten] ** NOTE: This is a development version (3.3.10) of MongoDB.
2016-07-27T14:21:56.126+0000 I CONTROL  [initandlisten] **       Not recommended for production.
2016-07-27T14:21:56.126+0000 I CONTROL  [initandlisten]
2016-07-27T14:21:56.126+0000 I CONTROL  [initandlisten] ** WARNING: Access control is not enabled for the database.
2016-07-27T14:21:56.126+0000 I CONTROL  [initandlisten] **          Read and write access to data and configuration is unrestricted.
2016-07-27T14:21:56.126+0000 I CONTROL  [initandlisten]
2016-07-27T14:21:56.126+0000 I CONTROL  [initandlisten]
2016-07-27T14:21:56.126+0000 I CONTROL  [initandlisten] ** WARNING: soft rlimits too low. Number of files is 256, should be at least 1000
>

Are you running Oracle Solaris 11.3? What version of the kernel are you running? What's the output of pkg info kernel? We'd tested the fix in SERVER-22927 on a number of Solaris variants, but it's possible we missed one.

Comment by Andrew Morrow (Inactive) [ 15/Jul/16 ]

Thanks for the additional information, we will investigate.

Comment by Daniel Heitepriem [ 15/Jul/16 ]

Hi acm,

I neither got a stack trace nor any other error. After installing MongoDB I tried to connect to the console and almost instantly got this error. Here are the steps after installing MongoDB

root@cs-tryout-mongo-t:~# pwd
/root
root@cs-tryout-mongo-t:~# ls /opt/mongo/
GNU-AGPL-3.0         MPL-2                README               THIRD-PARTY-NOTICES  bin                  install
root@cs-tryout-mongo-t:~# ls /opt/mongo/bin/
bsondump       mongo          mongod         mongodump      mongoexport    mongofiles     mongoimport    mongooplog     mongoperf      mongorestore   mongos         mongostat      mongotop       start_mongodb
root@cs-tryout-mongo-t:~# netstat -an | grep 3306
      *.3306               *.*                  0      0  128000      0 LISTEN
stream-ord /tmp/mongodb-3306.sock
root@cs-tryout-mongo-t:~# svcs -xv mongo
svc:/application/mongo:default (Mongo DB)
 State: online since Fri Jul 15 17:38:37 2016
   See: http://docs.mongo.org
   See: /var/svc/log/application-mongo:default.log
Impact: None.
root@cs-tryout-mongo-t:~# /opt/mongo/bin/mongo --port 3306
MongoDB shell version: 3.3.9
exception: Failed to initialize JSContext
root@cs-tryout-mongo-t:~# 

And the output of the logfile:

root@cs-tryout-mongo-t:~# cat /logs/mongo/mongo.log 
2016-07-15T17:38:37.645+0200 I CONTROL  [initandlisten] MongoDB starting : pid=9454 port=3306 dbpath=/data/mongo 64-bit host=cs-tryout-mongo-t
2016-07-15T17:38:37.645+0200 I CONTROL  [initandlisten] db version v3.3.9
2016-07-15T17:38:37.645+0200 I CONTROL  [initandlisten] git version: 15d3d1f9bd151a2cd21fc7bee0bffc61caaaeb1d
2016-07-15T17:38:37.645+0200 I CONTROL  [initandlisten] allocator: system
2016-07-15T17:38:37.645+0200 I CONTROL  [initandlisten] modules: none
2016-07-15T17:38:37.645+0200 I CONTROL  [initandlisten] build environment:
2016-07-15T17:38:37.645+0200 I CONTROL  [initandlisten]     distarch: x86_64
2016-07-15T17:38:37.645+0200 I CONTROL  [initandlisten]     target_arch: x86_64
2016-07-15T17:38:37.645+0200 I CONTROL  [initandlisten] options: { config: "/opt/etc/mongo/mongodb.cfg", net: { port: 3306 }, processManagement: { fork: true, pidFilePath: "/tmp/mongo.pid" }, storage: { dbPath: "/data/mongo", journal: { enabled: true } }, systemLog: { destination: "file", logAppend: true, logRotate: "rename", path: "/logs/mongo/mongo.log" } }
2016-07-15T17:38:37.656+0200 I STORAGE  [initandlisten] wiredtiger_open config: create,cache_size=738M,session_max=20000,eviction=(threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0),
2016-07-15T17:38:37.977+0200 I CONTROL  [initandlisten] 
2016-07-15T17:38:37.977+0200 I CONTROL  [initandlisten] ** NOTE: This is a development version (3.3.9) of MongoDB.
2016-07-15T17:38:37.977+0200 I CONTROL  [initandlisten] **       Not recommended for production.
2016-07-15T17:38:37.977+0200 I CONTROL  [initandlisten] 
2016-07-15T17:38:37.977+0200 I CONTROL  [initandlisten] ** WARNING: Access control is not enabled for the database.
2016-07-15T17:38:37.977+0200 I CONTROL  [initandlisten] **          Read and write access to data and configuration is unrestricted.
2016-07-15T17:38:37.977+0200 I CONTROL  [initandlisten] 
2016-07-15T17:38:37.977+0200 I CONTROL  [initandlisten] 
2016-07-15T17:38:37.977+0200 I CONTROL  [initandlisten] ** WARNING: soft rlimits too low. Number of files is 256, should be at least 1000
2016-07-15T17:38:37.978+0200 I FTDC     [initandlisten] Initializing full-time diagnostic data capture with directory '/data/mongo/diagnostic.data'
2016-07-15T17:38:37.978+0200 I NETWORK  [HostnameCanonicalizationWorker] Starting hostname canonicalization worker
2016-07-15T17:38:38.022+0200 I NETWORK  [initandlisten] waiting for connections on port 3306

Comment by Andrew Morrow (Inactive) [ 15/Jul/16 ]

Is there any other information printed? Do you get a stack trace? Can you provide the entire output, including the invocation of the shell, until it terminates?

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