Bug 251700 - Assertion abort in libdns_sd compat code
Assertion abort in libdns_sd compat code
Product: Fedora
Classification: Fedora
Component: avahi (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Lennart Poettering
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2007-08-10 10:35 EDT by Tim Waugh
Modified: 2007-11-30 17:12 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-09-06 16:07:45 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
avahi-dnssd-compat.patch (895 bytes, patch)
2007-08-10 10:35 EDT, Tim Waugh
no flags Details | Diff

  None (edit)
Description Tim Waugh 2007-08-10 10:35:17 EDT
Description of problem:
cupsd can segfault while using the libdns_sd compatibility layer of Avahi.

Version-Release number of selected component (if applicable):

How reproducible:
Fairly easy here.

Steps to Reproduce:
1.service avahi-daemon stop; service cups stop
2.service avahi-daemon start; cupsd -f
Actual results:

Additional info:
#0  0x0012d402 in __kernel_vsyscall ()
#1  0x00440160 in raise () from /lib/libc.so.6
#2  0x00441aa1 in abort () from /lib/libc.so.6
#3  0x0043956e in __assert_fail () from /lib/libc.so.6
#4  0x00792422 in avahi_entry_group_add_service_strlst (group=0xb8421e20, 
    interface=-1, protocol=-1, flags=0, name=0x0, type=0xb842d9b8 "_ipp._tcp", 
    domain=0xb842d4f8 "local", host=0x0, port=631, txt=0xb842d938)
    at entrygroup.c:424
424         assert(name);
#5  0x0024f895 in reg_create_service (sdref=0xb842d9d8) at compat.c:923
923         if ((ret = avahi_entry_group_add_service_strlst(
#6  0x0024fcf5 in reg_client_callback (s=0xb842d018, 
    state=AVAHI_CLIENT_S_RUNNING, userdata=0xb842d9d8) at compat.c:996
996                 if ((ret = reg_create_service(sdref)) < 0) {
#7  0x0078eccd in client_set_state (client=0xb842d018, 
    state=AVAHI_SERVER_RUNNING) at client.c:101
101             client->callback (client, state, client->userdata);
#8  0x007904c1 in filter_func (bus=0xb8421628, message=0xb841fb48, 
    userdata=0xb842d018) at client.c:188
188             client_set_state(client, (AvahiClientState) state);
#9  0x00215684 in dbus_connection_dispatch () from /lib/libdbus-1.so.3
#10 0x00797a9c in dispatch_timeout_callback (t=0xb842d5e0, userdata=0xb842d228)
    at ../avahi-common/dbus-watch-glue.c:103
103         if (dbus_connection_dispatch(d->connection) ==
#11 0x0078619a in timeout_callback (t=0x6) at simple-watch.c:449
449         t->callback(t, t->userdata);
#12 0x00786451 in avahi_simple_poll_dispatch (s=0xb842ce88)
    at simple-watch.c:562
562                 timeout_callback(next_timeout);
#13 0x00251362 in DNSServiceProcessResult (sdref=0xb842d9d8) at compat.c:497
497         if (avahi_simple_poll_dispatch(sdref->simple_poll) < 0)
#14 0xb7eeeb23 in cupsdUpdateDNSSDBrowse (p=0xb840bf48) at dirsvc.c:1364
1364      if ((sdErr = DNSServiceProcessResult(p->dnssd_ipp_ref))

Attached patch fixes it here.
Comment 1 Tim Waugh 2007-08-10 10:35:18 EDT
Created attachment 161058 [details]
Comment 2 Lennart Poettering 2007-08-12 13:19:41 EDT
Aaarg, I forgot about this patch when I preprared Avahi 0.6.21.

Hmm, patch doesn't look entirely right to me. I will look into this again later
and cook up another patch for the Fedora package.

For not forgetting about this again I posted this upstream, too:

Comment 3 Tim Waugh 2007-08-30 10:40:44 EDT
This is still causing cupsd to abort on boot-up.  Please fix for test2.
Comment 4 Lennart Poettering 2007-09-06 13:17:14 EDT
Hmm, I wonder what I was thinking when I looked at your patch the first time.
It's perfectly correct. I will merge this now into the avahi packages.

Sorry for the delay!
Comment 5 Lennart Poettering 2007-09-06 16:07:45 EDT
OK, this is now fixed in rawhide. I am not sure though what is necessary to get
this tagges for test2.

Note You need to log in before you can comment on or make changes to this bug.