[mythtv-users] /find_orphans.py crashes mythbackend

Jonatan Lindblad mythtv at comhem.se
Sun Sep 11 09:35:41 UTC 2016


Den 2016-09-11 kl. 08:23, skrev Udo van den Heuvel:
> On 04-09-16 14:43, Stuart Auchterlonie wrote:
>>> Does find_orphans manage the amount of files sent to the backend to be
>>> deleted?
>>> Does the backend manage the amount of files sent to mysql to be deleted?
>>> Assuming one can delete all files sent to 'it; in one go at any time is
>>> a weird assumption.
>>
>> So we probably don't use a queue and try to delete all the recordings at
>> once. /me shrugs
>
> So we need a queue or similar.
> I cannot reproduce the issue anymore without deleting my recordings.
> Maybe we can have a simple SQL query to inject some fake recordings?
> (i.e. e.g. duplicate the available recordings with a changed year)
> That would mean that anyone can reproduce the issue without harming
> their recordings.
>
>> never been tested and therefore never been hit before.
>
> It has not been well thought about before.
>
>> The *reason* for asking for a backtrace is so the relevant code can
>> be identified, and potentially fixed.
>
> That is good news.
> Please help me reproduce the issue.

I took a look at the code and it seems like each request to delete a recording is handled in a new thread if there is none available in the pool.  That is probably desired when triggered by auto expiration but not in this case.

https://github.com/MythTV/mythtv/blob/master/mythtv/programs/mythbackend/mainserver.cpp#L3014
https://github.com/MythTV/mythtv/blob/master/mythtv/programs/mythbackend/mainserver.h#L81
https://github.com/MythTV/mythtv/blob/master/mythtv/libs/libmythbase/mthreadpool.cpp#L429

Jonatan


More information about the mythtv-users mailing list