Bug 16077 - witness test flappy needs to be fixed
Summary: witness test flappy needs to be fixed
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Test infrastructure (show other bugs)
Version: 4.24.2
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Samba release manager
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-05-12 11:04 UTC by Björn Jacke
Modified: 2026-09-01 21:57 UTC (History)
1 user (show)

See Also:


Attachments
backport for 4.24 and 4.23 (824 bytes, patch)
2026-08-06 18:11 UTC, Björn Jacke
metze: review-
Details
backport patch for 4.23 and 4.24 (4.11 KB, patch)
2026-08-10 16:55 UTC, Björn Jacke
metze: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Björn Jacke 2026-05-12 11:04:47 UTC
the witness test should become more stable or get marked flapping, this needs also be fixed for the release branches then:

[11(53)/11 at 1m4s] samba.tests.blackbox.rpcd_witness_samba_only(clusteredmember:local)
UNEXPECTED(error): samba.tests.blackbox.rpcd_witness_samba_only.samba.tests.blackbox.rpcd_witness_samba_only.RpcdWitnessSambaTests.test_net_witness_force_response_ip_changes(clusteredmember:local)
REASON: Exception: Exception: Traceback (most recent call last):
  File "/m/bjacke/a424/b3240057/samba-ctdb/bin/python/samba/tests/blackbox/rpcd_witness_samba_only.py", line 1335, in test_net_witness_force_response_ip_changes
    self._test_net_witness_force_response_generic_moves(msg_type)
  File "/m/bjacke/a424/b3240057/samba-ctdb/bin/python/samba/tests/blackbox/rpcd_witness_samba_only.py", line 1322, in _test_net_witness_force_response_generic_moves
    self._test_net_witness_force_response(msg_type=msg_type,
  File "/m/bjacke/a424/b3240057/samba-ctdb/bin/python/samba/tests/blackbox/rpcd_witness_samba_only.py", line 1276, in _test_net_witness_force_response
    self.check_combinations(check_force_response)
  File "/m/bjacke/a424/b3240057/samba-ctdb/bin/python/samba/tests/blackbox/rpcd_witness_samba_only.py", line 939, in check_combinations
    all_regs = self.prepare_all_registrations()
  File "/m/bjacke/a424/b3240057/samba-ctdb/bin/python/samba/tests/blackbox/rpcd_witness_samba_only.py", line 569, in prepare_all_registrations
    conn = witness.witness(binding_string, self.lp, self.remote_creds)
samba.NTSTATUSError: (3221225653, '{Device Timeout} The specified I/O operation on %hs was not completed before the time-out period expired.')

FAILED (0 failures, 1 errors and 0 unexpected successes in 0 testsuites)
Comment 1 Björn Jacke 2026-06-27 16:47:59 UTC
hit this a number of times since it was reported. Even with only a single autobuld running this returns i/o timeouts randomly. If this cannot be fixed now, can we mark this flapping?
Comment 2 Björn Jacke 2026-08-03 18:50:14 UTC
please mark this as flapping, too until time permits to find the root cause.
Comment 3 Samba QA Contact 2026-08-06 15:27:04 UTC
This bug was referenced in samba master:

a871fae0b94fae5b052f14ae06cf3400b4a0ef33
Comment 4 Björn Jacke 2026-08-06 18:11:10 UTC
Created attachment 19151 [details]
backport for 4.24 and 4.23
Comment 5 Stefan Metzmacher 2026-08-07 15:25:13 UTC
Comment on attachment 19151 [details]
backport for 4.24 and 4.23

This doesn't work :-(

[14(82)/14 at 2m52s] samba.tests.blackbox.rpcd_witness_samba_only(clusteredmember:local)
UNEXPECTED(error): samba.tests.blackbox.rpcd_witness_samba_only.samba.tests.blackbox.rpcd_witness_samba_only.RpcdWitnessSambaTests.test_net_witness_force_unregister(clusteredmember:local)
REASON: Exception: Exception: Traceback (most recent call last):
  File "/m/metze/aMASTER/b3118864/samba-ctdb/bin/python/samba/tests/blackbox/rpcd_witness_samba_only.py", line 1185, in test_net_witness_force_unregister
    self.check_combinations(check_force_unregister)
  File "/m/metze/aMASTER/b3118864/samba-ctdb/bin/python/samba/tests/blackbox/rpcd_witness_samba_only.py", line 939, in check_combinations
    all_regs = self.prepare_all_registrations()
  File "/m/metze/aMASTER/b3118864/samba-ctdb/bin/python/samba/tests/blackbox/rpcd_witness_samba_only.py", line 569, in prepare_all_registrations
    conn = witness.witness(binding_string, self.lp, self.remote_creds)
samba.NTSTATUSError: (3221225653, '{Device Timeout} The specified I/O operation on %hs was not completed before the time-out period expired.')


It's an error not a failure so it can't be marked flapping...
The python code and an expection to handle samba.NTSTATUSError
and wrap it into a AssertionExpection
Comment 6 Stefan Metzmacher 2026-08-10 15:14:53 UTC
(In reply to Stefan Metzmacher from comment #5)

This should make it work and needs some review:
https://gitlab.com/samba-team/samba/-/merge_requests/4660
Comment 7 Samba QA Contact 2026-08-10 16:43:12 UTC
This bug was referenced in samba master:

f16269a6fc586071da81052ee4e76827e5b774be
Comment 8 Björn Jacke 2026-08-10 16:55:42 UTC
Created attachment 19157 [details]
backport patch for 4.23 and 4.24
Comment 9 Samba QA Contact 2026-08-11 18:23:28 UTC
This bug was referenced in samba v4-23-test:

948b4f39ae78475520dc980490e8c87800f14082
d57ed1c0927c4e5be00c1f4d9f7d96eec20bc31c
Comment 10 Samba QA Contact 2026-08-11 19:20:20 UTC
This bug was referenced in samba v4-24-test:

4906c4d490523c0e6d81998ccada33953e780dc2
71c1e9f2f8604a956a6127d2908a4b960df8b93c
Comment 11 Samba QA Contact 2026-08-13 14:31:34 UTC
This bug was referenced in samba v4-24-stable (Release samba-4.24.6):

4906c4d490523c0e6d81998ccada33953e780dc2
71c1e9f2f8604a956a6127d2908a4b960df8b93c
Comment 12 Samba QA Contact 2026-09-01 21:57:46 UTC
This bug was referenced in samba v4-23-stable (Release samba-4.23.12):

948b4f39ae78475520dc980490e8c87800f14082
d57ed1c0927c4e5be00c1f4d9f7d96eec20bc31c