TDB mutex support breaks CTDB
Stefan (metze) Metzmacher
metze at samba.org
Wed Dec 17 02:51:57 MST 2014
Am 17.12.2014 um 10:03 schrieb Ralph Böhme:
> Hi Amitay,
>
> On Wed, Dec 17, 2014 at 07:48:33PM +1100, Amitay Isaacs wrote:
>> I am trying to test samba+ctdb with these changes using nbench torture
>> test, however smbd is crashing in brlock. I am not sure if this is related
>> or something else is going wrong. I have attached gdb backtrace. If you
>> have any ideas on how to debug this, please let me know.
>
> hey, I just ran into this just yesterday too, sounds like the same
> issue. gdb:
>
> #6 <signal handler called>
> No symbol table info available.
> #7 0x00007fcfdc8120b5 in brl_conflict_other (lock=0x0, rw_probe=0x7fffab1a3300) at ../source3/locking/brlock.c:233
> No locals.
> #8 0x00007fcfdc814398 in brl_locktest (br_lck=0x7fcfde974870, rw_probe=0x7fffab1a3300) at ../source3/locking/brlock.c:1385
> ret = true
> i = 0
> locks = 0x0
> fsp = 0x7fcfde974a20
> __FUNCTION__ = "brl_locktest"
> #9 0x00007fcfdc80e80a in strict_lock_default (fsp=0x7fcfde974a20, plock=0x7fffab1a3300) at ../source3/locking/locking.c:139
> br_lck = 0x7fcfde974870
> strict_locking = 2
> ret = false
> __FUNCTION__ = "strict_lock_default"
> #10 0x00007fcfdc86cd7c in vfswrap_strict_lock (handle=0x7fcfde967060, fsp=0x7fcfde974a20, plock=0x7fffab1a3300) at ../source3/modules/vfs_default.c:2293
> __FUNCTION__ = "vfswrap_strict_lock"
>
> For some reason locks is NULL. My band aid wad disabling strict locking.
I think I found the problem, it's regression introduced with the leases
code.
A possible fix is attached...
metze
-------------- next part --------------
From 725492afcc6faa56f9f58fdf8e99f37167f98bdc Mon Sep 17 00:00:00 2001
From: Stefan Metzmacher <metze at samba.org>
Date: Wed, 17 Dec 2014 10:43:33 +0100
Subject: [PATCH] s3:locking: fix uninitialiazed variable in
brl_get_locks_readonly_parser()
In a cluster this can be called with an empty record, while
brl_parse_data() relies on an initialized structure.
This is a regression in commit 0dfdd8a3351f0e35a50813e34a0ce59b9c456ba6.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10911
Signed-off-by: Stefan Metzmacher <metze at samba.org>
---
source3/locking/brlock.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c
index 6c73c72..7fd3783 100644
--- a/source3/locking/brlock.c
+++ b/source3/locking/brlock.c
@@ -2014,6 +2014,7 @@ static void brl_get_locks_readonly_parser(TDB_DATA key, TDB_DATA data,
*state->br_lock = NULL;
return;
}
+ *br_lck = (struct byte_range_lock) {};
if (!brl_parse_data(br_lck, data)) {
*state->br_lock = NULL;
return;
--
1.9.1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20141217/95f76a53/attachment.pgp>
More information about the samba-technical
mailing list