[PATCH] avoid lock oder violation between xattr.tdb and g_lock.tdb
Steve French
smfrench at gmail.com
Wed Jul 20 17:03:07 UTC 2016
On Wed, Jul 20, 2016 at 12:51 AM, Volker Lendecke <vl at samba.org> wrote:
> On Tue, Jul 19, 2016 at 08:47:47PM -0500, Steve French wrote:
>> Running this series of Volker's patches on 4.4-test (adding the one earlier
>> patch needed for the missing #define SERVER_ID_BUF_LENGTH
>> ) we got a different oops (in get_share_mode_write_time due to corrupt lock
>> contents).
>>
>> Are there other coreq patches that would need to backport this to 4.4-test
>> (or is it safer to use Michael's original small patch ... or ...)?
>
> Can you reproduce this somehow and get me more info like a stack trace
> or the corrupted contents? And, your exact patchset? I will need to
> backport this to 4.4 and 4.3 for a customer too, so any information
> will be very interesting for me.
>
> Thanks,
>
> Volker
Created large directory tree and did ls -lR (from cifs mount to Samba
4.4-test branch equivalent to about two weeks ago + your patch
series). (By the way Michael's small original patch did work without
problems in the same scenario as an alternative).
#0 0x00007fc99911b5f7 in raise () from /lib64/libc.so.6
#1 0x00007fc99911cce8 in abort () from /lib64/libc.so.6
#2 0x00007fc99a65dc6b in dump_core () from /lib64/libsmbconf.so.0
#3 0x00007fc99a6500f7 in smb_panic_s3 () from /lib64/libsmbconf.so.0
#4 0x00007fc99cf4eadf in smb_panic () from /lib64/libsamba-util.so.0
#5 0x00007fc99cf4ecf6 in sig_fault () from /lib64/libsamba-util.so.0
#6 <signal handler called>
#7 0x00007fc99cb921a4 in get_share_mode_write_time () from
/usr/lib64/samba/libsmbd-base-samba4.so
#8 0x00007fc99cb92258 in get_file_infos () from
/usr/lib64/samba/libsmbd-base-samba4.so
#9 0x00007fc99ca99ff8 in smbd_dirptr_get_entry () from
/usr/lib64/samba/libsmbd-base-samba4.so
#10 0x00007fc99cad4c95 in smbd_dirptr_lanman2_entry () from
/usr/lib64/samba/libsmbd-base-samba4.so
#11 0x00007fc99cb3731c in smbd_smb2_query_directory_send.isra.0 ()
from /usr/lib64/samba/libsmbd-base-samba4.so
#12 0x00007fc99cb37a44 in smbd_smb2_request_process_query_directory ()
from /usr/lib64/samba/libsmbd-base-samba4.so
#13 0x00007fc99cb2274d in smbd_smb2_request_dispatch () from
/usr/lib64/samba/libsmbd-base-samba4.so
Lock contents are garbage
(gdb) f 8
#8 get_share_mode_write_time (lck=lck at entry=0x55b3ef2d2e80) at
../source3/locking/locking.c:1315
1315 if (!null_timespec(d->changed_write_time)) {
(gdb) p *lck
$1 = {data = 0x2e} ß-
(gdb) p lck
$2 = (struct share_mode_lock *) 0x55b3ef2d2e80
(gdb) p d
$3 = (struct share_mode_data *) 0x2e
(gdb) local
Undefined command: "local". Try "help".
(gdb) print d
$4 = (struct share_mode_data *) 0x2e
Thanks,
Steve
More information about the samba-technical
mailing list