Actions
Bug #3678
closed[epggrab] unix domain socket is not closed
Start date:
2016-03-31
Due date:
% Done:
0%
Estimated time:
Found in version:
4.1
Affected Versions:
Description
Hi,
The accepted unix domain socket used for epggrab module is not closed after grabbing.
How to reproduce:
1. initially, there is only one listening socket
$ lsof -p $TVH_PID | grep xmltv.sock tvheadend 17734 hts 20u unix 0xffff88070f4a34c0 0t0 1488041359 /home/hts/.hts/tvheadend/epggrab/xmltv.sock
2. send epg to xmltv.sock 5 times
$ cat xmltv.xml | socat - UNIX-CONNECT:/home/hts/.hts/tvheadend/epggrab/xmltv.sock $ cat xmltv.xml | socat - UNIX-CONNECT:/home/hts/.hts/tvheadend/epggrab/xmltv.sock $ cat xmltv.xml | socat - UNIX-CONNECT:/home/hts/.hts/tvheadend/epggrab/xmltv.sock $ cat xmltv.xml | socat - UNIX-CONNECT:/home/hts/.hts/tvheadend/epggrab/xmltv.sock $ cat xmltv.xml | socat - UNIX-CONNECT:/home/hts/.hts/tvheadend/epggrab/xmltv.sock
3. now there's 6 sockets. 5 of them should have been closed
$ lsof -p $TVH_PID | grep xmltv.sock tvheadend 17734 hts 20u unix 0xffff88070f4a34c0 0t0 1488041359 /home/hts/.hts/tvheadend/epggrab/xmltv.sock tvheadend 17734 hts 24u unix 0xffff8804df7bd880 0t0 1488041362 /home/hts/.hts/tvheadend/epggrab/xmltv.sock tvheadend 17734 hts 25u unix 0xffff88021d2db0c0 0t0 1488075867 /home/hts/.hts/tvheadend/epggrab/xmltv.sock tvheadend 17734 hts 26u unix 0xffff8806d77c3840 0t0 1488076686 /home/hts/.hts/tvheadend/epggrab/xmltv.sock tvheadend 17734 hts 30u unix 0xffff8804ac153400 0t0 1488077181 /home/hts/.hts/tvheadend/epggrab/xmltv.sock tvheadend 17734 hts 31u unix 0xffff88044324e100 0t0 1488086366 /home/hts/.hts/tvheadend/epggrab/xmltv.sock
I have created simple patch to this bug. Please take a look.
https://github.com/axfree/tvheadend/commit/5fabbf8638cbb92a1ca323b7387bef719814c7c1
Actions