Avahi daemon broken? (segfault)

dndlnx

Member

Reaction score: 1
Messages: 77

I use the Netatalk file server. It also grabs net/avahi-app, which I never configure, but usually "just works".

My upgrade to 10.0-RELEASE went fine, I rebuilt my ports, everything is working except this. I receive the following:

Code:
Starting avahi-daemon.
Segmentation fault (core dumped)

Version:
Code:
avahi-app-0.6.31

Anyone else encounter this, or can verify?
 

bnk

New Member


Messages: 2

Anyone else encounter this, or can verify?

Confirmed: I updated my 9.2-STABLE box to 10.0-RELEASE using freebsd-update, rebuilt all ports, and see exactly the same behavior. avahi-daemon dumps core with a segmentation fault when started.

I haven't built avahi-daemon with debugging symbols, but in case it's useful, a backtrace without symbols at the time of the crash looks like this:

Code:
# gdb /usr/local/sbin/avahi-daemon 
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-marcel-freebsd"...(no debugging symbols found)...
(gdb) run
Starting program: /usr/local/sbin/avahi-daemon 
(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...[New LWP 101588]
(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
[Switching to LWP 101588]
0x0000000801304604 in pthread_testcancel () from /lib/libthr.so.3
(gdb) bt
#0  0x0000000801304604 in pthread_testcancel () from /lib/libthr.so.3
#1  0x00000008012fc706 in open () from /lib/libthr.so.3
#2  0x0000000801517227 in __gets_chk () from /lib/libssp.so.0
#3  0x00000008015173d2 in __chk_fail () from /lib/libssp.so.0
#4  0x0000000801516ace in .init () from /lib/libssp.so.0
#5  0x00007fffffffd0b0 in ?? ()
#6  0x000000080061e691 in r_debug_state () from /libexec/ld-elf.so.1
#7  0x000000080061dd27 in __tls_get_addr () from /libexec/ld-elf.so.1
#8  0x000000080061c089 in .text () from /libexec/ld-elf.so.1
#9  0x0000000000000000 in ?? ()

FWIW, another user has reported this exact behavior on -ports:

http://lists.freebsd.org/pipermail/freebsd-ports/2014-January/089159.html

Like others, I ran the same revision of the avahi port without a problem on 9.2-STABLE. (And again, I rebuilt all ports after upgrading to 10.0-RELEASE.)

I won't have time to dig into this to look for the cause for another couple weeks minimum. In the interim, has anyone else found it?

Thanks,
Brad
 

Ajax

Member

Reaction score: 1
Messages: 54

Confirming. The worst is that on test machine net/avahi-app works; upgrade on production made it non-working. Both machines are amd64 and upgraded via freebsd-update from 9.2-REL-p3 to 10.0-RELEASE. The most strange is that re-installing via pkg on both machines doesn't change the situation — works on test and doesn't on production. As a temporary solution I just copied /usr/local/sbin/avahi-daemon from test to production and everything is up and running by now.
 

ahanikel

New Member


Messages: 4

Workaround: rebuild without updating ports tree

The following reproduces the problem on a vanilla FreeBSD 10 (installed via the boot-only CD image):

pkg install avahi

The following procedure resolves the problem on that same installation:

  • Do not update the ports tree
  • port install portmaster
  • cd /usr/ports/net/avahi && portmaster -f

Doing so downgrades a couple of packages, so it's probably one of these that causes the segfault:
Code:
        Installation of devel/libcheck (libcheck-0.9.11)
        Re-installation of libpthread-stubs-0.3_4
        Re-installation of python27-2.7.6_1
        Re-installation of python2-2_2
        Re-installation of python-2.7_1,2
        Installation of security/libgpg-error (libgpg-error-1.12)
        Installation of security/libgcrypt (libgcrypt-1.5.3)
        Installation of textproc/libxslt (libxslt-1.1.28_1)
        Installation of x11/xcb-proto (xcb-proto-1.8)
        Upgrade of libxcb-1.9.3 to libxcb-1.9.1_1
        Installation of x11/xcmiscproto (xcmiscproto-1.2.2)
        Re-installation of xextproto-7.2.1
        Re-installation of libX11-1.6.2,1
        Re-installation of gnome_subr-1.0
        Upgrade of dbus-1.6.18 to dbus-1.6.12
        Upgrade of libffi-3.0.13_1 to libffi-3.0.13
        Re-installation of pcre-8.33
        Re-installation of glib-2.36.3_1
        Re-installation of dbus-glib-0.100.2
        Installation of devel/m4 (m4-1.4.17,1)
        Installation of devel/bison (bison-2.7.1,1)
        Installation of devel/cmake-modules (cmake-modules-2.8.12.1)
        Installation of devel/cmake (cmake-2.8.12.1)
        Re-installation of png-1.5.17
        Upgrade of freetype2-2.5.2 to freetype2-2.5.0.1
        Upgrade of fontconfig-2.11.0_1,1 to fontconfig-2.10.95,1
        Re-installation of renderproto-0.11.1
        Re-installation of libXrender-0.9.8
        Upgrade of pixman-0.32.4 to pixman-0.30.2
        Re-installation of xcb-util-0.3.9_1,1
        Re-installation of xcb-util-renderutil-0.3.8
        Upgrade of cairo-1.10.2_7,2 to cairo-1.10.2_6,2
        Re-installation of gnomehier-3.0
        Re-installation of gobject-introspection-1.36.0_2
        Re-installation of libdaemon-0.14
        Installation of textproc/p5-XML-Parser (p5-XML-Parser-2.41_1)
        Installation of textproc/intltool (intltool-0.50.2)
        Re-installation of avahi-app-0.6.31
        Re-installation of avahi-autoipd-0.6.31
        Re-installation of atk-2.8.0
        Installation of archivers/unzip (unzip-6.0_1)
        Re-installation of jpeg-8_4
        Re-installation of jasper-1.900.1_12
        Installation of devel/makedepend (makedepend-1.0.5,1)
        Upgrade of pciids-20131225 to pciids-20131130
        Re-installation of libpciaccess-0.13.2
        Re-installation of libdrm-2.4.17_1
        Installation of textproc/py-libxml2 (py27-libxml2-2.8.0)
        Re-installation of dri2proto-2.8
        Installation of x11/glproto (glproto-1.4.16)
        Re-installation of damageproto-1.2.1
        Re-installation of fixesproto-5.0
        Re-installation of libXfixes-5.0.1
        Re-installation of libXdamage-1.1.4
        Re-installation of libXext-1.3.2,1
        Re-installation of xf86vidmodeproto-2.3.1
        Re-installation of libXxf86vm-1.1.3
        Re-installation of libGL-7.6.1_4
        Re-installation of libGLU-9.0.0
        Re-installation of libXi-1.7.2,1
        Re-installation of randrproto-1.4.0
        Re-installation of libXrandr-1.4.2
        Re-installation of freeglut-2.8.1
        Re-installation of jbigkit-1.6
        Re-installation of libXt-1.1.4,1
        Re-installation of libXmu-1.1.2,1
        Re-installation of tiff-4.0.3
        Re-installation of gdk-pixbuf2-2.28.2
        Re-installation of icu-50.1.2
        Re-installation of graphite2-1.2.4
        Upgrade of harfbuzz-0.9.25 to harfbuzz-0.9.19
        Re-installation of libXft-2.3.1
        Installation of x11-fonts/fontsproto (fontsproto-2.1.2)
        Re-installation of libfontenc-1.1.2
        Installation of x11-fonts/libXfont (libXfont-1.4.6,1)
        Installation of x11-fonts/bdftopcf (bdftopcf-1.0.4)
        Upgrade of font-util-1.3.0_1 to font-util-1.3.0
        Re-installation of mkfontscale-1.1.1
        Upgrade of encodings-1.0.4_1,1 to encodings-1.0.4,1
        Re-installation of dejavu-2.34
        Re-installation of mkfontdir-1.0.7
        Upgrade of font-bh-ttf-1.0.3_1 to font-bh-ttf-1.0.3
        Upgrade of font-misc-ethiopic-1.0.3_1 to font-misc-ethiopic-1.0.3
        Upgrade of font-misc-meltho-1.0.3_1 to font-misc-meltho-1.0.3
        Re-installation of xorg-fonts-truetype-7.7_1
        Re-installation of pango-1.34.1_1
        Re-installation of compositeproto-0.4.2
        Re-installation of libXcomposite-0.4.4,1
        Re-installation of libXcursor-1.1.14
        Re-installation of xineramaproto-1.2.1
        Re-installation of libXinerama-1.1.3,1
        Re-installation of hicolor-icon-theme-0.12
        Re-installation of shared-mime-info-1.1
        Re-installation of gtk-update-icon-cache-2.24.22
        Re-installation of cups-client-1.5.4_1
        Upgrade of gtk2-2.24.22_1 to gtk2-2.24.22
        Re-installation of xmlcatmgr-2.2
        Re-installation of libglade2-2.6.4_5
        Re-installation of avahi-header-0.6.31
        Re-installation of avahi-gtk-0.6.31_1
        Re-installation of avahi-libdns-0.6.31
        Re-installation of avahi-0.6.31

I have no idea how to find out which one of these it is, however.
 

Ajax

Member

Reaction score: 1
Messages: 54

Looks like the code itself is broken since source code build also doesn't work :(
 

tomster

New Member


Messages: 4

it's probably some library that's been updated, not a fault on avahi itself. i got the error with 0.6.29 after upgrading some other ports (can't remember which). after experiencing the breakage i upgraded avahi to 0.6.31 (both from binary as well as from ports). neither worked.
 

teig

New Member


Messages: 10

Bummer, just updated packages via pkg, for the first time since pkgng, and ran into this issue.
My mouse is gone, very annoying!
 

teig

New Member


Messages: 10

It can be fixed by adding --disable-stack-protector to CONFIGURE_ARGS in the /usr/ports/net/avahi-app/Makefile.
And rebuilding it.
Ref. freebsd-ports mailing list.

Still no mouse though, in X, works in console!
 

bnk

New Member


Messages: 2

teig said:
It can be fixed by adding --disable-stack-protector to CONFIGURE_ARGS in the /usr/ports/net/avahi-app/Makefile.
And rebuilding it.
Ref. freebsd-ports mailing list.

Thanks for passing along the tip from the list, @teig! Disabling stack protector eliminated the SIGSEGV on start for me, too.

FWIW, afpd in net/netatalk seg-faulted on start for me, as well. The same fix, disabling stack protector, eliminated that one, too.

I'd rather run these network services with stack protector turned on! Is something about stack protector in clang problematic that was not problematic in gcc?

teig said:
Still no mouse though, in X, works in console!

Sorry to hear that. I haven't encountered that problem after upgrading from 9.2-STABLE to 10.0-RELEASE with freebsd-update.

Thanks again,
-Brad
 
Last edited by a moderator:
Top