LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-25-2009, 09:04 PM   #1
mitchd123
LQ Newbie
 
Registered: Jan 2009
Distribution: Ubuntu 14.04
Posts: 21

Rep: Reputation: 0
Processes are not stopping?


Processes are not closing, but instead accumulating and taking CPU to 100% I really need help figuring this one out. I'm running Gentoo and I've recently upgraded and also started running KVM.

top -c

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
5089 mythtv 29 9 201m 26m 18m R 83 0.3 272:28.35 /usr/bin/mythbackend --generate-preview 0x0 --ch
5008 mythtv 29 9 201m 27m 18m R 59 0.3 274:36.21 /usr/bin/mythbackend --generate-preview 0x0 --ch
5171 mythtv 37 17 284m 30m 18m R 30 0.4 46:28.22 /usr/bin/mythcommflag -j 5318 -V 3
5176 mythtv 37 17 281m 27m 18m R 20 0.3 46:24.62 /usr/bin/mythcommflag -j 5319 -V 3
4160 root 13 -7 3219m 3.1g 1788 S 6 39.2 382:14.80 /usr/bin/kvm -m 3G -smp 2 -localtime -nographic
4556 root 20 0 118m 40m 13m S 2 0.5 2:54.04 /usr/bin/X :0 -audit 0 -auth /var/gdm/:0.Xauth -
6218 root 20 0 141m 49m 16m S 2 0.6 0:46.64 /opt/firefox/firefox-bin
1 root 20 0 3768 612 516 S 0 0.0 0:00.74 init [3]
2 root 15 -5 0 0 0 S 0 0.0 0:00.00 [kthreadd]
3 root RT -5 0 0 0 S 0 0.0 0:00.00 [migration/0]
4 root 15 -5 0 0 0 S 0 0.0 0:00.00 [ksoftirqd/0]
5 root RT -5 0 0 0 S 0 0.0 0:00.00 [migration/1]
6 root 15 -5 0 0 0 S 0 0.0 0:00.05 [ksoftirqd/1]
7 root 15 -5 0 0 0 S 0 0.0 0:01.33 [events/0]


Next I open up three more empty terminal windows and the CPU gets crushed and KVM pops up possibly due to being scheduled at a higher priority.

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
4160 root 13 -7 3219m 3.1g 1788 S 69 39.2 382:49.41 /usr/bin/kvm -m 3G -smp 2 -localtime -nographic
6538 root 20 0 218m 18m 12m R 42 0.2 0:13.28 gnome-terminal
6530 root 20 0 218m 18m 12m R 34 0.2 0:13.61 gnome-terminal
6545 root 20 0 218m 18m 12m R 34 0.2 0:12.71 gnome-terminal
5008 mythtv 29 9 201m 27m 18m R 12 0.3 275:07.13 /usr/bin/mythbackend --generate-preview 0x0 --ch
5089 mythtv 29 9 201m 26m 18m R 6 0.3 273:03.96 /usr/bin/mythbackend --generate-preview 0x0 --ch
4556 root 20 0 119m 41m 13m S 2 0.5 2:55.95 /usr/bin/X :0 -audit 0 -auth /var/gdm/:0.Xauth -
5176 mythtv 37 17 281m 27m 18m R 2 0.3 46:30.90 /usr/bin/mythcommflag -j 5319 -V 3
6218 root 20 0 141m 49m 16m S 2 0.6 0:48.39 /opt/firefox/firefox-bin
1 root 20 0 3768 612 516 S 0 0.0 0:00.74 init [3]
2 root 15 -5 0 0 0 S 0 0.0 0:00.00 [kthreadd]
3 root RT -5 0 0 0 S 0 0.0 0:00.00 [migration/0]
4 root 15 -5 0 0 0 S 0 0.0 0:00.00 [ksoftirqd/0]
5 root RT -5 0 0 0 S 0 0.0 0:00.00 [migration/1]


If I close out the gnome-terminals, they continue to live on:

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
4160 root 13 -7 3219m 3.1g 1788 R 75 39.2 388:45.55 /usr/bin/kvm -m 3G -smp 2 -localtime -nographic
6530 root 20 0 218m 18m 12m R 36 0.2 4:41.21 gnome-terminal
6538 root 20 0 218m 18m 12m R 36 0.2 4:41.43 gnome-terminal
6545 root 20 0 218m 18m 12m R 32 0.2 4:32.40 gnome-terminal
5089 mythtv 29 9 201m 26m 18m R 8 0.3 274:08.24 /usr/bin/mythbackend --generate-preview 0x0 --ch
5008 mythtv 29 9 201m 27m 18m R 6 0.3 276:10.32 /usr/bin/mythbackend --generate-preview 0x0 --ch
4556 root 20 0 119m 41m 13m S 2 0.5 3:13.66 /usr/bin/X :0 -audit 0 -auth /var/gdm/:0.Xauth -
4755 mythtv 20 0 514m 51m 19m S 2 0.6 1:26.57 /usr/bin/mythbackend --verbose important,general
6218 root 20 0 147m 56m 16m S 2 0.7 1:09.05 /opt/firefox/firefox-bin
1 root 20 0 3768 612 516 S 0 0.0 0:00.74 init [3]
2 root 15 -5 0 0 0 S 0 0.0 0:00.00 [kthreadd]
3 root RT -5 0 0 0 S 0 0.0 0:00.00 [migration/0]
4 root 15 -5 0 0 0 S 0 0.0 0:00.00 [ksoftirqd/0]
5 root RT -5 0 0 0 S 0 0.0 0:00.00 [migration/1]

Every day I have to go in manually and start killing the process which are not dying naturally on their own...eg pkill gnome-terminal

Any hints on how to troubleshoot this? Nothing showing up in dmesg
 
Old 04-27-2009, 08:39 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Not that I'd know, but is it normal to have 2 copies of myth.. running?
 
Old 04-27-2009, 11:01 PM   #3
mitchd123
LQ Newbie
 
Registered: Jan 2009
Distribution: Ubuntu 14.04
Posts: 21

Original Poster
Rep: Reputation: 0
Thank you for your reply.

It is NOT normal for multiple copies of mythbackend to be running. That is the problem. Myth is executing tasks over time,and the tasks are not completely dying off as they should. They linger on and start eating up CPU.

Currently in System Monitor I see:

4 processes labeled apache2 running
4 processes of dbus-daemon running
3 processes of kjournald, etc.

Daily I have been going in and stopping mythbackend correctly /etc/init.d/mythbackend stop and then executing a kill signal to kill off the bogus or zombie processes which never completely died with pkill mythbackend

Then for me to exit the terminal window I used to execute the pkill commands, I can't just type exit. Instead I have to type pkill gnome-terminal. If I simply type exit it runs on in the background chewing up all my CPU.


What I can't figure out is some programs exit correctly but others do not. Some processes which close correctly are gcalc and openoffice.

The worst offender is gnome-terminal which will crush my CPU.

Any help would be GREATLY appreciated. I don't know what to do next with this problem other than to rebuild my system which is painful.
 
Old 04-28-2009, 02:25 AM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Is it possible myth has a bug? Is it the latest update? Is it happening to other progs even if myth isn't running at all?
Can you add your distro and version to your profile so people know what you've got?
 
Old 04-28-2009, 10:18 AM   #5
mitchd123
LQ Newbie
 
Registered: Jan 2009
Distribution: Ubuntu 14.04
Posts: 21

Original Poster
Rep: Reputation: 0
Chris, thanks again for your help.

I went in and shut down as many services and tasks as I could and unloaded most of the modules to help isolate this. I stopped mythtv, kvm_amd, etc.

However the problem still remains. If I open a single gnome-terminal window everything is fine. However when I close that window, CPU ramps up to 100% as seen through gnome-system-monitor

As soon as I execute pkill gnome-terminal CPU returns to normal <5%

I'm running Gentoo with Gnome 2.24.1

Below are more details on my configuration. Let me know what else you might be looking for?


emerge --info

Portage 2.1.6.7 (default/linux/amd64/2008.0/desktop, gcc-4.1.2, glibc-2.8_p20080602-r1, 2.6.27-gentoo-r8 x86_64)
=================================================================
System uname: Linux-2.6.27-gentoo-r8-x86_64-AMD_Athlon-tm-_Dual_Core_Processor_4850e-with-glibc2.2.5
Timestamp of tree: Mon, 20 Apr 2009 15:15:01 +0000
app-shells/bash: 3.2_p39
dev-java/java-config: 2.1.7
dev-lang/python: 2.5.4-r2
dev-util/cmake: 2.6.2-r1
sys-apps/baselayout: 2.0.0
sys-apps/openrc: 0.4.3-r2
sys-apps/sandbox: 1.6-r2
sys-devel/autoconf: 2.13, 2.63
sys-devel/automake: 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils: 2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool: 1.5.26
virtual/os-headers: 2.6.27-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -mno-tls-direct-seg-refs"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="C"
LDFLAGS="-Wl,-O1"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X aac ac3 acl acpi alsa amd64 apache2 avi bash-completion berkdb branding bzip2 cairo cddb cdparanoia cdr cli cracklib crypt css cups dbus divx4linux docs dri dv dvd dvdr dvdread eds emboss encode esd evo examples fam ffmpeg firefox fortran ftp gdbm gif gnome gphoto2 gpm gstreamer gtk hal iconv ieee1394 imagemagick imlib ipv6 isdnlog ivtv jpeg kde kvm lame latin1 ldap libnotify lirc mad midi mikmod mjpeg mmx mmxext mp3 mp4 mpeg mudflap multilib mysql mythtv ncurses nls nptl nptlonly nvidia ogg opengl openmp pam parport pcre pdf perl php png ppds pppd python qt3 qt3support qt4 quicktime readline reflection rtsp samba sdl session spell spl sse sse2 ssl startup-notification stream svg swat sysfs tcpd threads threadsafe tiff tightvnc transcode truetype unicode usb v4l v4l2 vcd vim-with-x vorbis wav wmf wxwindows x264 xine xinerama xml xorg xulrunner xv xvid xvmc zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIRC_DEVICES="serial" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Close remote session with out stopping processes watcher69b Linux - General 3 02-27-2009 08:34 AM
Stopping Multiple processes with a script rajdeepbhattacharya Linux - Newbie 1 06-15-2008 05:00 PM
stopping other processes TranceDude Linux - Software 8 08-28-2005 08:55 AM
stopping all processes adhiraj Linux - General 0 01-29-2004 05:19 AM
Inittab - stopping processes upon boot jfshadow Linux - General 5 06-08-2002 04:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:42 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