Author Topic: Updated Samba Client  (Read 111702 times)

David McKenna

  • Hero Member
  • *****
  • Posts: 806
  • Karma: +25/-0
    • View Profile
Re: Updated Samba Client
« Reply #150 on: January 27, 2024, 02:18:09 pm »
Thanks Paul!

 This one does seem to work well - no OOM yet. The last one I never got an OOM either, so you may have squashed that bug. I'll attach logs for the new one. By far the most common line in it is:

2024/01/27 07:50:34.55: 9 2: NdpQueryPathInfo in [0x317ac0] <A.+,;=[].B>

so still see the A.+,;=[].B.

 On a different subject - on directories with windows exe files, the WPS blocks while apparently it tries to determine the icons for the files. If the files are large it can take a very long time (minutes - like it reads the whole file) to display and free the WPS. I have 'SET NOLARGENTEXEICON=1' in CONFIG.SYS, but apparently SAMBA doesn't honor that? Have you seen this?

Regards,



Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1341
  • Karma: +26/-0
    • View Profile
Re: Updated Samba Client
« Reply #151 on: January 27, 2024, 09:40:33 pm »
David,

...On a different subject - on directories with windows exe files, the WPS blocks while apparently it tries to determine the icons for the files. If the files are large it can take a very long time (minutes - like it reads the whole file) to display and free the WPS...

That has always been the bahaviour I've seen on my end.

In particular, I have my general software library on the NAS, which easily serves all the individual PC installs, but that is a set of directories I generally stay away from viewing on my OS/2 machine for the very reason you mentioned.

It's like the whole EXE has to be read in order for ANY info to actually show.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2244
  • Karma: +170/-0
    • View Profile
Re: Updated Samba Client
« Reply #152 on: January 27, 2024, 10:04:36 pm »
Hi Dave,

Thanks Paul!

 This one does seem to work well - no OOM yet. The last one I never got an OOM either, so you may have squashed that bug. I'll attach logs for the new one. By far the most common line in it is:

2024/01/27 07:50:34.55: 9 2: NdpQueryPathInfo in [0x317ac0] <A.+,;=[].B>

so still see the A.+,;=[].B.

 On a different subject - on directories with windows exe files, the WPS blocks while apparently it tries to determine the icons for the files. If the files are large it can take a very long time (minutes - like it reads the whole file) to display and free the WPS. I have 'SET NOLARGENTEXEICON=1' in CONFIG.SYS, but apparently SAMBA doesn't honor that? Have you seen this?

The log line:
Code: [Select]
2024/01/27 07:50:34.55: 9 2: NdpQueryPathInfo in [0x317ac0] <A.+,;=[].B>
Is expected. What has changed in the plugin is the code at https://github.com/psmedley/ndpsmb/blob/samba-4.19.x/src/ndpsmb.c#L1008 where if the WPS is testing A.+,;=[].B,  we return immediately rather than calling smbwrp_getattr()

If I can find a windows exe file, I'll see what the client logs  are saying.  I have no idea what the NOLARGENTEXEICON setting does and there is  definitely no code  in Samba that would handle it.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2244
  • Karma: +170/-0
    • View Profile
Re: Updated Samba Client
« Reply #153 on: January 27, 2024, 10:05:51 pm »
It's like the whole EXE has to be read in order for ANY info to actually show.

Interesting.... a set  of client logs showing this would be interesting - it may be possible to fix  in the plugin.

Flashback

  • Newbie
  • *
  • Posts: 11
  • Karma: +3/-1
    • View Profile
Re: Updated Samba Client
« Reply #154 on: January 27, 2024, 11:38:02 pm »
What has changed in the plugin is the code at https://github.com/psmedley/ndpsmb/blob/samba-4.19.x/src/ndpsmb.c#L1008 where if the WPS is testing A.+,;=[].B,  we return immediately rather than calling smbwrp_getattr()
While this certainly is a performance benefit, I think this approach just 'cures' a symptom but does not address it's root cause. Obviously, smbwrp_getattr() has a memory leak. Just checking for a specific name doesn't prevent the same problem resurfacing in other situations.

Doug Bissett

  • Hero Member
  • *****
  • Posts: 1599
  • Karma: +4/-2
    • View Profile
Re: Updated Samba Client
« Reply #155 on: January 28, 2024, 12:30:04 am »
@Paul
Quote
I have no idea what the NOLARGENTEXEICON setting does and there is  definitely no code  in Samba that would handle it

From REXX T&T:
Code: [Select]
SET NOLARGENTEXEICON=n
Limit the number of megabytes (=n) the WPS should scan through Windows EXE files for the program icon before assigning a default icon

Available: New kernels from testcase (APAR PJ27886)
Source: XWorkplace Mailinglist

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2244
  • Karma: +170/-0
    • View Profile
Re: Updated Samba Client
« Reply #156 on: January 28, 2024, 12:52:21 am »
What has changed in the plugin is the code at https://github.com/psmedley/ndpsmb/blob/samba-4.19.x/src/ndpsmb.c#L1008 where if the WPS is testing A.+,;=[].B,  we return immediately rather than calling smbwrp_getattr()
While this certainly is a performance benefit, I think this approach just 'cures' a symptom but does not address it's root cause. Obviously, smbwrp_getattr() has a memory leak. Just checking for a specific name doesn't prevent the same problem resurfacing in other situations.

I look forward to seeing your fix for the memory leak in smbwrp_getattr(). Afaict the code is basically identical to what's in Samba. I've spent hours staring at the code looking for what might be causing a leak. also note that neither client or server are demonstrating an out of memory condition - the error comes from the *mapping* of a Samba error to Unix style error codes on the *server* which manifests on the client.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2244
  • Karma: +170/-0
    • View Profile
Re: Updated Samba Client
« Reply #157 on: January 28, 2024, 01:35:12 am »
@Paul
Quote
I have no idea what the NOLARGENTEXEICON setting does and there is  definitely no code  in Samba that would handle it

From REXX T&T:
Code: [Select]
SET NOLARGENTEXEICON=n
Limit the number of megabytes (=n) the WPS should scan through Windows EXE files for the program icon before assigning a default icon

Available: New kernels from testcase (APAR PJ27886)
Source: XWorkplace Mailinglist

Thanks - I've downloaded https://github.com/open-watcom/open-watcom-1.9/releases/download/ow1.9/open-watcom-c-win32-1.9.exe and will see if I can reproduce this.

Edit: I can reproduce this - however - I don't think the plugin is doing anything wrong. I set SET NOLARGENTEXEICON  on a client - but the NdpFileRead calls are identical. Maybe  it's a bug in Netdrive? I suspect the same issue would be seen with other Netdrive plugins, but I don't have any installed to be able to test.
« Last Edit: January 28, 2024, 02:02:54 am by Paul Smedley »

David McKenna

  • Hero Member
  • *****
  • Posts: 806
  • Karma: +25/-0
    • View Profile
Re: Updated Samba Client
« Reply #158 on: January 28, 2024, 12:51:25 pm »
Hey Paul,

  I think you are probably correct about NDFS - my SAMBA server also has an FTP server, so tried the FTP plugin for NDFS and saw the exact same behavior on the same Windows files directory as with the SAMBA plugin. I also copied that directory to my client and tried browsing it locally and don't see the lag for icon display. So it seems NDFS could use a tune-up.

Regards,

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2244
  • Karma: +170/-0
    • View Profile
Re: Updated Samba Client
« Reply #159 on: January 31, 2024, 09:22:14 am »
Hey Dave,

Any change with WPS with https://smedley.id.au/tmp/ndpsmb-20240131.zip  ? Chatting with Steven -  it seems NO_ERROR might be a better return code at https://github.com/psmedley/ndpsmb/blob/samba-4.19.x/src/ndpsmb.c#L1011

That's the only change from the last build (not committed yet).

Cheers,

Paul

David McKenna

  • Hero Member
  • *****
  • Posts: 806
  • Karma: +25/-0
    • View Profile
Re: Updated Samba Client
« Reply #160 on: January 31, 2024, 12:32:45 pm »
 Paul,

  No obvious difference performance-wise, but I no longer see these lines in the client log:

 [2024/01/19 11:32:59.648000, 3] ../../source3/libsmb/clierror.c:91(cli_status_to_errno)
  cli_status_to_errno: 0xc0000034 -> 2

  I'll update your Mantis on this point...

Regards,

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2244
  • Karma: +170/-0
    • View Profile
Re: Updated Samba Client
« Reply #161 on: February 02, 2024, 09:21:56 am »
I rebuilt Samba 4.19.4 to ensure the latest fixes to smbd are also reflected in any other executables that share common libraries.

Latest Server is https://smedley.id.au/tmp/samba-4.19.4-os2-20240202.zip
Latest Netdrive Plugin: https://smedley.id.au/tmp/ndpsmb-20240131.zip
Latest smbcl419.dll: https://smedley.id.au/tmp/smbcl419-4.19.4-20240202.zip

I also updated the 1st post  to include these links to make them easier to find.
« Last Edit: February 02, 2024, 09:26:33 am by Paul Smedley »

Neil Waldhauer

  • Hero Member
  • *****
  • Posts: 1059
  • Karma: +26/-0
    • View Profile
    • Blonde Guy
Re: Updated Samba Client
« Reply #162 on: February 02, 2024, 04:27:10 pm »
I didn't detect any regressions on the server side. The latest build of smbd, samba-4.19.4-os2-20240202.zip, shares files here, just like the previous build. Network browsing is still not working, same as before.
Expert consulting for ArcaOS, OS/2 and eComStation
http://www.blondeguy.com

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1341
  • Karma: +26/-0
    • View Profile
Re: Updated Samba Client
« Reply #163 on: February 02, 2024, 05:04:11 pm »
Paul,

Latest Netdrive Plugin: https://smedley.id.au/tmp/ndpsmb-20240131.zip
Latest smbcl419.dll: https://smedley.id.au/tmp/smbcl419-4.19.4-20240202.zip

I seem to be having an awful time with these.

Pulled the NetDrive and client ZIPs, deployed and re-booted.

TRAP-D on bootup, and this is even after I scaled back my massive 1G JFS cache, etc, etc.

Not sure what else to tell ya here, appreciate the work you do though.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2244
  • Karma: +170/-0
    • View Profile
Re: Updated Samba Client
« Reply #164 on: February 02, 2024, 10:03:03 pm »
I didn't detect any regressions on the server side. The latest build of smbd, samba-4.19.4-os2-20240202.zip, shares files here, just like the previous build. Network browsing is still not working, same as before.

Thanks Neil -  I need to test arcamapper  against my Samba server running on Ubuntu -  to see if the issue is specific to the OS/2 port, or if it's a change in Samba Server behaviour.