Bug 7904 - Invalid file handle error when sambashare is opened.
Summary: Invalid file handle error when sambashare is opened.
Status: RESOLVED WORKSFORME
Alias: None
Product: Samba 3.3
Classification: Unclassified
Component: File services (show other bugs)
Version: 3.3.14
Hardware: All Windows 7
: P3 major
Target Milestone: ---
Assignee: Volker Lendecke
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-09 22:30 UTC by Dorey Ram (550 5.1.1 User unknown)
Modified: 2014-07-26 15:05 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dorey Ram (550 5.1.1 User unknown) 2011-01-09 22:30:06 UTC
When joined to AD/Domain,if I Open the samba filesharefrom windows PC. 

I get something like "Invalid File handle error". I observe that the FD for IPC connections is not getting created properly during the SMB_SESSIONSETUP.   

Workaround:-  Again try to join to AD/Domain(run smbd,nmbd) ,then it works properly. 


But I'm not able to understand this behaviour. I'm erasing the contents of the TDB file each time i restart SMBD.(i.e., for joinig to AD/doamin). 

Is clearing the TDB files serve my real purpose??? I believe somewhere the smb context is not handled and is dangling.

Samba Logs are as below:   
Domain name - TRANSLIKE.COM 

 
2010/12/20 12:00:51,  5] auth/token_util.c:debug_unix_user_token(548)
  UNIX token of user 0
  Primary group is 0 and contains 0 supplementary groups
[2010/12/20 12:00:51,  3] winbindd/winbindd_pam.c:winbindd_pam_auth_crap(1779)
  [16195]: pam auth crap domain: [TRANSLIKE] user: Administrator
[2010/12/20 12:00:51,  8] lib/util.c:is_myname(2108)
  is_myname(\"\TRANSLIKE\"\) returns 0
[2010/12/20 12:00:51,  3] smbd/sec_ctx.c:pop_sec_ctx(432)
  pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
[2010/12/20 12:00:51,  5] auth/auth.c:check_ntlm_password(272)
  check_ntlm_password: winbind authentication for user [Administrator] FAILED with error NT_STATUS_INVALID_HANDLE
[2010/12/20 12:00:51,  2] auth/auth.c:check_ntlm_password(318)
  check_ntlm_password:  Authentication for user [Administrator] -> [Administrator] FAILED with error NT_STATUS_INVALID_HANDLE
[2010/12/20 12:00:51,  5] auth/auth_util.c:free_user_info(2103)
  attempting to free (and zero) a user_info structure
[2010/12/20 12:00:51,  3] smbd/error.c:error_packet_set(61)
  error packet at smbd/sesssetup.c(127) cmd=115 (SMBsesssetupX) NT_STATUS_INVALID_HANDLE
[2010/12/20 12:00:51,  5] lib/util.c:show_msg(645)
[2010/12/20 12:00:51,  5] lib/util.c:show_msg(655)
  size=35
  smb_com=0x73
  smb_rcls=8
  smb_reh=0
  smb_err=49152
  smb_flg=136
  smb_flg2=51201
  smb_tid=65535
  smb_pid=65279
  smb_uid=105
  smb_mid=768
  smt_wct=0
  smb_bcc=0
[2010/12/20 12:00:51,  6] smbd/process.c:process_smb(1577)
  got message type 0x0 of len 0x8a
[2010/12/20 12:00:51,  3] smbd/process.c:process_smb(1580)
  Transaction 13 of length 142 (0 toread)
[2010/12/20 12:00:51,  5] lib/util.c:show_msg(645)
[2010/12/20 12:00:51,  5] lib/util.c:show_msg(655)
  size=138
  smb_com=0x73
  smb_rcls=0
  smb_reh=0
  smb_err=0
  smb_flg=24
  smb_flg2=51207
  smb_tid=65535
  smb_pid=65279
  smb_uid=0
  smb_mid=832
  smt_wct=12
  smb_vwv[ 0]=  255 (0xFF)
  smb_vwv[ 1]=    0 (0x0)
  smb_vwv[ 2]=16644 (0x4104)
  smb_vwv[ 3]=   50 (0x32)
  smb_vwv[ 4]=    0 (0x0)
  smb_vwv[ 5]=    0 (0x0)
  smb_vwv[ 6]=    0 (0x0)
  smb_vwv[ 7]=   74 (0x4A)
  smb_vwv[ 8]=    0 (0x0)
  smb_vwv[ 9]=    0 (0x0)
  smb_vwv[10]=  212 (0xD4)
  smb_vwv[11]=40960 (0xA000)
  smb_bcc=79
[2010/12/20 12:00:51,  3] smbd/process.c:switch_message(1397)
  switch message SMBsesssetupX (pid 16195) conn 0x0
[2010/12/20 12:00:51,  3] smbd/sec_ctx.c:set_sec_ctx(324)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2010/12/20 12:00:51,  5] auth/token_util.c:debug_nt_user_token(522)
  NT user token: (NULL)
[2010/12/20 12:00:51,  5] auth/token_util.c:debug_unix_user_token(548)
  UNIX token of user 0
  Primary group is 0 and contains 0 supplementary groups
[2010/12/20 12:00:51,  5] smbd/uid.c:change_to_root_user(370)
  change_to_root_user: now uid=(0,0) gid=(0,0)
[2010/12/20 12:00:51,  3] smbd/sesssetup.c:reply_sesssetup_and_X(1412)
  wct=12 flg2=0xc807
[2010/12/20 12:00:51,  2] smbd/sesssetup.c:setup_new_vc_session(1368)
  setup_new_vc_session: New VC == 0, if NT4.x compatible we would close all old resources.
[2010/12/20 12:00:51,  3] smbd/sesssetup.c:reply_sesssetup_and_X_spnego(1175)
  Doing spnego session setup
[2010/12/20 12:00:51,  3] smbd/sesssetup.c:reply_sesssetup_and_X_spnego(1210)
  NativeOS=[] NativeLanMan=[] PrimaryDomain=[]
[2010/12/20 12:00:51,  5] smbd/sesssetup.c:parse_spnego_mechanisms(751)
  parse_spnego_mechanisms: Got OID 1 3 6 1 4 1 311 2 2 10
[2010/12/20 12:00:51,  3] smbd/sesssetup.c:reply_spnego_negotiate(802)
  reply_spnego_negotiate: Got secblob of size 40
[2010/12/20 12:00:51,  5] auth/auth.c:make_auth_context_subsystem(514)
  Making default auth method list for security=ADS
[2010/12/20 12:00:51,  5] auth/auth.c:load_auth_module(387)
  load_auth_module: Attempting to find an auth method to match guest
[2010/12/20 12:00:51,  5] auth/auth.c:load_auth_module(412)
  load_auth_module: auth method guest has a valid init
[2010/12/20 12:00:51,  5] auth/auth.c:load_auth_module(387)
  load_auth_module: Attempting to find an auth method to match sam
[2010/12/20 12:00:51,  5] auth/auth.c:load_auth_module(412)
  load_auth_module: auth method sam has a valid init
[2010/12/20 12:00:51,  5] auth/auth.c:load_auth_module(387)
  load_auth_module: Attempting to find an auth method to match winbind:ntdomain
[2010/12/20 12:00:51,  5] auth/auth.c:load_auth_module(387)
  load_auth_module: Attempting to find an auth method to match ntdomain
[2010/12/20 12:00:51,  5] auth/auth.c:load_auth_module(412)
  load_auth_module: auth method ntdomain has a valid init
[2010/12/20 12:00:51,  5] auth/auth.c:load_auth_module(412)
  load_auth_module: auth method winbind has a valid init
[2010/12/20 12:00:51,  3] libsmb/ntlmssp.c:debug_ntlmssp_flags(62)
  Got NTLMSSP neg_flags=0xe2088297
    NTLMSSP_NEGOTIATE_UNICODE
    NTLMSSP_NEGOTIATE_OEM
    NTLMSSP_REQUEST_TARGET
    NTLMSSP_NEGOTIATE_SIGN
    NTLMSSP_NEGOTIATE_LM_KEY
    NTLMSSP_NEGOTIATE_NTLM
    NTLMSSP_NEGOTIATE_ALWAYS_SIGN
    NTLMSSP_NEGOTIATE_NTLM2
    NTLMSSP_NEGOTIATE_VERSION
    NTLMSSP_NEGOTIATE_128
    NTLMSSP_NEGOTIATE_KEY_EXCH
    NTLMSSP_NEGOTIATE_56
Comment 1 Volker Lendecke 2011-05-14 09:22:20 UTC
Can you try 3.5.8? If you can reproduce it there, we need winbind logs also as well as an strace of smbd.
Comment 2 Björn Jacke 2014-07-26 15:05:31 UTC
ne feedback. assume this is not a problem anymore.