coredump

What's the reason of this segmentation fault?

≯℡__Kan透↙ 提交于 2019-12-11 07:19:15
问题 It doesn't happen always,but will happen when the server application has been running for quite a while. What's the reason and how can I fix it? Code as follows: struct hostent* Host; Result->sin_family=AF_INET; Result->sin_port=htons((unsigned short)Port); Host=gethostbyname(HostName); if(!Host) { unsigned long int addr=inet_addr(HostName); if(addr!=-1) Host=gethostbyaddr(&addr,sizeof(addr),AF_INET); if(!Host) { if(errno!=ETIMEDOUT) errno=-1; /* use h_errno */ printf("Unknown host for server

How Do I run ulimit -c unlimited automatically

断了今生、忘了曾经 提交于 2019-12-11 03:53:01
问题 I am trying to provide support for coredump file generation from my rootfs ,I have modified /etc/limits file with "ulimit -c unlimited" command and "* hard core -1" ,Now when I give kill -6 $$ ,expecting core file generation but to get this core file have to run ulimit -c unlimited explicitly . But I want it to happen automatically , no need to run ulimit -c unlimited it again in shell. Can anybody tell me what changes I have to make for the same to happen 回答1: From a program you can use

Why Coredump files is not generating here?

邮差的信 提交于 2019-12-11 02:44:26
问题 I have a sitution here,few days back I was able to see core dumbed file on my target board,I have provided the coredump generation support by adding "ulimit -c unlimited" to my /etc/profile.But then someone told me This will only take affect for program launched from a login shell, not for processes/services started by systemd,etc/limits would the the proper location for settings these defaults. So I changed /etc/limits file and added "ulimit -c unlimited" line.but now I could not see

Understanding issue with shared pointers (Lifetime, passing as parameter)

て烟熏妆下的殇ゞ 提交于 2019-12-10 23:33:09
问题 I tried to start with the boost asio chat example and derive an own networking program. Unfortunately I have some problem understanding what really happens. I tried to reduce my program to an absolute minimum. A server class waits for incoming connections and creates a session object to handle the connection. This is the code of the server: #include <cstdint> #include <iostream> #include <sstream> #include <memory> #include <vector> #include <boost/asio.hpp> #include <boost/bind.hpp> class

How can i take a user dump using powershell

不羁的心 提交于 2019-12-10 20:37:57
问题 I want to take user dump of a process using powershell How can i do it? The same I get on rightclicking the process in Taskmanager 回答1: The easiest way is to use Procdump from Sysinternals toolkit. Use Get-Process to get process id, which you can pass to Procdump for actual dumping. Edit: I'd still rather use readily available tools instead of the hard way. Have you got a valid business reason? Since you insist, there is a Win32 API call that creates user mode memory dumps. It can be invoked

Python server “Aborted (Core dumped)”

谁说我不能喝 提交于 2019-12-10 12:53:35
问题 I use web.py to create a Python web server. This server is called to solve linear programming problems, and it uses the library CBC to do that. Every once in a while, the server crashes with a log that looks like that: 78.243.184.3:56271 - - [03/Jun/2016 04:35:54] "HTTP/1.1 GET /optimization" - 200 OK Aborted (core dumped) I belive "Aborted (core dumped)" is a C error, so it comes from either web.py or CBC. Is there any way to trace back the source of the error? 回答1: A core dump is caused by

Accessing random image pixels using a for loop

≡放荡痞女 提交于 2019-12-10 11:33:30
问题 I am trying to learn image processing using OpenCV . I wrote some code to edit an image. The edits are working well except for changing the color of some pixels. I am trying to access some random pixels, and change their color (that is when status == 3 ). When I run the program I get "[run] Segmentation fault (core dumped)" , which I think means that there is a denied memory access. int main( ) { Mat originalImage = imread("image.jpg", CV_LOAD_IMAGE_UNCHANGED); if (originalImage.empty()){

How to analyse Websphere core*.dmp file and Snap*.trc files?

社会主义新天地 提交于 2019-12-10 04:22:27
问题 All, I have my application running on websphere app server 7.0. I get some of these core dumps and trace files like core.20110909.164930.3828.0001.dmp and Snap.20110909.164930.3828.0003.trc. My question is, just like the thread dumps generated by WAS can be opened and analyzed by IBM-Thread Dump Analyzer tool is there a tool(s) to open the above mentioned files by IBM or any other? Thanks, Ayusman 回答1: the core dumps have to be processed by the jextract utility (of the jre that dumped) fromn

OS X: Generate core dump without bringing down the process?

会有一股神秘感。 提交于 2019-12-09 16:11:41
问题 I know how to generate a core dump on OS X when a process crashes, but what I really need to do is attach to a process, generate a core dump, then resume that process (without killing it). A long time ago (maybe a year and a half ago) I had C code that would do this... It used the OS X kernel libraries to connect to a process, read all of its thread states and memory, and write that into a Mach-O file on disk. This worked great (and it's exactly what I'm looking for), but now I can't seem to

Segmentation fault (core dumped) when using fscanf to read into a pointer

霸气de小男生 提交于 2019-12-09 04:02:17
问题 I'm trying to use fscanf to read and print every character on the screen, but I'm getting a segmentation fault (core dumped) when I run the program. Here's my code: #include <stdio.h> main(int argc, char * argv[]) { int *a ; FILE *input; if (argc>=2) { input= fopen(argv[1],"r"); if (input!=NULL) { while (feof(input)==0) { fscanf(input,"%d\n",a); printf("%d\n",*a); } fclose(input); } else { printf("Error!\n"); } } } I provide the file as an argument, like this: ./myprog input.txt The file