coredump

Can Sun JDK generate core/heap dump files when JVM crashes?

做~自己de王妃 提交于 2019-11-28 03:56:48
问题 Is there anyway to generate core/heap dump file when JVM crashes? Since these files are usually very helpful to find out bugs in code. Any help is appreciated. cheng 回答1: With the following JVM options: -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath="/tmp" JVM will dump the content of heap to a file in specified directory. Note that this only happens when OutOfMemoryError is thrown since dump isn't really needed if JVM crashed due to a different reason. Edit: "Boolean options are turned on

Where are core dumps written on Mac?

六月ゝ 毕业季﹏ 提交于 2019-11-28 03:07:54
On Mac OS X, if I send SIGQUIT to my C program, it terminates, but there is no core dump file. Do you have to manually enable core dumps on Mac OS X (how?), or are they written to somewhere else instead of the working directory? xyz It seems they are suppressed by default. Running $ ulimit -c unlimited Will enable core dumps for the current terminal, and it will be placed in /cores/ as core.PID. When you open a new session, it will be set to the default value again. On macOS, your crash dumps are automatically handled by Crash Reporter . You can find backtrace files by executing Console and

Is it possible to get a core dump of a running process and its symbol table?

大兔子大兔子 提交于 2019-11-28 03:03:44
Is it possible to get gdb or use some other tools to create a core dump of a running process and it's symbol table? It would be great if there's a way to do this without terminating the process. If this is possible, what commands would you use? (I'm trying to do this on a Linux box) DustinB $ gdb --pid=26426 (gdb) gcore Saved corefile core.26426 (gdb) detach Alex Zeffertt Or run gcore $(pidof processname) . This has the benefit (over running gdb and issuing commands to the CLI) that you attach and detach in the shortest possible time. You can used generate-core-file command in gdb to generate

What is SEGV_MAPERR?

元气小坏坏 提交于 2019-11-27 17:22:49
What is SEGV_MAPERR , why does it always come up with SIGSEGV ? There are two common kinds of SEGV , which is an error that results from an invalid memory access: A page was accessed which had the wrong permissions. E.g., it was read-only but your code tried to write to it. This will be reported as SEGV_ACCERR . A page was accessed that is not even mapped into the address space of the application at all. This will often result from dereferencing a null pointer or a pointer that was corrupted with a small integer value. This is reported as SEGV_MAPERR . Documentation of a sort (indexed Linux

strcat() implementation works but causes a core dump at the end

孤人 提交于 2019-11-27 15:22:40
My implementation of strcat(char*, const char*) seems to work but then it causes a core dump. strcat() implementation: char* strcat(char* dest, const char* src) { char* tmp = dest; while(*tmp) ++tmp ; while( (*tmp++ = *src++ ) != '\0') ; return (dest); } Code in int main() where I call strcat(): char arr3[] = "Mr. "; char arr4[] = "Smith"; printf("Hello %s!", strcat(arr3, arr4)); It actually concatenated both strings and printed it out but still caused a core dump. output : Hello Mr. Smith!Aborted (core dumped) What did I do wrong? Your program doing buffer overflow at runs time, by strcat

undefined reference to `std::ios_base::Init::Init()'

喜欢而已 提交于 2019-11-27 11:52:47
I write this code to read 3 files, TM is the size of square matrix, LER the No. of rows of an array and from last value define a non-square matrix of (ler/2)*2 Then... the code read a file with some relations, all are numbers and are assign to C[ler]. Then ... C[ler] is assigned to B[ler/2][2]. Those coordinates, per row, in B[ler/2][2] are assign to a and b. a and b are the row and the column of the matrix A[tm][tm] where to add 1. My code crashes and I don't see what the error is. When I try to compile it, the compiler gcc -g -o MatSim MatSim.cpp prompted: /usr/include/c++/4.6/iostream:75:

How to generate core dump file in Ubuntu [duplicate]

白昼怎懂夜的黑 提交于 2019-11-27 11:49:49
This question already has an answer here: How to generate a core dump in Linux on a segmentation fault? 11 answers I would like to know how to generate a core dump file in Ubuntu. I am using Ubuntu 8.04.1 and gcc compiler 4.2.3. I have written a simple C program to generate a core dump. I have compiled the program as in -- gcc -g badpointer.c . When I run the program its gives segmentation fault but no core dump is generated. What additional things do i have to do to generate a core dump file ? Linux Activate your coredumps by: ulimit -c unlimited Also, check: $ sysctl kernel.core_pattern to

How can a C program produce a core dump of itself without terminating?

时光总嘲笑我的痴心妄想 提交于 2019-11-27 11:34:48
I want a C program to produce a core dump under certain circumstances. This is a program that runs in a production environment and isn't easily stopped and restarted to adjust other kinds of debugging code. Also, since it's in a production environment, I don't want to call abort(). The issues under investigation aren't easily replicated in a non-production environment. What I'd like is for the program, when it detects certain issues, to produce a core dump on its own, preferably with enough information to rename the file, and then continue. void create_dump(void) { if(!fork()) { // Crash the

How can I configure windows to generate a core dump from an application?

你离开我真会死。 提交于 2019-11-27 10:54:40
问题 How can I configure windows to generate a core dump from an application? I'm using Win xp, and the application is build with Visual Studio 2003. 回答1: Microsoft has a free tool called Userdump.exe which will do this. It's pretty simple to use that tool to create a dump (.dmp) file for a process that shuts down with an exception or to create a dump file for a hanging process 回答2: Just to throw in some other suggestions: ProcDump that is part of the MS SysInternals suite (it captures crashes but

Is it possible to get a core dump of a running process and its symbol table?

无人久伴 提交于 2019-11-27 04:10:48
问题 Is it possible to get gdb or use some other tools to create a core dump of a running process and it's symbol table? It would be great if there's a way to do this without terminating the process. If this is possible, what commands would you use? (I'm trying to do this on a Linux box) 回答1: $ gdb --pid=26426 (gdb) gcore Saved corefile core.26426 (gdb) detach 回答2: Or run gcore $(pidof processname) . This has the benefit (over running gdb and issuing commands to the CLI) that you attach and detach