UNIX Socket FAQ

A forum for questions and answers about network programming on Linux and all other Unix-like systems

You are not logged in.

  • Index
  • » C++
  • » Help Please !!!!! Why c++ programme get "killed"

#1 2006-11-17 10:48 AM

amohammad
Member
Registered: 2006-11-17
Posts: 3

Re: Help Please !!!!! Why c++ programme get "killed"

Offline

#2 2006-11-17 08:00 PM

i3839
Oddministrator
From: Amsterdam
Registered: 2003-06-07
Posts: 2,239

Re: Help Please !!!!! Why c++ programme get "killed"

Probably because there's a bug somewhere else, most likely close to that point. If you want us to find the bug you need to post much more code, something which we can compile and test, preferably.

It seems to be a multithreaded application, so that makes it harder to debug. Did you run it from gdb?

Offline

#3 2006-11-19 08:18 AM

amohammad
Member
Registered: 2006-11-17
Posts: 3

Re: Help Please !!!!! Why c++ programme get "killed"

Hi,
Thank you for your reply ,
offcourse my application is multithreaded, I want to know only that why c++ programm get "killed" , the signal 'SIGKILL' ,why it generated,  I have studied that the SIGKILL signal cannot be caught or removed. but I doesn't know why it generates

Help Please
regard,
Ali Muhammad Qaim Khani

Offline

#4 2006-11-19 02:31 PM

i3839
Oddministrator
From: Amsterdam
Registered: 2003-06-07
Posts: 2,239

Re: Help Please !!!!! Why c++ programme get "killed"

Run it from gdb and make sure it is really SIGKILL that is sent.

Offline

#5 2006-11-19 07:00 PM

RobSeace
Administrator
From: Boston, MA
Registered: 2002-06-12
Posts: 3,839
Website

Re: Help Please !!!!! Why c++ programme get "killed"

Yeah, that seems weird...  SIGKILL is generally only generated interactively; ie.,
someone running "kill -9" on your app...  The only time I can think of right offhand
where it'd be done automatically by the system is at shutdown time (and, then only
if SIGTERM doesn't take you out)...  Maybe also an OOM-killer type thing might
send SIGKILL if you're hogging too much memory, and the system is running low...
That's possible, given you say you're on Linux...  How much RAM does your system
have?  Does your app allocate a lot of memory?  Check your syslog or "dmesg",
and see if there's any message about the process getting killed...

Offline

#6 2006-11-22 07:26 AM

amohammad
Member
Registered: 2006-11-17
Posts: 3

Re: Help Please !!!!! Why c++ programme get "killed"

Hi all,
    thank you for helping me to solve the "killed " problem in multithreaded application,
thank you to both of Mr. i3839 and Mr. RobSeace to advice me to use gdb, using gdb I have solved the problem. the problem was, I was accessing the uninitialized object. it was the "segmentation fault" but giving me "Killed" message. again thanks to both of you .

regard,
Ali Muhammad Qaim Khani

Offline

  • Index
  • » C++
  • » Help Please !!!!! Why c++ programme get "killed"

Board footer

Powered by FluxBB