Project

General

Profile

Bug #3041

TVHeadend crashes when Avahi is unavailable

Added by Aydan Ulysses over 9 years ago. Updated about 9 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
Crashes
Target version:
-
Start date:
2015-08-14
Due date:
% Done:

100%

Estimated time:
Found in version:
4.1-373~gcb5f6a1
Affected Versions:

Description

Hello,

I tried running tvheadend (compiled from github, version 4.1-373~gcb5f6a1) inside docker and stumbled over this:

tvheadend: client.c:626: avahi_client_free: Assertion `client' failed.

Well, my container doesn't run avahi.

here's the full crashlog after sending TERM:
2015-08-14 14:49:51.211 [ INFO] epgdb: snapshot start
2015-08-14 14:49:51.212 [ INFO] epgdb: queued to save (size 191)
2015-08-14 14:49:51.212 [ INFO] epgdb: brands 0
2015-08-14 14:49:51.212 [ INFO] epgdb: seasons 0
2015-08-14 14:49:51.212 [ INFO] epgdb: episodes 0
2015-08-14 14:49:51.212 [ INFO] epgdb: broadcasts 0
tvheadend: client.c:626: avahi_client_free: Assertion `client' failed.
2015-08-14 14:49:51.215 [ ALERT] CRASH: Signal: 6 in PRG: tvheadend (4.1-373~gcb5f6a1) [5e879aa552a0aab7205967c5ad7da0a3e52b745a] CWD: /home/hts
2015-08-14 14:49:51.215 [ ALERT] CRASH: Fault address 0x650000000c (N/A)
2015-08-14 14:49:51.215 [ ALERT] CRASH: Loaded libraries: /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0 /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0 /lib/x86_64-linux-gnu/libz.so.1 /usr/lib/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/libc.so.6 /lib64/ld-linux-x86-64.so.2
2015-08-14 14:49:51.215 [ ALERT] CRASH: Register dump [23]: 00007f7a1fff77006360206e6f6974720000000000000008000000000000020600007f7a2d8df88900007f7a2d8dfe5000007f7a2cba3b670000000000000272000000000000000c000000000000001f00007f7a2cba3b6700007ffcdf2d2f2400000000000000060000000000000000ffffffffffffffff00007f7a1fff674800007f7a2ca89165000000000000020600000000000000330000000000000006000000000000000efffffffe7ffbba130000000000000000
2015-08-14 14:49:51.215 [ ALERT] CRASH: STACKTRACE
2015-08-14 14:49:51.218 [ ALERT] CRASH: 0x440976
2015-08-14 14:49:51.219 [ ALERT] CRASH: 0x7f7a2d27c0a0
2015-08-14 14:49:51.219 [ ALERT] CRASH: gsignal+0x35 (/lib/x86_64-linux-gnu/libc.so.6)
2015-08-14 14:49:51.219 [ ALERT] CRASH: abort+0x180 (/lib/x86_64-linux-gnu/libc.so.6)
2015-08-14 14:49:51.219 [ ALERT] CRASH: __assert_fail+0xf1 (/lib/x86_64-linux-gnu/libc.so.6)
2015-08-14 14:49:51.221 [ ALERT] CRASH: 0x7f7a2d8d7b3b
2015-08-14 14:49:51.222 [ ALERT] CRASH: 0x4cc187
2015-08-14 14:49:51.224 [ ALERT] CRASH: 0x414c4e

TVheadend should be able to cope with this without crashing.

Regards
Aydan

History

#1

Updated by Aydan Ulysses over 9 years ago

Additional info:
the container base image is a debootstrap of debian 7.7. tvheadend has been compiled and packaged for debian on that base image with buildessentials installed plus the dependencies listed in the wiki + gettext.
Then a new image has been created based on the debain 7.7 base image with this docker file:
@
FROM own/wheezy-7.7:debootstrap
MAINTAINER
LABEL description="TVheadend 4.1-373~gcb5f6a1_amd64 on wheezy minimal"
VOLUME [ "/media/recordings" ]
EXPOSE 9981 9982

USER root
ENV DEBIAN_FRONTEND noninteractive
COPY fs /
RUN env; pwd
RUN exec /root/setup-tvh.sh
USER hts
WORKDIR /home/hts
RUN env; pwd
RUN exec /root/setup-tvh.sh
ENTRYPOINT exec /usr/bin/tvheadend

with /root/setup-tvh.sh containing this:

#!/bin/bash

if [ "$(whoami)" "root" ]
then
dpkg -i /root/tvheadend_4.1-373~gcb5f6a1_amd64.deb
apt-get update
apt-get -f install -y --force-yes
apt-get install supervisor
apt-get install -y --force-yes psmisc tar bzip2
apt-get clean
elif [ "$(whoami)" "hts" ]
then
tvheadend -C -B &
echo sleeping for 20 seconds
sleep 20
echo terminating tvheadend
killall -sTERM tvheadend
echo sleeping for 20 seconds
sleep 20
echo done
else
echo "I am $(whoami)"
fi
@
and the tvheadend deb located in in /root

#2

Updated by Jaroslav Kysela over 9 years ago

Install the debug package to see the crash function.

#3

Updated by Aydan Ulysses over 9 years ago

I tried again with debug symbols installed, but i don't see any additional info:
hts@tvh-test:/media/root$ tvheadend
2015-08-14 20:18:28.696 [ INFO] main: Log started
2015-08-14 20:18:28.735 [ INFO] config: loaded
2015-08-14 20:18:28.966 [ INFO] scanfile: DVB-T - loaded 43 regions with 729 networks
2015-08-14 20:18:28.967 [ INFO] scanfile: DVB-S - loaded 1 regions with 92 networks
2015-08-14 20:18:28.967 [ INFO] scanfile: DVB-C - loaded 17 regions with 52 networks
2015-08-14 20:18:28.967 [ INFO] scanfile: ATSC - loaded 2 regions with 14 networks
2015-08-14 20:18:28.967 [ INFO] dvr: Creating new configuration ''
2015-08-14 20:18:28.968 [ INFO] CSA: Using SSE2 128bit parallel descrambling
2015-08-14 20:18:28.968 [ INFO] epggrab: module eit created
2015-08-14 20:18:28.968 [ INFO] epggrab: module uk_freesat created
2015-08-14 20:18:28.968 [ INFO] epggrab: module uk_freeview created
2015-08-14 20:18:28.968 [ INFO] epggrab: module viasat_baltic created
2015-08-14 20:18:28.968 [ INFO] epggrab: module Bulsatcom_39E created
2015-08-14 20:18:28.973 [ INFO] epggrab: module opentv-skynz created
2015-08-14 20:18:28.973 [ INFO] epggrab: module opentv-ausat created
2015-08-14 20:18:28.973 [ INFO] epggrab: module opentv-skyit created
2015-08-14 20:18:28.974 [ INFO] epggrab: module opentv-skyuk created
2015-08-14 20:18:28.975 [ INFO] epggrab: module pyepg created
2015-08-14 20:18:28.975 [ INFO] epggrab: module xmltv created
2015-08-14 20:18:28.975 [ INFO] epgdb: loaded v2
2015-08-14 20:18:28.975 [ INFO] epgdb: config 1
2015-08-14 20:18:28.975 [ INFO] epgdb: channels 0
2015-08-14 20:18:28.975 [ INFO] epgdb: brands 0
2015-08-14 20:18:28.975 [ INFO] epgdb: seasons 0
2015-08-14 20:18:28.975 [ INFO] epgdb: episodes 0
2015-08-14 20:18:28.975 [ INFO] epgdb: broadcasts 0
2015-08-14 20:18:28.976 [ NOTICE] START: HTS Tvheadend version 4.1-373~gcb5f6a1 started, running as PID:142 UID:101 GID:103, CWD:/media/root CNF:/home/hts/.hts/tvheadend
^C2015-08-14 20:18:31.492 [ INFO] epgdb: snapshot start
2015-08-14 20:18:31.492 [ INFO] epgdb: queued to save (size 191)
2015-08-14 20:18:31.492 [ INFO] epgdb: brands 0
2015-08-14 20:18:31.492 [ INFO] epgdb: seasons 0
2015-08-14 20:18:31.492 [ INFO] epgdb: episodes 0
2015-08-14 20:18:31.492 [ INFO] epgdb: broadcasts 0
tvheadend: client.c:626: avahi_client_free: Assertion `client' failed.
2015-08-14 20:18:31.495 [ ALERT] CRASH: Signal: 6 in PRG: tvheadend (4.1-373~gcb5f6a1) [5e879aa552a0aab7205967c5ad7da0a3e52b745a] CWD: /media/root
2015-08-14 20:18:31.495 [ ALERT] CRASH: Fault address 0x650000008e (N/A)
2015-08-14 20:18:31.495 [ ALERT] CRASH: Loaded libraries: /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0 /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0 /lib/x86_64-linux-gnu/libz.so.1 /usr/lib/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/libc.so.6 /lib64/ld-linux-x86-64.so.2
2015-08-14 20:18:31.495 [ ALERT] CRASH: Register dump [23]: 00007f15e17f27006360206e6f6974720000000000000008000000000000020600007f15ef2f288900007f15ef2f2e5000007f15ee5b6b670000000000000272000000000000008e00000000000000a000007f15ee5b6b6700007fffcd6aff0c00000000000000060000000000000000ffffffffffffffff00007f15e17f174800007f15ee49c165000000000000020600000000000000330000000000000006000000000000000efffffffe7ffbba130000000000000000
2015-08-14 20:18:31.495 [ ALERT] CRASH: STACKTRACE
2015-08-14 20:18:31.497 [ ALERT] CRASH: 0x440976
2015-08-14 20:18:31.499 [ ALERT] CRASH: 0x7f15eec8f0a0
2015-08-14 20:18:31.499 [ ALERT] CRASH: gsignal+0x35 (/lib/x86_64-linux-gnu/libc.so.6)
2015-08-14 20:18:31.499 [ ALERT] CRASH: abort+0x180 (/lib/x86_64-linux-gnu/libc.so.6)
2015-08-14 20:18:31.499 [ ALERT] CRASH: __assert_fail+0xf1 (/lib/x86_64-linux-gnu/libc.so.6)
2015-08-14 20:18:31.500 [ ALERT] CRASH: 0x7f15ef2eab3b
2015-08-14 20:18:31.501 [ ALERT] CRASH: 0x4cc187
2015-08-14 20:18:31.503 [ ALERT] CRASH: 0x414c4e
2015-08-14 20:18:31.504 [ ALERT] CRASH: 0x7f15eec86b50
Aborted

This time I didn't run it from the Dockerfile but in a shell inside a container basend on my wheezy debotstrap and ^C-ed out of it.

Regards
Aydan

#4

Updated by Jaroslav Kysela over 9 years ago

/usr/bin/addr2line utility is probably missing in your runtime environment.

#5

Updated by Aydan Ulysses about 9 years ago

Now we're getting somewhere:
^C2015-08-16 16:03:41.317 [ INFO] epgdb: snapshot start
2015-08-16 16:03:41.317 [ INFO] epgdb: queued to save (size 191)
2015-08-16 16:03:41.317 [ INFO] epgdb: brands 0
2015-08-16 16:03:41.317 [ INFO] epgdb: seasons 0
2015-08-16 16:03:41.317 [ INFO] epgdb: episodes 0
2015-08-16 16:03:41.317 [ INFO] epgdb: broadcasts 0
tvheadend: client.c:626: avahi_client_free: Assertion `client' failed.
2015-08-16 16:03:41.320 [ ALERT] CRASH: Signal: 6 in PRG: tvheadend (4.1-373~gcb5f6a1) [5e879aa552a0aab7205967c5ad7da0a3e52b745a] CWD: /home/hts
2015-08-16 16:03:41.320 [ ALERT] CRASH: Fault address 0x650000072b (N/A)
2015-08-16 16:03:41.320 [ ALERT] CRASH: Loaded libraries: /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0 /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0 /lib/x86_64-linux-gnu/libz.so.1 /usr/lib/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/libc.so.6 /lib64/ld-linux-x86-64.so.2
2015-08-16 16:03:41.320 [ ALERT] CRASH: Register dump [23]: 00007fb652ff57006360206e6f6974720000000000000008000000000000020600007fb6609a388900007fb6609a3e5000007fb65fc67b670000000000000272000000000000072b000000000000073d00007fb65fc67b6700007ffc196e8efb00000000000000060000000000000000ffffffffffffffff00007fb652ff474800007fb65fb4d165000000000000020600000000000000330000000000000006000000000000000efffffffe7ffbba130000000000000000
2015-08-16 16:03:41.320 [ ALERT] CRASH: STACKTRACE
2015-08-16 16:03:41.484 [ ALERT] CRASH: /root/build/tvheadend/src/trap.c:148 0x440976
2015-08-16 16:03:41.486 [ ALERT] CRASH: ??:0 0x7fb6603400a0
2015-08-16 16:03:41.486 [ ALERT] CRASH: gsignal+0x35 (/lib/x86_64-linux-gnu/libc.so.6)
2015-08-16 16:03:41.486 [ ALERT] CRASH: abort+0x180 (/lib/x86_64-linux-gnu/libc.so.6)
2015-08-16 16:03:41.486 [ ALERT] CRASH: __assert_fail+0xf1 (/lib/x86_64-linux-gnu/libc.so.6)
2015-08-16 16:03:41.488 [ ALERT] CRASH: ??:0 0x7fb66099bb3b
2015-08-16 16:03:41.533 [ ALERT] CRASH: /root/build/tvheadend/src/avahi.c:286 0x4cc187
2015-08-16 16:03:41.575 [ ALERT] CRASH: /root/build/tvheadend/src/wrappers.c:149 0x414c4e

It's probably a good idea to make the debug package depend on binutils.

Regards
Aydan

#6

Updated by Jaroslav Kysela about 9 years ago

  • Status changed from New to Fixed
  • % Done changed from 0 to 100

Applied in changeset commit:tvheadend|8aa67a451fb31221172a2e2adbd44b2e90c069d3.

#7

Updated by Aydan Ulysses about 9 years ago

I can confirm the fix, tested with g10d7654.

Thanks for the quick fix.
Aydan

Also available in: Atom PDF