Bug #1059
tvheadend unusable - crashes always upon streaming
| Status: | Fixed | Start date: | 07/23/2012 | |
|---|---|---|---|---|
| Priority: | High | Due date: | ||
| Assignee: | % Done: | 0% | ||
| Category: | Streaming | |||
| Target version: | - | |||
| Found in version: | 2.99-44-g4ef72fb | Affected Versions: |
Description
If a client conntects to tvheadend it crashes always.
E.g. http://192.168.0.13:9981/stream/channelid//1
I'm using tvheadend git as of today on an ARM machine.
Here the gdb back trace:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb3354430 (LWP 1046)]
service_find (ch=<value optimized out>, weight=<value optimized out>, loginfo=0xb335318c "Subscription \"HTTP\"",
errorp=<value optimized out>, skip=0x0) at /root/tvheadend/src/service.c:347
347 tvhlog(LOG_DEBUG, "Service",
(gdb) bt
#0 service_find (ch=<value optimized out>, weight=<value optimized out>, loginfo=0xb335318c "Subscription \"HTTP\"",
errorp=<value optimized out>, skip=0x0) at /root/tvheadend/src/service.c:347
#1 0x00018748 in subscription_reschedule () at /root/tvheadend/src/subscriptions.c:173
#2 0x000188e8 in subscription_create_from_channel (ch=0xf15a8, weight=100, name=<value optimized out>, st=<value optimized out>,
flags=0) at /root/tvheadend/src/subscriptions.c:326
#3 0x00038030 in http_stream_channel (hc=0xb3353cec, remain=<value optimized out>, opaque=<value optimized out>)
at /root/tvheadend/src/webui/webui.c:411
#4 http_stream (hc=0xb3353cec, remain=<value optimized out>, opaque=<value optimized out>
at /root/tvheadend/src/webui/webui.c:470
#5 0x0000f2ac in http_exec (hc=0xb3353cec, hp=0xcab78, remain=0xb33538c0 "channelid") at /root/tvheadend/src/http.c:344
#6 0x0000f310 in http_cmd_get (hc=0xb3353cec) at /root/tvheadend/src/http.c:375
#7 0x0000f468 in http_process_request (hc=0xb3353cec, spill=0xb3353d50) at /root/tvheadend/src/http.c:455
#8 process_request (hc=0xb3353cec, spill=0xb3353d50) at /root/tvheadend/src/http.c:521
#9 0x0000f800 in http_serve_requests (hc=0xb3353cec, spill=0xb3353d50) at /root/tvheadend/src/http.c:749
#10 0x0000f8c0 in http_serve (fd=20, opaque=<value optimized out>, peer=0xc56e4, self=0xc56f4) at /root/tvheadend/src/http.c:792
#11 0x0000de0c in tcp_server_start (aux=0xc56d8) at /root/tvheadend/src/tcp.c:397
#12 0xb6df5910 in start_thread () from /lib/libpthread.so.0
#13 0xb6cca3ec in clone () from /lib/libc.so.6
#14 0xb6cca3ec in clone () from /lib/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) print loginfo
$1 = 0xb335318c "Subscription \"HTTP\""
(gdb) print t
$2 = (service_t *) 0x8cd50
(gdb) print t->s_dvb_mux_instance
$3 = (struct th_dvb_mux_instance *) 0x0
t->s_dvb_mux_instance seems to be NULL for whatever reason...
History
#1
Updated by Adam Sutton 10 months ago
Discussing this with Richard I think I might have tracked this down to a couple of issues:
1. Configuration is wrong and not what he's expecting (still looking into this).
2. If the channel source is not DVB (the debug statement attempts to use mux instance ptr without validation, which will fail).
I'll look at providing a fix for 2 and continue to discuss 1 with him.
Adam
#2
Updated by Adam Sutton 10 months ago
OK, looks like 1 has been solved (mapping just hadn't been made) and Richard removed IPTV service and things are now working.
What I don't understand, reading the code, is how on earth IPTV/V4L can work at all. From what I can see they should ALWAYS bomb out due to to DEBUG lines in service_find().
#3
Updated by Adam Sutton 10 months ago
This has now been resolved. Andreas merged PR-102 which already dealt with the specific issue (s_dvb_mux_instance=NULL for non DVB services) and has now been applied.
#4
Updated by John Törnblom 10 months ago
- Status changed from New to Resolved
#5
Updated by Adam Sutton 10 months ago
- Status changed from Resolved to Fixed
Code is now in master.