[SERVER-388] invalid ensureIndex crashes mongod server Created: 26/Oct/09 Updated: 12/Jul/16 Resolved: 26/Oct/09 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.1.3 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Doug Green | Assignee: | Eliot Horowitz (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
linux-x86_64-1.0.1, but it's one we compiled ourself with boost 1_38 libs, and not the distro |
||
| Participants: |
| Description |
|
The mongod server crashes when the c++ client sends a bad ensureIndex(). Here's the code (http://pastebin.com/d744f024) void statstore_mongo::init(vector<string>& options) { catch (const UserException& e) { string what("Unable to open mongo database connection: "); what.append(e.what()); throw runtime_error(what); }} And here's a partial log: Mon Oct 26 21:27:54 git version: 73ed0277ffabb283f315b1da18a90c9c889b4924 for retweet... , name: "stat_id_1_word_1" } |
| Comments |
| Comment by auto [ 07/Dec/09 ] |
|
Author: {'name': 'Eliot Horowitz', 'email': 'eliot@10gen.com'}Message: fix invalid ensureIndex crashing server Conflicts: db/pdfile.cpp |
| Comment by Doug Green [ 27/Oct/09 ] |
|
Ahh, this crash was caused by my misunderstanding of databases and collection. If I pass "dbname.collectionname" instead of just "collectionname" it doesn't seem to crash. You probably need a check for people like me just passing a single name instead of the fully qualified collectionname. |
| Comment by Doug Green [ 27/Oct/09 ] |
|
On further review, I don't think it has anything to do with the multiple indexes, but it appears to be a problem creating any index using this code, the first time. |
| Comment by Eliot Horowitz (Inactive) [ 26/Oct/09 ] |
|
fixed the crash. so it actually was the first call crashing the server, not the 2nd. |