Project

General

Profile

Bug #11836

SMB server shutdown hang after tree connect test

Added by Gordon Ross 6 months ago. Updated 6 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

We have a new smbtorture test "base.tcondis" that does an SMB1 tree connect
with the flags including TREE_CONNECT_ANDX_DISCONNECT_TID
(see MS-SMB 2.2.4.7.1 )
which tells the server to disconnect the current TID before connecting a new one.

After running that test, the SMB server won't restart without a reboot.
It appears that some tree objects remain that are not getting cleaned up after that test.

History

#1

Updated by Gordon Ross 6 months ago

Sure enough, smb_com_tree_connect_andx does, in the SMB_TCONX_DISCONECT_TID case, a
smb_session_lookup_tree, which takes a hold on the returned tree and never releases that hold.

#2

Updated by Gordon Ross 6 months ago

I added an smbtorture test for this, on our engineering branch of samba:
https://github.com/Nexenta/samba/tree/nex-eng-tort1

The new test is: "base.tcondis"
restart the server after that test to verify the fix.

#3

Updated by Gordon Ross 6 months ago

Tested per. the description above.

#4

Updated by Electric Monk 6 months ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

git commit 27f3c5a8194b190aeea38638adf95bd93e61cef1

commit  27f3c5a8194b190aeea38638adf95bd93e61cef1
Author: Gordon Ross <gwr@nexenta.com>
Date:   2019-10-19T13:03:06.000Z

    11836 SMB server shutdown hang after tree connect test
    Reviewed by: Matt Barden <matt.barden@nexenta.com>
    Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
    Reviewed by: Evan Layton <evan.layton@nexenta.com>
    Reviewed by: Andy Stormont <AStormont@racktopsystems.com>
    Approved by: Robert Mustacchi <rm@fingolfin.org>

Also available in: Atom PDF