Most of the time when VDR shuts the box down using vdrshutdown script there is a line in the log runvdr: VDR exited with status 134, attempting restart
I've got fedora with runvdr from fedora vdr package and it tries to restart VDR if exit code is something else than 0, 2 or 137. Sometimes the exit code is 137 but most of the time it is 134. This causes VDR to restart (or runvdr makes VDR to restart) and dvb drivers to reload.
What does exit code 134 mean? Why is exit code sometimes 137 and most of the times 134? What should exit code be when VDR is shutting down either because the user pushed power button or because there has been no user activity?
I've replaced fedoras VDR with my own vdr-1.4.6 compilation (due to some plugins not in fedora packaging).
\Kartsa
On Sunday 10 June 2007, Kartsa wrote:
I've got fedora with runvdr from fedora vdr package and it tries to restart VDR if exit code is something else than 0, 2 or 137. Sometimes the exit code is 137 but most of the time it is 134. This causes VDR to restart (or runvdr makes VDR to restart) and dvb drivers to reload.
What does exit code 134 mean?
From "man bash": The return value of a simple command is its exit status, or 128+n if the command is terminated by signal n.
So 134 - 128 = 6, SIGABRT ("kill -l 6"). "info SIGABRT" says: This signal indicates an error detected by the program itself and reported by calling `abort'.
Why is exit code sometimes 137 and most of the times 134?
It's 137 when killproc (see /etc/init.d/functions) invoked from /etc/init.d/vdr gets tired of waiting for "kill -TERM" to result in vdr to shut down and issues a "kill -KILL" to really get rid of it. It's 134 when you got a "crash" caused by SIGABRT.
If you wish to debug it further, uncomment DAEMON_COREFILE_LIMIT=unlimited at end of /etc/sysconfig/vdr and watch if core dumps start to appear in /tmp.
What should exit code be when VDR is shutting down either because the user pushed power button or because there has been no user activity?
0 if all went well (and if I remember correctly).
I've replaced fedoras VDR with my own vdr-1.4.6 compilation (due to some plugins not in fedora packaging).
In my experience, crashes at vdr shutdown are almost always caused by plugin bugs. I'm not aware of any such in the Fedora plugin packages at the moment.
By the way, which packaged plugins are you missing/adding? The last crash-at-shutdown bug I saw was in ttxtsubs; in case you're using it, my patch for the crash is included in Rofa's "kermanekka" edition (http://www.saunalahti.fi/~rahrenbe/vdr/patches/, Fedora 7 packages at http://cachalot.mine.nu/ and possibly sometime soonish in Fedora proper).
Also, just in case you weren't aware of it, if your additional plugins don't require patching vdr itself (patches for subtitles and ttxtsubs plugins are already included), you can use Fedora's vdr and vdr-devel packages and build additional plugins for it instead of building a whole vdr of your own, see /usr/share/doc/vdr-*/README.package
Ville Skyttä kirjoitti:
On Sunday 10 June 2007, Kartsa wrote:
I've got fedora with runvdr from fedora vdr package and it tries to restart VDR if exit code is something else than 0, 2 or 137. Sometimes the exit code is 137 but most of the time it is 134. This causes VDR to restart (or runvdr makes VDR to restart) and dvb drivers to reload.
What does exit code 134 mean?
From "man bash":
The return value of a simple command is its exit status, or 128+n if the command is terminated by signal n.
So 134 - 128 = 6, SIGABRT ("kill -l 6"). "info SIGABRT" says: This signal indicates an error detected by the program itself and reported by calling `abort'.
Ah, did not think of that. Thanks.
Why is exit code sometimes 137 and most of the times 134?
It's 137 when killproc (see /etc/init.d/functions) invoked from /etc/init.d/vdr gets tired of waiting for "kill -TERM" to result in vdr to shut down and issues a "kill -KILL" to really get rid of it. It's 134 when you got a "crash" caused by SIGABRT.
If you wish to debug it further, uncomment DAEMON_COREFILE_LIMIT=unlimited at end of /etc/sysconfig/vdr and watch if core dumps start to appear in /tmp.
I'll give it a try. Would -t switch be helpfull with shutdown?
What should exit code be when VDR is shutting down either because the user pushed power button or because there has been no user activity?
0 if all went well (and if I remember correctly).
Seems that it never is 0. At least in my case. Maybe I'll try VDR with no plugins.
I've replaced fedoras VDR with my own vdr-1.4.6 compilation (due to some plugins not in fedora packaging).
In my experience, crashes at vdr shutdown are almost always caused by plugin bugs. I'm not aware of any such in the Fedora plugin packages at the moment.
By the way, which packaged plugins are you missing/adding? The last crash-at-shutdown bug I saw was in ttxtsubs; in case you're using it, my patch for the crash is included in Rofa's "kermanekka" edition (http://www.saunalahti.fi/~rahrenbe/vdr/patches/, Fedora 7 packages at http://cachalot.mine.nu/ and possibly sometime soonish in Fedora proper).
I am using ttxtsubs. I do not actually need it more than occasionally because I have no channels witch uses this subtitling system. Maybe I could try without it.
Also, just in case you weren't aware of it, if your additional plugins don't require patching vdr itself (patches for subtitles and ttxtsubs plugins are already included), you can use Fedora's vdr and vdr-devel packages and build additional plugins for it instead of building a whole vdr of your own, see /usr/share/doc/vdr-*/README.package
I am compiling vdr my self mostly because I like Soppalusikka :) I think there was some other reason(s) as well but I can not recall what :) I had newer actually read the README.package and it was wery illuminating. Maybe I'll have to start using readymade packages and give up using Soppalusikka :(
\Kartsa
On Monday 11 June 2007, Kartsa wrote:
Ville Skyttä kirjoitti:
If you wish to debug it further, uncomment DAEMON_COREFILE_LIMIT=unlimited at end of /etc/sysconfig/vdr and watch if core dumps start to appear in /tmp.
I'll give it a try. Would -t switch be helpfull with shutdown?
No idea, I've never used that switch myself.
One possibly way to find out if the abort is because of some plugin is to watch /var/log/messages when shutting down vdr and to see what the last output before "runvdr: VDR exited with status ..." is. If it's not "vdr: [...] exiting" but rather "vdr: [...] stopping plugin: foo" or "vdr: [...] deleting plugin: foo", it's pretty likely that the foo plugin is somehow involved.
I am compiling vdr my self mostly because I like Soppalusikka :) I think there was some other reason(s) as well but I can not recall what :) I had newer actually read the README.package and it was wery illuminating. Maybe I'll have to start using readymade packages and give up using Soppalusikka :(
I don't think soppalusikka (in case you're referring to the skin) requires any patches to vdr, so it should be usable and buildable with the packaged version too. Some dirs are obviously a bit different than in the install instructions, but README.package and "rpm -ql vdr" should help with those.