I didn't see the error in the trace - might be helpful to try "trace-cmd -e cifs record" just before you repro the bug run "md5sum" in another window (or whatever command you are using that gets the error) then "trace-cmd show" to see if that shows the error being returned to the app On Fri, Jun 4, 2021 at 3:31 AM Jörg Sommer <joerg@xxxxxxxx> wrote: > > Hi, > > I have a nasty problem. I use a cable router named Fritzbox (6490 Cable, > FritzOS 7.27) as server, but the kernel (5.10.0-7-amd64, Debian-unstable) > has problems to access the files on the share. > > This is a network capture using smbget to fetch a file: > > ``` > 107.477947156 client server Negotiate Protocol Request > SMB2 (Server Message Block Protocol version 2) > SMB2 Header > ProtocolId: 0xfe534d42 > Header Length: 64 > Credit Charge: 0 > Channel Sequence: 0 > Reserved: 0000 > Command: Negotiate Protocol (0) > Credits requested: 31 > Flags: 0x00000000 > Chain Offset: 0x00000000 > Message ID: 0 > Process Id: 0x00000000 > Tree Id: 0x00000000 > Session Id: 0x0000000000000000 > Signature: 00000000000000000000000000000000 > [Response in: 2216] > Negotiate Protocol Request (0x00) > [Preauth Hash: 09d3a214a8f08e401aa10f5c46c79bfb4b4cbfea0c181589954df4c325e4b054085bfe90…] > StructureSize: 0x0024 > Dialect count: 8 > Security mode: 0x01, Signing enabled > Reserved: 0000 > Capabilities: 0x0000007f, DFS, LEASING, LARGE MTU, MULTI CHANNEL, PERSISTENT HANDLES, DIRECTORY LEASING, ENCRYPTION > Client Guid: e612920f-05ad-41f1-b34b-5e7650d1be90 > NegotiateContextOffset: 0x00000078 > NegotiateContextCount: 3 > Reserved: 0000 > Dialect: SMB 2.0.2 (0x0202) > Dialect: SMB 2.1 (0x0210) > Dialect: Unknown (0x0222) > Dialect: Unknown (0x0224) > Dialect: SMB 3.0 (0x0300) > Dialect: SMB 3.0.2 (0x0302) > Dialect: SMB 3.1.0 (deprecated; should be 3.1.1) (0x0310) > Dialect: SMB 3.1.1 (0x0311) > Negotiate Context: SMB2_PREAUTH_INTEGRITY_CAPABILITIES > Negotiate Context: SMB2_ENCRYPTION_CAPABILITIES > Negotiate Context: SMB2_NETNAME_NEGOTIATE_CONTEXT_ID > 107.481115263 server client Negotiate Protocol Response > SMB2 (Server Message Block Protocol version 2) > SMB2 Header > ProtocolId: 0xfe534d42 > Header Length: 64 > Credit Charge: 0 > NT Status: STATUS_SUCCESS (0x00000000) > Command: Negotiate Protocol (0) > Credits granted: 1 > Flags: 0x00000001, Response > Chain Offset: 0x00000000 > Message ID: 0 > Process Id: 0x00000000 > Tree Id: 0x00000000 > Session Id: 0x0000000000000000 > Signature: 00000000000000000000000000000000 > [Response to: 2214] > [Time from request: 0.003168107 seconds] > Negotiate Protocol Response (0x00) > [Preauth Hash: 25b9c1efb89f4aa0d8fa9bddd3a8cf7f72298b00197187801a11006578ecbcdf23bcdb9f…] > StructureSize: 0x0041 > Security mode: 0x01, Signing enabled > Dialect: SMB 3.1.1 (0x0311) > NegotiateContextCount: 2 > Server Guid: 7369c667-ff51-ec4a-29cd-baabf2fbe346 > Capabilities: 0x00000000 > Max Transaction Size: 65696 > Max Read Size: 65564 > Max Write Size: 65584 > Current Time: Jun 4, 2021 09:22:04.866600000 CEST > Boot Time: Sep 14, 2000 20:34:26.039600000 CEST > Blob Offset: 0x00000080 > Blob Length: 74 > Security Blob: 604806062b0601050502a03e303ca00e300c060a2b06010401823702020aa32a3028a026… > NegotiateContextOffset: 0x000000d0 > Negotiate Context: SMB2_PREAUTH_INTEGRITY_CAPABILITIES > Negotiate Context: SMB2_ENCRYPTION_CAPABILITIES > 107.482745267 client server Session Setup Request, NTLMSSP_NEGOTIATE > 107.486012547 server client Session Setup Response, Error: STATUS_MORE_PROCESSING_REQUIRED, NTLMSSP_CHALLENGE > 107.486294745 client server Session Setup Request, NTLMSSP_AUTH, User: WORKGROUP\public > 107.495302076 server client Session Setup Response > 107.495509240 client server Tree Connect Request Tree: \\server\fritzi > 107.498547296 server client Tree Connect Response > 107.498736847 client server Create Request File: > 107.503489606 server client Create Response File: > 107.503663348 client server GetInfo Request FS_INFO/FileFsAttributeInformation File: > 107.506197658 server client GetInfo Response > 107.506366587 client server Close Request File: > 107.509582634 server client Close Response > 107.509816409 client server Create Request File: WD_blau\Public\Jörg-Backup\passwd.kdbx > 107.517840241 server client Create Response File: WD_blau\Public\Jörg-Backup\passwd.kdbx > 107.518034187 client server GetInfo Request FILE_INFO/SMB2_FILE_ALL_INFO File: WD_blau\Public\Jörg-Backup\passwd.kdbx > 107.521217971 server client GetInfo Response > 107.521347702 client server Read Request Len:64000 Off:0 File: WD_blau\Public\Jörg-Backup\passwd.kdbx > 107.823992939 server client Read Response > … > 108.280977571 client server Read Request Len:64000 Off:3840000 File: WD_blau\Public\Jörg-Backup\passwd.kdbx > 108.284075230 server client Read Response > 108.284259643 client server Read Request Len:48413 Off:3855587 File: WD_blau\Public\Jörg-Backup\passwd.kdbx > 108.286540047 server client Read Response, Error: STATUS_END_OF_FILE > 108.286742343 client server Close Request File: WD_blau\Public\Jörg-Backup\passwd.kdbx > 108.289520300 server client Close Response > ``` > > This is a network capture using mount vers=default to fetch the same file. > Accessing the file with md5sum gives `Stale file handle` > > ``` > 159.745293999 client server Negotiate Protocol Request > SMB2 (Server Message Block Protocol version 2) > SMB2 Header > ProtocolId: 0xfe534d42 > Header Length: 64 > Credit Charge: 0 > Channel Sequence: 0 > Reserved: 0000 > Command: Negotiate Protocol (0) > Credits requested: 10 > Flags: 0x00000000 > Chain Offset: 0x00000000 > Message ID: 0 > Process Id: 0x0000d504 > Tree Id: 0x00000000 > Session Id: 0x0000000000000000 > Signature: 00000000000000000000000000000000 > [Response in: 3341] > Negotiate Protocol Request (0x00) > [Preauth Hash: 637eee42d4a0314f3fb6050d55a25a0b04070a334135bd5eae14c88d2e0acfae84c8312f…] > StructureSize: 0x0024 > Dialect count: 4 > Security mode: 0x01, Signing enabled > Reserved: 0000 > Capabilities: 0x00000077, DFS, LEASING, LARGE MTU, PERSISTENT HANDLES, DIRECTORY LEASING, ENCRYPTION > Client Guid: 10b7aee0-c6dc-5341-aef1-6c8c1d5bef4e > NegotiateContextOffset: 0x00000070 > NegotiateContextCount: 4 > Reserved: 0000 > Dialect: SMB 2.1 (0x0210) > Dialect: SMB 3.0 (0x0300) > Dialect: SMB 3.0.2 (0x0302) > Dialect: SMB 3.1.1 (0x0311) > Negotiate Context: SMB2_PREAUTH_INTEGRITY_CAPABILITIES > Negotiate Context: SMB2_ENCRYPTION_CAPABILITIES > Negotiate Context: SMB2_NETNAME_NEGOTIATE_CONTEXT_ID > Negotiate Context: SMB2_POSIX_EXTENSIONS_CAPABILITIES > 159.747346324 server client Negotiate Protocol Response > SMB2 (Server Message Block Protocol version 2) > SMB2 Header > ProtocolId: 0xfe534d42 > Header Length: 64 > Credit Charge: 0 > NT Status: STATUS_SUCCESS (0x00000000) > Command: Negotiate Protocol (0) > Credits granted: 1 > Flags: 0x00000001, Response > Chain Offset: 0x00000000 > Message ID: 0 > Process Id: 0x0000d504 > Tree Id: 0x00000000 > Session Id: 0x0000000000000000 > Signature: 00000000000000000000000000000000 > [Response to: 3339] > [Time from request: 0.002052325 seconds] > Negotiate Protocol Response (0x00) > [Preauth Hash: 22993b274035b9b6a3cadf7a6c19b9b757df11aff9a45d7c9c70acfc3e830ef0b64034d6…] > StructureSize: 0x0041 > Security mode: 0x01, Signing enabled > Dialect: SMB 3.1.1 (0x0311) > NegotiateContextCount: 2 > Server Guid: 7369c667-ff51-ec4a-29cd-baabf2fbe346 > Capabilities: 0x00000000 > Max Transaction Size: 65696 > Max Read Size: 65564 > Max Write Size: 65584 > Current Time: Jun 4, 2021 09:22:57.133600000 CEST > Boot Time: Sep 14, 2000 20:34:26.039600000 CEST > Blob Offset: 0x00000080 > Blob Length: 74 > Security Blob: 604806062b0601050502a03e303ca00e300c060a2b06010401823702020aa32a3028a026… > NegotiateContextOffset: 0x000000d0 > Negotiate Context: SMB2_PREAUTH_INTEGRITY_CAPABILITIES > Negotiate Context: SMB2_ENCRYPTION_CAPABILITIES > 159.747489696 client server Session Setup Request, NTLMSSP_NEGOTIATE > 159.749757908 server client Session Setup Response, Error: STATUS_MORE_PROCESSING_REQUIRED, NTLMSSP_CHALLENGE > 159.749963978 client server Session Setup Request, NTLMSSP_AUTH, User: \public > 159.755666410 server client Session Setup Response > 159.755822268 client server Tree Connect Request Tree: \\server\IPC$ > 159.757998425 server client Tree Connect Response > 159.758149227 client server Tree Connect Request Tree: \\server\fritzi > 159.761217776 server client Tree Connect Response > 159.761390846 client server Create Request File: > 159.766487167 server client Create Response File: > 159.766633459 client server Ioctl Request FSCTL_QUERY_NETWORK_INTERFACE_INFO > 159.768736951 server client Ioctl Response, Error: STATUS_NOT_SUPPORTED > 159.768892535 client server GetInfo Request FS_INFO/FileFsAttributeInformation File: > 159.772155096 server client GetInfo Response > 159.772308033 client server GetInfo Request FS_INFO/FileFsDeviceInformation File: > 159.774874452 server client GetInfo Response > 159.775022603 client server GetInfo Request FS_INFO/FileFsVolumeInformation File: > 159.778130405 server client GetInfo Response > 159.778279828 client server GetInfo Request FS_INFO/FileFsSectorSizeInformation File: > 159.780849883 server client GetInfo Response, Error: STATUS_NOT_SUPPORTED > 159.781003009 client server Close Request File: > 159.783777662 server client Close Response > 159.783938472 client server Ioctl Request FSCTL_DFS_GET_REFERRALS, File: \server\fritzi > 159.786039870 server client Ioctl Response, Error: STATUS_NOT_FOUND > 159.786193956 client server Create Request File: > 159.790835187 server client Create Response File: > 159.790981359 client server Close Request File: > 159.793822253 server client Close Response > 159.793952080 client server Create Request File: > 159.798685685 server client Create Response File: > 159.798838348 client server Close Request File: > 159.801688226 server client Close Response > 159.801945547 client server Create Request File: ;GetInfo Request FILE_INFO/SMB2_FILE_ALL_INFO;Close Request > 159.807449380 server client Create Response File: ;GetInfo Response;Close Response > 162.884160365 client server Create Request File: WD_blau;GetInfo Request FILE_INFO/SMB2_FILE_ALL_INFO;Close Request > 162.892931850 server client Create Response File: ;GetInfo Response;Close Response > 162.893066730 client server Create Request File: WD_blau\Public;GetInfo Request FILE_INFO/SMB2_FILE_ALL_INFO;Close Request > 162.901135678 server client Create Response File: ;GetInfo Response;Close Response > 162.901307878 client server Create Request File: WD_blau\Public\Jörg-Backup;GetInfo Request FILE_INFO/SMB2_FILE_ALL_INFO;Close Request > 162.910088237 server client Create Response File: ;GetInfo Response;Close Response > 162.910199171 client server Create Request File: WD_blau\Public\Jörg-Backup\passwd.kdbx;GetInfo Request FILE_INFO/SMB2_FILE_ALL_INFO;Close Request > 162.919726743 server client Create Response File: ;GetInfo Response;Close Response > 162.919841841 client server Create Request File: WD_blau\Public\Jörg-Backup\passwd.kdbx > 162.928605146 server client Create Response File: > 162.928699866 client server Close Request File: > 162.931355762 server client Close Response > 162.931456051 client server Create Request File: WD_blau\Public\Jörg-Backup\passwd.kdbx;GetInfo Request FILE_INFO/SMB2_FILE_ALL_INFO;Close Request > 162.941435848 server client Create Response File: WD_blau\Public\Jörg-Backup;GetInfo Response;Close Response > 162.941552518 client server Create Request File: WD_blau\Public\Jörg-Backup\passwd.kdbx > 162.950640950 server client Create Response File: WD_blau\Public\Jörg-Backup > 162.950727794 client server Close Request File: WD_blau\Public\Jörg-Backup > 162.953512696 server client Close Response > 162.953612392 client server Create Request File: WD_blau;GetInfo Request FILE_INFO/SMB2_FILE_ALL_INFO;Close Request > 162.960265634 server client Create Response File: WD_blau\Public\Jörg-Backup\passwd.kdbx;GetInfo Response;Close Response > 162.960363152 client server Create Request File: WD_blau\Public;GetInfo Request FILE_INFO/SMB2_FILE_ALL_INFO;Close Request > 162.968120926 server client Create Response File: WD_blau\Public\Jörg-Backup\passwd.kdbx;GetInfo Response;Close Response > 162.968234195 client server Create Request File: WD_blau\Public\Jörg-Backup;GetInfo Request FILE_INFO/SMB2_FILE_ALL_INFO;Close Request > 162.977020433 server client Create Response File: WD_blau\Public\Jörg-Backup\passwd.kdbx;GetInfo Response;Close Response > 162.977123224 client server Create Request File: WD_blau\Public\Jörg-Backup\passwd.kdbx;GetInfo Request FILE_INFO/SMB2_FILE_ALL_INFO;Close Request > 162.986415829 server client Create Response File: WD_blau\Public\Jörg-Backup\passwd.kdbx;GetInfo Response;Close Response > 162.986554470 client server Create Request File: WD_blau\Public\Jörg-Backup\passwd.kdbx > 162.995019319 server client Create Response File: WD_blau\Public\Jörg-Backup\passwd.kdbx > 162.995101551 client server Close Request File: WD_blau\Public\Jörg-Backup\passwd.kdbx > 162.997887122 server client Close Response > 169.505713730 client server Create Request File: ;GetInfo Request FILE_INFO/SMB2_FILE_ALL_INFO;Close Request > 169.512323741 server client Create Response File: WD_blau\Public;GetInfo Response;Close Response > 169.512860789 client server Tree Disconnect Request > 169.515188660 server client Tree Disconnect Response > 169.515259125 client server Session Logoff Request > 169.517551272 server client Session Logoff Response > ``` > > And this is an access of the file with mount vers=1.0. md5sum reports > `Input/output error` > > ``` > 181.652435091 client server Negotiate Protocol Request > SMB (Server Message Block Protocol) > SMB Header > Server Component: SMB > [Response in: 3642] > SMB Command: Negotiate Protocol (0x72) > NT Status: STATUS_SUCCESS (0x00000000) > Flags: 0x00 > Flags2: 0xc801, Unicode Strings, Error Code Type, Extended Security Negotiation, Long Names Allowed > Process ID High: 23 > Signature: 0000000000000000 > Reserved: 0000 > Tree ID: 0 > Process ID: 54746 > User ID: 0 > Multiplex ID: 1 > Negotiate Protocol Request (0x72) > Word Count (WCT): 0 > Byte Count (BCC): 43 > Requested Dialects > Dialect: LM1.2X002 > Dialect: LANMAN2.1 > Dialect: NT LM 0.12 > Dialect: POSIX 2 > 181.655826070 server client Negotiate Protocol Response > SMB (Server Message Block Protocol) > SMB Header > Server Component: SMB > [Response to: 3640] > [Time from request: 0.003390979 seconds] > SMB Command: Negotiate Protocol (0x72) > NT Status: STATUS_SUCCESS (0x00000000) > Flags: 0x88, Request/Response, Case Sensitivity > Flags2: 0xc801, Unicode Strings, Error Code Type, Extended Security Negotiation, Long Names Allowed > Process ID High: 23 > Signature: 0000000000000000 > Reserved: 0000 > Tree ID: 0 > Process ID: 54746 > User ID: 0 > Multiplex ID: 1 > Negotiate Protocol Response (0x72) > Word Count (WCT): 17 > Selected Index: 2: NT LM 0.12 > Security Mode: 0x07, Mode, Password, Signatures > Max Mpx Count: 10 > Max VCs: 1 > Max Buffer Size: 65536 > Max Raw Buffer: 65536 > Session Key: 0x00000000 > Capabilities: 0x8000e05c, Unicode, Large Files, NT SMBs, NT Status Codes, Infolevel Passthru, Large ReadX, Large WriteX, Extended Security > System Time: Jun 4, 2021 09:23:19.039600000 CEST > Server Time Zone: -120 min from UTC > Challenge Length: 0 > Byte Count (BCC): 90 > Server GUID: 67c66973-51ff-4aec-29cd-baabf2fbe346 > Security Blob: 604806062b0601050502a03e303ca00e300c060a2b06010401823702020aa32a3028a026… > 181.655974252 client server Session Setup AndX Request, NTLMSSP_NEGOTIATE > 181.658209133 server client Session Setup AndX Response, NTLMSSP_CHALLENGE, Error: STATUS_MORE_PROCESSING_REQUIRED > 181.658295009 client server Session Setup AndX Request, NTLMSSP_AUTH, User: \public > 181.662947503 server client Session Setup AndX Response > 181.663081108 client server Tree Connect AndX Request, Path: \\server\IPC$ > 181.665337749 server client Tree Connect AndX Response > 181.665505345 client server Tree Connect AndX Request, Path: \\server\fritzi > 181.669439351 server client Tree Connect AndX Response > 181.669585289 client server Trans2 Request, QUERY_FS_INFO, Query FS Device Info > 181.672183252 server client Trans2 Response, QUERY_FS_INFO > 181.672266260 client server Trans2 Request, QUERY_FS_INFO, Query FS Attribute Info > 181.674872915 server client Trans2 Response, QUERY_FS_INFO > 181.674965933 client server Trans2 Request, GET_DFS_REFERRAL, File: \server\fritzi > 181.677692923 server client Trans2 Response, GET_DFS_REFERRAL, Error: STATUS_NOT_SUPPORTED > 181.677809275 client server Trans2 Request, QUERY_PATH_INFO, Query File All Info, Path: > 181.681715358 server client Trans2 Response, QUERY_PATH_INFO > 181.681847587 client server Trans2 Request, QUERY_PATH_INFO, Query File All Info, Path: > 181.686809347 server client Trans2 Response, QUERY_PATH_INFO > 181.687021639 client server Trans2 Request, QUERY_PATH_INFO, Query File All Info, Path: > 181.691405260 server client Trans2 Response, QUERY_PATH_INFO > 181.691552739 client server Trans2 Request, QUERY_PATH_INFO, Query File Internal Info, Path: > 181.695055860 server client Trans2 Response, QUERY_PATH_INFO > 182.873928911 client server Trans2 Request, QUERY_PATH_INFO, Query File All Info, Path: \WD_blau > 182.880656088 server client Trans2 Response, QUERY_PATH_INFO > 182.880792332 client server Trans2 Request, QUERY_PATH_INFO, Query File Internal Info, Path: \WD_blau > 182.886816299 server client Trans2 Response, QUERY_PATH_INFO > 182.887061740 client server Trans2 Request, QUERY_PATH_INFO, Query File All Info, Path: \WD_blau\Public > 182.892873238 server client Trans2 Response, QUERY_PATH_INFO > 182.893011485 client server Trans2 Request, QUERY_PATH_INFO, Query File Internal Info, Path: \WD_blau\Public > 182.898630411 server client Trans2 Response, QUERY_PATH_INFO > 182.898728260 client server Trans2 Request, QUERY_PATH_INFO, Query File All Info, Path: \WD_blau\Public\Jörg-Backup > 182.905397538 server client Trans2 Response, QUERY_PATH_INFO > 182.905490065 client server Trans2 Request, QUERY_PATH_INFO, Query File Internal Info, Path: \WD_blau\Public\Jörg-Backup > 182.911806490 server client Trans2 Response, QUERY_PATH_INFO > 182.911904941 client server Trans2 Request, QUERY_PATH_INFO, Query File All Info, Path: \WD_blau\Public\Jörg-Backup\passwd.kdbx > 182.919436779 server client Trans2 Response, QUERY_PATH_INFO > 182.919514901 client server Trans2 Request, QUERY_PATH_INFO, Query File Internal Info, Path: \WD_blau\Public\Jörg-Backup\passwd.kdbx > 182.926356968 server client Trans2 Response, QUERY_PATH_INFO > 182.926478308 client server NT Create AndX Request, FID: 0x4001, Path: \WD_blau\Public\J�rg-Backup\passwd.kdbx > 182.935217463 server client NT Create AndX Response, FID: 0x4001 > 182.935431010 client server Read AndX Request, FID: 0x4001, 32768 bytes at offset 0 > 182.947742379 server client Read AndX Response, FID: 0x4001, 32768 bytes > … > 183.462757494 client server Read AndX Request, FID: 0x4001, 32768 bytes at offset 3833856 > 183.465864287 server client Read AndX Response, FID: 0x4001, 21731 bytes > 183.466023126 client server Read AndX Request, FID: 0x4001, 8192 bytes at offset 3855587 > 183.468370770 server client Read AndX Response, FID: 0x4001, Error: STATUS_END_OF_FILE > 183.468490608 client server Read AndX Request, FID: 0x4001, 8192 bytes at offset 3855587 > 183.470547535 server client Read AndX Response, FID: 0x4001, Error: STATUS_END_OF_FILE > 183.470775894 client server Close Request, FID: 0x4001 > 183.472856467 server client Close Response, FID: 0x4001 > 187.299929279 client server Trans2 Request, QUERY_PATH_INFO, Query File All Info, Path: > 187.304405796 server client Trans2 Response, QUERY_PATH_INFO > 187.304940291 client server Tree Disconnect Request > 187.307143775 server client Tree Disconnect Response > 187.307301303 client server Logoff AndX Request > 187.309632364 server client Logoff AndX Response > ``` > > Can anyone help? > > Kind regards, Jörg > > -- > Ich halte ihn zwar für einen Schurken und das was er sagt für > falsch – aber ich bin bereit mein Leben dafür einzusetzen, daß > er seine Meinung sagen kann. (Voltaire) -- Thanks, Steve