Samba currupting data

Ask questions about Arch Linux ARM. Please search before making a new topic.

Re: Samba currupting data

Postby ErnieW » Fri Aug 29, 2014 10:58 am

Just to confirm that the problem I reported on this thread viewtopic.php?f=57&t=7669 di indeed seem to be a file transfer problem in kernel 3.16. I downloaded a TV recording made with tvheadend on a Pogo E02 running kernel 3.16 and got loads of file errors when processing it with ProjectX. Downgrading the tPogo to kernel 3.15, downloading the same file and running it through ProjectX again gave me no errors.
ErnieW
 
Posts: 7
Joined: Thu May 15, 2014 10:11 am

Re: Samba currupting data

Postby ebbix » Fri Aug 29, 2014 11:27 am

$this->bbcode_second_pass_quote('ErnieW', 'J')ust to confirm that the problem I reported on this thread viewtopic.php?f=57&t=7669 di indeed seem to be a file transfer problem in kernel 3.16. I downloaded a TV recording made with tvheadend on a Pogo E02 running kernel 3.16 and got loads of file errors when processing it with ProjectX. Downgrading the tPogo to kernel 3.15, downloading the same file and running it through ProjectX again gave me no errors.

Interesting, please try running (as root, while on Kernel 3.16)
$this->bbcode_second_pass_code('', 'ethtool -K eth0 tso off')
and try downloading again. I really think that might be the same problem I was facing.
EDIT: and ethtool is included in package ethtool :D
ebbix
 
Posts: 48
Joined: Fri Aug 10, 2012 1:55 pm

Re: Samba currupting data

Postby bodhi » Fri Aug 29, 2014 9:14 pm

Another test I did, without TCP tweaks mentioned above:

- 2 Kirkwood plugs running Debian 3.16.0, connected to the same Gb switch. Both running samba and smbnetfs.
- samba were mounted as:
$this->bbcode_second_pass_code('', 'root 2571 1 0 02:26 ? 00:03:56 /sbin/mount.ntfs /dev/sdc1 /media/HOME -o rw,noatime,big_writes
root 3622 2184 0 14:08 ? 00:00:00 smbnetfs -o allow_other -o config=/root/.smb/smbnetfs.conf /media/net
')
- On the 1st plug, copy a 4.4G file from the second plug:
$this->bbcode_second_pass_code('', 'cp -a /media/net/WORKGROUP/HOMEMEDIA2/media/HOME/Movies/test.mkv .
')
- The checksum matched. There was no error.
bodhi
 
Posts: 225
Joined: Sat Aug 13, 2011 10:06 am

Re: Samba currupting data

Postby fanyangto » Fri Aug 29, 2014 10:31 pm

My sendfile is already the default (false) as "true" will cause video play glitches.
fanyangto
 
Posts: 13
Joined: Mon Aug 18, 2014 2:17 am

Re: Samba currupting data

Postby bodhi » Fri Aug 29, 2014 10:44 pm

$this->bbcode_second_pass_quote('bodhi', 'A')nother test I did, without TCP tweaks mentioned above:

- 2 Kirkwood plugs running Debian 3.16.0, connected to the same Gb switch. Both running samba and smbnetfs.
- samba were mounted as:
$this->bbcode_second_pass_code('', 'root 2571 1 0 02:26 ? 00:03:56 /sbin/mount.ntfs /dev/sdc1 /media/HOME -o rw,noatime,big_writes
root 3622 2184 0 14:08 ? 00:00:00 smbnetfs -o allow_other -o config=/root/.smb/smbnetfs.conf /media/net
')
- On the 1st plug, copy a 4.4G file from the second plug:
$this->bbcode_second_pass_code('', 'cp -a /media/net/WORKGROUP/HOMEMEDIA2/media/HOME/Movies/test.mkv .
')
- The checksum matched. There was no error.


And I can confirm that playing this video file on Win 7 HTPC showing the video glitches (with sendfile =yes).

Update:
And I can confirm that the tweak from ebbix above works. The video plays without a glitch! Thanks ebbix.
$this->bbcode_second_pass_code('', 'ethtool -K eth0 tso off
')
bodhi
 
Posts: 225
Joined: Sat Aug 13, 2011 10:06 am

Re: Samba currupting data

Postby moonman » Sat Aug 30, 2014 3:22 am

Yeah disabling TSO seems to help. Thanks ebbix.
I've vreated a systemd unit that seems to work. Test and report:

/etc/systemd/system/tso_disable@.service
$this->bbcode_second_pass_code('', '[Unit]
Description=Disable TCP segmentation offload for %i
Requires=network.target
After=network.target

[Service]
ExecStart=/usr/bin/ethtool -K %i tso off
Type=oneshot

[Install]
WantedBy=multi-user.target
')

then
$this->bbcode_second_pass_code('', 'systemctl daemon-reload
systemctl enable tso_disable@eth0')
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3387
Joined: Sat Jan 15, 2011 3:36 am

Re: Samba currupting data

Postby ebbix » Sat Aug 30, 2014 3:19 pm

Glad it works for you. Took only 13 kernel builds for bisecting :lol:

In case anyone wants to disable TSO via udev (I use this method):
$this->bbcode_second_pass_code('', '$ cat /etc/udev/rules.d/50-eth.rules
# Disable TCP segmentation offload due to bugs
ACTION=="add", SUBSYSTEM=="net", KERNEL=="eth0", RUN+="/usr/bin/ethtool -K %k tso off"')
ebbix
 
Posts: 48
Joined: Fri Aug 10, 2012 1:55 pm

Re: Samba currupting data

Postby moonman » Sat Aug 30, 2014 9:42 pm

$this->bbcode_second_pass_quote('ebbix', 'G')lad it works for you. Took only 13 kernel builds for bisecting :lol:

In case anyone wants to disable TSO via udev (I use this method):
$this->bbcode_second_pass_code('', '$ cat /etc/udev/rules.d/50-eth.rules
# Disable TCP segmentation offload due to bugs
ACTION=="add", SUBSYSTEM=="net", KERNEL=="eth0", RUN+="/usr/bin/ethtool -K %k tso off"')

I tried that but it was still enabled after reboot
Did you check ethtool -k | grep tcp
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3387
Joined: Sat Jan 15, 2011 3:36 am
Top

Re: Samba currupting data

Postby ebbix » Sun Aug 31, 2014 10:30 am

For me it's working...
$this->bbcode_second_pass_code('', '$ ethtool -k eth0 | grep tcp
tcp-segmentation-offload: off
tx-tcp-segmentation: off
tx-tcp-ecn-segmentation: off [fixed]
tx-tcp6-segmentation: off [fixed]')
ebbix
 
Posts: 48
Joined: Fri Aug 10, 2012 1:55 pm

Re: Samba currupting data

Postby moonman » Sun Aug 31, 2014 11:34 am

Yeah it works. I misspelled eht0 ;) udev is cleaner and probably more reliable. Cheers
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3387
Joined: Sat Jan 15, 2011 3:36 am

PreviousNext

Return to User Questions

Who is online

Users browsing this forum: No registered users and 14 guests