[SERVER-8446] MongoDB Segmentation Fault Created: 04/Feb/13 Updated: 10/Dec/14 Resolved: 02/Jun/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Stability |
| Affects Version/s: | 2.2.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Adam Kusmierz | Assignee: | David Hows |
| Resolution: | Done | Votes: | 0 |
| Labels: | crash | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Operating System: | Linux |
| Steps To Reproduce: | I can't. |
| Participants: |
| Description |
|
Random segmentation fault.
|
| Comments |
| Comment by Adam Kusmierz [ 03/Jun/13 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Ok, you've right. But it's not a reason to segmentation fault the server! It's insane. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by David Hows [ 28/Feb/13 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi Adam, From what I can see of the error this related to the fact that you are looking to evaluate the obj.search.partner_id and while you check if search is true, you aren't checking if partner_id exists as part of the document you are evaluating against. Is there a doc in your collection which has a search value, but no partner_id value? As an aside, we normally recommend using standard query operators rather than server side javascript. Regards, | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Adam Kusmierz [ 27/Feb/13 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The beginning of the code is (called from php driver):
Why this code kills mongo server? It's ("a little bit") annoying... | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Adam Kusmierz [ 27/Feb/13 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Moar:
I'm looking into my code for the mongo code. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by David Hows [ 25/Feb/13 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
It may, it depends on where within the query the problem lies as if the error occurs before it actually begins processing the query then nothing would be logged to the profiler. If you can reproduce things that would be the biggest step forward, as it stands if you cannot reproduce there is not much we can do. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Adam Kusmierz [ 25/Feb/13 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
What do you think. If I turn on debug log queries (profiler?) on the node, would it help you find what caused the issue? I haven't too much traffic on this machine, so I can turn debugging on for some time on production for you. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by David Hows [ 24/Feb/13 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi Adam, It likely is that execute, but given the stack trace i cannot say with 100% certainty. Nor can i say which part of that code could have caused an issue. Here are the source code points which represent where this crash in mongo.
Without more details of what exactly was going on or a reproducible crash there is little we can do. Regards, David | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Adam Kusmierz [ 24/Feb/13 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Probably this was one of this: exception 'MongoCursorException' with message 'couldn't send command' whith MongoCode (or it was just first code executed after mongo failed):
But looking in my logs it's not only one place, or I'm looking in wrong. Other thing - I still can't reproduce it. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Adam Kusmierz [ 24/Feb/13 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I haven't any more logs from my application. I'll try log some things more, but have you any idea what can throw this exception? find? update? call user code? Thanks in advance. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by David Hows [ 18/Feb/13 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi Adam, I need the full logs for what your application was doing as a lead up to this. While a stacktrace itself can be useful in pointing out where in the code an issue was raised from it does not provide any details of the variables that were used in the call nor any context as to why it was within that particular codepath. As such we normally need the logfiles for the instance to determine what it was doing in the lead up to the crash and if possible details from the user about any actions that were being performed. Regards, David | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Adam Kusmierz [ 18/Feb/13 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi David, what do you mean "logs"? I've attached one. I've only this, how can I produce more detailed (the issue is repeatable - once a week or so)? | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by David Hows [ 18/Feb/13 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi Adam, This looks like a crash within the javascript engine, what leads you to suspect this was corruption? Can you attach logs for this node in the lead up to the crash? Thanks, David |