gencache bug in master?
Andreas Schneider
asn at samba.org
Fri Jun 23 15:58:05 UTC 2017
Hi,
with current master there is no CURRENT_DCNAME/SAMBADOMAIN written to the
gencache database!
make -j testenv SELFTEST_TESTENV="ad_member" SCREEN=1 WINBINDD_OPTIONS=-d10
In the log file I see:
[2017/06/23 17:47:01.661145, 10, pid=8381, effective(0, 0), real(0, 0),
class=winbind] ../source3/winbindd/winbindd_cm.c:481(set_domain_online)
set_domain_online: called for domain SAMBADOMAIN
[2017/06/23 17:47:01.661188, 10, pid=8381, effective(0, 0), real(0, 0)] ../
source3/lib/messages_dgm.c:1343(messaging_dgm_send)
messaging_dgm_send: Sending message to 8380
[2017/06/23 17:47:01.661211, 0, pid=8381, effective(0, 0), real(0, 0),
class=winbind] ../source3/winbindd/winbindd_cm.c:
1722(store_current_dc_in_gencache)
store_current_dc_in_gencache: XXXXXX KEY: CURRENT_DCNAME/SAMBADOMAIN, VALUE:
127.0.0.21 localdc.samba.example.com
[2017/06/23 17:47:01.661231, 10, pid=8381, effective(0, 0), real(0, 0),
class=tdb] ../source3/lib/gencache.c:324(gencache_set_data_blob)
Adding cache entry with key=[CURRENT_DCNAME/SAMBADOMAIN] and timeout=[Thu
Jan 1 01:00:00 1970 CET] (-1498232821 seconds in the past)
[2017/06/23 17:47:01.661242, 10, pid=8380, effective(0, 0), real(0, 0)] ../
source4/lib/messaging/messaging.c:527(imessaging_dgm_recv)
[2017/06/23 17:47:01.661259, 10, pid=8381, effective(0, 0), real(0, 0),
class=tdb] ../source3/lib/gencache.c:324(gencache_set_data_blob)
imessaging_dgm_recv: dst 8380 matches my id: 8380, type=0x40b
Adding cache entry with key=[CURRENT_DCNAME/SAMBADOMAIN] and timeout=[Tue
Jan 19 04:14:07 2038 CET] (649250826 seconds ahead)
[2017/06/23 17:47:01.661270, 10, pid=8380, effective(0, 0), real(0, 0)] ../
source3/lib/messages.c:203(messaging_recv_cb)
messaging_recv_cb: Received message 0x40b len 12 (num_fds:0) from 8381
[2017/06/23 17:47:01.661286, 10, pid=8381, effective(0, 0), real(0, 0),
class=winbind] ../source3/winbindd/winbindd_cm.c:2591(set_dc_type_and_flags)
[2017/06/23 17:47:01.661287, 10, pid=8380, effective(0, 0), real(0, 0)] ../
source3/lib/messages.c:203(messaging_recv_cb)
set_dc_type_and_flags: setting up flags for primary or internal domain
messaging_recv_cb: Received message 0x40b len 12 (num_fds:0) from 8381
[2017/06/23 17:47:01.661299, 5, pid=8381, effective(0, 0), real(0, 0),
class=winbind] ../source3/winbindd/winbindd_cm.c:
2328(set_dc_type_and_flags_connect)
[2017/06/23 17:47:01.661302, 10, pid=8380, effective(0, 0), real(0, 0),
class=winbind] ../source3/winbindd/winbindd_cm.c:
386(winbind_msg_domain_online)
set_dc_type_and_flags_connect: domain SAMBADOMAIN
Domain SAMBADOMAIN is marked as online now.
The first strange thing is that there are *two* debug messages for
gencache_set_data_blob(). I don't understand where the second message is
produced.
If I dump the gencache*.tdb I have:
$ tdbdump st/ad_member/lockdir/gencache.tdb
$ tdbdump st/ad_member/lockdir/gencache_notrans.tdb
{
key(21) = "IDMAP/GID2SID/100001\00"
data(26) = " 1498837992/S-1-5-32-545\00"
}
{
key(17) = "@LAST_STABILIZED\00"
data(11) = "1498233192\00"
}
{
key(27) = "IDMAP/SID2XID/S-1-5-32-545\00"
data(22) = " 1498837992/100001:G\00"
}
The log states that gencache_set_data_blob wrote the key CURRENT_DCNAME/
SAMBADOMAIN but as the tdbdump shows, there is not such value in the database.
What fixes the issue for me is:
diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c
index 7566a30..b5f2546 100644 (file)
--- a/source3/winbindd/winbindd_cm.c
+++ b/source3/winbindd/winbindd_cm.c
@@ -1942,6 +1942,7 @@ static NTSTATUS cm_open_connection(struct
winbindd_domain *domain,
}
set_domain_online(domain);
+ sleep(1);
/*
* Much as I hate global state, this seems to be the point
* where we can be certain that we have a proper connection to
a) Why is there a double debug statement?
b) What could cause the issue?
Andreas
--
Andreas Schneider GPG-ID: CC014E3D
Samba Team asn at samba.org
www.samba.org
More information about the samba-technical
mailing list