[SERVER-15418] Signal to dump non-mapped memory Created: 26/Sep/14 Updated: 25/Jun/15 Resolved: 26/Sep/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Diagnostics, Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Critical - P2 |
| Reporter: | Charlie Page | Assignee: | Andy Schwerin |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Participants: | |||||
| Description |
|
We need (Linux terminology is used in this ticket) a way to dump core that does not include the memory mapped files. This will become more critical as we move to better (and therefore complicated) algorithms where examining memory will yield information we cannot otherwise access and speed up the diagnostic process. Having a core dump is the only way to have a historical record of a process state. Currently this isn't possible as all signals are caught. Having this internal to mongo such that development programs aren't installed would be ideal. |
| Comments |
| Comment by James Wahlin [ 26/Sep/14 ] | |||||||
|
gcore and gdb don't respect /proc/PID/coredump_filter settings. They use the same underlying mechanism to dump memory and do not provide a way to skip dumping file-mapped memory space. (See https://sourceware.org/bugzilla/show_bug.cgi?id=16092) | |||||||
| Comment by Andy Schwerin [ 26/Sep/14 ] | |||||||
|
OS tools exist for this purpose. | |||||||
| Comment by Matt Kangas [ 26/Sep/14 ] | |||||||
|
It is possible today to trigger core dumps of MongoDB on Linux by running "gcore" or "gdb". These dumps do not include memory mapped files by default. You can control this via /proc/PID/coredump_filter. For example, on my Ubuntu 12.04 box:
Notably bits 2 and 3 are off, those control file-backed mappings. See "man core" for details. Cross-platform, the story is more tricky Are you looking for something along the lines of Google Breakpad, which produces Windows-format minidumps on all supported platforms? |