Project

General

Profile

Bug #1289

Crash: assert "t->s_status != SERVICE_RUNNING " failed (service.c, line 199) - Raspberry Pi

Added by Guillaume B about 12 years ago. Updated about 12 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
DVB
Target version:
-
Start date:
2012-10-02
Due date:
% Done:

100%

Estimated time:
Found in version:
be6c00788508172d0cd18d4e95efffeb06f0b1f7
Affected Versions:

Description

This crash happened while I was trying to record a program on a channel with low signal.

Traces:

oct. 01 21:23:19 [NOTICE]:Service: Subscription "DVR: Castle": Skipping "Realtek DVB-T RTL2832/F: 602,000 kHz/France 2 HD" -- Quality below 10%
oct. 01 21:23:33 [NOTICE]:Service: Subscription "DVR: Castle": Skipping "Realtek DVB-T RTL2832/F: 602,000 kHz/France 2 HD" -- Quality below 10%
oct. 01 21:23:47 [NOTICE]:Service: Subscription "DVR: Castle": Skipping "Realtek DVB-T RTL2832/F: 602,000 kHz/France 2 HD" -- Quality below 10%
oct. 01 21:24:01 [NOTICE]:Service: Subscription "DVR: Castle": Skipping "Realtek DVB-T RTL2832/F: 602,000 kHz/France 2 HD" -- Quality below 10%
oct. 01 21:24:15 [NOTICE]:Service: Subscription "DVR: Castle": Skipping "Realtek DVB-T RTL2832/F: 602,000 kHz/France 2 HD" -- Quality below 10%
oct. 01 21:24:29 [NOTICE]:Service: Subscription "DVR: Castle": Skipping "Realtek DVB-T RTL2832/F: 602,000 kHz/France 2 HD" -- Quality below 10%
oct. 01 21:24:31 [INFO]:dvr: "Castle" on "France 2 HD" recorder starting
oct. 01 21:24:31 [NOTICE]:Service: Subscription "DVR: Castle": Skipping "Realtek DVB-T RTL2832/F: 602,000 kHz/France 2 HD" -- Quality below 10%
tvheadend: /home/pi/dev/tvheadend/src/service.c :199 : service_start:  L'assertion « t->s_status != SERVICE_RUNNING » a échoué.
Abandon (core dumped)

This was on my Raspi, and I enabled the core dumps to see what was going on.

Backtrace of all threads:

Thread 8 (Thread 0x45a68430 (LWP 3011)):
#0  0x400e9494 in pthread_cond_wait@@GLIBC_2.4 () from /lib/arm-linux-gnueabihf/libpthread.so.0
#1  0x00039e9c in dvr_thread (aux=0x159dd40) at /home/pi/dev/tvheadend/src/dvr/dvr_rec.c:431
#2  0x400e4bfc in start_thread () from /lib/arm-linux-gnueabihf/libpthread.so.0
#3  0x403b5e98 in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
#4  0x403b5e98 in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 7 (Thread 0x41e53430 (LWP 2695)):
#0  0x400ec258 in __lll_lock_wait () from /lib/arm-linux-gnueabihf/libpthread.so.0
#1  0x400e6cac in pthread_mutex_lock () from /lib/arm-linux-gnueabihf/libpthread.so.0
#2  0x00046d54 in dvb_table_input (aux=0x108b4f0) at /home/pi/dev/tvheadend/src/dvb/dvb_tables.c:210
#3  0x400e4bfc in start_thread () from /lib/arm-linux-gnueabihf/libpthread.so.0
#4  0x403b5e98 in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
#5  0x403b5e98 in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 6 (Thread 0x46361430 (LWP 2972)):
#0  0x400ec7d0 in read () from /lib/arm-linux-gnueabihf/libpthread.so.0
#1  0x400ec044 in __pthread_enable_asynccancel () from /lib/arm-linux-gnueabihf/libpthread.so.0
#2  0x0000defc in tcp_fill_htsbuf_from_fd (hq=0x46360d60, fd=-1) at /home/pi/dev/tvheadend/src/tcp.c:229
#3  tcp_read_line (fd=-1, buf=0x463604cc "POST", bufsize=1024, spill=0x46360d60) at /home/pi/dev/tvheadend/src/tcp.c:255
#4  0x0000f274 in http_serve_requests (hc=0x46360cfc, spill=0x46360d60) at /home/pi/dev/tvheadend/src/http.c:718
#5  0x0000f41c in http_serve (fd=18, opaque=<optimized out>, peer=0x17f76ac, self=0x17f76bc) at /home/pi/dev/tvheadend/src/http.c:791
#6  0x0000d9a8 in tcp_server_start (aux=0x17f76a0) at /home/pi/dev/tvheadend/src/tcp.c:401
#7  0x400e4bfc in start_thread () from /lib/arm-linux-gnueabihf/libpthread.so.0
#8  0x403b5e98 in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
#9  0x403b5e98 in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 5 (Thread 0x42653430 (LWP 2696)):
#0  0x400e9494 in pthread_cond_wait@@GLIBC_2.4 () from /lib/arm-linux-gnueabihf/libpthread.so.0
#1  0x000257a8 in serviceprobe_thread (aux=<optimized out>) at /home/pi/dev/tvheadend/src/serviceprobe.c:103
#2  0x400e4bfc in start_thread () from /lib/arm-linux-gnueabihf/libpthread.so.0
#3  0x403b5e98 in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
#4  0x403b5e98 in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 4 (Thread 0x415d0430 (LWP 2693)):
#0  0x403b65c4 in epoll_wait () from /lib/arm-linux-gnueabihf/libc.so.6
#1  0x0000d7c4 in tcp_server_loop (aux=<optimized out>) at /home/pi/dev/tvheadend/src/tcp.c:426
#2  0x400e4bfc in start_thread () from /lib/arm-linux-gnueabihf/libpthread.so.0
#3  0x403b5e98 in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
#4  0x403b5e98 in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 3 (Thread 0x42e53430 (LWP 2702)):
#0  0x400e984c in pthread_cond_timedwait@@GLIBC_2.4 () from /lib/arm-linux-gnueabihf/libpthread.so.0
#1  0x00015d74 in _epggrab_internal_thread (p=<optimized out>) at /home/pi/dev/tvheadend/src/epggrab.c:99
#2  0x400e4bfc in start_thread () from /lib/arm-linux-gnueabihf/libpthread.so.0
#3  0x403b5e98 in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
#4  0x403b5e98 in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 2 (Thread 0x40dd0430 (LWP 2692)):
#0  0x400e9494 in pthread_cond_wait@@GLIBC_2.4 () from /lib/arm-linux-gnueabihf/libpthread.so.0
#1  0x0001c910 in service_saver (aux=<optimized out>) at /home/pi/dev/tvheadend/src/service.c:963
#2  0x400e4bfc in start_thread () from /lib/arm-linux-gnueabihf/libpthread.so.0
#3  0x403b5e98 in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
#4  0x403b5e98 in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 1 (Thread 0x4041b000 (LWP 2691)):
#0  0x4031abfc in raise () from /lib/arm-linux-gnueabihf/libc.so.6
#1  0x4031e97c in abort () from /lib/arm-linux-gnueabihf/libc.so.6
#2  0x00000088 in ?? ()
#3  0x00000088 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

If this can help...

History

#1

Updated by Adam Sutton about 12 years ago

  • Category changed from General to DVB
  • Status changed from New to Need feedback
  • Assignee deleted (Hein Rigolo)

Guillaume,

Do you have any more context for that log? Would be nice to see the rest of it from when the recording/tuning started etc...

Though I'll try and have a look for possible issues.

Adam

#2

Updated by Adam Sutton about 12 years ago

I think I can see a possible issue, though would be useful to have some more context. If this can be repeated with debug enabled that would really help.

Adam

#3

Updated by Adam Sutton about 12 years ago

I think I can see what has happened here. And its all my fault :)

We slightly tweaked the service_find call to better deal with a couple of use cases, but unfortunately it turns out I might have broken it where the available services are <10% (which is the case here) but an existing subscription already exists.

I think its a very simple fix and I will post shortly.

Adam

#4

Updated by Adam Sutton about 12 years ago

  • Status changed from Need feedback to Fixed
  • % Done changed from 0 to 100

Applied in changeset commit:4310485eb0b5fa83d8d37240db53fa0ee115ab63.

#5

Updated by Guillaume B about 12 years ago

Well, that was quick !

I don't know if I'll be able to reproduce the bug soon, I switched the antenna cable to the building's own cable, which is maxed out in signal quality.

Anyway, thanks for the fix, I updated tvheadend.

#6

Updated by Adam Sutton about 12 years ago

Yeah it might just be a case of suck it and see, however I can certainly see that in your situation (poor signal) the code was definitely wrong and could certainly cause a crash the way you described it.

Adam

Also available in: Atom PDF