[SERVER-4870] upgrade to SpiderMonkey 1.8.5 ? Created: 03/Feb/12 Updated: 08/Mar/13 Resolved: 02/Oct/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | JavaScript |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Nathaniel McCallum | Assignee: | Unassigned |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: |
| Description |
|
Fedora 15+ ships SpiderMonkey 1.8.5, but earlier releases support older versions of SpiderMonkey. We need to support all of them. This pull request adds support for all currently released versions of SpiderMonkey: https://github.com/mongodb/mongo/pull/160 Please merge it. We are currently shipping a backport of this for 2.0.2. |
| Comments |
| Comment by Tad Marshall [ 02/Oct/12 ] | ||||||
|
We're moving to V8 as our JavaScript engine, so upgrading SpiderMonkey doesn't make sense any more. | ||||||
| Comment by Eliot Horowitz (Inactive) [ 17/Feb/12 ] | ||||||
|
Tried this on fs16. | ||||||
| Comment by Daniel Crosta [ 16/Feb/12 ] | ||||||
|
Hi Nathan, The - As for the failure, that looks like an actual test failure, not a wrong setup in your testing environment. The assertion in question is:
which is preceded in the test file with:
Perhaps there's something quirky in the way spidermonkey 1.8.5 manages RegExps vs 1.7? | ||||||
| Comment by Nathaniel McCallum [ 16/Feb/12 ] | ||||||
|
OK, I was able to get it running last night. (the smokedbprefix option should really be on the smoke tests page, also, there should be a sensible default) The first test to fail was and.js. I believe this is the relevant section of the test: ['/home/nathaniel/Projects/mongo/mongo', '--port', '27999', '/home/nathaniel/Projects/mongo/jstests/and.js', '--eval', 'TestData = new Object();TestData.testPath = "/home/nathaniel/Projects/mongo/jstests/and.js";TestData.testFile = "and.js";TestData.testName = "and";TestData.noJournal = false;TestData.noJournalPrealloc = false;TestData.auth = false;TestData.keyFile = null;TestData.keyFileData = null;'] Thu Feb 16 10:00:24 [conn2] build index done. scanned 0 total records. 0 secs Thu Feb 16 10:00:24 [conn2] { $err: "$and expression must be a nonempty array", code: 14816 }Thu Feb 16 10:00:24 [conn2] assertion 14816 $and expression must be a nonempty array ns:test.jstests_and query:{ $and: {} } Thu Feb 16 10:00:24 [conn2] assertion 14817 $and elements must be objects ns:test.jstests_and query: { $and: [ 4.0 ] }Thu Feb 16 10:00:24 [conn2] { $err: "$and elements must be objects", code: 14817 }assert: [1] != [0] are not equal : undefined Thu Feb 16 10:00:24 uncaught exception: [1] != [0] are not equal : undefined | ||||||
| Comment by Daniel Crosta [ 15/Feb/12 ] | ||||||
|
You can use
to create the test suite database files outside of /data. Once the tests are done, you can remove that path to recover any space it may still be using. | ||||||
| Comment by Nathaniel McCallum [ 15/Feb/12 ] | ||||||
|
Yes, I would hope so... I don't want the mongo test suite having read/write access to the root of my filesystem... | ||||||
| Comment by Michael A. Fiedler [ 15/Feb/12 ] | ||||||
Your user appears to not have access to write to this directory. | ||||||
| Comment by Nathaniel McCallum [ 15/Feb/12 ] | ||||||
|
Creating dir: /data/ | ||||||
| Comment by Eliot Horowitz (Inactive) [ 15/Feb/12 ] | ||||||
|
That page looks correct. Can you try
| ||||||
| Comment by Nathaniel McCallum [ 15/Feb/12 ] | ||||||
|
I tried, but I'm guessing that http://www.mongodb.org/display/DOCS/Smoke+Tests is out of date. I was never able to get anything close to a successful run on the master branch, with or without my changes. | ||||||
| Comment by Eliot Horowitz (Inactive) [ 15/Feb/12 ] | ||||||
|
Have you run the full test suite with 1.8.5? Last we tried with newer versions a lot of the timeout logic wasn't working. We don't want to just have it compile obviously, but need it to be just as well understood and functional as with 1.7.0. | ||||||
| Comment by Nathaniel McCallum [ 15/Feb/12 ] | ||||||
|
Please reconsider. I support multiple versions of SpiderMonkey in multiple other projects and I have used that knowledge to make this patch. In the case of 1.8.5 the differences are mostly the function signatures (particularly JSNative and JSStrictProperty). I did find two other small issues in my testing, both of which were bugs in the original code (they relied on undefined behavior) that only manifested in the new version. Fedora/EPEL MUST support multiple versions because we cannot bundle libs. The same is true for Debian. This means that upgrading to 1.8.5 without support for the earlier versions just shifts the maintenance burden to a different version. I've taken a lot of time (multiple days) to ensure compatibility with both and done extensive testing. If MongoDB is not willing to merge work to make its product better for downstream distributors then I will definitely think twice before spending my time improving MongoDB again. | ||||||
| Comment by Eliot Horowitz (Inactive) [ 15/Feb/12 ] | ||||||
|
We cannot support 2 versions of spidermonkey as we've found too many minor differences and stopped trying to ifdef everything. We should look at upgrading everything to 1.8.5 though |