bingo235 / google-breakpad

Automatically exported from code.google.com/p/google-breakpad
0 stars 0 forks source link

Can't clone because of no enough memory under linux #420

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When a process allocated almost all memory crashes, the current code can't 
generate mindump because of no enough memory for sys_clone. Should we add 
CLONE_VM flag to sys_clone?

Original issue reported on code.google.com by david.yu...@gmail.com on 11 Mar 2011 at 9:45

Attachments:

GoogleCodeExporter commented 9 years ago
I don't think you are going to gain very much memory by doing this. I believe 
the memory in the new process is COW whether you specify CLONE_VM or not.

The initial patch set [1] for exception_handler.cc had CLONE_VM, but it was 
taken out in the second patch set. Maybe agl remembers why.

[1] http://codereview.chromium.org/115526/

Original comment by thestig@chromium.org on 19 Apr 2012 at 5:21

GoogleCodeExporter commented 9 years ago
I'm afraid that the impact of using CLONE_VM might be significant. The change 
can't be made lightly. Certainly the actions of the dumper may become visible 
in the dump itself which is undesirable.

The dumper itself allocates memory so, if the system is so critically short 
that the kernel can't start a new process, the dump is unlikely to work in any 
case.

Original comment by a...@chromium.org on 19 Apr 2012 at 3:12