Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#1929 closed defect (worksforme)

Mythshutdown shuts down system even though Mythcommflag is still running

Reported by: kmp589@… Owned by: Isaac Richards
Priority: minor Milestone: unknown
Component: mythtv Version: 0.19
Severity: medium Keywords:
Cc: Ticket locked: no

Description

When a recording finishes, the system automatically starts commercial flagging. I have my machine set to shut down the system when it's done recording to conserve power. Theoretically, the system should not shut down when Mythcommflag is running (the backend should send a checksum of 2 back to mythshutdown), however, my system shuts down during Mythcommflag. I do have the shutdown command set as "mythshutdown -c". Mythwelcome displays "Mythtv is busy flagging commercials" when it shuts down (it doesn't even say "Mythtv is idle and will shut down in xx seconds).

Any ideas?

Change History (7)

comment:1 Changed 18 years ago by anonymous

This is normal - to get the behaviour you want you will need to change from using "mythshutdown -c" to "mythshutdown -s", though you will have to add an additional test so that it returns 0 or 1. I.e. something like "[ mythshutdown -s -eq 0 ]; then 0; else 1;", though this is untested so please check before you change your settings.

comment:2 Changed 18 years ago by kmp589@…

Would I add "[ mythshutdown -s -eq 0 ]; then 0; else 1;" as the shutdown command (instead of "mythshutdown -c")?

comment:3 Changed 18 years ago by paulh

Ignore the reply by anonymous it simply isn't right. Internally mythshutdown -c uses mythshutdown -s to check whether it is safe to shutdown or not anyway. So the Pre shutdown check command should be 'mythshutdown -c' as its says in the readme. If it isn't working that way for you that way then there is something wrong.

If you add '-v important' to the mythshutdown -c command in the backend settings it should add some debugging to the backend log which may help you to see the order of things and where its going wrong. restart the backend with something line 'mythbackend -v important,commflag,record,jobqueue'.

comment:4 Changed 18 years ago by kmp589@…

I have set the preshutdown check command to "mythshutdown --check", but the system continues to shut down during commercial flagging. When I run "mythshutdown --check --verbose" manually, it gives me an output of 2 when mythcommflag is running, so it's working. I think it has something to do with the backend ignoring the output and shutting down anyway.

What should my settings be, and is there a bugfix comming up soon?

comment:5 Changed 18 years ago by paulh

Resolution: worksforme
Status: newclosed

Is this still happening with current SVN?

comment:6 Changed 18 years ago by kmp589@…

I'm running whatever SVN version that was available in late June (off the top of my head, I don't know and I'm currently out of town). Unless a new SVN is available, I'm running the current version.

Just for some more notes, it looks like Mythwelcome is recognizing the status spit out by Mythshutdown, but Mythbackend is either not getting the status or is simply ignoring it. Is there any way I can do some debugging to find out?

comment:7 Changed 18 years ago by paulh

If you are using SVN you really should be watching the commits list. There are updates to SVN every day. I did a commit in [10652] which may inadvertently fix this. I'm not sure because I haven't been able to reproduce it here.

You should update to the latest SVN and see if you can still reproduce the problem.

If the problem still occurs I'd need a mythbackend log showing the order of what happens after a recording finishes upto when the backend is shut down. Could you change the 'Pre Shutdown check-command' to

mythshutdown -v general,important --check

and run mythbackend like this

mythbackend -v general,important,commflag,jobqueue > ~/mythbackend.log

I'd need the last part of the log from when the recording finishes onwards.

Note: See TracTickets for help on using tickets.