[SERVER-9047] warning: failed to read from /proc/self/numa_maps: errno:2 No such file or directory Created: 21/Mar/13 Updated: 11/Jul/16 Resolved: 29/Mar/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Logging |
| Affects Version/s: | 2.4.0 |
| Fix Version/s: | 2.4.2, 2.5.0 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | stronglee | Assignee: | Andrew Morrow (Inactive) |
| Resolution: | Done | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Linux 2.6.38-2-amd64 |
||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | Linux | ||||||||
| Steps To Reproduce: | Change line[100] to line[20] and you will see this warnning message on any machine. |
||||||||
| Participants: | |||||||||
| Description |
|
The 100 character buffer used to read /proc/self/numa_maps at startup will be too small when MongoDB has been unpacked into, for example, /usr/local/mongodb-linux-x86_64-2.4.0/bin/. The buffer size should be increased, perhaps to 1024 characters or more. See src/mongo/db/db.cpp line 230 in today's master branch. Original report: When starts mongod, it writes this warning message to the log. Please look at the source code:
It's just because the first line of my system in /proc/self/numa_maps is longer than 100 chars. When the line is larger than the buffer, the f's failbit will be set after getline() without setting the errno, so errnoWithDescription() displays last errno message. |
| Comments |
| Comment by auto [ 29/Mar/13 ] |
|
Author: {u'date': u'2013-03-29T18:14:36Z', u'name': u'Andrew Morrow', u'email': u'acm@10gen.com'}Message: |
| Comment by auto [ 29/Mar/13 ] |
|
Author: {u'date': u'2013-03-29T18:14:36Z', u'name': u'Andrew Morrow', u'email': u'acm@10gen.com'}Message: |
| Comment by Tad Marshall [ 21/Mar/13 ] |
|
Thanks. Your result is similar to what I see in Ubuntu 12.04, and the major variable is going to be the path to the executable, which could be pretty much anything. We should probably have a buffer size more like 1 KB or 10 KB to be safer ... 100 bytes is pretty small. |
| Comment by stronglee [ 21/Mar/13 ] |
|
Oh, I am sorry. |
| Comment by stronglee [ 21/Mar/13 ] |
|
Hi, I am running mongodb2.4 release, which was installed using apt-get in Debian6.0. cat /proc/15902/numa_maps 00400000 interleave:0-1 file=/usr/local/mongodb-linux-x86_64-2.4.0/bin/mongod mapped=2466 active=1853 N0=2466 The first line contains 109 characters long... |
| Comment by Tad Marshall [ 21/Mar/13 ] |
|
Thanks for the report and diagnosis! What distro are you running? What hardware or virtualized environment is mongod running on? Can you post the results from 'cat /proc/<pid>/numa_maps' for the mongod process? |