Bug 9496 - AFP. Netatalk Panic
Summary: AFP. Netatalk Panic
Status: RESOLVED INVALID
Alias: None
Product: Samba 3.6
Classification: Unclassified
Component: User & Group Accounts (show other bugs)
Version: 3.6.9
Hardware: All All
: P2 major
Target Milestone: ---
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-12 12:48 UTC by Ranjan
Modified: 2013-01-24 09:32 UTC (History)
2 users (show)

See Also:


Attachments
detailed log (118.87 KB, text/plain)
2013-01-16 15:20 UTC, Ranjan
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ranjan 2012-12-12 12:48:09 UTC
Hi i have recently upgraded the samba version(3.6.9) and i'm running an AFP server on my PC(Debian). I have configured with netatalk version 2.2.4 and i have made configuration changes in afpd.conf and Applevolumes.default file. When i tried to access the share using my login credentials it is throwing error and some messages in /var/log/messages. But through a guest user i was able to access the device. I got some messages while accessing a share using my login credentials.

Oct 17 23:41:44   afpd[23169]:
===============================================================
Oct 17 23:41:44   afpd[23169]: INTERNAL ERROR: Signal 11 in pid
23169 (2.2.2)
Oct 17 23:41:44   afpd[23169]:
===============================================================
Oct 17 23:41:44   afpd[23169]: BACKTRACE: 27 stack frames:
Oct 17 23:41:44   afpd[23169]:  #0
/usr/sbin/afpd(netatalk_panic+0x23) [0x4609b4]
Oct 17 23:41:44   afpd[23169]:  #1 /usr/sbin/afpd [0x460b87]
Oct 17 23:41:44   afpd[23169]:  #2 /usr/sbin/afpd [0x460bd9]
Oct 17 23:41:44   afpd[23169]:  #3 /lib/libc.so.6
[0x7fe83bbcef60]
Oct 17 23:41:44   afpd[23169]:  #4 /usr/lib/libtdb.so.1
[0x7fe838de1d80]
Oct 17 23:41:44   afpd[23169]:  #5
/usr/lib/libtdb.so.1(tdb_have_extra_locks+0x45) [0x7fe838de2f89]
Oct 17 23:41:44   afpd[23169]:  #6 /usr/lib/libtdb.so.1
[0x7fe838ddd242]
Oct 17 23:41:44   afpd[23169]:  #7
/usr/lib/libtdb.so.1(tdb_transaction_start+0x1a) [0x7fe838ddd626]
Oct 17 23:41:44   afpd[23169]:  #8 /lib/security/pam_smbpass.so
[0x7fe83842e122]
Oct 17 23:41:44   afpd[23169]:  #9
/lib/security/pam_smbpass.so(get_global_sam_sid+0x4e) [0x7fe8384e9af9]
Oct 17 23:41:44   afpd[23169]:  #10
/lib/security/pam_smbpass.so(pdb_set_user_sid_from_rid+0x27) [0x7fe838498e71]
Oct 17 23:41:44   afpd[23169]:  #11 /lib/security/pam_smbpass.so
[0x7fe83848e3be]
Oct 17 23:41:44   afpd[23169]:  #12
/lib/security/pam_smbpass.so(samu_set_unix+0x22) [0x7fe83848e411]
Oct 17 23:41:44   afpd[23169]:  #13 /lib/security/pam_smbpass.so
[0x7fe8384ba35d]
Oct 17 23:41:44   afpd[23169]:  #14 /lib/security/pam_smbpass.so
[0x7fe8384ba65c]
Oct 17 23:41:44   afpd[23169]:  #15
/lib/security/pam_smbpass.so(pdb_getsampwnam+0x2f) [0x7fe8384944c8]
Oct 17 23:41:44   afpd[23169]:  #16
/lib/security/pam_smbpass.so(pam_sm_authenticate+0x2a2) [0x7fe8383e447e]
Oct 17 23:41:44   afpd[23169]:  #17 /lib/libpam.so.0
[0x7fe83cb8dc42]
Oct 17 23:41:44   afpd[23169]:  #18
/lib/libpam.so.0(pam_authenticate+0x43) [0x7fe83cb8d523]
Oct 17 23:41:44   afpd[23169]:  #19
/usr/lib/netatalk/uams_dhx2.so [0x7fe83a65cdba]
Oct 17 23:41:44   afpd[23169]:  #20
/usr/lib/netatalk/uams_dhx2.so [0x7fe83a65d10f]
Oct 17 23:41:44   afpd[23169]:  #21
/usr/sbin/afpd(afp_logincont+0xa9) [0x41608d]
Oct 17 23:41:44   afpd[23169]:  #22
/usr/sbin/afpd(afp_over_dsi+0xa6b) [0x40fe68]
Oct 17 23:41:44   afpd[23169]:  #23 /usr/sbin/afpd [0x40dd91]
Oct 17 23:41:44   afpd[23169]:  #24 /usr/sbin/afpd(main+0xa85)
[0x4323ce]
Oct 17 23:41:44   afpd[23169]:  #25
/lib/libc.so.6(__libc_start_main+0xe6) [0x7fe83bbbb1a6]
Oct 17 23:41:44   afpd[23169]:  #26 /usr/sbin/afpd [0x40db59]


But the following scenerio was working with samba version(3.5.15) and netatalk Version(2.2.4).....

I'm using PAM for authentication. i need to know y its working with samba version(3.5.15) and why its not working with samba version(3.6.9)
Comment 1 Volker Lendecke 2013-01-14 20:02:46 UTC
can you install the samba debuginfo package for the pam module? Maybe we can see what's going on. Maybe it might be even possible to run netatalk under valgrind and get us the output?
Comment 2 Ranjan 2013-01-16 15:20:33 UTC
Created attachment 8438 [details]
detailed log


Hi Volker,

I enabled debug info in samba and i got some core generated, when i tried using backtrace i got some trace of this sort.

Program terminated with signal 6, Aborted.
[New process 5749]
#0  0x00007f50d63c2ed5 in raise () from /lib/libc.so.6
(gdb) bt
#0  0x00007f50d63c2ed5 in raise () from /lib/libc.so.6
#1  0x00007f50d63c43f3 in abort () from /lib/libc.so.6
#2  0x0000000000464386 in ?? ()
#3  0x0000000000464399 in ?? ()
#4  <signal handler called>
#5  0x00007f50d35d5d84 in find_nestlock (tdb=0xd2e060, offset=4) at ../lib/tdb/common/lock.c:249
#6  0x00007f50d35d6f8d in tdb_have_extra_locks (tdb=0xd2e060) at ../lib/tdb/common/lock.c:825
#7  0x00007f50d35d1242 in _tdb_transaction_start (tdb=0xd2e060, lockflags=TDB_LOCK_WAIT) at ../lib/tdb/common/transaction.c:446
#8  0x00007f50d35d1626 in tdb_transaction_start (tdb=0xd2e060) at ../lib/tdb/common/transaction.c:534
#9  0x00007f50d2c22172 in db_tdb_transaction_start (db=0xd2ddf0) at lib/dbwrap_tdb.c:319
#10 0x00007f50d2cddcb5 in get_global_sam_sid () at passdb/machine_sid.c:207
#11 0x00007f50d2c8d03d in pdb_set_user_sid_from_rid (sampass=0xd2f570, rid=3000, flag=PDB_SET) at passdb/pdb_compat.c:60
#12 0x00007f50d2c8258a in samu_set_unix_internal (user=0xd2f570, pwd=0xd2f9e0, create=false) at passdb/passdb.c:272
#13 0x00007f50d2c825dd in samu_set_unix (user=0xd2f570, pwd=0xd2f9e0) at passdb/passdb.c:285
#14 0x00007f50d2cae529 in build_sam_account (smbpasswd_state=0xd2e9b0, sam_pass=0xd2f570, pw_buf=0xd2e9c0) at passdb/pdb_smbpasswd.c:1255
#15 0x00007f50d2cae828 in smbpasswd_getsampwnam (my_methods=0xd2e790, sam_acct=0xd2f570, username=0xd28300 "Admin") at passdb/pdb_smbpasswd.c:1321
#16 0x00007f50d2c88694 in pdb_getsampwnam (sam_acct=0xd2f570, username=0xd28300 "Admin") at passdb/pdb_interface.c:321
#17 0x00007f50d2bd84ce in pam_sm_authenticate (pamh=0xd28180, flags=0, argc=1, argv=0xd28700) at pam_smbpass/pam_smb_auth.c:128
#18 0x00007f50d7588c42 in ?? () from /lib/libpam.so.0
#19 0x00007f50d7588523 in pam_authenticate () from /lib/libpam.so.0
#20 0x00007f50d4e50e1a in ?? () from /usr/lib/netatalk/uams_dhx2.so
#21 0x00007f50d4e5116f in ?? () from /usr/lib/netatalk/uams_dhx2.so
#22 0x0000000000417e8d in afp_logincont ()
#23 0x0000000000410e6c in afp_over_dsi ()
#24 0x000000000040e758 in ?? ()
#25 0x00000000004345fa in main ()

I have attatched a file which gives the detailed info about the disassembly , please take a look at it.

This is my samba configuration.

                ./configure \
                --build=$(GNU_HOST_NAME) \
                --libdir=/usr/lib64 \
                --host=$(GNU_TARGET_NAME) \
                --prefix=$(SAMBA_PREFIX) \
                $(SAMBA_LOCALSTATEDIR_SETTING) \
                --disable-pie \
                --disable-cups \
                --disable-iprint \
                --with-fhs \
                --with-syslog \
                --enable-shared \
                --enable-static \
                --enable-debug \
                --with-configdir=/etc/samba \
                --with-libtalloc \
                --with-libtdb \
                --with-logfilebase=/tmp/samba \
                --enable-external-libtdb=no \
                --enable-external-libtalloc=no \
                --enable-external-libtevent=no \
                --enable-external-libldb=no \
                --enable-external-libnetapi=yes \
                --with-lockdir=/tmp/samba \
                --with-piddir=/tmp/samba \
                --with-swatdir=/tmp/samba \
                --with-privatedir=/etc/samba/private \
                --with-sendfile-support \
                --with-ldap \
                --with-ads \
                --with-krb5=$(TARGET_DIR)/usr/lib \
                --with-pam \
                --with-syslog \
                --with-utmp \
                --with-pammodulesdir=/lib/security \
                --with-pam_smbpass \
                --with-winbind \
                --with-acl-support \
                --with-cifsumount \
                --with-libiconv=$(TARGET_DIR)/usr \
                --with-pthreads \
                --with-dnsupdate \
                --with-cachedir=$(SAMBA_CACHE_DIR) \
                --disable-avahi \
                --with-shared-modules=idmap_ad,idmap_rid,idmap_adex,idmap_hash,idmap_ldap,idmap_tdb2 \
        );
        touch $(SAMBA_DIR)/.configure


With samba version(3.6.9) i compiled samba without internal and external libtdb, i was able to access the shares (public and private ) using registered users via AFP. But i need libtdb because i'm using it as a database, so please help me to resolve this problem and find a solution.
Comment 3 Ranjan 2013-01-24 09:32:19 UTC
The problem was in netatalk package as the tdb_context used by netatalk was not compatible with the tdb_context of samba-3.6.9 , hence the panic arised. removed cnid_tdb backend while configuring netatatlk . hence closing the bug as invalid