[SERVER-20753] Broken "show dbs" when WiredTiger is built as a separate library Created: 05/Oct/15  Updated: 05/Oct/15  Resolved: 05/Oct/15

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

Type: Bug Priority: Major - P3
Reporter: Matthias Saou Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

With WiredTiger 2.6.1 and MongoDB 3.0.6, the show dbs command doesn't work, with the following error :

> show dbs
2015-10-05T09:28:13.964+0000 E QUERY    Error: listDatabases failed:{
	"errmsg" : "exception: unable to open cursor at URI statistics:table:collection-7--7027075706490972526. reason: Invalid argument",
	"code" : 43,
	"ok" : 0
}
    at Error (<anonymous>)
    at Mongo.getDBs (src/mongo/shell/mongo.js:47:15)
    at shellHelper.show (src/mongo/shell/utils.js:630:33)
    at shellHelper (src/mongo/shell/utils.js:524:36)
    at (shellhelp2):1:1 at src/mongo/shell/mongo.js:47
> 

And this line appears in the mongod.log file :

2015-10-05T11:28:13.957+0200 E STORAGE  [conn222] WiredTiger (22) [1444037293:957932][23869:0x7f2a1c517700], WT_SESSION.open_cursor: Value 'size' not a permitted choice for key 'statistics': Invalid argument

This server has been installed with 3.0.0, then upgraded to 3.0.3, then finally to 3.0.6, in case that could explain the issue.



 Comments   
Comment by Ramon Fernandez Marina [ 05/Oct/15 ]

Thias, this matter was already discussed in mongodb-dev. The short answer is that what you're trying to do is currently not supported, please see the link above for further details.

Regards,
Ramón.

Comment by Matthias Saou [ 05/Oct/15 ]

For MongoDB 3.0.6, when using --shared-all, what tag/release/commit of WiredTiger should I use? So far, I have tried the following :

  • git master branch : Still at 2.6.1 + few irrelevant changes (so I think it wouldn't fix the problem)
  • git develop branch : Looks more like 2.6.2 but impossible to get "make dist" working
  • mongodb-src-r3.0.6/src/third_party/wiredtiger/ : I couldn't get it to compile "standalone" since it's missing bits (api, tests)
  • git mongodb-3.0.6 tag : Looks like a heavily patched 2.5.3, which I got to compile but starting my existing MongoDB 3.0.6 with it resulted in an immediate Segmentation fault.

I would really like to see the Fedora packages get updated. For that to happen, this is one problem that needs to be fixed, so pointers would be very welcome! (let me know if you'd like a different report for this)

Comment by Matthias Saou [ 05/Oct/15 ]

Ouch! Spot on. Well, I'm using Fedora/EPEL packages as a base, and Fedora includes a guideline prohibiting using bundled snapshots of libraries : https://fedoraproject.org/wiki/Packaging:No_Bundled_Libraries (and I personally agree with it, as I would hate to have a dozen different statically linked openssl versions on my systems!)

I understand that it might not be convenient for rapid changes in both MongoDB and WiredTiger, but the correct thing would be to make the required releases of WiredTiger, with proper library versioning and make sure MongoDB checks for the version it needs at build time. At the moment, mongodb-3.0.6 happily builds and links against any wiredtiger version since they all provide libwiredtiger.so.0.0.0 (from my limited testing).

In the meantime, I have seen that the wiredtiger git repository has a "mongodb-3.0.6" tag, so I'm going to rebuild my shared wiredtiger package with the 2.6.1 source + a patch that brings its code up to par with that tag, as I'm assuming that should do it.

Thanks for the quick reply!

Comment by Daniel Pasette (Inactive) [ 05/Oct/15 ]

Hi Matthias,
It looks like you are building WiredTiger library separately. In MongoDB 3.0.5, there is a new statistics parameter added to open_cursor which gathers only the size on disk of the underlying table. See SERVER-17078.

This interface is available in WiredTiger 2.6.2, but not in 2.6.1 (see docs). MongoDB should not be built with WiredTiger as a separate library except for test purposes.

-Dan

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