[mythtv-users] Mythbuntu's kill/restart irexec command kills but no longer restarts until pressed again

Ian Evans dheianevans at gmail.com
Mon Mar 18 00:02:38 UTC 2013


On Sun, Mar 17, 2013 at 2:28 PM, Alex Tomlins <alex at tomlins.org.uk> wrote:
> On 17/03/13 16:15, Ian Evans wrote:
>>
>> I think that's the first time my subject pretty much summed up my
>> whole issue. :-)
>>
>> Mythbuntu's kill/restart irexec command kills but no longer restarts
>> until pressed again.
>>
>> That is, the power/clear combo that kills mythfrontend and restarts
>> it, now just kills it. If I hit the combo again, it finally restarts.
>>
>> The command hasn't changed. Any idea why it would take two usages now
>> instead of one?
>>
>> Here's the command that's sent:
>>
>> (kill $(pgrep mythfrontend) || true) && mythfrontend --service &
>>
> It could well be a race condition...
>
> My guess is that on the first press, it sends the kill signal to
> mythfrontend, but then when it tries to start it again, the old instance
> hasn't finished exiting causing the new instance to fail to start (ports
> already in use etc...).  On the second call, it will start successfully
> because by then the old instance has exited.
>
> You could test this by adding a sleep in between the 2 commands.

I added a 'sleep 4' into the command and that did not do the trick.

Looking at the mythfrontend.log I see:

Mar 17 19:57:42 buster mythlogserver: mythfrontend[17296]: I
CoreContext bonjourregister.cpp:26 (~BonjourRegister) Bonjour:
De-registering service '_mythfrontend._tcp.' on 'Mythfrontend on
buster'
Mar 17 19:57:42 buster mythlogserver: mythfrontend[17296]: I
CoreContext AirPlay/mythraopdevice.cpp:68 (Cleanup) RAOP Device:
Cleaning up.
Mar 17 19:57:42 buster mythlogserver: mythfrontend[17296]: I
CoreContext AirPlay/mythairplayserver.cpp:346 (Cleanup) AirPlay:
Cleaning up.
Mar 17 19:57:42 buster mythlogserver: mythfrontend[17296]: I
CoreContext bonjourregister.cpp:26 (~BonjourRegister) Bonjour:
De-registering service '_airplay._tcp.' on 'MythTV on buster'
Mar 17 19:57:42 buster mythlogserver: mythfrontend[17296]: I
CoreContext main.cpp:251 (cleanup) Deleting UPnP client...
Mar 17 19:57:43 buster mythlogserver: mythfrontend[17296]: I
CoreContext mythrender_opengl1.cpp:280 (DeleteOpenGLResources)
OpenGL1: Deleting OpenGL Resources
Mar 17 19:57:43 buster mythlogserver: mythfrontend[17296]: I
CoreContext mythrender_opengl.cpp:1042 (DeleteOpenGLResources) OpenGL:
Deleting OpenGL Resources
Mar 17 19:57:43 buster mythlogserver: mythfrontend[17296]: E
CoreContext referencecounter.cpp:94 (~ReferenceCounter) Object deleted
with non-zero reference count!
Mar 17 19:57:43 buster mythlogserver: mythfrontend[17296]: I
CoreContext mythcontext.cpp:1169 (~MythContext) Waiting for threads to
exit.

Nothing about the attempt to restart...is there another myth/system
log I can check to see if it's somehow freaking out on the
mythfrontend --service command?


More information about the mythtv-users mailing list