samba4.winbind.struct flapping test uncovers a real issue

Stefan Metzmacher metze at samba.org
Mon Dec 14 12:52:25 UTC 2015


Am 06.10.2014 um 20:25 schrieb Andrew Bartlett:
> On Mon, 2014-10-06 at 13:54 +0200, Michael Adam wrote:
>> On 2014-10-06 at 13:14 +0200, Volker Lendecke wrote:
>>> On Mon, Oct 06, 2014 at 11:25:22AM +0200, Michael Adam wrote:
>>>> Hi Andrew,
>>>>
>>>> It is great that you looked at it and were able to
>>>> apparently hunt it down!
>>>> I am currently looking at the patches and doing
>>>> a few tests.
>>>>
>>>> Will push them with some line-lenght adaption
>>>> if all goes well.
>>>>
>>>
>>> The only comment I have: DEBUG(0 usually goes to syslog. Is this really
>>> worth going there? Isn't DEBUG(1 better? This only ends up in log.winbind
>>
>> Very good point.
>> I changed all added DEBUGS to 1.
>> Pushing to autobuild.
> 
> Thanks!  Any thoughts on what further we should to to blacklist such a
> server?  Currently the connection still stands, we just don't update the
> domains list.

Sadly the test is still flakey :-(

The following patch gives a bit more information in the output
and hopefully helps finding the real problem.

Please review and push, thanks!

metze
-------------- next part --------------
From 72f3a4e6c58f539328ac03fdb6f44065827b36a0 Mon Sep 17 00:00:00 2001
From: Stefan Metzmacher <metze at samba.org>
Date: Fri, 11 Dec 2015 08:52:59 +0100
Subject: [PATCH] s4:torture/winbind: add more debug output to
 samba4.winbind.struct.domain_info

With this we hopefully find the reason for the following flakey test:

  [1566(10157)/1882 at 1h47m18s] samba4.winbind.struct(ad_member:local)
  Running WINBINDD_DOMAIN_INFO (struct based)
  DOMAIN 'BUILTIN' => '' [ ] [S-1-5-32]
  DOMAIN 'LOCALADMEMBER' => '' [ ] [S-1-5-21-4121020324-2900821022-46155812]
  DOMAIN 'SAMBADOMAIN' => 'samba.example.com' [ PR AD NA ] [S-1-5-21-929009974-669086582-3038401809]
  DOMAIN 'TORTURE300' => 'torturedom300.samba._none_.example.com' [ AD NA ] [S-1-5-21-97398-379795-300]
  DOMAIN 'TORTURE301' => 'torturedom301.samba._none_.example.com' [ AD NA ] [S-1-5-21-97398-379795-301]
  DOMAIN 'TORTURE302' => 'torturedom302.samba._none_.example.com' [ AD NA ] [S-1-5-21-97398-379795-302]
  DOMAIN 'TORTURE303' => 'torturedom303.samba._none_.example.com' [ AD NA ] [S-0-0]
  UNEXPECTED(failure): samba4.winbind.struct.domain_info(ad_member:local)
  REASON: Exception: Exception: ../source4/torture/winbind/struct_based.c:460:
  Expression `ok' failed: SID's doesn't match

With the changes we get:

  [1566(10158)/1882 at 1h47m51s] samba4.winbind.struct(ad_member:local)
  Running WINBINDD_DOMAIN_INFO (struct based)
  LIST[0] 'BUILTIN' => '' [S-1-5-32]
  LIST[1] 'LOCALADMEMBER' => '' [S-1-5-21-734569583-677146317-1850798319]
  LIST[2] 'SAMBADOMAIN' => 'samba.example.com' [S-1-5-21-1870621479-3245899124-866531092]
  LIST[3] 'TORTURE300' => 'torturedom300.samba._none_.example.com' [S-1-5-21-97398-379795-300]
  LIST[4] 'TORTURE301' => 'torturedom301.samba._none_.example.com' [S-1-5-21-97398-379795-301]
  LIST[5] 'TORTURE302' => 'torturedom302.samba._none_.example.com' [S-1-5-21-97398-379795-302]
  LIST[6] 'TORTURE303' => 'torturedom303.samba._none_.example.com' [S-1-0-0]
  LIST[7] 'TORTURE304' => 'torturedom304.samba._none_.example.com' [S-1-0-0]
  LIST[8] 'TORTURE305' => 'torturedom305.samba._none_.example.com' [S-1-0-0]
  LIST[9] 'TORTURE306' => 'torturedom306.samba._none_.example.com' [S-1-5-21-97398-379795-306]
  LIST[10] 'TORTURE307' => 'torturedom307.samba._none_.example.com' [S-1-5-21-97398-379795-307]
  LIST[11] 'TORTURE308' => 'torturedom308.samba._none_.example.com' [S-1-5-21-97398-379795-308]
  LIST[12] 'TORTURE309' => 'torturedom309.samba._none_.example.com' [S-1-5-21-97398-379795-309]
  LIST[13] 'TORTURE310' => 'torturedom310.samba._none_.example.com' [S-1-5-21-97398-379795-310]
  LIST[14] 'TORTURE311' => 'torturedom311.samba._none_.example.com' [S-1-5-21-97398-379795-311]
  DOMAIN[0] 'BUILTIN' => '' [ ] [S-1-5-32]
  DOMAIN[1] 'LOCALADMEMBER' => '' [ ] [S-1-5-21-734569583-677146317-1850798319]
  DOMAIN[2] 'SAMBADOMAIN' => 'samba.example.com' [ PR AD NA ] [S-1-5-21-1870621479-3245899124-866531092]
  DOMAIN[3] 'TORTURE300' => 'torturedom300.samba._none_.example.com' [ AD NA ] [S-1-5-21-97398-379795-300]
  DOMAIN[4] 'TORTURE301' => 'torturedom301.samba._none_.example.com' [ AD NA ] [S-1-5-21-97398-379795-301]
  DOMAIN[5] 'TORTURE302' => 'torturedom302.samba._none_.example.com' [ AD NA ] [S-1-5-21-97398-379795-302]
  DOMAIN[6] 'TORTURE303' => 'torturedom303.samba._none_.example.com' [ AD NA ] [S-0-0]
  UNEXPECTED(failure): samba4.winbind.struct.domain_info(ad_member:local)
  REASON: Exception: Exception: ../source4/torture/winbind/struct_based.c:471: Expression `ok' failed: SID's doesn't match [S-1-0-0] != [S-0-0]

Signed-off-by: Stefan Metzmacher <metze at samba.org>
---
 source4/torture/winbind/struct_based.c | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/source4/torture/winbind/struct_based.c b/source4/torture/winbind/struct_based.c
index a7b6bfd..1a84a7a 100644
--- a/source4/torture/winbind/struct_based.c
+++ b/source4/torture/winbind/struct_based.c
@@ -417,6 +417,14 @@ static bool torture_winbind_struct_domain_info(struct torture_context *torture)
 	torture_assert(torture, ok, "failed to get trust list");
 
 	for (i=0; listd && listd[i].netbios_name; i++) {
+		torture_comment(torture, "LIST[%u] '%s' => '%s' [%s]\n",
+				(unsigned)i,
+				listd[i].netbios_name,
+				listd[i].dns_name,
+				dom_sid_string(torture, listd[i].sid));
+	}
+
+	for (i=0; listd && listd[i].netbios_name; i++) {
 		struct winbindd_request req;
 		struct winbindd_response rep;
 		struct dom_sid *sid;
@@ -447,7 +455,8 @@ static bool torture_winbind_struct_domain_info(struct torture_context *torture)
 			flagstr = talloc_strdup_append(flagstr, "NA ");
 		}
 
-		torture_comment(torture, "DOMAIN '%s' => '%s' [%s] [%s]\n",
+		torture_comment(torture, "DOMAIN[%u] '%s' => '%s' [%s] [%s]\n",
+				(unsigned)i,
 				rep.data.domain_info.name,
 				rep.data.domain_info.alt_name,
 				flagstr,
@@ -457,7 +466,9 @@ static bool torture_winbind_struct_domain_info(struct torture_context *torture)
 		torture_assert(torture, sid, "Failed to parse SID");
 
 		ok = dom_sid_equal(listd[i].sid, sid);
-		torture_assert(torture, ok, "SID's doesn't match");
+		torture_assert(torture, ok, talloc_asprintf(torture, "SID's doesn't match [%s] != [%s]",
+			       dom_sid_string(torture, listd[i].sid),
+			       dom_sid_string(torture, sid)));
 
 		torture_assert_str_equal(torture,
 					 rep.data.domain_info.name,
-- 
1.9.1

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20151214/c51f0bc3/signature.sig>


More information about the samba-technical mailing list