smbd main process stuck on fcntl() in samba cluster

zhangzujian.7 zhangzujian.7 at gmail.com
Tue Jun 13 09:55:39 UTC 2017


Hi, all:

In my environment (samba cluster with ctdb, v4.6.5, CentOS 6.4), if I start ctdb service in shell with command 'service ctdb start', everything is OK.
In my C++ program, ctdb service is started by 'system("service ctdb start")', but smb service is stuck.

I found that the main smbd process is stuck. I tried `gdb -p $PID_OF_SMBD` and command bt showed the following information:

#0  0x00007fd44a7ba765 in fcntl () from /lib64/libpthread.so.0
#1  0x00007fd444888338 in fcntl_lock () from /opt/samba/lib/private/libtdb.so.1
#2  0x00007fd444888474 in tdb_brlock () from /opt/samba/lib/private/libtdb.so.1
#3  0x00007fd4448889d1 in tdb_nest_lock () from /opt/samba/lib/private/libtdb.so.1
#4  0x00007fd444888c1b in tdb_lock_list () from /opt/samba/lib/private/libtdb.so.1
#5  0x00007fd444888cc3 in tdb_lock () from /opt/samba/lib/private/libtdb.so.1
#6  0x00007fd444885603 in tdb_find_lock_hash () from /opt/samba/lib/private/libtdb.so.1
#7  0x00007fd444885a85 in tdb_parse_record () from /opt/samba/lib/private/libtdb.so.1
#8  0x00007fd447a94e8c in db_ctdb_ltdb_parse () from /opt/samba/lib/private/libsamba-cluster-support-samba4.so
#9  0x00007fd447a9803d in db_ctdb_parse_record () from /opt/samba/lib/private/libsamba-cluster-support-samba4.so
#10 0x00007fd443fd174b in dbwrap_parse_record () from /opt/samba/lib/private/libdbwrap-samba4.so
#11 0x00007fd443fd13c1 in dbwrap_fetch () from /opt/samba/lib/private/libdbwrap-samba4.so
#12 0x00007fd447456792 in secrets_fetch () from /opt/samba/lib/private/libsecrets3-samba4.so
#13 0x00007fd447457e2b in secrets_fetch_domain_sid () from /opt/samba/lib/private/libsecrets3-samba4.so
#14 0x00007fd4474594c3 in pdb_generate_sam_sid () from /opt/samba/lib/private/libsecrets3-samba4.so
#15 0x00007fd447459ab9 in get_global_sam_sid () from /opt/samba/lib/private/libsecrets3-samba4.so
#16 0x00007fd44abf9735 in main ()

I also tried to stop smb service and restart it again manually, but it didn't work at all.
But if I stop ctdb service and then start ctdb service in shell, there will be no such problem.

Actually, a similar problem occurred also in version 4.5.8. I could not solve the problem so I tried to upgrade samba to v4.6.5.

Sent from YoMail for Gmail


More information about the samba-technical mailing list