Actions
Bug #78116
closed
JM
JM
SMB: teuthology failures testing smb
Bug #78116:
SMB: teuthology failures testing smb
Due date:
% Done:
0%
Source:
Backport:
umbrella
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Tags (freeform):
Merge Commit:
Fixed In:
v21.3.0-864-g25f76754e0
Released In:
Upkeep Timestamp:
2026-08-27T18:40:16+00:00
Description
This is probably the wrong componnent for the teuthology failure, but it's a teuthology test meant to test this component, so let's just go with it:
Teuthology smb.workunit tests are suddenly failing in the TestHostsAccessToggle1 class.
The error appears to be due to a new version of `smbprotocol` getting released on 7/6.
Extended output:
2026-07-09T05:15:17.858 INFO:tasks.workunit.client.0.trial054.stdout:tests/test_ratelimit.py::TestSMBRateLimiting::test_qos_apply_via_resources PASSED [ 81%]
2026-07-09T05:15:17.880 INFO:tasks.workunit.client.0.trial054.stdout:tests/test_simple_smb.py::test_arbitrary_listdir[share1] PASSED [ 84%]
2026-07-09T05:15:17.901 INFO:tasks.workunit.client.0.trial054.stdout:tests/test_simple_smb.py::test_arbitrary_listdir[share2] PASSED [ 87%]
2026-07-09T05:15:17.931 INFO:tasks.workunit.client.0.trial054.stdout:tests/test_simple_smb.py::test_create_dir[share1] PASSED [ 90%]
2026-07-09T05:15:17.964 INFO:tasks.workunit.client.0.trial054.stdout:tests/test_simple_smb.py::test_create_dir[share2] PASSED [ 93%]
2026-07-09T05:15:17.993 INFO:tasks.workunit.client.0.trial054.stdout:tests/test_simple_smb.py::test_create_file[share1] PASSED [ 96%]
2026-07-09T05:15:18.024 INFO:tasks.workunit.client.0.trial054.stdout:tests/test_simple_smb.py::test_create_file[share2] PASSED [100%]
2026-07-09T05:15:18.024 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.024 INFO:tasks.workunit.client.0.trial054.stdout:=================================== FAILURES ===================================
2026-07-09T05:15:18.024 INFO:tasks.workunit.client.0.trial054.stdout:______________ TestHostsAccessToggle1.test_no_access_bogus_allow _______________
2026-07-09T05:15:18.024 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.024 INFO:tasks.workunit.client.0.trial054.stdout:self = <smbclient._io.SMBFileIO object at 0x7cc668c36f50>
2026-07-09T05:15:18.024 INFO:tasks.workunit.client.0.trial054.stdout:path = '\\\\10.20.193.54\\share2\\TestHostAcess1.txt', mode = 'w'
2026-07-09T05:15:18.024 INFO:tasks.workunit.client.0.trial054.stdout:share_access = None, desired_access = None, file_attributes = None
2026-07-09T05:15:18.024 INFO:tasks.workunit.client.0.trial054.stdout:create_options = 0, kwargs = {}
2026-07-09T05:15:18.024 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.024 INFO:tasks.workunit.client.0.trial054.stdout: def __init__(
2026-07-09T05:15:18.024 INFO:tasks.workunit.client.0.trial054.stdout: self, path, mode="r", share_access=None, desired_access=None, file_attributes=None, create_options=0, **kwargs
2026-07-09T05:15:18.024 INFO:tasks.workunit.client.0.trial054.stdout: ):
2026-07-09T05:15:18.024 INFO:tasks.workunit.client.0.trial054.stdout: # get_smb_tree runs outside the SMBFileTransaction layer that normally translates these.
2026-07-09T05:15:18.024 INFO:tasks.workunit.client.0.trial054.stdout: try:
2026-07-09T05:15:18.024 INFO:tasks.workunit.client.0.trial054.stdout:> tree, fd_path = get_smb_tree(path, **kwargs)
2026-07-09T05:15:18.024 INFO:tasks.workunit.client.0.trial054.stdout: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-07-09T05:15:18.024 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.024 INFO:tasks.workunit.client.0.trial054.stdout:_smb_tests_44163/lib/python3.12/site-packages/smbclient/_io.py:386:
2026-07-09T05:15:18.024 INFO:tasks.workunit.client.0.trial054.stdout:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2026-07-09T05:15:18.024 INFO:tasks.workunit.client.0.trial054.stdout:_smb_tests_44163/lib/python3.12/site-packages/smbclient/_pool.py:332: in get_smb_tree
2026-07-09T05:15:18.024 INFO:tasks.workunit.client.0.trial054.stdout: tree.connect(require_secure_negotiate=client_config.require_secure_negotiate)
2026-07-09T05:15:18.024 INFO:tasks.workunit.client.0.trial054.stdout:_smb_tests_44163/lib/python3.12/site-packages/smbprotocol/tree.py:250: in connect
2026-07-09T05:15:18.025 INFO:tasks.workunit.client.0.trial054.stdout: response = self.session.connection.receive(request)
2026-07-09T05:15:18.025 INFO:tasks.workunit.client.0.trial054.stdout: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-07-09T05:15:18.025 INFO:tasks.workunit.client.0.trial054.stdout:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2026-07-09T05:15:18.025 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.025 INFO:tasks.workunit.client.0.trial054.stdout:self = <smbprotocol.connection.Connection object at 0x7cc668c35a30>
2026-07-09T05:15:18.025 INFO:tasks.workunit.client.0.trial054.stdout:request = <smbprotocol.connection.Request object at 0x7cc668c37650>, wait = True
2026-07-09T05:15:18.025 INFO:tasks.workunit.client.0.trial054.stdout:timeout = None, resolve_symlinks = True
2026-07-09T05:15:18.025 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.025 INFO:tasks.workunit.client.0.trial054.stdout: def receive(self, request, wait=True, timeout=None, resolve_symlinks=True):
2026-07-09T05:15:18.025 INFO:tasks.workunit.client.0.trial054.stdout: """
2026-07-09T05:15:18.025 INFO:tasks.workunit.client.0.trial054.stdout: Polls the message buffer of the TCP connection and waits until a valid
2026-07-09T05:15:18.025 INFO:tasks.workunit.client.0.trial054.stdout: message is received based on the message_id passed in.
2026-07-09T05:15:18.025 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.025 INFO:tasks.workunit.client.0.trial054.stdout: :param request: The Request object to wait get the response for
2026-07-09T05:15:18.025 INFO:tasks.workunit.client.0.trial054.stdout: :param wait: Wait for the final response in the case of a STATUS_PENDING response, the pending response is
2026-07-09T05:15:18.025 INFO:tasks.workunit.client.0.trial054.stdout: returned in the case of wait=False
2026-07-09T05:15:18.025 INFO:tasks.workunit.client.0.trial054.stdout: :param timeout: Set a timeout used while waiting for the final response from the server.
2026-07-09T05:15:18.025 INFO:tasks.workunit.client.0.trial054.stdout: :param resolve_symlinks: Set to automatically resolve symlinks in the path when opening a file or directory.
2026-07-09T05:15:18.025 INFO:tasks.workunit.client.0.trial054.stdout: :return: SMB2HeaderResponse of the received message
2026-07-09T05:15:18.025 INFO:tasks.workunit.client.0.trial054.stdout: """
2026-07-09T05:15:18.025 INFO:tasks.workunit.client.0.trial054.stdout: # Only the worker thread delivers responses, so calling receive() from it would wait
2026-07-09T05:15:18.025 INFO:tasks.workunit.client.0.trial054.stdout: # on an event only it can set.
2026-07-09T05:15:18.025 INFO:tasks.workunit.client.0.trial054.stdout: worker = self._t_worker
2026-07-09T05:15:18.025 INFO:tasks.workunit.client.0.trial054.stdout: if worker is not None and threading.get_ident() == worker.ident:
2026-07-09T05:15:18.025 INFO:tasks.workunit.client.0.trial054.stdout: raise SMBException("Connection.receive() called from the SMB worker thread, would self-deadlock")
2026-07-09T05:15:18.025 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.025 INFO:tasks.workunit.client.0.trial054.stdout: # Make sure the receiver is still active, if not this raises an exception.
2026-07-09T05:15:18.025 INFO:tasks.workunit.client.0.trial054.stdout: self._check_worker_running()
2026-07-09T05:15:18.025 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.025 INFO:tasks.workunit.client.0.trial054.stdout: start_time = time.time()
2026-07-09T05:15:18.025 INFO:tasks.workunit.client.0.trial054.stdout: while True:
2026-07-09T05:15:18.026 INFO:tasks.workunit.client.0.trial054.stdout: iter_timeout = int(max(timeout - (time.time() - start_time), 1)) if timeout is not None else None
2026-07-09T05:15:18.026 INFO:tasks.workunit.client.0.trial054.stdout: if not request.response_event.wait(timeout=iter_timeout):
2026-07-09T05:15:18.026 INFO:tasks.workunit.client.0.trial054.stdout: value = request.message["message_id"].get_value()
2026-07-09T05:15:18.026 INFO:tasks.workunit.client.0.trial054.stdout: raise SMBException(
2026-07-09T05:15:18.026 INFO:tasks.workunit.client.0.trial054.stdout: f"Connection timeout of {timeout} seconds exceeded while waiting for a message id {value} "
2026-07-09T05:15:18.026 INFO:tasks.workunit.client.0.trial054.stdout: "response from the server"
2026-07-09T05:15:18.027 INFO:tasks.workunit.client.0.trial054.stdout: )
2026-07-09T05:15:18.027 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.027 INFO:tasks.workunit.client.0.trial054.stdout: # Use a lock on the request so that in the case of a pending response we have exclusive lock on the event
2026-07-09T05:15:18.027 INFO:tasks.workunit.client.0.trial054.stdout: # flag and can clear it without the future pending response taking it over before we first clear the flag.
2026-07-09T05:15:18.027 INFO:tasks.workunit.client.0.trial054.stdout: with request.response_event_lock:
2026-07-09T05:15:18.027 INFO:tasks.workunit.client.0.trial054.stdout: self._check_worker_running() # The worker may have failed while waiting for the response, check again
2026-07-09T05:15:18.027 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.027 INFO:tasks.workunit.client.0.trial054.stdout: response = request.response
2026-07-09T05:15:18.027 INFO:tasks.workunit.client.0.trial054.stdout: status = response["status"].get_value()
2026-07-09T05:15:18.027 INFO:tasks.workunit.client.0.trial054.stdout: if status == NtStatus.STATUS_PENDING and wait:
2026-07-09T05:15:18.027 INFO:tasks.workunit.client.0.trial054.stdout: # Received a pending message, clear the response_event flag and wait again.
2026-07-09T05:15:18.028 INFO:tasks.workunit.client.0.trial054.stdout: request.response_event.clear()
2026-07-09T05:15:18.028 INFO:tasks.workunit.client.0.trial054.stdout: continue
2026-07-09T05:15:18.028 INFO:tasks.workunit.client.0.trial054.stdout: elif status == NtStatus.STATUS_STOPPED_ON_SYMLINK and resolve_symlinks:
2026-07-09T05:15:18.028 INFO:tasks.workunit.client.0.trial054.stdout: # Received when we do an Open on a path that contains a symlink. Need to capture all related
2026-07-09T05:15:18.028 INFO:tasks.workunit.client.0.trial054.stdout: # requests and resend the Open + others with the redirected path. First we need to resolve the
2026-07-09T05:15:18.028 INFO:tasks.workunit.client.0.trial054.stdout: # symlink path. This will fail if the symlink is pointing to a location that is not in the same
2026-07-09T05:15:18.028 INFO:tasks.workunit.client.0.trial054.stdout: # tree/share as the original request.
2026-07-09T05:15:18.028 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.028 INFO:tasks.workunit.client.0.trial054.stdout: # First wait for the other remaining requests to be processed. Their status will also fail and we
2026-07-09T05:15:18.028 INFO:tasks.workunit.client.0.trial054.stdout: # need to make sure we update the old request with the new one properly.
2026-07-09T05:15:18.028 INFO:tasks.workunit.client.0.trial054.stdout: related_requests = [self.outstanding_requests[i] for i in request.related_ids]
2026-07-09T05:15:18.029 INFO:tasks.workunit.client.0.trial054.stdout: [r.response_event.wait() for r in related_requests]
2026-07-09T05:15:18.029 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.029 INFO:tasks.workunit.client.0.trial054.stdout: # Check if the response has the reparse buffer present.
2026-07-09T05:15:18.029 INFO:tasks.workunit.client.0.trial054.stdout: exp = SMBResponseException(response)
2026-07-09T05:15:18.029 INFO:tasks.workunit.client.0.trial054.stdout: reparse_buffer = next(
2026-07-09T05:15:18.029 INFO:tasks.workunit.client.0.trial054.stdout: iter(e for e in exp.error_details if isinstance(e, SMB2SymbolicLinkErrorResponse)), None
2026-07-09T05:15:18.029 INFO:tasks.workunit.client.0.trial054.stdout: )
2026-07-09T05:15:18.029 INFO:tasks.workunit.client.0.trial054.stdout: if reparse_buffer is None:
2026-07-09T05:15:18.029 INFO:tasks.workunit.client.0.trial054.stdout: # Some SMB server don't return a buffer, only thing we
2026-07-09T05:15:18.029 INFO:tasks.workunit.client.0.trial054.stdout: # can do is raise the exception.
2026-07-09T05:15:18.029 INFO:tasks.workunit.client.0.trial054.stdout: message_id = request.message["message_id"].get_value()
2026-07-09T05:15:18.029 INFO:tasks.workunit.client.0.trial054.stdout: self.outstanding_requests.pop(message_id, None)
2026-07-09T05:15:18.030 INFO:tasks.workunit.client.0.trial054.stdout: raise exp
2026-07-09T05:15:18.030 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.030 INFO:tasks.workunit.client.0.trial054.stdout: # Now create a new request with the new path the symlink points to.
2026-07-09T05:15:18.030 INFO:tasks.workunit.client.0.trial054.stdout: session = self.session_table[request.session_id]
2026-07-09T05:15:18.030 INFO:tasks.workunit.client.0.trial054.stdout: tree = session.tree_connect_table[request.message["tree_id"].get_value()]
2026-07-09T05:15:18.030 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.030 INFO:tasks.workunit.client.0.trial054.stdout: old_create = request.get_message_data()
2026-07-09T05:15:18.030 INFO:tasks.workunit.client.0.trial054.stdout: tree_share_name = tree.share_name + "\\"
2026-07-09T05:15:18.030 INFO:tasks.workunit.client.0.trial054.stdout: original_path = tree_share_name + to_text(
2026-07-09T05:15:18.030 INFO:tasks.workunit.client.0.trial054.stdout: old_create["buffer_path"].get_value(), encoding="utf-16-le"
2026-07-09T05:15:18.030 INFO:tasks.workunit.client.0.trial054.stdout: )
2026-07-09T05:15:18.031 INFO:tasks.workunit.client.0.trial054.stdout: new_path = reparse_buffer.resolve_path(original_path)[len(tree_share_name) :]
2026-07-09T05:15:18.031 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.031 INFO:tasks.workunit.client.0.trial054.stdout: new_open = Open(tree, new_path)
2026-07-09T05:15:18.031 INFO:tasks.workunit.client.0.trial054.stdout: create_req = new_open.create(
2026-07-09T05:15:18.031 INFO:tasks.workunit.client.0.trial054.stdout: old_create["impersonation_level"].get_value(),
2026-07-09T05:15:18.031 INFO:tasks.workunit.client.0.trial054.stdout: old_create["desired_access"].get_value(),
2026-07-09T05:15:18.031 INFO:tasks.workunit.client.0.trial054.stdout: old_create["file_attributes"].get_value(),
2026-07-09T05:15:18.031 INFO:tasks.workunit.client.0.trial054.stdout: old_create["share_access"].get_value(),
2026-07-09T05:15:18.031 INFO:tasks.workunit.client.0.trial054.stdout: old_create["create_disposition"].get_value(),
2026-07-09T05:15:18.031 INFO:tasks.workunit.client.0.trial054.stdout: old_create["create_options"].get_value(),
2026-07-09T05:15:18.031 INFO:tasks.workunit.client.0.trial054.stdout: create_contexts=old_create["buffer_contexts"].get_value(),
2026-07-09T05:15:18.031 INFO:tasks.workunit.client.0.trial054.stdout: send=False,
2026-07-09T05:15:18.032 INFO:tasks.workunit.client.0.trial054.stdout: )[0]
2026-07-09T05:15:18.032 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.032 INFO:tasks.workunit.client.0.trial054.stdout: # Now add all the related requests (if any) to send as a compound request.
2026-07-09T05:15:18.032 INFO:tasks.workunit.client.0.trial054.stdout: new_msgs = [create_req] + [r.get_message_data() for r in related_requests]
2026-07-09T05:15:18.032 INFO:tasks.workunit.client.0.trial054.stdout: new_requests = self.send_compound(new_msgs, session.session_id, tree.tree_connect_id, related=True)
2026-07-09T05:15:18.032 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.032 INFO:tasks.workunit.client.0.trial054.stdout: # Verify that the first request was successful before updating the related requests with the new
2026-07-09T05:15:18.032 INFO:tasks.workunit.client.0.trial054.stdout: # info.
2026-07-09T05:15:18.032 INFO:tasks.workunit.client.0.trial054.stdout: error = None
2026-07-09T05:15:18.032 INFO:tasks.workunit.client.0.trial054.stdout: try:
2026-07-09T05:15:18.032 INFO:tasks.workunit.client.0.trial054.stdout: new_response = self.receive(new_requests[0], wait=wait, timeout=timeout, resolve_symlinks=True)
2026-07-09T05:15:18.033 INFO:tasks.workunit.client.0.trial054.stdout: except SMBResponseException as exc:
2026-07-09T05:15:18.033 INFO:tasks.workunit.client.0.trial054.stdout: # We need to make sure we fix up the remaining responses before throwing this.
2026-07-09T05:15:18.033 INFO:tasks.workunit.client.0.trial054.stdout: error = exc
2026-07-09T05:15:18.033 INFO:tasks.workunit.client.0.trial054.stdout: [r.response_event.wait() for r in new_requests]
2026-07-09T05:15:18.033 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.033 INFO:tasks.workunit.client.0.trial054.stdout: # Update the old requests with the new response information
2026-07-09T05:15:18.033 INFO:tasks.workunit.client.0.trial054.stdout: for i, old_request in enumerate([request] + related_requests):
2026-07-09T05:15:18.033 INFO:tasks.workunit.client.0.trial054.stdout: del self.outstanding_requests[old_request.message["message_id"].get_value()]
2026-07-09T05:15:18.033 INFO:tasks.workunit.client.0.trial054.stdout: old_request.update_request(new_requests[i])
2026-07-09T05:15:18.033 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.033 INFO:tasks.workunit.client.0.trial054.stdout: if error:
2026-07-09T05:15:18.035 INFO:tasks.workunit.client.0.trial054.stdout: raise error
2026-07-09T05:15:18.035 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.035 INFO:tasks.workunit.client.0.trial054.stdout: return new_response
2026-07-09T05:15:18.035 INFO:tasks.workunit.client.0.trial054.stdout: else:
2026-07-09T05:15:18.035 INFO:tasks.workunit.client.0.trial054.stdout: # now we have a retrieval request for the response, we can delete
2026-07-09T05:15:18.035 INFO:tasks.workunit.client.0.trial054.stdout: # the request from the outstanding requests
2026-07-09T05:15:18.035 INFO:tasks.workunit.client.0.trial054.stdout: message_id = request.message["message_id"].get_value()
2026-07-09T05:15:18.035 INFO:tasks.workunit.client.0.trial054.stdout: self.outstanding_requests.pop(message_id, None)
2026-07-09T05:15:18.036 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.036 INFO:tasks.workunit.client.0.trial054.stdout: if status not in [NtStatus.STATUS_SUCCESS, NtStatus.STATUS_PENDING]:
2026-07-09T05:15:18.036 INFO:tasks.workunit.client.0.trial054.stdout:> raise SMBResponseException(response)
2026-07-09T05:15:18.036 INFO:tasks.workunit.client.0.trial054.stdout:E smbprotocol.exceptions.AccessDenied: Received unexpected status from the server: A process has requested access to an object but has not been granted those access rights. (3221225506) STATUS_ACCESS_DENIED: 0xc0000022
2026-07-09T05:15:18.036 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.036 INFO:tasks.workunit.client.0.trial054.stdout:_smb_tests_44163/lib/python3.12/site-packages/smbprotocol/connection.py:1142: AccessDenied
2026-07-09T05:15:18.036 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.036 INFO:tasks.workunit.client.0.trial054.stdout:The above exception was the direct cause of the following exception:
2026-07-09T05:15:18.036 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.036 INFO:tasks.workunit.client.0.trial054.stdout:self = <test_hosts_access.TestHostsAccessToggle1 object at 0x7cc668bf28d0>
2026-07-09T05:15:18.036 INFO:tasks.workunit.client.0.trial054.stdout:smb_cfg = <smbutil.SMBTestConf object at 0x7cc668bf16a0>
2026-07-09T05:15:18.037 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.037 INFO:tasks.workunit.client.0.trial054.stdout: def test_no_access_bogus_allow(self, smb_cfg):
2026-07-09T05:15:18.037 INFO:tasks.workunit.client.0.trial054.stdout: "Reject access when only the bogus address is allowed"
2026-07-09T05:15:18.037 INFO:tasks.workunit.client.0.trial054.stdout: mod_share = copy.deepcopy(self.orig)
2026-07-09T05:15:18.037 INFO:tasks.workunit.client.0.trial054.stdout: mod_share['hosts_access'] = [
2026-07-09T05:15:18.037 INFO:tasks.workunit.client.0.trial054.stdout: {'access': 'allow', 'address': BOGUS},
2026-07-09T05:15:18.037 INFO:tasks.workunit.client.0.trial054.stdout: ]
2026-07-09T05:15:18.037 INFO:tasks.workunit.client.0.trial054.stdout: applied = smbutil.apply_share_config(smb_cfg, mod_share)
2026-07-09T05:15:18.037 INFO:tasks.workunit.client.0.trial054.stdout: assert applied['share_id'] == mod_share['share_id']
2026-07-09T05:15:18.037 INFO:tasks.workunit.client.0.trial054.stdout: assert applied['hosts_access'] == mod_share['hosts_access']
2026-07-09T05:15:18.037 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.038 INFO:tasks.workunit.client.0.trial054.stdout: with pytest.raises(smbprotocol.exceptions.AccessDenied):
2026-07-09T05:15:18.038 INFO:tasks.workunit.client.0.trial054.stdout: with smbutil.connection(smb_cfg, self.share_name) as sharep:
2026-07-09T05:15:18.038 INFO:tasks.workunit.client.0.trial054.stdout: fname = sharep / self.filename
2026-07-09T05:15:18.038 INFO:tasks.workunit.client.0.trial054.stdout:> fname.write_text('value: NOPE\n')
2026-07-09T05:15:18.038 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.038 INFO:tasks.workunit.client.0.trial054.stdout:tests/test_hosts_access.py:64:
2026-07-09T05:15:18.038 INFO:tasks.workunit.client.0.trial054.stdout:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2026-07-09T05:15:18.038 INFO:tasks.workunit.client.0.trial054.stdout:tests/smbutil.py:157: in write_text
2026-07-09T05:15:18.038 INFO:tasks.workunit.client.0.trial054.stdout: with self.open(mode='w') as fh:
2026-07-09T05:15:18.038 INFO:tasks.workunit.client.0.trial054.stdout: ^^^^^^^^^^^^^^^^^^^
2026-07-09T05:15:18.038 INFO:tasks.workunit.client.0.trial054.stdout:tests/smbutil.py:148: in open
2026-07-09T05:15:18.038 INFO:tasks.workunit.client.0.trial054.stdout: return smbclient.open_file(str(self.share_path), mode=mode)
2026-07-09T05:15:18.039 INFO:tasks.workunit.client.0.trial054.stdout: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-07-09T05:15:18.039 INFO:tasks.workunit.client.0.trial054.stdout:_smb_tests_44163/lib/python3.12/site-packages/smbclient/_os.py:524: in open_file
2026-07-09T05:15:18.039 INFO:tasks.workunit.client.0.trial054.stdout: raw_fd = file_class(
2026-07-09T05:15:18.039 INFO:tasks.workunit.client.0.trial054.stdout:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2026-07-09T05:15:18.039 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.039 INFO:tasks.workunit.client.0.trial054.stdout:self = <smbclient._io.SMBFileIO object at 0x7cc668c36f50>
2026-07-09T05:15:18.039 INFO:tasks.workunit.client.0.trial054.stdout:path = '\\\\10.20.193.54\\share2\\TestHostAcess1.txt', mode = 'w'
2026-07-09T05:15:18.039 INFO:tasks.workunit.client.0.trial054.stdout:share_access = None, desired_access = None, file_attributes = None
2026-07-09T05:15:18.039 INFO:tasks.workunit.client.0.trial054.stdout:create_options = 0, kwargs = {}
2026-07-09T05:15:18.039 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.039 INFO:tasks.workunit.client.0.trial054.stdout: def __init__(
2026-07-09T05:15:18.039 INFO:tasks.workunit.client.0.trial054.stdout: self, path, mode="r", share_access=None, desired_access=None, file_attributes=None, create_options=0, **kwargs
2026-07-09T05:15:18.040 INFO:tasks.workunit.client.0.trial054.stdout: ):
2026-07-09T05:15:18.040 INFO:tasks.workunit.client.0.trial054.stdout: # get_smb_tree runs outside the SMBFileTransaction layer that normally translates these.
2026-07-09T05:15:18.040 INFO:tasks.workunit.client.0.trial054.stdout: try:
2026-07-09T05:15:18.040 INFO:tasks.workunit.client.0.trial054.stdout: tree, fd_path = get_smb_tree(path, **kwargs)
2026-07-09T05:15:18.040 INFO:tasks.workunit.client.0.trial054.stdout: except SMBResponseException as exc:
2026-07-09T05:15:18.040 INFO:tasks.workunit.client.0.trial054.stdout:> raise SMBOSError(exc.status, path) from exc
2026-07-09T05:15:18.040 INFO:tasks.workunit.client.0.trial054.stdout:E smbprotocol.exceptions.SMBOSError: [Error 0] [NtStatus 0xc0000022] Unknown NtStatus error returned 'STATUS_ACCESS_DENIED': '\\10.20.193.54\share2\TestHostAcess1.txt'
2026-07-09T05:15:18.040 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.040 INFO:tasks.workunit.client.0.trial054.stdout:_smb_tests_44163/lib/python3.12/site-packages/smbclient/_io.py:388: SMBOSError
2026-07-09T05:15:18.040 INFO:tasks.workunit.client.0.trial054.stdout:---------------------------- Captured stdout setup -----------------------------
2026-07-09T05:15:18.040 INFO:tasks.workunit.client.0.trial054.stdout:Testing original share configuration...
2026-07-09T05:15:18.041 INFO:tasks.workunit.client.0.trial054.stdout:_______________ TestHostsAccessToggle1.test_no_access_self_deny ________________
2026-07-09T05:15:18.041 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.041 INFO:tasks.workunit.client.0.trial054.stdout:self = <smbclient._io.SMBFileIO object at 0x7cc668bf1960>
2026-07-09T05:15:18.041 INFO:tasks.workunit.client.0.trial054.stdout:path = '\\\\10.20.193.54\\share2\\TestHostAcess1.txt', mode = 'w'
2026-07-09T05:15:18.041 INFO:tasks.workunit.client.0.trial054.stdout:share_access = None, desired_access = None, file_attributes = None
2026-07-09T05:15:18.041 INFO:tasks.workunit.client.0.trial054.stdout:create_options = 0, kwargs = {}
2026-07-09T05:15:18.041 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.041 INFO:tasks.workunit.client.0.trial054.stdout: def __init__(
2026-07-09T05:15:18.042 INFO:tasks.workunit.client.0.trial054.stdout: self, path, mode="r", share_access=None, desired_access=None, file_attributes=None, create_options=0, **kwargs
2026-07-09T05:15:18.042 INFO:tasks.workunit.client.0.trial054.stdout: ):
2026-07-09T05:15:18.042 INFO:tasks.workunit.client.0.trial054.stdout: # get_smb_tree runs outside the SMBFileTransaction layer that normally translates these.
2026-07-09T05:15:18.042 INFO:tasks.workunit.client.0.trial054.stdout: try:
2026-07-09T05:15:18.042 INFO:tasks.workunit.client.0.trial054.stdout:> tree, fd_path = get_smb_tree(path, **kwargs)
2026-07-09T05:15:18.042 INFO:tasks.workunit.client.0.trial054.stdout: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-07-09T05:15:18.042 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.042 INFO:tasks.workunit.client.0.trial054.stdout:_smb_tests_44163/lib/python3.12/site-packages/smbclient/_io.py:386:
2026-07-09T05:15:18.042 INFO:tasks.workunit.client.0.trial054.stdout:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2026-07-09T05:15:18.042 INFO:tasks.workunit.client.0.trial054.stdout:_smb_tests_44163/lib/python3.12/site-packages/smbclient/_pool.py:332: in get_smb_tree
2026-07-09T05:15:18.042 INFO:tasks.workunit.client.0.trial054.stdout: tree.connect(require_secure_negotiate=client_config.require_secure_negotiate)
2026-07-09T05:15:18.043 INFO:tasks.workunit.client.0.trial054.stdout:_smb_tests_44163/lib/python3.12/site-packages/smbprotocol/tree.py:250: in connect
2026-07-09T05:15:18.043 INFO:tasks.workunit.client.0.trial054.stdout: response = self.session.connection.receive(request)
2026-07-09T05:15:18.043 INFO:tasks.workunit.client.0.trial054.stdout: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-07-09T05:15:18.043 INFO:tasks.workunit.client.0.trial054.stdout:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2026-07-09T05:15:18.043 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.043 INFO:tasks.workunit.client.0.trial054.stdout:self = <smbprotocol.connection.Connection object at 0x7cc668b629c0>
2026-07-09T05:15:18.043 INFO:tasks.workunit.client.0.trial054.stdout:request = <smbprotocol.connection.Request object at 0x7cc668c36d50>, wait = True
2026-07-09T05:15:18.043 INFO:tasks.workunit.client.0.trial054.stdout:timeout = None, resolve_symlinks = True
2026-07-09T05:15:18.043 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.043 INFO:tasks.workunit.client.0.trial054.stdout: def receive(self, request, wait=True, timeout=None, resolve_symlinks=True):
2026-07-09T05:15:18.043 INFO:tasks.workunit.client.0.trial054.stdout: """
2026-07-09T05:15:18.043 INFO:tasks.workunit.client.0.trial054.stdout: Polls the message buffer of the TCP connection and waits until a valid
2026-07-09T05:15:18.044 INFO:tasks.workunit.client.0.trial054.stdout: message is received based on the message_id passed in.
2026-07-09T05:15:18.044 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.044 INFO:tasks.workunit.client.0.trial054.stdout: :param request: The Request object to wait get the response for
2026-07-09T05:15:18.044 INFO:tasks.workunit.client.0.trial054.stdout: :param wait: Wait for the final response in the case of a STATUS_PENDING response, the pending response is
2026-07-09T05:15:18.044 INFO:tasks.workunit.client.0.trial054.stdout: returned in the case of wait=False
2026-07-09T05:15:18.044 INFO:tasks.workunit.client.0.trial054.stdout: :param timeout: Set a timeout used while waiting for the final response from the server.
2026-07-09T05:15:18.044 INFO:tasks.workunit.client.0.trial054.stdout: :param resolve_symlinks: Set to automatically resolve symlinks in the path when opening a file or directory.
2026-07-09T05:15:18.044 INFO:tasks.workunit.client.0.trial054.stdout: :return: SMB2HeaderResponse of the received message
2026-07-09T05:15:18.044 INFO:tasks.workunit.client.0.trial054.stdout: """
2026-07-09T05:15:18.044 INFO:tasks.workunit.client.0.trial054.stdout: # Only the worker thread delivers responses, so calling receive() from it would wait
2026-07-09T05:15:18.044 INFO:tasks.workunit.client.0.trial054.stdout: # on an event only it can set.
2026-07-09T05:15:18.044 INFO:tasks.workunit.client.0.trial054.stdout: worker = self._t_worker
2026-07-09T05:15:18.045 INFO:tasks.workunit.client.0.trial054.stdout: if worker is not None and threading.get_ident() == worker.ident:
2026-07-09T05:15:18.045 INFO:tasks.workunit.client.0.trial054.stdout: raise SMBException("Connection.receive() called from the SMB worker thread, would self-deadlock")
2026-07-09T05:15:18.045 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.045 INFO:tasks.workunit.client.0.trial054.stdout: # Make sure the receiver is still active, if not this raises an exception.
2026-07-09T05:15:18.045 INFO:tasks.workunit.client.0.trial054.stdout: self._check_worker_running()
2026-07-09T05:15:18.045 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.045 INFO:tasks.workunit.client.0.trial054.stdout: start_time = time.time()
2026-07-09T05:15:18.045 INFO:tasks.workunit.client.0.trial054.stdout: while True:
2026-07-09T05:15:18.045 INFO:tasks.workunit.client.0.trial054.stdout: iter_timeout = int(max(timeout - (time.time() - start_time), 1)) if timeout is not None else None
2026-07-09T05:15:18.045 INFO:tasks.workunit.client.0.trial054.stdout: if not request.response_event.wait(timeout=iter_timeout):
2026-07-09T05:15:18.045 INFO:tasks.workunit.client.0.trial054.stdout: value = request.message["message_id"].get_value()
2026-07-09T05:15:18.045 INFO:tasks.workunit.client.0.trial054.stdout: raise SMBException(
2026-07-09T05:15:18.046 INFO:tasks.workunit.client.0.trial054.stdout: f"Connection timeout of {timeout} seconds exceeded while waiting for a message id {value} "
2026-07-09T05:15:18.046 INFO:tasks.workunit.client.0.trial054.stdout: "response from the server"
2026-07-09T05:15:18.046 INFO:tasks.workunit.client.0.trial054.stdout: )
2026-07-09T05:15:18.046 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.046 INFO:tasks.workunit.client.0.trial054.stdout: # Use a lock on the request so that in the case of a pending response we have exclusive lock on the event
2026-07-09T05:15:18.046 INFO:tasks.workunit.client.0.trial054.stdout: # flag and can clear it without the future pending response taking it over before we first clear the flag.
2026-07-09T05:15:18.046 INFO:tasks.workunit.client.0.trial054.stdout: with request.response_event_lock:
2026-07-09T05:15:18.046 INFO:tasks.workunit.client.0.trial054.stdout: self._check_worker_running() # The worker may have failed while waiting for the response, check again
2026-07-09T05:15:18.046 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.046 INFO:tasks.workunit.client.0.trial054.stdout: response = request.response
2026-07-09T05:15:18.046 INFO:tasks.workunit.client.0.trial054.stdout: status = response["status"].get_value()
2026-07-09T05:15:18.047 INFO:tasks.workunit.client.0.trial054.stdout: if status == NtStatus.STATUS_PENDING and wait:
2026-07-09T05:15:18.047 INFO:tasks.workunit.client.0.trial054.stdout: # Received a pending message, clear the response_event flag and wait again.
2026-07-09T05:15:18.047 INFO:tasks.workunit.client.0.trial054.stdout: request.response_event.clear()
2026-07-09T05:15:18.047 INFO:tasks.workunit.client.0.trial054.stdout: continue
2026-07-09T05:15:18.047 INFO:tasks.workunit.client.0.trial054.stdout: elif status == NtStatus.STATUS_STOPPED_ON_SYMLINK and resolve_symlinks:
2026-07-09T05:15:18.047 INFO:tasks.workunit.client.0.trial054.stdout: # Received when we do an Open on a path that contains a symlink. Need to capture all related
2026-07-09T05:15:18.047 INFO:tasks.workunit.client.0.trial054.stdout: # requests and resend the Open + others with the redirected path. First we need to resolve the
2026-07-09T05:15:18.047 INFO:tasks.workunit.client.0.trial054.stdout: # symlink path. This will fail if the symlink is pointing to a location that is not in the same
2026-07-09T05:15:18.047 INFO:tasks.workunit.client.0.trial054.stdout: # tree/share as the original request.
2026-07-09T05:15:18.047 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.047 INFO:tasks.workunit.client.0.trial054.stdout: # First wait for the other remaining requests to be processed. Their status will also fail and we
2026-07-09T05:15:18.047 INFO:tasks.workunit.client.0.trial054.stdout: # need to make sure we update the old request with the new one properly.
2026-07-09T05:15:18.048 INFO:tasks.workunit.client.0.trial054.stdout: related_requests = [self.outstanding_requests[i] for i in request.related_ids]
2026-07-09T05:15:18.048 INFO:tasks.workunit.client.0.trial054.stdout: [r.response_event.wait() for r in related_requests]
2026-07-09T05:15:18.048 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.048 INFO:tasks.workunit.client.0.trial054.stdout: # Check if the response has the reparse buffer present.
2026-07-09T05:15:18.048 INFO:tasks.workunit.client.0.trial054.stdout: exp = SMBResponseException(response)
2026-07-09T05:15:18.048 INFO:tasks.workunit.client.0.trial054.stdout: reparse_buffer = next(
2026-07-09T05:15:18.049 INFO:tasks.workunit.client.0.trial054.stdout: iter(e for e in exp.error_details if isinstance(e, SMB2SymbolicLinkErrorResponse)), None
2026-07-09T05:15:18.049 INFO:tasks.workunit.client.0.trial054.stdout: )
2026-07-09T05:15:18.049 INFO:tasks.workunit.client.0.trial054.stdout: if reparse_buffer is None:
2026-07-09T05:15:18.049 INFO:tasks.workunit.client.0.trial054.stdout: # Some SMB server don't return a buffer, only thing we
2026-07-09T05:15:18.049 INFO:tasks.workunit.client.0.trial054.stdout: # can do is raise the exception.
2026-07-09T05:15:18.049 INFO:tasks.workunit.client.0.trial054.stdout: message_id = request.message["message_id"].get_value()
2026-07-09T05:15:18.049 INFO:tasks.workunit.client.0.trial054.stdout: self.outstanding_requests.pop(message_id, None)
2026-07-09T05:15:18.050 INFO:tasks.workunit.client.0.trial054.stdout: raise exp
2026-07-09T05:15:18.050 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.050 INFO:tasks.workunit.client.0.trial054.stdout: # Now create a new request with the new path the symlink points to.
2026-07-09T05:15:18.050 INFO:tasks.workunit.client.0.trial054.stdout: session = self.session_table[request.session_id]
2026-07-09T05:15:18.050 INFO:tasks.workunit.client.0.trial054.stdout: tree = session.tree_connect_table[request.message["tree_id"].get_value()]
2026-07-09T05:15:18.050 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.050 INFO:tasks.workunit.client.0.trial054.stdout: old_create = request.get_message_data()
2026-07-09T05:15:18.050 INFO:tasks.workunit.client.0.trial054.stdout: tree_share_name = tree.share_name + "\\"
2026-07-09T05:15:18.050 INFO:tasks.workunit.client.0.trial054.stdout: original_path = tree_share_name + to_text(
2026-07-09T05:15:18.050 INFO:tasks.workunit.client.0.trial054.stdout: old_create["buffer_path"].get_value(), encoding="utf-16-le"
2026-07-09T05:15:18.050 INFO:tasks.workunit.client.0.trial054.stdout: )
2026-07-09T05:15:18.050 INFO:tasks.workunit.client.0.trial054.stdout: new_path = reparse_buffer.resolve_path(original_path)[len(tree_share_name) :]
2026-07-09T05:15:18.051 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.051 INFO:tasks.workunit.client.0.trial054.stdout: new_open = Open(tree, new_path)
2026-07-09T05:15:18.051 INFO:tasks.workunit.client.0.trial054.stdout: create_req = new_open.create(
2026-07-09T05:15:18.051 INFO:tasks.workunit.client.0.trial054.stdout: old_create["impersonation_level"].get_value(),
2026-07-09T05:15:18.051 INFO:tasks.workunit.client.0.trial054.stdout: old_create["desired_access"].get_value(),
2026-07-09T05:15:18.051 INFO:tasks.workunit.client.0.trial054.stdout: old_create["file_attributes"].get_value(),
2026-07-09T05:15:18.051 INFO:tasks.workunit.client.0.trial054.stdout: old_create["share_access"].get_value(),
2026-07-09T05:15:18.051 INFO:tasks.workunit.client.0.trial054.stdout: old_create["create_disposition"].get_value(),
2026-07-09T05:15:18.051 INFO:tasks.workunit.client.0.trial054.stdout: old_create["create_options"].get_value(),
2026-07-09T05:15:18.051 INFO:tasks.workunit.client.0.trial054.stdout: create_contexts=old_create["buffer_contexts"].get_value(),
2026-07-09T05:15:18.051 INFO:tasks.workunit.client.0.trial054.stdout: send=False,
2026-07-09T05:15:18.051 INFO:tasks.workunit.client.0.trial054.stdout: )[0]
2026-07-09T05:15:18.052 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.052 INFO:tasks.workunit.client.0.trial054.stdout: # Now add all the related requests (if any) to send as a compound request.
2026-07-09T05:15:18.052 INFO:tasks.workunit.client.0.trial054.stdout: new_msgs = [create_req] + [r.get_message_data() for r in related_requests]
2026-07-09T05:15:18.052 INFO:tasks.workunit.client.0.trial054.stdout: new_requests = self.send_compound(new_msgs, session.session_id, tree.tree_connect_id, related=True)
2026-07-09T05:15:18.052 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.052 INFO:tasks.workunit.client.0.trial054.stdout: # Verify that the first request was successful before updating the related requests with the new
2026-07-09T05:15:18.052 INFO:tasks.workunit.client.0.trial054.stdout: # info.
2026-07-09T05:15:18.052 INFO:tasks.workunit.client.0.trial054.stdout: error = None
2026-07-09T05:15:18.052 INFO:tasks.workunit.client.0.trial054.stdout: try:
2026-07-09T05:15:18.052 INFO:tasks.workunit.client.0.trial054.stdout: new_response = self.receive(new_requests[0], wait=wait, timeout=timeout, resolve_symlinks=True)
2026-07-09T05:15:18.052 INFO:tasks.workunit.client.0.trial054.stdout: except SMBResponseException as exc:
2026-07-09T05:15:18.053 INFO:tasks.workunit.client.0.trial054.stdout: # We need to make sure we fix up the remaining responses before throwing this.
2026-07-09T05:15:18.053 INFO:tasks.workunit.client.0.trial054.stdout: error = exc
2026-07-09T05:15:18.053 INFO:tasks.workunit.client.0.trial054.stdout: [r.response_event.wait() for r in new_requests]
2026-07-09T05:15:18.053 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.053 INFO:tasks.workunit.client.0.trial054.stdout: # Update the old requests with the new response information
2026-07-09T05:15:18.053 INFO:tasks.workunit.client.0.trial054.stdout: for i, old_request in enumerate([request] + related_requests):
2026-07-09T05:15:18.053 INFO:tasks.workunit.client.0.trial054.stdout: del self.outstanding_requests[old_request.message["message_id"].get_value()]
2026-07-09T05:15:18.053 INFO:tasks.workunit.client.0.trial054.stdout: old_request.update_request(new_requests[i])
2026-07-09T05:15:18.053 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.053 INFO:tasks.workunit.client.0.trial054.stdout: if error:
2026-07-09T05:15:18.053 INFO:tasks.workunit.client.0.trial054.stdout: raise error
2026-07-09T05:15:18.053 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.054 INFO:tasks.workunit.client.0.trial054.stdout: return new_response
2026-07-09T05:15:18.054 INFO:tasks.workunit.client.0.trial054.stdout: else:
2026-07-09T05:15:18.054 INFO:tasks.workunit.client.0.trial054.stdout: # now we have a retrieval request for the response, we can delete
2026-07-09T05:15:18.054 INFO:tasks.workunit.client.0.trial054.stdout: # the request from the outstanding requests
2026-07-09T05:15:18.054 INFO:tasks.workunit.client.0.trial054.stdout: message_id = request.message["message_id"].get_value()
2026-07-09T05:15:18.054 INFO:tasks.workunit.client.0.trial054.stdout: self.outstanding_requests.pop(message_id, None)
2026-07-09T05:15:18.054 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.054 INFO:tasks.workunit.client.0.trial054.stdout: if status not in [NtStatus.STATUS_SUCCESS, NtStatus.STATUS_PENDING]:
2026-07-09T05:15:18.054 INFO:tasks.workunit.client.0.trial054.stdout:> raise SMBResponseException(response)
2026-07-09T05:15:18.054 INFO:tasks.workunit.client.0.trial054.stdout:E smbprotocol.exceptions.AccessDenied: Received unexpected status from the server: A process has requested access to an object but has not been granted those access rights. (3221225506) STATUS_ACCESS_DENIED: 0xc0000022
2026-07-09T05:15:18.054 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.054 INFO:tasks.workunit.client.0.trial054.stdout:_smb_tests_44163/lib/python3.12/site-packages/smbprotocol/connection.py:1142: AccessDenied
2026-07-09T05:15:18.054 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.055 INFO:tasks.workunit.client.0.trial054.stdout:The above exception was the direct cause of the following exception:
2026-07-09T05:15:18.055 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.055 INFO:tasks.workunit.client.0.trial054.stdout:self = <test_hosts_access.TestHostsAccessToggle1 object at 0x7cc668bf1e20>
2026-07-09T05:15:18.055 INFO:tasks.workunit.client.0.trial054.stdout:smb_cfg = <smbutil.SMBTestConf object at 0x7cc668bf16a0>
2026-07-09T05:15:18.055 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.055 INFO:tasks.workunit.client.0.trial054.stdout: def test_no_access_self_deny(self, smb_cfg):
2026-07-09T05:15:18.055 INFO:tasks.workunit.client.0.trial054.stdout: "Deny access when the client ip is explicitly denied"
2026-07-09T05:15:18.055 INFO:tasks.workunit.client.0.trial054.stdout: mod_share = copy.deepcopy(self.orig)
2026-07-09T05:15:18.055 INFO:tasks.workunit.client.0.trial054.stdout: mod_share['hosts_access'] = [
2026-07-09T05:15:18.055 INFO:tasks.workunit.client.0.trial054.stdout: {'access': 'deny', 'address': smb_cfg.default_client.ip_address},
2026-07-09T05:15:18.055 INFO:tasks.workunit.client.0.trial054.stdout: ]
2026-07-09T05:15:18.055 INFO:tasks.workunit.client.0.trial054.stdout: applied = smbutil.apply_share_config(smb_cfg, mod_share)
2026-07-09T05:15:18.055 INFO:tasks.workunit.client.0.trial054.stdout: assert applied['share_id'] == mod_share['share_id']
2026-07-09T05:15:18.056 INFO:tasks.workunit.client.0.trial054.stdout: assert applied['hosts_access'] == mod_share['hosts_access']
2026-07-09T05:15:18.056 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.056 INFO:tasks.workunit.client.0.trial054.stdout: with pytest.raises(smbprotocol.exceptions.AccessDenied):
2026-07-09T05:15:18.056 INFO:tasks.workunit.client.0.trial054.stdout: with smbutil.connection(smb_cfg, self.share_name) as sharep:
2026-07-09T05:15:18.056 INFO:tasks.workunit.client.0.trial054.stdout: fname = sharep / self.filename
2026-07-09T05:15:18.056 INFO:tasks.workunit.client.0.trial054.stdout:> fname.write_text('value: NOPE\n')
2026-07-09T05:15:18.056 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.056 INFO:tasks.workunit.client.0.trial054.stdout:tests/test_hosts_access.py:108:
2026-07-09T05:15:18.056 INFO:tasks.workunit.client.0.trial054.stdout:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2026-07-09T05:15:18.056 INFO:tasks.workunit.client.0.trial054.stdout:tests/smbutil.py:157: in write_text
2026-07-09T05:15:18.056 INFO:tasks.workunit.client.0.trial054.stdout: with self.open(mode='w') as fh:
2026-07-09T05:15:18.056 INFO:tasks.workunit.client.0.trial054.stdout: ^^^^^^^^^^^^^^^^^^^
2026-07-09T05:15:18.056 INFO:tasks.workunit.client.0.trial054.stdout:tests/smbutil.py:148: in open
2026-07-09T05:15:18.057 INFO:tasks.workunit.client.0.trial054.stdout: return smbclient.open_file(str(self.share_path), mode=mode)
2026-07-09T05:15:18.057 INFO:tasks.workunit.client.0.trial054.stdout: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-07-09T05:15:18.057 INFO:tasks.workunit.client.0.trial054.stdout:_smb_tests_44163/lib/python3.12/site-packages/smbclient/_os.py:524: in open_file
2026-07-09T05:15:18.057 INFO:tasks.workunit.client.0.trial054.stdout: raw_fd = file_class(
2026-07-09T05:15:18.057 INFO:tasks.workunit.client.0.trial054.stdout:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2026-07-09T05:15:18.057 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.057 INFO:tasks.workunit.client.0.trial054.stdout:self = <smbclient._io.SMBFileIO object at 0x7cc668bf1960>
2026-07-09T05:15:18.057 INFO:tasks.workunit.client.0.trial054.stdout:path = '\\\\10.20.193.54\\share2\\TestHostAcess1.txt', mode = 'w'
2026-07-09T05:15:18.057 INFO:tasks.workunit.client.0.trial054.stdout:share_access = None, desired_access = None, file_attributes = None
2026-07-09T05:15:18.057 INFO:tasks.workunit.client.0.trial054.stdout:create_options = 0, kwargs = {}
2026-07-09T05:15:18.057 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.057 INFO:tasks.workunit.client.0.trial054.stdout: def __init__(
2026-07-09T05:15:18.057 INFO:tasks.workunit.client.0.trial054.stdout: self, path, mode="r", share_access=None, desired_access=None, file_attributes=None, create_options=0, **kwargs
2026-07-09T05:15:18.057 INFO:tasks.workunit.client.0.trial054.stdout: ):
2026-07-09T05:15:18.058 INFO:tasks.workunit.client.0.trial054.stdout: # get_smb_tree runs outside the SMBFileTransaction layer that normally translates these.
2026-07-09T05:15:18.058 INFO:tasks.workunit.client.0.trial054.stdout: try:
2026-07-09T05:15:18.058 INFO:tasks.workunit.client.0.trial054.stdout: tree, fd_path = get_smb_tree(path, **kwargs)
2026-07-09T05:15:18.058 INFO:tasks.workunit.client.0.trial054.stdout: except SMBResponseException as exc:
2026-07-09T05:15:18.058 INFO:tasks.workunit.client.0.trial054.stdout:> raise SMBOSError(exc.status, path) from exc
2026-07-09T05:15:18.058 INFO:tasks.workunit.client.0.trial054.stdout:E smbprotocol.exceptions.SMBOSError: [Error 0] [NtStatus 0xc0000022] Unknown NtStatus error returned 'STATUS_ACCESS_DENIED': '\\10.20.193.54\share2\TestHostAcess1.txt'
2026-07-09T05:15:18.058 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.058 INFO:tasks.workunit.client.0.trial054.stdout:_smb_tests_44163/lib/python3.12/site-packages/smbclient/_io.py:388: SMBOSError
2026-07-09T05:15:18.058 INFO:tasks.workunit.client.0.trial054.stdout:____________ TestHostsAccessToggle1.test_no_access_bogus_net_allow _____________
2026-07-09T05:15:18.058 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.058 INFO:tasks.workunit.client.0.trial054.stdout:self = <smbclient._io.SMBFileIO object at 0x7cc668b615a0>
2026-07-09T05:15:18.058 INFO:tasks.workunit.client.0.trial054.stdout:path = '\\\\10.20.193.54\\share2\\TestHostAcess1.txt', mode = 'w'
2026-07-09T05:15:18.058 INFO:tasks.workunit.client.0.trial054.stdout:share_access = None, desired_access = None, file_attributes = None
2026-07-09T05:15:18.058 INFO:tasks.workunit.client.0.trial054.stdout:create_options = 0, kwargs = {}
2026-07-09T05:15:18.059 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.059 INFO:tasks.workunit.client.0.trial054.stdout: def __init__(
2026-07-09T05:15:18.059 INFO:tasks.workunit.client.0.trial054.stdout: self, path, mode="r", share_access=None, desired_access=None, file_attributes=None, create_options=0, **kwargs
2026-07-09T05:15:18.059 INFO:tasks.workunit.client.0.trial054.stdout: ):
2026-07-09T05:15:18.059 INFO:tasks.workunit.client.0.trial054.stdout: # get_smb_tree runs outside the SMBFileTransaction layer that normally translates these.
2026-07-09T05:15:18.059 INFO:tasks.workunit.client.0.trial054.stdout: try:
2026-07-09T05:15:18.059 INFO:tasks.workunit.client.0.trial054.stdout:> tree, fd_path = get_smb_tree(path, **kwargs)
2026-07-09T05:15:18.059 INFO:tasks.workunit.client.0.trial054.stdout: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-07-09T05:15:18.059 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.059 INFO:tasks.workunit.client.0.trial054.stdout:_smb_tests_44163/lib/python3.12/site-packages/smbclient/_io.py:386:
2026-07-09T05:15:18.059 INFO:tasks.workunit.client.0.trial054.stdout:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2026-07-09T05:15:18.059 INFO:tasks.workunit.client.0.trial054.stdout:_smb_tests_44163/lib/python3.12/site-packages/smbclient/_pool.py:332: in get_smb_tree
2026-07-09T05:15:18.059 INFO:tasks.workunit.client.0.trial054.stdout: tree.connect(require_secure_negotiate=client_config.require_secure_negotiate)
2026-07-09T05:15:18.059 INFO:tasks.workunit.client.0.trial054.stdout:_smb_tests_44163/lib/python3.12/site-packages/smbprotocol/tree.py:250: in connect
2026-07-09T05:15:18.059 INFO:tasks.workunit.client.0.trial054.stdout: response = self.session.connection.receive(request)
2026-07-09T05:15:18.060 INFO:tasks.workunit.client.0.trial054.stdout: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-07-09T05:15:18.060 INFO:tasks.workunit.client.0.trial054.stdout:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2026-07-09T05:15:18.060 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.060 INFO:tasks.workunit.client.0.trial054.stdout:self = <smbprotocol.connection.Connection object at 0x7cc668c578f0>
2026-07-09T05:15:18.060 INFO:tasks.workunit.client.0.trial054.stdout:request = <smbprotocol.connection.Request object at 0x7cc668b60410>, wait = True
2026-07-09T05:15:18.060 INFO:tasks.workunit.client.0.trial054.stdout:timeout = None, resolve_symlinks = True
2026-07-09T05:15:18.060 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.060 INFO:tasks.workunit.client.0.trial054.stdout: def receive(self, request, wait=True, timeout=None, resolve_symlinks=True):
2026-07-09T05:15:18.060 INFO:tasks.workunit.client.0.trial054.stdout: """
2026-07-09T05:15:18.060 INFO:tasks.workunit.client.0.trial054.stdout: Polls the message buffer of the TCP connection and waits until a valid
2026-07-09T05:15:18.060 INFO:tasks.workunit.client.0.trial054.stdout: message is received based on the message_id passed in.
2026-07-09T05:15:18.060 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.060 INFO:tasks.workunit.client.0.trial054.stdout: :param request: The Request object to wait get the response for
2026-07-09T05:15:18.060 INFO:tasks.workunit.client.0.trial054.stdout: :param wait: Wait for the final response in the case of a STATUS_PENDING response, the pending response is
2026-07-09T05:15:18.061 INFO:tasks.workunit.client.0.trial054.stdout: returned in the case of wait=False
2026-07-09T05:15:18.061 INFO:tasks.workunit.client.0.trial054.stdout: :param timeout: Set a timeout used while waiting for the final response from the server.
2026-07-09T05:15:18.061 INFO:tasks.workunit.client.0.trial054.stdout: :param resolve_symlinks: Set to automatically resolve symlinks in the path when opening a file or directory.
2026-07-09T05:15:18.061 INFO:tasks.workunit.client.0.trial054.stdout: :return: SMB2HeaderResponse of the received message
2026-07-09T05:15:18.061 INFO:tasks.workunit.client.0.trial054.stdout: """
2026-07-09T05:15:18.061 INFO:tasks.workunit.client.0.trial054.stdout: # Only the worker thread delivers responses, so calling receive() from it would wait
2026-07-09T05:15:18.061 INFO:tasks.workunit.client.0.trial054.stdout: # on an event only it can set.
2026-07-09T05:15:18.061 INFO:tasks.workunit.client.0.trial054.stdout: worker = self._t_worker
2026-07-09T05:15:18.061 INFO:tasks.workunit.client.0.trial054.stdout: if worker is not None and threading.get_ident() == worker.ident:
2026-07-09T05:15:18.061 INFO:tasks.workunit.client.0.trial054.stdout: raise SMBException("Connection.receive() called from the SMB worker thread, would self-deadlock")
2026-07-09T05:15:18.061 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.061 INFO:tasks.workunit.client.0.trial054.stdout: # Make sure the receiver is still active, if not this raises an exception.
2026-07-09T05:15:18.061 INFO:tasks.workunit.client.0.trial054.stdout: self._check_worker_running()
2026-07-09T05:15:18.061 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.061 INFO:tasks.workunit.client.0.trial054.stdout: start_time = time.time()
2026-07-09T05:15:18.061 INFO:tasks.workunit.client.0.trial054.stdout: while True:
2026-07-09T05:15:18.062 INFO:tasks.workunit.client.0.trial054.stdout: iter_timeout = int(max(timeout - (time.time() - start_time), 1)) if timeout is not None else None
2026-07-09T05:15:18.062 INFO:tasks.workunit.client.0.trial054.stdout: if not request.response_event.wait(timeout=iter_timeout):
2026-07-09T05:15:18.062 INFO:tasks.workunit.client.0.trial054.stdout: value = request.message["message_id"].get_value()
2026-07-09T05:15:18.062 INFO:tasks.workunit.client.0.trial054.stdout: raise SMBException(
2026-07-09T05:15:18.062 INFO:tasks.workunit.client.0.trial054.stdout: f"Connection timeout of {timeout} seconds exceeded while waiting for a message id {value} "
2026-07-09T05:15:18.062 INFO:tasks.workunit.client.0.trial054.stdout: "response from the server"
2026-07-09T05:15:18.062 INFO:tasks.workunit.client.0.trial054.stdout: )
2026-07-09T05:15:18.062 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.062 INFO:tasks.workunit.client.0.trial054.stdout: # Use a lock on the request so that in the case of a pending response we have exclusive lock on the event
2026-07-09T05:15:18.062 INFO:tasks.workunit.client.0.trial054.stdout: # flag and can clear it without the future pending response taking it over before we first clear the flag.
2026-07-09T05:15:18.062 INFO:tasks.workunit.client.0.trial054.stdout: with request.response_event_lock:
2026-07-09T05:15:18.062 INFO:tasks.workunit.client.0.trial054.stdout: self._check_worker_running() # The worker may have failed while waiting for the response, check again
2026-07-09T05:15:18.062 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.062 INFO:tasks.workunit.client.0.trial054.stdout: response = request.response
2026-07-09T05:15:18.062 INFO:tasks.workunit.client.0.trial054.stdout: status = response["status"].get_value()
2026-07-09T05:15:18.063 INFO:tasks.workunit.client.0.trial054.stdout: if status == NtStatus.STATUS_PENDING and wait:
2026-07-09T05:15:18.063 INFO:tasks.workunit.client.0.trial054.stdout: # Received a pending message, clear the response_event flag and wait again.
2026-07-09T05:15:18.063 INFO:tasks.workunit.client.0.trial054.stdout: request.response_event.clear()
2026-07-09T05:15:18.063 INFO:tasks.workunit.client.0.trial054.stdout: continue
2026-07-09T05:15:18.063 INFO:tasks.workunit.client.0.trial054.stdout: elif status == NtStatus.STATUS_STOPPED_ON_SYMLINK and resolve_symlinks:
2026-07-09T05:15:18.063 INFO:tasks.workunit.client.0.trial054.stdout: # Received when we do an Open on a path that contains a symlink. Need to capture all related
2026-07-09T05:15:18.063 INFO:tasks.workunit.client.0.trial054.stdout: # requests and resend the Open + others with the redirected path. First we need to resolve the
2026-07-09T05:15:18.063 INFO:tasks.workunit.client.0.trial054.stdout: # symlink path. This will fail if the symlink is pointing to a location that is not in the same
2026-07-09T05:15:18.063 INFO:tasks.workunit.client.0.trial054.stdout: # tree/share as the original request.
2026-07-09T05:15:18.063 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.063 INFO:tasks.workunit.client.0.trial054.stdout: # First wait for the other remaining requests to be processed. Their status will also fail and we
2026-07-09T05:15:18.063 INFO:tasks.workunit.client.0.trial054.stdout: # need to make sure we update the old request with the new one properly.
2026-07-09T05:15:18.063 INFO:tasks.workunit.client.0.trial054.stdout: related_requests = [self.outstanding_requests[i] for i in request.related_ids]
2026-07-09T05:15:18.063 INFO:tasks.workunit.client.0.trial054.stdout: [r.response_event.wait() for r in related_requests]
2026-07-09T05:15:18.063 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.063 INFO:tasks.workunit.client.0.trial054.stdout: # Check if the response has the reparse buffer present.
2026-07-09T05:15:18.064 INFO:tasks.workunit.client.0.trial054.stdout: exp = SMBResponseException(response)
2026-07-09T05:15:18.064 INFO:tasks.workunit.client.0.trial054.stdout: reparse_buffer = next(
2026-07-09T05:15:18.064 INFO:tasks.workunit.client.0.trial054.stdout: iter(e for e in exp.error_details if isinstance(e, SMB2SymbolicLinkErrorResponse)), None
2026-07-09T05:15:18.064 INFO:tasks.workunit.client.0.trial054.stdout: )
2026-07-09T05:15:18.064 INFO:tasks.workunit.client.0.trial054.stdout: if reparse_buffer is None:
2026-07-09T05:15:18.064 INFO:tasks.workunit.client.0.trial054.stdout: # Some SMB server don't return a buffer, only thing we
2026-07-09T05:15:18.064 INFO:tasks.workunit.client.0.trial054.stdout: # can do is raise the exception.
2026-07-09T05:15:18.064 INFO:tasks.workunit.client.0.trial054.stdout: message_id = request.message["message_id"].get_value()
2026-07-09T05:15:18.064 INFO:tasks.workunit.client.0.trial054.stdout: self.outstanding_requests.pop(message_id, None)
2026-07-09T05:15:18.064 INFO:tasks.workunit.client.0.trial054.stdout: raise exp
2026-07-09T05:15:18.064 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.064 INFO:tasks.workunit.client.0.trial054.stdout: # Now create a new request with the new path the symlink points to.
2026-07-09T05:15:18.064 INFO:tasks.workunit.client.0.trial054.stdout: session = self.session_table[request.session_id]
2026-07-09T05:15:18.064 INFO:tasks.workunit.client.0.trial054.stdout: tree = session.tree_connect_table[request.message["tree_id"].get_value()]
2026-07-09T05:15:18.064 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.064 INFO:tasks.workunit.client.0.trial054.stdout: old_create = request.get_message_data()
2026-07-09T05:15:18.064 INFO:tasks.workunit.client.0.trial054.stdout: tree_share_name = tree.share_name + "\\"
2026-07-09T05:15:18.064 INFO:tasks.workunit.client.0.trial054.stdout: original_path = tree_share_name + to_text(
2026-07-09T05:15:18.065 INFO:tasks.workunit.client.0.trial054.stdout: old_create["buffer_path"].get_value(), encoding="utf-16-le"
2026-07-09T05:15:18.065 INFO:tasks.workunit.client.0.trial054.stdout: )
2026-07-09T05:15:18.065 INFO:tasks.workunit.client.0.trial054.stdout: new_path = reparse_buffer.resolve_path(original_path)[len(tree_share_name) :]
2026-07-09T05:15:18.065 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.065 INFO:tasks.workunit.client.0.trial054.stdout: new_open = Open(tree, new_path)
2026-07-09T05:15:18.065 INFO:tasks.workunit.client.0.trial054.stdout: create_req = new_open.create(
2026-07-09T05:15:18.065 INFO:tasks.workunit.client.0.trial054.stdout: old_create["impersonation_level"].get_value(),
2026-07-09T05:15:18.065 INFO:tasks.workunit.client.0.trial054.stdout: old_create["desired_access"].get_value(),
2026-07-09T05:15:18.065 INFO:tasks.workunit.client.0.trial054.stdout: old_create["file_attributes"].get_value(),
2026-07-09T05:15:18.065 INFO:tasks.workunit.client.0.trial054.stdout: old_create["share_access"].get_value(),
2026-07-09T05:15:18.065 INFO:tasks.workunit.client.0.trial054.stdout: old_create["create_disposition"].get_value(),
2026-07-09T05:15:18.065 INFO:tasks.workunit.client.0.trial054.stdout: old_create["create_options"].get_value(),
2026-07-09T05:15:18.065 INFO:tasks.workunit.client.0.trial054.stdout: create_contexts=old_create["buffer_contexts"].get_value(),
2026-07-09T05:15:18.065 INFO:tasks.workunit.client.0.trial054.stdout: send=False,
2026-07-09T05:15:18.065 INFO:tasks.workunit.client.0.trial054.stdout: )[0]
2026-07-09T05:15:18.065 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.065 INFO:tasks.workunit.client.0.trial054.stdout: # Now add all the related requests (if any) to send as a compound request.
2026-07-09T05:15:18.065 INFO:tasks.workunit.client.0.trial054.stdout: new_msgs = [create_req] + [r.get_message_data() for r in related_requests]
2026-07-09T05:15:18.066 INFO:tasks.workunit.client.0.trial054.stdout: new_requests = self.send_compound(new_msgs, session.session_id, tree.tree_connect_id, related=True)
2026-07-09T05:15:18.066 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.066 INFO:tasks.workunit.client.0.trial054.stdout: # Verify that the first request was successful before updating the related requests with the new
2026-07-09T05:15:18.066 INFO:tasks.workunit.client.0.trial054.stdout: # info.
2026-07-09T05:15:18.066 INFO:tasks.workunit.client.0.trial054.stdout: error = None
2026-07-09T05:15:18.066 INFO:tasks.workunit.client.0.trial054.stdout: try:
2026-07-09T05:15:18.066 INFO:tasks.workunit.client.0.trial054.stdout: new_response = self.receive(new_requests[0], wait=wait, timeout=timeout, resolve_symlinks=True)
2026-07-09T05:15:18.066 INFO:tasks.workunit.client.0.trial054.stdout: except SMBResponseException as exc:
2026-07-09T05:15:18.066 INFO:tasks.workunit.client.0.trial054.stdout: # We need to make sure we fix up the remaining responses before throwing this.
2026-07-09T05:15:18.066 INFO:tasks.workunit.client.0.trial054.stdout: error = exc
2026-07-09T05:15:18.066 INFO:tasks.workunit.client.0.trial054.stdout: [r.response_event.wait() for r in new_requests]
2026-07-09T05:15:18.066 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.066 INFO:tasks.workunit.client.0.trial054.stdout: # Update the old requests with the new response information
2026-07-09T05:15:18.066 INFO:tasks.workunit.client.0.trial054.stdout: for i, old_request in enumerate([request] + related_requests):
2026-07-09T05:15:18.066 INFO:tasks.workunit.client.0.trial054.stdout: del self.outstanding_requests[old_request.message["message_id"].get_value()]
2026-07-09T05:15:18.066 INFO:tasks.workunit.client.0.trial054.stdout: old_request.update_request(new_requests[i])
2026-07-09T05:15:18.066 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.067 INFO:tasks.workunit.client.0.trial054.stdout: if error:
2026-07-09T05:15:18.067 INFO:tasks.workunit.client.0.trial054.stdout: raise error
2026-07-09T05:15:18.067 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.067 INFO:tasks.workunit.client.0.trial054.stdout: return new_response
2026-07-09T05:15:18.067 INFO:tasks.workunit.client.0.trial054.stdout: else:
2026-07-09T05:15:18.067 INFO:tasks.workunit.client.0.trial054.stdout: # now we have a retrieval request for the response, we can delete
2026-07-09T05:15:18.067 INFO:tasks.workunit.client.0.trial054.stdout: # the request from the outstanding requests
2026-07-09T05:15:18.067 INFO:tasks.workunit.client.0.trial054.stdout: message_id = request.message["message_id"].get_value()
2026-07-09T05:15:18.067 INFO:tasks.workunit.client.0.trial054.stdout: self.outstanding_requests.pop(message_id, None)
2026-07-09T05:15:18.067 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.067 INFO:tasks.workunit.client.0.trial054.stdout: if status not in [NtStatus.STATUS_SUCCESS, NtStatus.STATUS_PENDING]:
2026-07-09T05:15:18.067 INFO:tasks.workunit.client.0.trial054.stdout:> raise SMBResponseException(response)
2026-07-09T05:15:18.067 INFO:tasks.workunit.client.0.trial054.stdout:E smbprotocol.exceptions.AccessDenied: Received unexpected status from the server: A process has requested access to an object but has not been granted those access rights. (3221225506) STATUS_ACCESS_DENIED: 0xc0000022
2026-07-09T05:15:18.067 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.067 INFO:tasks.workunit.client.0.trial054.stdout:_smb_tests_44163/lib/python3.12/site-packages/smbprotocol/connection.py:1142: AccessDenied
2026-07-09T05:15:18.067 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.067 INFO:tasks.workunit.client.0.trial054.stdout:The above exception was the direct cause of the following exception:
2026-07-09T05:15:18.067 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.067 INFO:tasks.workunit.client.0.trial054.stdout:self = <test_hosts_access.TestHostsAccessToggle1 object at 0x7cc668bf2030>
2026-07-09T05:15:18.067 INFO:tasks.workunit.client.0.trial054.stdout:smb_cfg = <smbutil.SMBTestConf object at 0x7cc668bf16a0>
2026-07-09T05:15:18.068 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.068 INFO:tasks.workunit.client.0.trial054.stdout: def test_no_access_bogus_net_allow(self, smb_cfg):
2026-07-09T05:15:18.068 INFO:tasks.workunit.client.0.trial054.stdout: "Reject access when only the bogus network address is allowed"
2026-07-09T05:15:18.068 INFO:tasks.workunit.client.0.trial054.stdout: mod_share = copy.deepcopy(self.orig)
2026-07-09T05:15:18.068 INFO:tasks.workunit.client.0.trial054.stdout: mod_share['hosts_access'] = [
2026-07-09T05:15:18.068 INFO:tasks.workunit.client.0.trial054.stdout: {'access': 'allow', 'network': BOGUS_NET},
2026-07-09T05:15:18.068 INFO:tasks.workunit.client.0.trial054.stdout: ]
2026-07-09T05:15:18.068 INFO:tasks.workunit.client.0.trial054.stdout: applied = smbutil.apply_share_config(smb_cfg, mod_share)
2026-07-09T05:15:18.068 INFO:tasks.workunit.client.0.trial054.stdout: assert applied['share_id'] == mod_share['share_id']
2026-07-09T05:15:18.068 INFO:tasks.workunit.client.0.trial054.stdout: assert applied['hosts_access'] == mod_share['hosts_access']
2026-07-09T05:15:18.068 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.068 INFO:tasks.workunit.client.0.trial054.stdout: with pytest.raises(smbprotocol.exceptions.AccessDenied):
2026-07-09T05:15:18.068 INFO:tasks.workunit.client.0.trial054.stdout: with smbutil.connection(smb_cfg, self.share_name) as sharep:
2026-07-09T05:15:18.068 INFO:tasks.workunit.client.0.trial054.stdout: fname = sharep / self.filename
2026-07-09T05:15:18.068 INFO:tasks.workunit.client.0.trial054.stdout:> fname.write_text('value: NOPE\n')
2026-07-09T05:15:18.068 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.068 INFO:tasks.workunit.client.0.trial054.stdout:tests/test_hosts_access.py:123:
2026-07-09T05:15:18.068 INFO:tasks.workunit.client.0.trial054.stdout:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2026-07-09T05:15:18.069 INFO:tasks.workunit.client.0.trial054.stdout:tests/smbutil.py:157: in write_text
2026-07-09T05:15:18.069 INFO:tasks.workunit.client.0.trial054.stdout: with self.open(mode='w') as fh:
2026-07-09T05:15:18.069 INFO:tasks.workunit.client.0.trial054.stdout: ^^^^^^^^^^^^^^^^^^^
2026-07-09T05:15:18.069 INFO:tasks.workunit.client.0.trial054.stdout:tests/smbutil.py:148: in open
2026-07-09T05:15:18.069 INFO:tasks.workunit.client.0.trial054.stdout: return smbclient.open_file(str(self.share_path), mode=mode)
2026-07-09T05:15:18.069 INFO:tasks.workunit.client.0.trial054.stdout: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-07-09T05:15:18.069 INFO:tasks.workunit.client.0.trial054.stdout:_smb_tests_44163/lib/python3.12/site-packages/smbclient/_os.py:524: in open_file
2026-07-09T05:15:18.069 INFO:tasks.workunit.client.0.trial054.stdout: raw_fd = file_class(
2026-07-09T05:15:18.069 INFO:tasks.workunit.client.0.trial054.stdout:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2026-07-09T05:15:18.069 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.069 INFO:tasks.workunit.client.0.trial054.stdout:self = <smbclient._io.SMBFileIO object at 0x7cc668b615a0>
2026-07-09T05:15:18.069 INFO:tasks.workunit.client.0.trial054.stdout:path = '\\\\10.20.193.54\\share2\\TestHostAcess1.txt', mode = 'w'
2026-07-09T05:15:18.069 INFO:tasks.workunit.client.0.trial054.stdout:share_access = None, desired_access = None, file_attributes = None
2026-07-09T05:15:18.069 INFO:tasks.workunit.client.0.trial054.stdout:create_options = 0, kwargs = {}
2026-07-09T05:15:18.069 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.069 INFO:tasks.workunit.client.0.trial054.stdout: def __init__(
2026-07-09T05:15:18.069 INFO:tasks.workunit.client.0.trial054.stdout: self, path, mode="r", share_access=None, desired_access=None, file_attributes=None, create_options=0, **kwargs
2026-07-09T05:15:18.069 INFO:tasks.workunit.client.0.trial054.stdout: ):
2026-07-09T05:15:18.069 INFO:tasks.workunit.client.0.trial054.stdout: # get_smb_tree runs outside the SMBFileTransaction layer that normally translates these.
2026-07-09T05:15:18.069 INFO:tasks.workunit.client.0.trial054.stdout: try:
2026-07-09T05:15:18.070 INFO:tasks.workunit.client.0.trial054.stdout: tree, fd_path = get_smb_tree(path, **kwargs)
2026-07-09T05:15:18.070 INFO:tasks.workunit.client.0.trial054.stdout: except SMBResponseException as exc:
2026-07-09T05:15:18.070 INFO:tasks.workunit.client.0.trial054.stdout:> raise SMBOSError(exc.status, path) from exc
2026-07-09T05:15:18.070 INFO:tasks.workunit.client.0.trial054.stdout:E smbprotocol.exceptions.SMBOSError: [Error 0] [NtStatus 0xc0000022] Unknown NtStatus error returned 'STATUS_ACCESS_DENIED': '\\10.20.193.54\share2\TestHostAcess1.txt'
2026-07-09T05:15:18.070 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.070 INFO:tasks.workunit.client.0.trial054.stdout:_smb_tests_44163/lib/python3.12/site-packages/smbclient/_io.py:388: SMBOSError
2026-07-09T05:15:18.070 INFO:tasks.workunit.client.0.trial054.stdout:--------------------------- Captured stdout teardown ---------------------------
2026-07-09T05:15:18.070 INFO:tasks.workunit.client.0.trial054.stdout:Restoring original share configuration...
2026-07-09T05:15:18.070 INFO:tasks.workunit.client.0.trial054.stdout:=============================== warnings summary ===============================
2026-07-09T05:15:18.070 INFO:tasks.workunit.client.0.trial054.stdout:test_hosts_access.py::TestHostsAccessToggle1::test_no_access_bogus_allow
2026-07-09T05:15:18.070 INFO:tasks.workunit.client.0.trial054.stdout:test_ratelimit.py::TestSMBRateLimiting::test_qos_read_iops_limit
2026-07-09T05:15:18.070 INFO:tasks.workunit.client.0.trial054.stdout: /home/ubuntu/cephtest/clone.client.0/qa/workunits/smb/_smb_tests_44163/lib/python3.12/site-packages/_pytest/fixtures.py:1313: PytestRemovedIn10Warning: Class-scoped fixture defined as instance method is deprecated.
2026-07-09T05:15:18.070 INFO:tasks.workunit.client.0.trial054.stdout: Instance attributes set in this fixture will NOT be visible to test methods,
2026-07-09T05:15:18.070 INFO:tasks.workunit.client.0.trial054.stdout: as each test gets a new instance while the fixture runs only once per class.
2026-07-09T05:15:18.070 INFO:tasks.workunit.client.0.trial054.stdout: Use @classmethod decorator and set attributes on cls instead.
2026-07-09T05:15:18.070 INFO:tasks.workunit.client.0.trial054.stdout: See https://docs.pytest.org/en/stable/deprecations.html#class-scoped-fixture-as-instance-method
2026-07-09T05:15:18.070 INFO:tasks.workunit.client.0.trial054.stdout: fixturefunc = resolve_fixture_function(fixturedef, request)
2026-07-09T05:15:18.070 INFO:tasks.workunit.client.0.trial054.stdout:
2026-07-09T05:15:18.070 INFO:tasks.workunit.client.0.trial054.stdout:-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
2026-07-09T05:15:18.070 INFO:tasks.workunit.client.0.trial054.stdout:=========================== short test summary info ============================
2026-07-09T05:15:18.071 INFO:tasks.workunit.client.0.trial054.stdout:FAILED tests/test_hosts_access.py::TestHostsAccessToggle1::test_no_access_bogus_allow
2026-07-09T05:15:18.071 INFO:tasks.workunit.client.0.trial054.stdout:FAILED tests/test_hosts_access.py::TestHostsAccessToggle1::test_no_access_self_deny
2026-07-09T05:15:18.071 INFO:tasks.workunit.client.0.trial054.stdout:FAILED tests/test_hosts_access.py::TestHostsAccessToggle1::test_no_access_bogus_net_allow
2026-07-09T05:15:18.071 INFO:tasks.workunit.client.0.trial054.stdout:===== 3 failed, 30 passed, 1 deselected, 2 warnings in 1546.94s (0:25:46) ======
2026-07-09T05:15:18.071 INFO:tasks.workunit.client.0.trial054.stderr:+ cleanup
2026-07-09T05:15:18.071 INFO:tasks.workunit.client.0.trial054.stderr:+ [ ]
2026-07-09T05:15:18.071 INFO:tasks.workunit.client.0.trial054.stderr:+ rm -rf /home/ubuntu/cephtest/clone.client.0/qa/workunits/smb/_smb_tests_44163
2026-07-09T05:15:18.097 DEBUG:teuthology.orchestra.run:got remote process result: 1
2026-07-09T05:15:18.098 INFO:tasks.workunit:Stopping ["smb/smb_tests.sh -m 'default or hosts_access or rate_limiting or ceph_smb_ctl_local' tests"] on client.0...
2026-07-09T05:15:18.098 DEBUG:teuthology.orchestra.run.trial054:> sudo rm -rf -- /home/ubuntu/cephtest/workunits.list.client.0 /home/ubuntu/cephtest/clone.client.0
2026-07-09T05:15:18.104 INFO:[email protected]:Jul 09 05:15:18 trial054 bash[11308]: audit 2026-07-09T05:15:17.877260+0000 mon.a (mon.0) 864 : audit [DBG] from='mgr.14273 10.20.193.54:0/106055038' entity='mgr.x' cmd={"prefix": "config dump", "format": "json"} : dispatch
2026-07-09T05:15:18.105 INFO:[email protected]:Jul 09 05:15:18 trial054 bash[11308]: audit 2026-07-09T05:15:17.877260+0000 mon.a (mon.0) 864 : audit [DBG] from='mgr.14273 10.20.193.54:0/106055038' entity='mgr.x' cmd={"prefix": "config dump", "format": "json"} : dispatch
2026-07-09T05:15:18.432 ERROR:teuthology.contextutil:Saw exception from nested tasks
Traceback (most recent call last):
JM Updated by John Mulligan 5 months ago
- Backport set to umbrella
UB Updated by Upkeep Bot 5 months ago
- Status changed from Fix Under Review to Pending Backport
- Merge Commit set to 25f76754e001adb2a51b7ad31990746b711e743c
- Fixed In set to v21.3.0-864-g25f76754e0
- Upkeep Timestamp set to 2026-07-09T23:48:00+00:00
UB Updated by Upkeep Bot 5 months ago
- Copied to Backport #78123: umbrella: SMB: teuthology failures testing smb added
UB Updated by Upkeep Bot 5 months ago
- Tags (freeform) set to backport_processed
UB Updated by Upkeep Bot 3 months ago
- Status changed from Pending Backport to Resolved
- Tags (freeform) deleted (
backport_processed) - Upkeep Timestamp changed from 2026-07-09T23:48:00+00:00 to 2026-08-27T18:40:16+00:00
Actions