LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-24-2008, 05:14 AM   #1
knobby67
Member
 
Registered: Mar 2006
Posts: 627

Rep: Reputation: 43
Killed error


Hello All,
I've been working on some code for a while, which works fine but every so often I get a killed error? That is the programme crashes and the word killed is in command prompt. As far as I can tell I never used "Killed" as an error so suspect something else (ie a lib) is causing this. I used GLX, OpenGL, SDL image and mixer and thread libs. If anyone has experience can you tell me if this is the problem? That is do any of these give a "Killed" error. Thanks in advance
 
Old 09-24-2008, 07:47 AM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,358

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Check /var/log/messages ; could be the oom-killer (Out-Of-Memory) http://linux-mm.org/OOM_Killer
 
Old 09-24-2008, 08:30 AM   #3
CRC123
Member
 
Registered: Aug 2008
Distribution: opensuse, RHEL
Posts: 374
Blog Entries: 1

Rep: Reputation: 32
Also, you may be 'over-extending' some resource (file, thread, etc). There are hard and soft limits for a process. When they hit the soft limit, they get 'notified' (by a signal) and when they hit a hard limit they get killed. Maybe your program is hitting some resource's hard limit. You can get/set these limits with the 'ulimit' command.
 
Old 09-24-2008, 09:31 AM   #4
knobby67
Member
 
Registered: Mar 2006
Posts: 627

Original Poster
Rep: Reputation: 43
Thanks for the help. Please bear with me for a second (I'm an embedded programmer used to interupts and no OS so this is fairly new to me)
I checked my log and found this when I ran the programme

Sep 24 16:19:13 development020 kernel: printk: 242 messages suppressed.
Sep 24 16:19:13 development020 kernel: oom-killer: gfp_mask=0x201d2, order=0
Sep 24 16:19:13 development020 kernel: [<c0144523>] out_of_memory+0x25/0x13a
Sep 24 16:19:13 development020 kernel: [<c014598c>] __alloc_pages+0x1f5/0x275
Sep 24 16:19:13 development020 kernel: [<c0146b3b>] __do_page_cache_readahead+0xc8/0x1e8
Sep 24 16:19:13 development020 kernel: [<c0124657>] do_gettimeofday+0x31/0xce
Sep 24 16:19:13 development020 kernel: [<c0143c34>] filemap_nopage+0x15b/0x313
Sep 24 16:19:13 development020 kernel: [<c014c0f8>] __handle_mm_fault+0x26e/0x740
Sep 24 16:19:13 development020 kernel: [<c0168079>] __user_walk+0xf/0x11
Sep 24 16:19:13 development020 kernel: [<c0220412>] sock_ioctl+0x193/0x1b5
Sep 24 16:19:13 development020 kernel: [<c022027f>] sock_ioctl+0x0/0x1b5
Sep 24 16:19:13 development020 kernel: [<c0124657>] do_gettimeofday+0x31/0xce
Sep 24 16:19:13 development020 kernel: [<c01154b6>] do_page_fault+0x18a/0x481
Sep 24 16:19:13 development020 kernel: [<c011532c>] do_page_fault+0x0/0x481
Sep 24 16:19:13 development020 kernel: [<c01037f9>] error_code+0x39/0x40

I presume this is the oom-killer? If so will the unlimitfix it or does the board I'm running need more memory? Thanks again, it would have taken me days if not more to work this out by myself.
 
Old 09-24-2008, 07:11 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,358

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Well, you could read up on that link, but fundamentally you'll have to check your code. It could be a runaway mem issue.
ulimit might(!) fix it....
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Error: subprocess dpkg-split killed by signal (Segmentation fault) Jinouchi Linux - Software 0 06-05-2008 11:41 AM
find history of a job killed by "kernel: Out of Memory: Killed process" poulacou Linux - Server 3 09-20-2007 04:24 PM
Got a error message 'Killed' while installing Xubuntu 7.04 Ronney Linux - Newbie 4 06-15-2007 01:32 PM
Shall he be killed? vargadanis General 32 12-30-2006 12:48 PM
valgrind crashes at start up with "Killed" error message lasindi Slackware 0 04-22-2006 08:54 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration