[SERVER-2787] Upgrading to 1.8.0 and enabling journaling causing cryptic "_a != -1" error Created: 17/Mar/11 Updated: 12/Jul/16 Resolved: 18/Mar/11 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 1.8.0 |
| Fix Version/s: | 1.8.1, 1.9.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Brian Ploetz | Assignee: | Aaron Staple |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Mac OSX 10.6.6 |
||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Operating System: | OS X | ||||||||
| Participants: | |||||||||
| Description |
|
I'm starting the process of vetting our software with MongoDB 1.8. I had been running MongoDB 1.6.0 on my Mac (which we also currently run in production). Today I installed MongoDB 1.8.0 and pointed it at the data files that had been created with 1.6.0. All of my tests passed and everything seemed fine. Then I enabled journaling (--journal). Once I did this, one of my tests started failing with this message: Failures:
2) SaveWave::Model::MongoDB::Upc should update
3) SaveWave::Model::MongoDB::Upc should destroy
When I turn off journaling, the test passes. Line 13 of the test where it keeps failing is: before :each do And the relevant FactoryGirl definition is: Factory.define :upc, :class => SaveWave::Model::MongoDB::Upc do |upc| Nothing obvious pops out here. Let me know if there's any more info I can provide to help debug this. |
| Comments |
| Comment by Hongli Lai [ 23/Mar/11 ] |
|
Disabling journaling did not fix the problem. I had to drop the entire database. |
| Comment by Hongli Lai [ 23/Mar/11 ] |
|
I just ran into the same problem as well. I was on 1.6, upgraded to 1.8 and enabled journaling, did a repairDatabase yesterday, and today all of a sudden insert operations start to fail. mongodb.log was full of these messages: Wed Mar 23 00:26:58 [conn3] webshop.process_count_10 Assertion failure _a != -1 db/pdfile.h 427 |
| Comment by Brian Ploetz [ 17/Mar/11 ] |
|
The requested diaglog file |
| Comment by Brian Ploetz [ 17/Mar/11 ] |
|
Most of the relevant bits of the unit test are noted above when I opened the ticket. It fails when it's trying to create the SaveWave::Model::MongoDB::Upc object in the before block. Also note the way it cleans up the database after the test suite is run by doing the following (drop each collection except the system collection): Rspec.configure do |config|
As I mentioned in one of the follow ups, this error does not happen when I run this test in isolation, it only happens when I run the entire test suite. Given this, the diaglog.4d8282ce file I'm about to attach is 2.6MB, so I hope this is not like finding a needle in a haystack for you guys. I've tried to reproduce the issue running various combinations of a smaller subset of the tests with no luck. I'll keep trying though..... The relevant collection where this is happening is named "products". Let me know if there's anything else you need. |
| Comment by Eliot Horowitz (Inactive) [ 17/Mar/11 ] |
|
Ah, ok. Then no, a re-index doesn't make sense. |
| Comment by Brian Ploetz [ 17/Mar/11 ] |
|
This is happening in a unit test of our Ruby code where the test database is empty at test start up, the data is created/updated/deleted as part of the test run, and then after the test each collection in the test database is dropped. So there is no pre-existing 1.6 era data in the database. Given this, does a collection.reIndex() still make sense, and if so, at which point in the test workflow noted above should it happen? |
| Comment by Eliot Horowitz (Inactive) [ 17/Mar/11 ] |
|
Can you do a .reIndex() on all the collections? |
| Comment by Kyle Banker [ 17/Mar/11 ] |
|
Brian, This looks like a potential core server issue, so I'm moving the issue from the Ruby driver to the core server. Kyle |
| Comment by Brian Ploetz [ 17/Mar/11 ] |
|
I see this in the MongoDB logs: Thu Mar 17 16:12:44 [conn6] savewavemodel_test.products Assertion failure _a != -1 db/pdfile.h 427 key:{ : "SaveWave::Model::MongoDB::Product" } What's interesting is that when I run this test in isolation, I don't see the error. It's only when I run the entire test suite that I see the error. I should note that my mongoid.yml looks like this..... defaults: &defaults test: .....and my spec_helper.rb has this hook in it to wipe the db after each run:
Rspec.configure do |config|
|
| Comment by Kyle Banker [ 17/Mar/11 ] |
|
Anything fishy in the MongoDB logs? Can you extract the actual updates / deletes that these tests represent? |