Samba hangs constantly


I'm not 100% sure if this is samba fault, nic or something weird around the kernel.

What i'm doing:

i'm trying to run openwrt on DNS-320. All the support from kernel side already in upstream and works like a charm. I only did some cosmetic changes

What i'm observing:

samba randomly hangs on reads or writes. This happens very often and it's very repeatable. It happens with files with just few KBs.

What i have tried:

  • Using samba:

    • built from sources from master of openwrt (4.14.12-4)
    • binary opkg from master/snapshot package from upstream (4.14.12-4)
    • opkg from releases/21.02.3 from upstream repo (4.14.12-1) < i know this version works just fine as i have device with it
  • Different client - linux; windows; weird android java implementation. All of them have the same behavior.

  • Disabling all possible offloadings from NIC.

  • Running client with -d10 server with -d2

  • Running server with -d10. It simply doesn't work, dunno why. On client side i'm getting "unable to negotiate protocol" when running server with -d >=3 : client side ; server side

  • I know that it's not related to disk or fs - i've tried using file from a ramdisk with the same result.

  • Dumping traffic from client ; dumping same from server: i don't see any losses and anything too suspicious.

  • I suspect it's not related to L2 network. I've tried:

    • use ftp server < it works just like a charm
    • scp < works just fine
    • ping with sizes 1 to 9999 bytes; works fine
  • I know it's not a hardware issue; without changing the setup:

    • i flashed original firmware back and samba there somewhat worked
    • i flashed alt-f firmware and samba there works also fine

I would appreciate any suggestions on how to investigate this deeper.

Okay, i managed to run server with -d10. Apparently 4.14.12-1 from releases/21.02.0 works fine with debug enabled.
This is server side log with timings

and this is client:

although it says nothing too obvious to me.

For history: i failed to get it working and i stronly suspect that something is broken beyond repair in samba4 itself. I had to switch to ksmbd.

1 Like

Hi, have you manage to resolve the Samba issue? And do you mind sharing the firmware image and installation steps?

I have a D-Link DNS-320 HW A1 model and wanted to give Openwrt a try. Tks.