Maybe the 'live' plugin makes copies of the timers, which VDR doesn't know of.
At any rate, the culprit is apparently 'live'.
Maybe the 'live' plugin makes copies of the timers, which VDR doesn't know of.
At any rate, the culprit is apparently 'live'.
Thank you for this hint and sorry for the noise. I will now contact the live maintainer to fix that.
Ups, I am one of them ...
short interim report:
kls assumption was correct, Live does copies of timer objects to make his own sorted timer list. Not a very good idee ...
I have to rewrite the timer handling code without timer object copies and use instead the vdr class cSortedTimers.
First try was succesful, I can now clre all events. But I have still some invalid lock sequence reports to fix.
I have never worked with locks and I need some support: What is wrong with this lock sequence ? There are only timer read locks. Are nested read locks not allowed ?
Aug 6 10:15:15 VDR-2004-Dev vdr: [283179] --- begin invalid lock sequence report
Aug 6 10:15:15 VDR-2004-Dev vdr: [283179] 283179 - R - - - - - - - - L
Aug 6 10:15:15 VDR-2004-Dev vdr: [283179] 283179 - U - - - - - - - - U
Aug 6 10:15:15 VDR-2004-Dev vdr: [283179] 283179 R - - - - - - - - - L
Aug 6 10:15:15 VDR-2004-Dev vdr: [283179] 283179 * R - - - - - - - - L
Aug 6 10:15:15 VDR-2004-Dev vdr: [283179] 283179 * U - - - - - - - - U
Aug 6 10:15:15 VDR-2004-Dev vdr: [283179] 283179 U - - - - - - - - - U
Aug 6 10:15:15 VDR-2004-Dev vdr: [283179] 283179 - R - - - - - - - - L
Aug 6 10:15:15 VDR-2004-Dev vdr: [283179] 283179 - U - - - - - - - - U
Aug 6 10:15:15 VDR-2004-Dev vdr: [283179] 283179 R - - - - - - - - - L
Aug 6 10:15:15 VDR-2004-Dev vdr: [283179] 283179 * R - - - - - - - - L
Aug 6 10:15:15 VDR-2004-Dev vdr: [283179] 283179 * U - - - - - - - - U
Aug 6 10:15:15 VDR-2004-Dev vdr: [283179] 283179 U - - - - - - - - - U
Aug 6 10:15:15 VDR-2004-Dev vdr: [283179] 283179 - R - - - - - - - - L
Aug 6 10:15:15 VDR-2004-Dev vdr: [283179] 283179 - U - - - - - - - - U
Aug 6 10:15:15 VDR-2004-Dev vdr: [283179] 283179 R - - - - - - - - - L
Aug 6 10:15:15 VDR-2004-Dev vdr: [283179] 283179 * R - - - - - - - - L
Aug 6 10:15:15 VDR-2004-Dev vdr: [283179] 283179 * U - - - - - - - - U
Aug 6 10:15:15 VDR-2004-Dev vdr: [283179] 283179 U - - - - - - - - - U
Aug 6 10:15:15 VDR-2004-Dev vdr: [283179] 283179 - R - - - - - - - - L
Aug 6 10:15:15 VDR-2004-Dev vdr: [283179] 283179 R * - - - - - - - - L
Aug 6 10:15:15 VDR-2004-Dev vdr: [283179] 283179 invalid lock sequence: 1 Timers
Aug 6 10:15:15 VDR-2004-Dev vdr: [283179] full backtrace:
Aug 6 10:15:17 VDR-2004-Dev vdr: [283154] loading /var/cache/vdr/cam.data
Aug 6 10:15:21 VDR-2004-Dev vdr: [283179] vdr cStateLock::Lock(cStateKey&, bool, int)
Aug 6 10:15:21 VDR-2004-Dev vdr: [283179] vdr cTimers::GetTimersRead(cStateKey&, int)
Aug 6 10:15:21 VDR-2004-Dev vdr: [283179] /usr/lib/vdr/plugins/libvdr-live.so.2.4.7 vdrlive::TimerManager::GetTimer(unsigned int, tChannelID) at timers.cpp:594
Aug 6 10:15:21 VDR-2004-Dev vdr: [283179] /usr/lib/vdr/plugins/libvdr-live.so.2.4.7 at pageelems.ecpp:174 (discriminator 1)
Aug 6 10:15:21 VDR-2004-Dev vdr: [283179] /usr/lib/vdr/plugins/libvdr-live.so.2.4.7 at basic_string.h:222 at std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_dispose() at basic_string.h:231 at std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string() at basic_string.h:658 at tnt::Subcompident::~Subcompident() at ecpp.h:50 at operator() at searchresults.ecpp:107
Aug 6 10:15:21 VDR-2004-Dev vdr: [283179] /lib/libtntnet.so.12 tnt::Worker::dispatch(tnt::HttpRequest&, tnt::HttpReply&) at ??:?
Aug 6 10:15:21 VDR-2004-Dev vdr: [283179] /lib/libtntnet.so.12 tnt::Worker::processRequest(tnt::HttpRequest&, std::iostream&, unsigned int) at ??:?
Aug 6 10:15:21 VDR-2004-Dev vdr: [283179] /lib/libtntnet.so.12 tnt::Worker::run() at ??:?
Aug 6 10:15:21 VDR-2004-Dev vdr: [283179] /lib/libtntnet.so.12 cxxtools::DetachedThread::exec() at ??:?
Aug 6 10:15:21 VDR-2004-Dev vdr: [283179] /lib/libcxxtools.so.9 at ??:?
Aug 6 10:15:21 VDR-2004-Dev vdr: [283179] /lib/x86_64-linux-gnu/libpthread.so.0 at pthread_create.c:478 (discriminator 6)
Aug 6 10:15:21 VDR-2004-Dev vdr: [283179] /lib/x86_64-linux-gnu/libc.so.6 clone at ??:?
Aug 6 10:15:21 VDR-2004-Dev vdr: [283179] --- end invalid lock sequence report
Aug 6 10:15:21 VDR-2004-Dev vdr: [283179] --- THERE WILL BE NO FURTHER REPORTS UNTIL VDR IS RESTARTED!
Display More
Aug 6 10:15:15 VDR-2004-Dev vdr: [283179] 283179 - R - - - - - - - - L
Aug 6 10:15:15 VDR-2004-Dev vdr: [283179] 283179 R * - - - - - - - - L
You are trying to lock the timers while holding a lock on the channels.
To implicitly avoid deadlocks when locking more than one of the global lists of VDR at the same time, make sure you always lock Timers, Channels, Recordings and Schedules in this sequence. So you need to give up the lock on the channels, then lock the timers, and, if necessary, lock the channels again.
kls Thx, this helped me to find the invalid lock sequence.
Now we can start with the tests from here.
I had to change many critical lines of code. So we need intensitiv testing before merge into master. Please also take a look in your syslog, if there are any invalid lock sequence reports. Run vdr with -l3.
So things to try with live plugin are timers in general (set new timer, delete etc.). CLRE command per channel and whole EPG.
I think, this are the importent things. But because of the deep changes, watch also normal use of your VDR for lock sequence reports in syslog.
These messages are probably normal?
Aug 6 16:03:32 telkka vdr: message repeated 86 times: [ [44749] live: timers.cpp TimerManager::GetTimer() LOCK_TIMERS_READ]
Aug 6 16:03:33 telkka vdr: [44643] live: timers.cpp TimerManager::GetTimer() LOCK_TIMERS_READ
Aug 6 16:03:33 telkka vdr: message repeated 86 times: [ [44643] live: timers.cpp TimerManager::GetTimer() LOCK_TIMERS_READ]
Aug 6 16:03:33 telkka vdr: [44859] live: timers.cpp TimerManager::GetTimer() LOCK_TIMERS_READ
Aug 6 16:03:33 telkka vdr: message repeated 86 times: [ [44859] live: timers.cpp TimerManager::GetTimer() LOCK_TIMERS_READ]
Aug 6 16:03:34 telkka vdr: [44640] live: timers.cpp TimerManager::GetTimer() LOCK_TIMERS_READ
Aug 6 16:03:34 telkka vdr: message repeated 86 times: [ [44640] live: timers.cpp TimerManager::GetTimer() LOCK_TIMERS_READ]
Aug 6 16:03:35 telkka vdr: [44641] live: timers.cpp TimerManager::GetTimer() LOCK_TIMERS_READ
Aug 6 16:03:35 telkka vdr: message repeated 86 times: [ [44641] live: timers.cpp TimerManager::GetTimer() LOCK_TIMERS_READ]
Aug 6 16:03:36 telkka vdr: [44749] live: timers.cpp TimerManager::GetTimer() LOCK_TIMERS_READ
Aug 6 16:03:36 telkka vdr: message repeated 86 times: [ [44749] live: timers.cpp TimerManager::GetTimer() LOCK_TIMERS_READ]
Aug 6 16:03:36 telkka vdr: [44643] live: timers.cpp TimerManager::GetTimer() LOCK_TIMERS_READ
Aug 6 16:03:36 telkka vdr: message repeated 86 times: [ [44643] live: timers.cpp TimerManager::GetTimer() LOCK_TIMERS_READ]
Aug 6 16:03:37 telkka vdr: [44657] VNSI: Requesting clients to reload channel list
Aug 6 16:03:37 telkka vdr: [44859] live: timers.cpp TimerManager::GetTimer() LOCK_TIMERS_READ
Aug 6 16:03:37 telkka vdr: message repeated 86 times: [ [44859] live: timers.cpp TimerManager::GetTimer() LOCK_TIMERS_READ]
Aug 6 16:03:58 telkka vdr: [44610] timer 9 (10 1758-1902 'Top Gear Best Of') set to event Pe 06.08.2021 18:00-19:00 'Top Gear Best Of'
Aug 6 16:03:58 telkka vdr: [44657] VNSI: Requesting clients to reload timers
Aug 6 16:04:16 telkka vdr: [44859] live: timers.cpp TimerManager::GetTimer() LOCK_TIMERS_READ
Aug 6 16:04:16 telkka vdr: message repeated 168 times: [ [44859] live: timers.cpp TimerManager::GetTimer() LOCK_TIMERS_READ]
Aug 6 16:04:17 telkka vdr: [44641] live: timers.cpp TimerManager::GetTimer() LOCK_TIMERS_READ
Aug 6 16:04:17 telkka vdr: message repeated 168 times: [ [44641] live: timers.cpp TimerManager::GetTimer() LOCK_TIMERS_READ]
Display More
Run vdr with -l3.
Where I put this? I'm using yavdr 0.7
Yes, these are debug messages which should help me to find lock sequence errors.
They will be removed in the final version.
I use it now on my productive VDR, it feels there is an improved performance too.
Where I put this?
/etc/vdr/conf.d/00-vdr.conf
But from your log I see it is already set.
I use it now on my productive VDR, it feels there is an improved performance too.
Do believe that this comes mainly from eliminating the for-iterators?
Or is it rather from using SortedTimers instead of copying?
Thanks for the nice work, btw!
Do believe that this comes mainly from eliminating the for-iterators?
The statement scared me at first but I checked it: No less for loops, only others.
Or is it rather from using SortedTimers instead of copying?
Copy a object takes CPU and memory, it is always better to avoid this. Especially if it brokes VDR functions.
Don’t have an account yet? Register yourself now and be a part of our community!