I am suffering through problems related to a link in /var/lib/init.d/started/mtyhbackend not being removed after stopping mythbackend. It results in this strange set of events: dragonfly ~ # /etc/init.d/mythbackend stop * Stopping myth backend ... start-stop-daemon: warning: failed to kill 14101: No such process [ !! ]dragonfly ~ # /etc/init.d/mythbackend start * WARNING: "mythbackend" has already been started. dragonfly ~ # /etc/init.d/mythbackend status * status: started dragonfly ~ # /etc/init.d/mythbackend stop * Stopping myth backend ... start-stop-daemon: warning: failed to kill 14101: No such process [ !! ]dragonfly ~ # /etc/init.d/mythbackend status * status: started dragonfly ~ # ps aux | grep myth root 14397 0.0 0.0 1476 464 pts/1 R+ 13:58 0:00 grep myth dragonfly ~ # There was one thread I found that covered the same thing: http://readlist.com/lists/gentoo.org/gentoo-user/1/6171.html It recommeded deleting var/lib/init.d/started/mthhbackend so I tried that: dragonfly ~ # rm /var/lib/init.d/started/mythbackend dragonfly ~ # /etc/init.d/mythbackend status * status: stopped dragonfly ~ # /etc/init.d/mythbackend start * Starting myth backend ... [ ok ]dragonfly ~ # /etc/init.d/mythbackend status * status: started dragonfly ~ # /etc/init.d/mythbackend stop * Stopping myth backend ... start-stop-daemon: warning: failed to kill 14503: No such process [ !! ]dragonfly ~ # /etc/init.d/mythbackend status * status: started dragonfly ~ # Yesterday I had this problem for a while but it went away. Now it's back. Need some help. Thanks! Reproducible: Sometimes Steps to Reproduce: 1. As above. Actual Results: As above Expected Results: I expect that mythbackend and mysql should be stopped when told and should start when told. I expect that when started that one or both should have process IDs that are visible in ps aux. I am concerned that the process of building MythTV has caused me to has way too many global flags on this machine. I'd like some guidance on wice should prossibly be placed in package.use dragonfly ~ # emerge info Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.3.5-20050130, glibc-2.3.4.20041102-r1, 2.6.11-gentoo-r6 i686) ================================================================= System uname: 2.6.11-gentoo-r6 i686 Intel(R) Pentium(R) 4 CPU 3.00GHz Gentoo Base System version 1.6.11 Python: dev-lang/python-2.3.4-r1 [2.3.4 (#1, Apr 16 2005, 03:24:16)] dev-lang/python: 2.3.4-r1 sys-devel/autoconf: 2.59-r6, 2.13 sys-devel/automake: 1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.4 sys-devel/binutils: 2.15.92.0.2-r7 sys-devel/libtool: 1.5.14 virtual/os-headers: 2.6.8.1-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 X aac alsa apache2 audiofile avi berkdb bitmap-fonts caps cdr crypt cups curl dvd dvdr dvdread emboss encode esd fam firebird flac fluidsynth foomaticdb fortran gd gdbm gif gimp gimpprint gnome gpm gstreamer gtk gtk2 i8x0 imlib ipv6 jack jack-tmpfs java jpeg kde ladcca ladspa libg++ libwww lirc mad mikmod mjpeg mmx motif mozcalendar mozilla mp3 mpeg mysql mythtv ncurses nls nptl nptlonly ogg oggvorbis opengl oss pam pdflib perl png ppds python qt quicktime readline samba sdl sndfile spell sse sse2 ssl svga tcltk tcpd threads tiff truetype truetype-fonts type1-fonts usb v4l v4l2 vorbis xml2 xmms xscreensaver xv xvid zlib" Unset: ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY dragonfly ~ #
version of MythTV?
dragonfly ~ # emerge -pv mythtv mythweather mythvideo mythnews mythmusic mythgallery mythdvd mythbrowser mysql These are the packages that I would merge, in order: Calculating dependencies ...done! [ebuild R ] media-tv/mythtv-0.18 +X +alsa (-altivec) -arts -cle266 -debug -directfb -dvb -ieee1394 +jack -joystick -lcd +lirc +nls -nvidia +oggvorbis +opengl +oss +xv 0 kB [ebuild N ] x11-themes/mythtv-themes-0.18 15,257 kB [ebuild R ] media-plugins/mythweather-0.18 -debug +nls 0 kB [ebuild R ] media-plugins/mythvideo-0.18 -debug +nls 0 kB [ebuild R ] media-plugins/mythnews-0.18 -debug +nls 0 kB [ebuild R ] media-plugins/mythmusic-0.18 +X -aac -debug +mmx +nls +opengl +sdl 0 kB [ebuild R ] media-plugins/mythgallery-0.18 -debug -exif +nls +opengl 0 kB [ebuild R ] media-plugins/mythdvd-0.18 -debug +nls +transcode 0 kB [ebuild R ] media-plugins/mythbrowser-0.18 -debug +nls 0 kB [ebuild R ] dev-db/mysql-4.0.24 +berkdb -debug -innodb +perl +readline (-selinux) +ssl -static +tcpd 0 kB Total size of downloads: 15,257 kB dragonfly ~ #
This doesn't seem like a media-tv problem to me. Maybe it's more of a baselayout thing. Although I wouldn't break down in fits if we didn't use start-stop-daemon. I think it's way overused sometimes. BTW, the proper way to make baselayout think that something isn't running, is to run /etc/init.d/mythbackend zap not to go in removing files in places you don't know much about.
"run /etc/init.d/mythbackend zap". I've never heard of zap before. This sounds very much preferable. Thanks. BTW - Since I filed this bug I have removed the wireless NIC that was in the machine and replaced it with an external wireless bridge due to problems with start-up routines for wireless. This problem has not occurred since making that change. When I was using wireless via ndiswrapper it happened on nearly every reboot. This problem might somehow have been related to wlan0 not working correctly. See this bug report for more info on that problem: http://bugs.gentoo.org/show_bug.cgi?id=90443
no, baselayout is doing exactly what it should the stop() function failed to return properly therefore baselayout did not remove the file that indicated the service was running
Everything is performing as it should. Your issue is that MythBackend is crashing while it's running. Completely seperate issue. Please read through your logs... investigate what is happening on your system. Possibly re-compile MythTV. Personal experience has it working with gcc 3.4.x better. And open another bug if it's still happening. This time the bug should be able the crashing and include details on that.
Please do not mark as 'RESOLVED|INVALID' without presenting some data about why you say it crashed. I cannot find anything to support that. MythTV wasn't crashing. It wasn't doing anything. The mythbackend and mysql are sitting there doing nothing and the frontend isn't being used. I reboot the system. Upon reboot mythbackend doesn't start. What's that have to do with a crash? The apparentl reason seems to be that that this file/var/lib/init.d/started/mythbackend is still there. I erase it and things run fine.
You presented all the evidence. dragonfly ~ # /etc/init.d/mythbackend stop * Stopping myth backend ... start-stop-daemon: warning: failed to kill 14101: No such process [ !! ] You attempted to stop it. It failed to kill the program because the program isn't running. Hense, it crashed.
From the link you provided.. " This inability to restart mythbackend is due to a really annoying behavior of the gentoo init.d scripts. This happens whenever any service dies without calling /etc/init.d/<service_name> stop. "
Prove to me it's still running... do a ps aux and provide it here... Then do a /etc/init.d/mythbackend stop and provide that full error msg.
Horsefeathers. Please read the bug report. Neither mythbackend or mysql had crashed. Both were still visible in a ps listing. I could run the mythfrontend and see video. It didn't crash. It was only when I try trying to debug why mythbackend wouldn't start correct on a cold boot that I ran across the stuff I ended up showing below. dragonfly ~ # /etc/init.d/mythbackend status * status: stopped dragonfly ~ # /etc/init.d/mythbackend start * Starting myth backend ... [ ok ] dragonfly ~ # /etc/init.d/mythbackend status * status: started dragonfly ~ # /etc/init.d/mythbackend stop * Stopping myth backend ... start-stop-daemon: warning: failed to kill 14503: No such process [ !! ] dragonfly ~ # /etc/init.d/mythbackend status * status: started dragonfly ~ # Cannot kill it but status is started and mythfrontend works. There's a problem here somewhere. I'm leaving the bug report as closed as I don't have time for such silliness.
How about this. None of us can reproduce this problem. If you find out what is causing this or figure out some way for us to reproduce, then you can reopen
iggy: I just like to get you CC on a ton of mail. I told you what info it's going to take to have me look into this. 1. Show me that you're using 0.18-r1. 0.18 was package.mask'd and known to be broken. 2. Provide me with "ps aux" showing me the pid numbers of Mythbackend. 3. provide me with the stop error so I can see the pid # it's trying to stop. Should take you a lot less time to do that then complaining about me closing the bug.
Here you go Doug. dragonfly etc # emerge -pv mythtv These are the packages that I would merge, in order: Calculating dependencies ...done! [ebuild R ] media-tv/mythtv-0.18-r2 +alsa (-altivec) -arts -debug -dvb -ieee1394 +jack -joystick -lcd +lirc +mmx -nvidia +oggvorbis +opengl +oss -unichrome +xv 0 kB Total size of downloads: 0 kB dragonfly etc # dragonfly etc # ps aux | grep myth root 22203 0.0 0.6 145272 3448 ? Ssl May11 2:37 /usr/ bin/mythbackend --daemon --pidfile /var/run/mythtv/mythbackend.pid --l ogfile /TVstorage/log/mythbackend.log --verbose quiet root 12897 0.0 0.1 1488 516 pts/2 S+ 04:18 0:00 grep myth dragonfly etc # /etc/init.d/mythbackend status * status: started dragonfly etc # /etc/init.d/mythbackend stop * Stopping myth backend ... start-stop-daemon: warning: failed to kill 12857: No such proc [ !! ] dragonfly etc # ps aux | grep myth root 22203 0.0 0.6 145272 3448 ? Ssl May11 2:37 /usr/ bin/mythbackend --daemon --pidfile /var/run/mythtv/mythbackend.pid --l ogfile /TVstorage/log/mythbackend.log --verbose quiet root 12966 0.0 0.0 1484 472 pts/2 R+ 04:19 0:00 grep myth dragonfly etc # /etc/init.d/mythbackend status * status: started dragonfly etc # /etc/init.d/mythbackend stop * Stopping myth backend ... start-stop-daemon: warning: failed to kill 12857: No such proc [ !! ] dragonfly etc # /etc/init.d/mythbackend zap * Manually resetting mythbackend to stopped state. dragonfly etc # /etc/init.d/mythbackend status * status: stopped dragonfly etc # ps aux | grep myth root 22203 0.0 0.6 145272 3448 ? Ssl May11 2:37 /usr/ bin/mythbackend --daemon --pidfile /var/run/mythtv/mythbackend.pid --l ogfile /TVstorage/log/mythbackend.log --verbose quiet root 13095 0.0 0.0 1484 472 pts/2 R+ 04:19 0:00 grep myth dragonfly etc # kill -9 22203 dragonfly etc # ps aux | grep myth root 13109 0.0 0.0 1484 472 pts/2 R+ 04:20 0:00 grep myth dragonfly etc # /etc/init.d/mythbackend status * status: stopped dragonfly etc # /etc/init.d/mythbackend start * Starting myth backend ... [ ok ] dragonfly etc # /etc/init.d/mythbackend status * status: started dragonfly etc # ps aux | grep myth root 13195 1.2 2.2 111780 11076 ? S<sl 04:20 0:00 /usr/ bin/mythbackend --daemon --pidfile /var/run/mythbackend.pid --logfile /var/log/mythtv/mythbackend.log --verbose quiet root 13241 0.0 0.0 1484 472 pts/2 R+ 04:20 0:00 grep myth dragonfly etc #
The pid file now lives in /var/run/mythbackend.pid Any references to the other pid file are from not using the latest version. Which was known to have an issue.
Doug - indeed comment #2 shows it was 0.18. Currently I'm at 0.18-r2. this appear better, at least as of 6:45 this evening. Thanks, Mark dragonfly ~ # emerge -pv mythtv These are the packages that I would merge, in order: Calculating dependencies ...done! [ebuild R ] media-tv/mythtv-0.18-r2 +alsa (-altivec) -arts -debug -dvb -ieee1394 +jack -joystick -lcd +lirc +mmx -nvidia +oggvorbis +opengl +oss -unichrome +xv 0 kB Total size of downloads: 0 kB dragonfly ~ # ls -al /var/run/mythbackend.pid -rw-r--r-- 1 root root 6 May 16 04:20 /var/run/mythbackend.pid dragonfly ~ # ps aux | grep myth root 13195 0.0 2.2 111780 11100 ? S<sl 04:20 0:02 /usr/bin/mythbackend --daemon --pidfile /var/run/mythbackend.pid --logfile /var/log/mythtv/mythbackend.log --verbose quiet root 16127 0.0 0.0 1484 472 pts/0 R+ 18:47 0:00 grep myth dragonfly ~ # dragonfly ~ # /etc/init.d/mythbackend stop * Stopping myth backend ... [ ok ]dragonfly ~ # /etc/init.d/mythbackend start * Starting myth backend ... [ ok ]dragonfly ~ # ps aux | grep myth root 16220 3.0 2.2 111776 11080 ? S<sl 18:48 0:00 /usr/bin/mythbackend --daemon --pidfile /var/run/mythbackend.pid --logfile /var/log/mythtv/mythbackend.log --verbose quiet root 16237 0.0 0.0 1424 240 pts/0 R+ 18:48 0:00 grep myth dragonfly ~ #
Good. Hope you have your gcc ready for ~x86. Cause mythtv-0.18.1 is going to hit tonight or the morning. Depending on how the Internet behaves at my parents house (which it hasn't been).
Fixed.