[SERVER-9325] Add blockCheckSupported() features to Solaris/SmartOS build Created: 11/Apr/13  Updated: 11/Jul/16  Resolved: 08/Jun/13

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: None
Fix Version/s: 2.4.6, 2.5.1

Type: Improvement Priority: Major - P3
Reporter: Tad Marshall Assignee: Tad Marshall
Resolution: Done Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Solaris/SmartOS build


Issue Links:
Depends
Related
related to SERVER-7404 Solaris file relocation error: posix_... Closed
Backwards Compatibility: Fully Compatible
Participants:

 Description   

mongod will use the mincore() kernel function (or the similar Windows QueryWorkingSetEx() API) on platforms where we have provided support in a src/mongo/util/processinfo_<platform>.cpp file to enable better runtime decisions about when to throw a PageFaultException.

We do not provide a processinfo_*.cpp file for Solaris/SmartOS, though Solaris has support for mincore() (according to http://www.opensolarisforum.org/man/man2/mincore.html) and has supported the mincore() function since Solaris 9 (according to http://fossies.org/linux/privat/libsigsegv-2.10.tar.gz:a/libsigsegv-2.10/src/stackvma-mincore.c).

The missing support results in a warning message being displayed by mongod in the Solaris/SmartOS build, and in the jstests/block_check_supported.js test reporting failure (because Solaris is not being excluded from testing):

** NOTE: your operating system version does not support the method that MongoDB
**       uses to detect impending page faults.
**       This may result in slower performance for certain use cases

Testing workingSet and indexCounters portions of serverStatus
Testing db.serverStatus({workingSet:1}).workingSet for expected fields
assert: Test FAILED: missing "note" field
Error: Printing Stack Trace
    at printStackTrace (src/mongo/shell/utils.js:37:15)
    at doassert (src/mongo/shell/assert.js:6:5)
    at testExpectedFields (/data/buildslaves/SolarisSmartOS_64bit/mongo/jstests/block_check_supported.js:14:13)
    at doTest (/data/buildslaves/SolarisSmartOS_64bit/mongo/jstests/block_check_supported.js:67:9)
    at /data/buildslaves/SolarisSmartOS_64bit/mongo/jstests/block_check_supported.js:100:1
Thu Apr 11 10:57:46.942 JavaScript execution failed: Test FAILED: missing "note" field at src/mongo/shell/assert.js:L7
failed to load: /data/buildslaves/SolarisSmartOS_64bit/mongo/jstests/block_check_supported.js

It would be good to add a src/mongo/util/processinfo_solaris.cpp file (similar to the Linux version) to enable this support. If required, the structure of this support allows this to be a runtime test.



 Comments   
Comment by auto [ 18/Jul/13 ]

Author:

{u'username': u'tadmarshall', u'name': u'Tad Marshall', u'email': u'tad@10gen.com'}

Message: SERVER-9325 Add blockCheckSupported and hostInfo support to Solaris/SmartOS

Implement a processinfo_*.cpp file for Solaris, providing support for
blockCheckSupported features and the the hostInfo command. Rewrite the
readLineFromFile() function from processinfo_linux2.cpp and move it into
processinfo.cpp where it can be called for Solaris as well as Linux.
Branch: v2.4
https://github.com/mongodb/mongo/commit/16fc6424eb4b556e148529dc26fb763dc4eca5b1

Comment by auto [ 17/Jul/13 ]

Author:

{u'username': u'tadmarshall', u'name': u'Tad Marshall', u'email': u'tad@10gen.com'}

Message: SERVER-9325 Add _C99FEATURES_ CPPDEFINE for Solaris to enable isinf()

This makes the build compile on Solaris 11.1 in addition to SmartOS.
Branch: v2.4
https://github.com/mongodb/mongo/commit/5a9cac28f8debfc5cc8ff616e3d3f6c186d8e057

Comment by Tad Marshall [ 08/Jun/13 ]

Suggest backport to 2.4 and 2.2. Backports will need a tweak to use pid_t instead of ProcessId, which was added in 2.5, otherwise the code should just work.

Comment by auto [ 08/Jun/13 ]

Author:

{u'username': u'tadmarshall', u'name': u'Tad Marshall', u'email': u'tad@10gen.com'}

Message: SERVER-9325 Add blockCheckSupported and hostInfo support to Solaris/SmartOS

Implement a processinfo_*.cpp file for Solaris, providing support for
blockCheckSupported features and the the hostInfo command. Rewrite the
readLineFromFile() function from processinfo_linux2.cpp and move it into
processinfo.cpp where it can be called for Solaris as well as Linux.
Branch: master
https://github.com/mongodb/mongo/commit/e55d971e468141401db1e8b9e570eed7af3c5947

Comment by auto [ 30/Apr/13 ]

Author:

{u'date': u'2013-04-22T17:10:00Z', u'name': u'Tad Marshall', u'email': u'tad@10gen.com'}

Message: SERVER-9242 Change expected test results for unnamed OS (e.g. Solaris)

Until SERVER-9325 is fixed, we don't get good values back from
Solaris/SmartOS, so treat any platform with a blank name (as returned
by db.hostInfo().os.name) as equivalent to Windows XP; test for
the "not supported" set of results.
Branch: v2.4
https://github.com/mongodb/mongo/commit/c557a1a66f1e5747769ee3eccbc0fb58e53884d4

Comment by auto [ 18/Apr/13 ]

Author:

{u'date': u'2013-04-15T13:21:17Z', u'name': u'Tad Marshall', u'email': u'tad@10gen.com'}

Message: SERVER-9325 Add __C99FEATURES__ CPPDEFINE for Solaris to enable isinf()

This makes the build compile on Solaris 11.1 in addition to SmartOS.
Branch: master
https://github.com/mongodb/mongo/commit/f1bc52b19bbd126d5d3c53c230173bae493741a9

Comment by Tad Marshall [ 15/Apr/13 ]

We are also missing most of the information in db.hostInfo() in the Solaris/SmartOS build.

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