Bug #5437
Still Crashing
100%
Description
After playing a while it crashes. Rebooted and it crashed again. Below is log
Dec 15 11:34:37 NUC-HTPC tvheadend32449: CRASH: Signal: 6 in PRG: /usr/bin/tvheadend (4.3-1663~g552cea0fc) [54362fc4592ebb238b826cab1487c6ab706ac8bc] CWD: /
Dec 15 11:34:37 NUC-HTPC tvheadend32449: CRASH: Fault address 0x7b00007ec1 (N/A)
Dec 15 11:34:37 NUC-HTPC tvheadend32449: CRASH: Loaded libraries: linux-vdso.so.1 /usr/lib/x86_64-linux-gnu/libdvbcsa.so.1 /usr/lib/x86_64-linux-gnu/libssl.so.1.1 /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 /lib/x86_64-linux-gnu/libz.so.1 /usr/lib/x86_64-linux-gnu/libpcre2-8.so.0 /usr/lib/x86_64-linux-gnu/liburiparser.so.1 /usr/lib/x86_64-linux-gnu/libavahi-common.so.3 /usr/lib/x86_64-linux-gnu/libavahi-client.so.3 /lib/x86_64-linux-gnu/libdbus-1.so.3 /lib/x86_64-linux-gnu/libdl.so.2 /lib/x86_64-linux-gnu/libpthread.so.0 /lib/x86_64-linux-gnu/libm.so.6 /lib/x86_64-linux-gnu/librt.so.1 /lib/x86_64-linux-gnu/libmvec.so.1 /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /lib/x86_64-linux-gnu/libc.so.6 /lib/x86_64-linux-gnu/libsystemd.so.0 /lib64/ld-linux-x86-64.so.2 /lib/x86_64-linux-gnu/libgcc_s.so.1 /lib/x86_64-linux-gnu/liblzma.so.5 /usr/lib/x86_64-linux-gnu/liblz4.so.1 /lib/x86_64-linux-gnu/libgcrypt.so.20 /lib/x86_64-linux-gnu/libgpg-error.so.0 /lib/x86_64-linux-gnu/libnss_compat.so.2 /lib/x86_64-linux-gnu/libnss_nis.so.2 /lib/x86_64-linux-gnu/libnsl.so.1
Dec 15 11:34:37 NUC-HTPC tvheadend32449: CRASH: Register dump [23]: 000000000000000000007f2668cf12500000000000000008000000000000024600007f2668cf165000007f26529f36d000007f26529f36c00000000000000000000000000000000200007f2668cf1250000055c8efc23590000055c8efc235900000000000000000000000000000000000007f267cba6e9700007f2668cf125000007f267cba6e970000000000000246002b00000000003300000000000000000000000000000000fffffffe7ffbba110000000000000000
Dec 15 11:34:37 NUC-HTPC tvheadend32449: CRASH: STACKTRACE
Dec 15 11:34:37 NUC-HTPC tvheadend32449: CRASH: ??:0 0x55c8ed9c22fd 0x55c8ed7af000
Dec 15 11:34:37 NUC-HTPC tvheadend32449: CRASH: ??:0 0x7f267dac4890 0x7f267dab2000
Dec 15 11:34:37 NUC-HTPC tvheadend32449: CRASH: gsignal+0xc7 (/lib/x86_64-linux-gnu/libc.so.6)
Dec 15 11:34:37 NUC-HTPC tvheadend32449: CRASH: abort+0x141 (/lib/x86_64-linux-gnu/libc.so.6)
Dec 15 11:34:37 NUC-HTPC tvheadend32449: CRASH: ??:0 0x55c8ed983a89 0x55c8ed7af000
Dec 15 11:34:37 NUC-HTPC tvheadend32449: CRASH: ??:0 0x55c8ed9d198d 0x55c8ed7af000
Dec 15 11:34:38 NUC-HTPC tvheadend32449: CRASH: ??:0 0x55c8ed9b0696 0x55c8ed7af000
Dec 15 11:34:38 NUC-HTPC tvheadend32449: CRASH: ??:0 0x55c8ed9b8805 0x55c8ed7af000
Dec 15 11:34:38 NUC-HTPC tvheadend32449: CRASH: ??:0 0x55c8ed9b8fbb 0x55c8ed7af000
Dec 15 11:34:38 NUC-HTPC tvheadend32449: CRASH: ??:0 0x55c8eda15302 0x55c8ed7af000
Dec 15 11:34:38 NUC-HTPC tvheadend32449: CRASH: ??:0 0x55c8ed982c58 0x55c8ed7af000
Dec 15 11:34:38 NUC-HTPC tvheadend32449: CRASH: ??:0 0x7f267dab96db 0x7f267dab2000
Dec 15 11:34:38 NUC-HTPC systemd1: tvheadend.service: Main process exited, code=killed, status=6/ABRT
Dec 15 11:34:38 NUC-HTPC systemd1: tvheadend.service: Failed with result 'signal'.
History
Updated by G Kazaroth almost 6 years ago
Upgraded to 4.3-1673~gefd99b34d~bionic with the same results. This started occurring after upgrading 2 days ago from a version about 1 month old. Reboot does not help. Crash occurs instantly. Shutdown tvheadend and waited overnight, then restarted the service. It ran for about 1 hour then crashed. Again reboot does not fix it, so it immediately crashed again.
Updated by G Kazaroth almost 6 years ago
Installed tvheadend-dbg
added -s --debug -D to process execution options
following is output from syslog on crash.
I have determined that the crash is occurring when I configure the pvr.hts on Kodi to connect to the tvheadend service.
Dec 15 17:07:30 NUC-HTPC tvheadend15308: CRASH: Signal: 6 in PRG: /usr/bin/tvheadend (4.3-1673~gefd99b34d) [457f1dd1f6970cfb5f2facbd39684f85d57ddc63] CWD: /
Dec 15 17:07:30 NUC-HTPC tvheadend15308: CRASH: Fault address 0x7b00003bcc (N/A)
Dec 15 17:07:30 NUC-HTPC tvheadend15308: CRASH: Loaded libraries: linux-vdso.so.1 /usr/lib/x86_64-linux-gnu/libdvbcsa.so.1 /usr/lib/x86_64-linux-gnu/libssl.so.1.1 /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 /lib/x86_64-linux-gnu/libz.so.1 /usr/lib/x86_64-linux-gnu/libpcre2-8.so.0 /usr/lib/x86_64-linux-gnu/liburiparser.so.1 /usr/lib/x86_64-linux-gnu/libavahi-common.so.3 /usr/lib/x86_64-linux-gnu/libavahi-client.so.3 /lib/x86_64-linux-gnu/libdbus-1.so.3 /lib/x86_64-linux-gnu/libdl.so.2 /lib/x86_64-linux-gnu/libpthread.so.0 /lib/x86_64-linux-gnu/libm.so.6 /lib/x86_64-linux-gnu/librt.so.1 /lib/x86_64-linux-gnu/libmvec.so.1 /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /lib/x86_64-linux-gnu/libc.so.6 /lib/x86_64-linux-gnu/libsystemd.so.0 /lib64/ld-linux-x86-64.so.2 /lib/x86_64-linux-gnu/libgcc_s.so.1 /lib/x86_64-linux-gnu/liblzma.so.5 /usr/lib/x86_64-linux-gnu/liblz4.so.1 /lib/x86_64-linux-gnu/libgcrypt.so.20 /lib/x86_64-linux-gnu/libgpg-error.so.0 /lib/x86_64-linux-gnu/libnss_compat.so.2 /lib/x86_64-linux-gnu/libnss_nis.so.2 /lib/x86_64-linux-gnu/libnsl.so.1
Dec 15 17:07:30 NUC-HTPC tvheadend15308: CRASH: Register dump [23]: 000000000000000000007f71494752500000000000000008000000000000024600007f714947565000007f71329f36d000007f71329f36c00000000000000000000000000000000200007f71494752500000556dcf9d4c500000556dcf9d4c500000000000000000000000000000000000007f715cad7e9700007f714947525000007f715cad7e970000000000000246002b00000000003300000000000000000000000000000000fffffffe7ffbba110000000000000000
Dec 15 17:07:30 NUC-HTPC tvheadend15308: CRASH: STACKTRACE
Dec 15 17:07:30 NUC-HTPC tvheadend15308: CRASH: /project/repo/checkout/src/trap.c:176 0x556dc9ab23ad 0x556dc989f000
Dec 15 17:07:31 NUC-HTPC tvheadend15308: CRASH: ??:0 0x7f715d9f5890 0x7f715d9e3000
Dec 15 17:07:31 NUC-HTPC tvheadend15308: CRASH: gsignal+0xc7 (/lib/x86_64-linux-gnu/libc.so.6)
Dec 15 17:07:31 NUC-HTPC tvheadend15308: CRASH: abort+0x141 (/lib/x86_64-linux-gnu/libc.so.6)
Dec 15 17:07:31 NUC-HTPC tvheadend15308: CRASH: /project/repo/checkout/src/tvh_thread.c:437 0x556dc9a73b29 0x556dc989f000
Dec 15 17:07:31 NUC-HTPC tvheadend15308: CRASH: /project/repo/checkout/src/tvh_thread.h:75 0x556dc9ac1a3d 0x556dc989f000
Dec 15 17:07:31 NUC-HTPC tvheadend15308: CRASH: /project/repo/checkout/src/htsp_server.c:346 0x556dc9aa0746 0x556dc989f000
Dec 15 17:07:32 NUC-HTPC tvheadend15308: CRASH: /project/repo/checkout/src/htsp_server.c:1039 0x556dc9aa88b5 0x556dc989f000
Dec 15 17:07:32 NUC-HTPC tvheadend15308: CRASH: /project/repo/checkout/src/htsp_server.c:3764 0x556dc9aa906b 0x556dc989f000
Dec 15 17:07:32 NUC-HTPC tvheadend15308: CRASH: /project/repo/checkout/src/dvr/dvr_rec.c:1762 0x556dc9b053a2 0x556dc989f000
Dec 15 17:07:32 NUC-HTPC tvheadend15308: CRASH: /project/repo/checkout/src/tvh_thread.c:91 0x556dc9a72ce8 0x556dc989f000
Dec 15 17:07:33 NUC-HTPC tvheadend15308: CRASH: ??:0 0x7f715d9ea6db 0x7f715d9e3000
Dec 15 17:07:33 NUC-HTPC tvheadend15308: CRASH: clone+0x3f (/lib/x86_64-linux-gnu/libc.so.6)
Dec 15 17:07:33 NUC-HTPC systemd1: tvheadend.service: Main process exited, code=killed, status=6/ABRT
Dec 15 17:07:33 NUC-HTPC systemd1: tvheadend.service: Failed with result 'signal'.
Updated by G Kazaroth almost 6 years ago
Info on kodi-pvr-hts. Installed using apt-get install kodi-pvr-hts
Latest version installed is 3.4.27-1 for bionic on Ubuntu.
Updated by Luis Alves almost 6 years ago
You are omitting some errors from tvh. You should have a "Mutex not held at xxx" message on the terminal stderr where tvh was started.
Anyway, with the 2nd log we can see the error is here:
https://github.com/tvheadend/tvheadend/blob/master/src/imagecache.c#L653
Updated by G Kazaroth almost 6 years ago
thank you for the info. I start the service using sudo service tvheadend start. I can try to run it from the command line, but it looks like you already understand the issue. Does the lock issue mean there is a lock file that needs to be removed? Let me know if there is anything I need to do.
Updated by Luis Alves almost 6 years ago
G Kazaroth wrote:
thank you for the info. I start the service using sudo service tvheadend start. I can try to run it from the command line, but it looks like you already understand the issue. Does the lock issue mean there is a lock file that needs to be removed? Let me know if there is anything I need to do.
No, it means that tvheadend global_lock is not locked when it should be (a lock is missing somewhere).
Jaroslav will provide the correct fix as soon as he can.
Meanwhile you can try this hack:
diff --git a/src/htsp_server.c b/src/htsp_server.c index 34772e7a4..33fdc35a5 100644 --- a/src/htsp_server.c +++ b/src/htsp_server.c @@ -343,7 +343,11 @@ static const char * htsp_image(htsp_connection_t *htsp, const char *image, char *buf, size_t buflen) { const char *ret = image; - const int id = imagecache_get_id(image); + const int id; + + tvh_mutex_lock(&global_lock); + id = imagecache_get_id(image); + tvh_mutex_unlock(&global_lock); /* Handle older clients */ if (id) {
Updated by Luis Alves almost 6 years ago
Sorry - remove the "const" from the 'id' variable:
diff --git a/src/htsp_server.c b/src/htsp_server.c index 34772e7a4..061e6000e 100644 --- a/src/htsp_server.c +++ b/src/htsp_server.c @@ -343,7 +343,11 @@ static const char * htsp_image(htsp_connection_t *htsp, const char *image, char *buf, size_t buflen) { const char *ret = image; - const int id = imagecache_get_id(image); + int id; + + tvh_mutex_lock(&global_lock); + id = imagecache_get_id(image); + tvh_mutex_unlock(&global_lock); /* Handle older clients */ if (id) {
Updated by Jaroslav Kysela almost 6 years ago
- Status changed from New to Fixed
- % Done changed from 0 to 100
Applied in changeset commit:tvheadend|91f6de4437f13d51a854ffe999cca63ff2ef503c.