Author Topic: Updated Samba Client  (Read 86898 times)

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2139
  • Karma: +166/-0
    • View Profile
Re: Updated Samba Client
« Reply #135 on: January 24, 2024, 09:56:43 am »
I should have known about the truncation - sorry about that. Did it again with max log set to 500000 - started at 9:35 and got the OOM at 9:38. I can pretty consistently get it in about 3 minutes now. Attached.

Nice. I'd love to know what steps you follow to reproduce it in 3min - might help me reproduce.

Anyway, turns out maybe  your previous log was sufficient - the first out of memory error looks to be:
Code: [Select]
[2024/01/23 09:38:27.270000, 5] ../../source3/smbd/files.c:1985(file_free)
  file_free: freed files structure 0 (1 used)
[2024/01/23 09:38:27.270000, 5] ../../source3/smbd/files.c:77(fsp_new)
  fsp_new: allocated files structure (2 used)
[2024/01/23 09:38:27.270000, 5] ../../source3/smbd/files.c:179(file_new)
  file_new: new file fnum [invalid value]
[2024/01/23 09:38:27.270000, 5] ../../source3/smbd/files.c:321(openat_internal_dir_from_pathref)
  openat_internal_dir_from_pathref: fd_openat(".", ".") failed: NT_STATUS_NO_MEMORY
[2024/01/23 09:38:27.270000, 5] ../../source3/smbd/files.c:1985(file_free)
  file_free: freed files structure 0 (1 used)
[2024/01/23 09:38:27.270000, 3] ../../source3/smbd/filename.c:319(get_real_filename_full_scan_at)
  get_real_filename_full_scan_at: scan dir didn't open dir [.]: NT_STATUS_NO_MEMORY
[2024/01/23 09:38:27.270000, 5] ../../source3/smbd/files.c:1985(file_free)
  file_free: freed files structure 0 (0 used)
[2024/01/23 09:38:27.270000, 3] ../../source3/smbd/smb2_server.c:4033(smbd_smb2_request_error_ex)
  smbd_smb2_request_error_ex: smbd_smb2_request_error_ex: idx[1] status[NT_STATUS_NO_MEMORY] || at ../../source3/smbd/smb2_create.c:360

file_new: new file fnum [invalid value] seems to be a furthy as there are multiple instance of it with no error.

Need to do some  thinking....

David McKenna

  • Hero Member
  • *****
  • Posts: 772
  • Karma: +25/-0
    • View Profile
Re: Updated Samba Client
« Reply #136 on: January 24, 2024, 12:31:10 pm »
Paul,

 I usually use the WPS (XView of drive N:) and browse to \Software\OS2 which has ~2500 files, open a few files, play part of an MP3, scroll down, then drag the scroll bar to the bottom and scroll up, maybe browse a couple sub-directories. Then browse to another directory \Music, which has 130 directories and start browsing them and very quickly there I get the 'no files' in a directory I know has them. Switching to command line, I see the OOM when I try to 'dir' on drive N:

 I think now if I just browse the \Music directory, it would happen faster...

Regards,
« Last Edit: January 24, 2024, 12:36:17 pm by David McKenna »

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2139
  • Karma: +166/-0
    • View Profile
Re: Updated Samba Client
« Reply #137 on: January 25, 2024, 09:01:03 am »
Here's a corresponding log from the client:
Code: [Select]
2024/01/23 09:38:27.27: 9 2: NdpQueryPathInfo in [0x342160] <Music\Pearl Jam\A.+,;=[].B>
2024/01/23 09:38:27.27: 9 2: dircache_find_path [Music\Pearl Jam\A.+,;=[].B]
2024/01/23 09:38:27.27: 9 2: dcFindPath: [Music\Pearl Jam][A.+,;=[].B]
2024/01/23 09:38:27.27: 9 2: dircache: FindPath Music\Pearl Jam\A.+,;=[].B not found
2024/01/23 09:38:27.27: 9 2: NdpQueryPathInfo pathparser for <\A.+,;=[].B> rc=0
2024/01/23 09:38:27.27: 9 2: NdpQueryPathInfo smbwrp_getattr for <\A.+,;=[].B>
2024/01/23 09:38:27.27: 4 2: getattr 0 16 <\A.+,;=[].B>
2024/01/23 09:38:27.27: 4 2: smbwrp_getattr, calling cli_qpathinfo3
2024/01/23 09:38:27.28: 9 2: NdpQueryPathInfo smbwrp_getattr, rc = 2
2024/01/23 09:38:27.28: 9 2: NdpQueryPathInfo <Music\Pearl Jam\A.+,;=[].B> (\A.+,;=[].B) 2
2024/01/23 09:38:27.28: 9 3: NdpQueryPathInfo in [0x317ac0] <Music\Pearl Jam\A.+,;=[].B>
2024/01/23 09:38:27.28: 9 3: dircache_find_path [Music\Pearl Jam\A.+,;=[].B]
2024/01/23 09:38:27.28: 9 3: dcFindPath: [Music\Pearl Jam][A.+,;=[].B]
2024/01/23 09:38:27.28: 9 3: dircache: FindPath Music\Pearl Jam\A.+,;=[].B not found
2024/01/23 09:38:27.28: 9 3: NdpQueryPathInfo pathparser for <\A.+,;=[].B> rc=0
2024/01/23 09:38:27.28: 9 3: NdpQueryPathInfo smbwrp_getattr for <\A.+,;=[].B>
2024/01/23 09:38:27.28: 4 3: getattr 0 16 <\A.+,;=[].B>
2024/01/23 09:38:27.28: 4 3: smbwrp_getattr, calling cli_qpathinfo3
2024/01/23 09:38:27.28: 9 3: NdpQueryPathInfo smbwrp_getattr, rc = 8
2024/01/23 09:38:27.28: 9 3: NdpQueryPathInfo <Music\Pearl Jam\A.+,;=[].B> (\A.+,;=[].B) 3

The WPS seems to try and open 'A.+,;=[].B'  in each folder  and somehow this triggers an OOM error in the server. Interesting....

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2139
  • Karma: +166/-0
    • View Profile
Re: Updated Samba Client
« Reply #138 on: January 25, 2024, 09:22:30 am »
Does  https://smedley.id.au/tmp/ndpsmb-20240125.zip help?  If  it doesn't, can I have a new log.ndpsmb please?

David McKenna

  • Hero Member
  • *****
  • Posts: 772
  • Karma: +25/-0
    • View Profile
Re: Updated Samba Client
« Reply #139 on: January 25, 2024, 12:33:57 pm »
 Paul,

No help - log attached, OOM toward the end of 6:16. I never noticed that 'A.+,;=[].B' before, but the log is riddled with it - must be a code error somewhere...

EDIT: tried running the 4.11 server with the 4.19 client (where I do not get the OOM) and I see those 'A.+,;=[].B' in the log all over the place there too.

Regards,
« Last Edit: January 25, 2024, 01:06:03 pm by David McKenna »

Flashback

  • Newbie
  • *
  • Posts: 11
  • Karma: +3/-1
    • View Profile
Re: Updated Samba Client
« Reply #140 on: January 25, 2024, 08:01:04 pm »
must be a code error somewhere...

AFAIR, it's the WPS checking for long file name support. If that file operation produces a specific error, a FAT-like file system is assumed. The WPS will then shorten file names and store the originals in EAs.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2139
  • Karma: +166/-0
    • View Profile
Re: Updated Samba Client
« Reply #141 on: January 25, 2024, 10:36:22 pm »
must be a code error somewhere...

AFAIR, it's the WPS checking for long file name support. If that file operation produces a specific error, a FAT-like file system is assumed. The WPS will then shorten file names and store the originals in EAs.

Yeah it's definitely a WPS thing....

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2139
  • Karma: +166/-0
    • View Profile
Re: Updated Samba Client
« Reply #142 on: January 25, 2024, 10:42:09 pm »
Paul,

No help - log attached, OOM toward the end of 6:16. I never noticed that 'A.+,;=[].B' before, but the log is riddled with it - must be a code error somewhere...

EDIT: tried running the 4.11 server with the 4.19 client (where I do not get the OOM) and I see those 'A.+,;=[].B' in the log all over the place there too.

Regards,

I think this is still the old plugin. The first line reports: Samba client 4.19-1 build 202401xx based on 4.19.4
I changed the build date for this one to 20240125

It's still showing:
Code: [Select]
2024/01/25 06:16:45.02: 9 2: NdpQueryPathInfo smbwrp_getattr for <\A.+,;=[].B>
2024/01/25 06:16:45.02: 4 2: getattr 0 16 <\A.+,;=[].B>
2024/01/25 06:16:45.02: 4 2: smbwrp_getattr, calling cli_qpathinfo3
2024/01/25 06:16:45.02: 9 2: NdpQueryPathInfo smbwrp_getattr, rc = 8

Whereas I would expect to see:
Code: [Select]
2024/01/25 17:49:56.99: 9 2: NdpQueryPathInfo in [0x4928e0] <A.+,;=[].B>
2024/01/25 17:49:56.99: 9 2: NdpQueryPathInfo in [0x4928e0] <A.+,;=[].B> - return ERROR_FILE_NOT_FOUND

Let me also double check that I zipped the right file....

bldlevel on ndpsmb.dll should show:
Description:     NDPSMB - SMBFS NetDrive External Plugin Build 20240125

David McKenna

  • Hero Member
  • *****
  • Posts: 772
  • Karma: +25/-0
    • View Profile
Re: Updated Samba Client
« Reply #143 on: January 26, 2024, 12:06:09 am »
Paul,

  That's what I see here:

[C:\programs\ndfs\ndplugs]bldlevel ndpsmb.dll
Build Level Display Facility Version 6.12.675 Sep 25 2001
(C) Copyright IBM Corporation 1993-2001
Signature:       @#netlabs:4.19-1#@##1## 25 Jan 2024 17:51:14     ARCAOS-803C::e
n::::@@NDPSMB - SMBFS NetDrive External Plugin Build 20240125
Vendor:          netlabs
Revision:        4.19
Date/Time:       25 Jan 2024 17:51:14
Build Machine:   ARCAOS-803C
Language Code:   en
File Version:    4.19
Description:     NDPSMB - SMBFS NetDrive External Plugin Build 20240125

EDIT: Just tried it again, and the header is the same: shows 4.19-1 build 202401xx based on 4.19.4. There is no other ndpsmb.dll on my system.

Regards,
« Last Edit: January 26, 2024, 12:20:18 am by David McKenna »

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2139
  • Karma: +166/-0
    • View Profile
Re: Updated Samba Client
« Reply #144 on: January 26, 2024, 12:23:33 am »

David McKenna

  • Hero Member
  • *****
  • Posts: 772
  • Karma: +25/-0
    • View Profile
Re: Updated Samba Client
« Reply #145 on: January 26, 2024, 12:36:37 am »
 OK, thanks Paul - this one has the correct header.

 Still get the OOM in about 3 minutes though - new log attached. OOM early in 18:31.

Regards,

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2139
  • Karma: +166/-0
    • View Profile
Re: Updated Samba Client
« Reply #146 on: January 26, 2024, 01:04:28 am »
ok,  https://smedley.id.au/tmp/ndpsmb-20240126b.zip  should get rid of the remaining cases like:
Code: [Select]
2024/01/25 18:28:32.09: 9 2: NdpQueryPathInfo in [0x317ac0] <Great Defrost 2012, LW pics\A.+,;=[].B>
2024/01/25 18:28:32.09: 9 2: dircache_find_path [Great Defrost 2012, LW pics\A.+,;=[].B]
2024/01/25 18:28:32.09: 9 2: dcFindPath: [Great Defrost 2012, LW pics][A.+,;=[].B]
2024/01/25 18:28:32.09: 9 2: dircache: FindPath Great Defrost 2012, LW pics\A.+,;=[].B not found
2024/01/25 18:28:32.09: 9 2: NdpQueryPathInfo pathparser for <\A.+,;=[].B> rc=0
2024/01/25 18:28:32.09: 9 2: NdpQueryPathInfo smbwrp_getattr for <\A.+,;=[].B>

I don't think this is going to fix things, but it makes the code more efficient by not calling smbwrp_getattr() on every folder to check file attributes for A.+,;=[].B which are never going to exist.

David McKenna

  • Hero Member
  • *****
  • Posts: 772
  • Karma: +25/-0
    • View Profile
Re: Updated Samba Client
« Reply #147 on: January 26, 2024, 02:29:58 am »
 Paul!

 I ran this one for 20 minutes and couldn't get the OOM. Still see the 'A.+,;=[].B' on some lines in the log though, but this is very promising!

Regards,

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2139
  • Karma: +166/-0
    • View Profile
Re: Updated Samba Client
« Reply #148 on: January 26, 2024, 09:58:01 pm »
Wow! That is promising. I'll clean up the changes and commit them anyway -  even if they don't 100% fix your issue,  they still reduce unnecessary traffic between the  client and server which is a good thing.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2139
  • Karma: +166/-0
    • View Profile
Re: Updated Samba Client
« Reply #149 on: January 27, 2024, 09:22:27 am »
https://smedley.id.au/tmp/ndpsmb-20240127.zip should be functionally identical to 20240126b but has some cleanups to the code.