Author Topic: Updated Samba Client  (Read 171464 times)

David McKenna

  • Hero Member
  • *****
  • Posts: 891
  • Karma: +32/-0
    • View Profile
Re: Updated Samba Client
« Reply #60 on: January 05, 2024, 05:00:58 am »
Paul,

 Tried 'client smb encrypt = off' on both client and server, but it made no difference to the performance, and I still needed to add -t 60 to smbclient to get a listing of \software\os2...

Regards,

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2531
  • Karma: +195/-0
    • View Profile
Re: Updated Samba Client
« Reply #61 on: January 05, 2024, 05:45:48 am »
OK I give in, it's general slowness in the server :)

Any chance of an 'smbd -d 8' with both 4.11 and 4.18 of a directory listing? Doesn't need to be software/os2 - just trying to identify where the delays are being created. Might be best to upload to a GitHub issue or my mantis.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2531
  • Karma: +195/-0
    • View Profile
Re: Updated Samba Client
« Reply #62 on: January 05, 2024, 08:52:56 am »
OK some of the error handling in list_files() was borked  - and made worse with my changes in the last few days. Previously the error handling was ok for SMB1, and broken for SMB2+ -  then with the latest resync - broken for both SMB1 and SMB2.

https://smedley.id.au/tmp/ndpsmb-3.18.2-samba418-20240105b.zip should fix this -  and also increases the default client timeout to 60s whilst we try and resolve issues with performance in smbd.

Code is in https://github.com/psmedley/ndpsmb/tree/cli_list_resync - I'll merge to master once a few others have confirmed nothing is borked.

David McKenna

  • Hero Member
  • *****
  • Posts: 891
  • Karma: +32/-0
    • View Profile
Re: Updated Samba Client
« Reply #63 on: January 05, 2024, 12:55:47 pm »
 Hey Paul,

  Something weird with this one - I start ndctl, it connects, I can browse the root, but when I go to \software\os2 (via the WPS), it doesn't list all files (maybe about 2100 of them), then ndctl crashes with a POPUPLOG:

01-05-2024  06:48:58  SYS3175  PID 005d  TID 0002  Slot 0089
C:\PROGRAMS\NDFS\NDCTL.EXE
c0000005
1ce7b65c
P1=00000001  P2=00000040  P3=XXXXXXXX  P4=XXXXXXXX 
EAX=00000000  EBX=1069f2d0  ECX=00000002  EDX=005d0002
ESI=00000010  EDI=1069f2d8 
DS=0053  DSACC=d0f3  DSLIM=bfffffff 
ES=0053  ESACC=d0f3  ESLIM=bfffffff 
FS=150b  FSACC=00f3  FSLIM=00000030
GS=0000  GSACC=****  GSLIM=********
CS:EIP=005b:1ce7b65c  CSACC=d0df  CSLIM=bfffffff
SS:ESP=0053:0254f624  SSACC=d0f3  SSLIM=bfffffff
EBP=0254f64c  FLG=00010206

SMBCL418.DLL 0001:0013b65c

 I'll also attach the log while this happened. I'll do the smbd -d 8 thing and upload to your Mantis when I get time - off to work now.

Regards,

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2531
  • Karma: +195/-0
    • View Profile
Re: Updated Samba Client
« Reply #64 on: January 05, 2024, 10:02:43 pm »
Interesting.....

We start seeing:
Code: [Select]
2024/01/05 06:47:58.90: 9 3: NdpFindStart: dir [\Software\OS2\Drivers\], dir_mask [*], mask [\Software\OS2\Drivers\*], szPath [Software\OS2\Drivers\*]
2024/01/05 06:47:58.90: 4 3:  cli_echo failed: NT_STATUS_CONNECTION_DISCONNECTED

I'll have to  stare at things again....

I don't think it will help,  but there are some cleanups in https://smedley.id.au/tmp/ndpsmb-3.18.2-samba418-20240106.zip
« Last Edit: January 05, 2024, 10:23:35 pm by Paul Smedley »

David McKenna

  • Hero Member
  • *****
  • Posts: 891
  • Karma: +32/-0
    • View Profile
Re: Updated Samba Client
« Reply #65 on: January 05, 2024, 11:45:24 pm »
Paul,

  I'm getting 'not found' on that link. Also uploaded a couple of logs on your Mantis of runs with smbd -d 8 with both 4.11 and 4.18 servers...

Regards,

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2531
  • Karma: +195/-0
    • View Profile
Re: Updated Samba Client
« Reply #66 on: January 06, 2024, 03:55:24 am »
Apologies  - file should be live now. One thought - it's possible errors  were being ignored previously and are being reported now. I  wonder if all files were actually being displayed with the previous 'good' build (ie the one with the increased timeouts).

Thanks for the smbd logs,  I'll stare at them later, gotta finish painting first!

David McKenna

  • Hero Member
  • *****
  • Posts: 891
  • Karma: +32/-0
    • View Profile
Re: Updated Samba Client
« Reply #67 on: January 06, 2024, 05:20:31 am »
Thanks Paul,

 This one is working on the \software\os2 directory (takes a long time to display), but now I eventually get the 'out of memory' condition again. No POPUPLOG, and restarting ndctl allows it to work again. I'll attach a log of browsing around until it runs out of memory (only takes a few minutes).

Regards,

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2531
  • Karma: +195/-0
    • View Profile
Re: Updated Samba Client
« Reply #68 on: January 06, 2024, 06:49:33 am »
I'm struggling to download that log, any chance of zipping it? Meanwhite, I'm trying to put enough stuff into a directory such that I can trigger this locallly.

David Graser

  • Hero Member
  • *****
  • Posts: 975
  • Karma: +110/-0
    • View Profile
Re: Updated Samba Client
« Reply #69 on: January 06, 2024, 07:42:06 am »
Thanks Paul,

 This one is working on the \software\os2 directory (takes a long time to display), but now I eventually get the 'out of memory' condition again. No POPUPLOG, and restarting ndctl allows it to work again. I'll attach a log of browsing around until it runs out of memory (only takes a few minutes).

Regards,

Paul, I zipped it up for you.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2531
  • Karma: +195/-0
    • View Profile
Re: Updated Samba Client
« Reply #70 on: January 06, 2024, 09:24:02 am »
So this is weird.... I now have a folder u:\website\2023  which has 24,727,763,360 bytes (23GB) in 3,889 files and 0 dirs

Even with the original plugin for Samba 4.18.x -  the plugin can list the folder - the directory listing takes 45 seconds before it shows anything, but it works.

With the latest  20240106 plugin,  the directory listing also works.

@Dave - can you remove x:\ndpsmb.dbg and see if it helps?

I also installed Samba 4.11 -  and the directory listing also takes close to 45 seconds before it shows anything.  I *cannot*  explain why @Dave needed the increased timeout  to  get the directory listing working.

My Samba server is running on baremetal  AOS 5.0  -  my test client is a virtualised AOS  5.0

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2531
  • Karma: +195/-0
    • View Profile
Re: Updated Samba Client
« Reply #71 on: January 06, 2024, 09:54:59 am »

David McKenna

  • Hero Member
  • *****
  • Posts: 891
  • Karma: +32/-0
    • View Profile
Re: Updated Samba Client
« Reply #72 on: January 06, 2024, 03:45:18 pm »
Hey Paul,

  You are sharing the root of the drive? What happens when you use smbclient without the '-t 60' to list that folder? I get:

smb: \> cd software
smb: \software\> cd os2
smb: \software\os2\> ls
NT_STATUS_IO_TIMEOUT listing \software\os2\*
smb: \software\os2\> SMBecho failed (NT_STATUS_INVALID_NETWORK_RESPONSE). The co
nnection is disconnected now

 This is with ndpsmb.dbg removed.  Also, eventually when heavily browsing the share I get the 'out of memory' condition with 20240106 too.

Regards,

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2531
  • Karma: +195/-0
    • View Profile
Re: Updated Samba Client
« Reply #73 on: January 06, 2024, 09:43:58 pm »
Hey Paul,

  You are sharing the root of the drive? What happens when you use smbclient without the '-t 60' to list that folder? I get:

smb: \> cd software
smb: \software\> cd os2
smb: \software\os2\> ls
NT_STATUS_IO_TIMEOUT listing \software\os2\*
smb: \software\os2\> SMBecho failed (NT_STATUS_INVALID_NETWORK_RESPONSE). The co
nnection is disconnected now

 This is with ndpsmb.dbg removed.  Also, eventually when heavily browsing the share I get the 'out of memory' condition with 20240106 too.

Yep,  sharing u:/. I did my testing with smbclient under linux - significant delay but it still worked.

ndpsmb.dbg will only impact the Netdrive plugin, not smbclient.

My final (well for now) idea - what's the contents of the smb.conf on the client machine you're using?

David McKenna

  • Hero Member
  • *****
  • Posts: 891
  • Karma: +32/-0
    • View Profile
Re: Updated Samba Client
« Reply #74 on: January 06, 2024, 10:37:03 pm »
Paul,

 Here it is:

[global]
   workgroup = IBMPEERS
   loglevel = 0
   client min protocol = NT1

 I've been trying all day to get this thing to work right, but so far no luck. One thing strange about the \software\os2 directory is that it always blocks the WPS when I try to list it (with the WPS). Other large directories on the share don't do that. One thing I still need to do is break up the files in that directory into sub-directories and see what happens.

 In C:\MPTN\ETC\samba\lock on both server and client there are *.tdb files (a lot on the server). Do you know what they do and can they be deleted? I wonder if there may be some kind of cruft or corruption in some of those...

 I searched thru dozens of logs too, but didn't see anything that jumped out to indicate a problem, but I really don't know what a lot of it is for.

 I'll keep trying...

Regards,