Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] [watchdog-crash] SVDRP should not block



Hi list.

I've successfully tracked down a bug that caused several VDR restarts on my machine lately. The problem is caused by vdradmin's SVDRP connection and VDR dying of watchdog expire. I've logged such an incident with tcpdump to see what happens, and the expire happened because vdradmin requested epg data and then blocked the TCP/IP connection for 2min45s without accepting any data.

At the time of the crash, two recordings were running and two instances of noad were scanning, so there was noticeable load on the machine. vdradmin was idle for 2 hours, thats probably the cause for the long delay in processing. (after the 2m45s, vdradmin processed all remaining buffered data normally, and even tried to request timers before the connection terminated.)

VDR should not block when sending SVDRP data, or at least should timeout soon. In any case, the SVDRP connection should be terminated before the watchdog timer expires. Keeping recordings running is more important than answering epg requests.

(I know there is a vdradmin version that directly reads epg.data, but that doesnt solve the underlying problem.)

I've attached a testcase perl script that blocks VDR via SVDRP and forces a watchdog expire. Obviously, these things can happen in reality, and not responding to the remote is not the worst possible problem.

Cheers,

Udo

#!/usr/bin/perl
use Socket;

socket(SOCK, PF_INET, SOCK_STREAM, getprotobyname('tcp')) or die "socket";
connect(SOCK, sockaddr_in(2001, inet_aton("localhost"))) or die "connect";
select(SOCK); $| = 1;
print SOCK "LSTE\r\n";
sleep(240);
close(SOCK) or die "close";

Home | Main Index | Thread Index