Bug 6198 - smbd segfaults randomly (cups related?).
Summary: smbd segfaults randomly (cups related?).
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.3
Classification: Unclassified
Component: Printing (show other bugs)
Version: 3.3.2
Hardware: Other Other
: P3 normal
Target Milestone: ---
Assignee: Gerald (Jerry) Carter (dead mail address)
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-20 04:15 UTC by Pawel Sikora
Modified: 2009-03-24 01:52 UTC (History)
1 user (show)

See Also:


Attachments
patch (18.21 KB, patch)
2009-03-22 16:16 UTC, Volker Lendecke
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pawel Sikora 2009-03-20 04:15:57 UTC
hi,

i'm using samba mainly to simple [homes] sharing.

[global]
   workgroup = WORKGROUP
   server string = Samba Server / PLD-Linux
   log file = /var/log/samba/log.%I
   max log size = 50
   security = user
  encrypt passwords = no
  username map = /etc/samba/smbusers
   socket options = TCP_NODELAY
   dns proxy = no
   use sendfile = yes
[homes]
   comment = Home Directories
   browseable = no
   writable = yes
   printable = no

there's no printer connected to machine and there's no started cups server.
in logs i see following warnings about cups...

[2009/03/17 12:04:37,  0] printing/print_cups.c:cups_connect(103)
  Unable to connect to CUPS server localhost:631 - Connection refused

some warnings about avahi...

*** WARNING *** The program 'smbd' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=smbd>

and random crashes...

*** glibc detected *** /usr/sbin/smbd: corrupted double-linked list: 0x00007f1ca3822230 ***
======= Backtrace: =========
/lib64/libc.so.6[0x7f1c9fc44dd8]
/lib64/libc.so.6[0x7f1c9fc450a0]
/lib64/libc.so.6[0x7f1c9fc47866]
/lib64/libc.so.6(__libc_calloc+0x168)[0x7f1c9fc49258]
/usr/lib64/libcups.so.2(_cupsGlobals+0x3f)[0x7f1ca19cc64f]
/usr/lib64/libcups.so.2(cupsSetPasswordCB+0x9)[0x7f1ca19e0ea9]
/usr/sbin/smbd(cups_cache_reload+0x2f3)[0x7f1ca32092c9]
/usr/sbin/smbd(pcap_cache_reload+0x10a)[0x7f1ca3205d1d]
/usr/sbin/smbd(reload_printers+0x29)[0x7f1ca3443f7a]
/usr/sbin/smbd(check_reload+0x13d)[0x7f1ca307aee6]
/usr/sbin/smbd(main+0x1912)[0x7f1ca3445ffe]
/lib64/libc.so.6(__libc_start_main+0xe6)[0x7f1c9fbef5b6]
/usr/sbin/smbd[0x7f1ca3009149]

installed software:

cups-lib-1.3.9-1.x86_64
gcc-4.3.3-6.x86_64
glibc-2.9-5.x86_64
libpcap-1.0.0-3.x86_64
samba-3.3.2-1.x86_64
Comment 1 Volker Lendecke 2009-03-20 05:41:31 UTC
What distribution are you using?

If you are not printing, it might help if you set "printing = bsd"

Volker
Comment 2 Pawel Sikora 2009-03-20 06:51:46 UTC
(In reply to comment #1)
> What distribution are you using?

http://pld-linux.org/
Comment 3 Volker Lendecke 2009-03-22 16:16:53 UTC
Created attachment 4006 [details]
patch

Can you try the attached patch? I've got the vague idea that our mdns register code is flaky. The attached patch replaces it with native avahi code.

Thanks,

Volker
Comment 4 Pawel Sikora 2009-03-23 08:52:42 UTC
the patch seems to work. no crashes so far...
Comment 5 Volker Lendecke 2009-03-23 09:05:11 UTC
It used to crash more frequently before? So, how certain are you that it fixes it? :-) 

Volker
Comment 6 Pawel Sikora 2009-03-23 09:15:00 UTC
(In reply to comment #5)
> It used to crash more frequently before? So, how certain are you that it fixes
> it? :-) 

w/o this patch it crashes few times per hour.
so far, with this patch it works (since ~8 hours) w/o any crash.
Comment 7 Volker Lendecke 2009-03-24 01:52:07 UTC
Thanks for verifying this. I've checked in the patch, will be in next 3.3 and following releases.

Volker