knoxcu / snake-os

Automatically exported from code.google.com/p/snake-os
0 stars 0 forks source link

File transfer (SMB or ftp) frozen during transfer #11

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Simply upload or download to NAS files no too large around (700MB)
2. after certain number of files, the transfer breaks and application (SMB
or ftp) seems frozen
3. restart of the application will reset and restart the transfer

What is the expected output? What do you see instead?
* download and upload files via ftp and SMB.

What version of the product are you using? On what operating system?
SNAKE OS V1.0.0 (20091027)/2.6.16-gazineu. Windows XP prf edition.

Please provide any additional information below.
-No error logs are found in Nas logs.
-Sometimes the transfer recovers itself
-RAM usage is always over 90%

Original issue reported on code.google.com by Angel.M....@gmail.com on 13 Apr 2010 at 9:51

GoogleCodeExporter commented 9 years ago
Same for me :-/

After insmod the two modules (asix.ko & usbnet.ko) which appears to be loaded 
(as I can see through dmesg) and executed the ifconfig command:

 # insmod usbnet.ko
 # insmod asix.ko
 # ifconfig eth0 192.168.0.11 netmask 255.255.255.0 up   (I understand that I have to type the same device name and IP I use for the NAS)

... no complains, but nothing happens, again the same network performance 
(after copying to/from the NAS a large movie file) and no loss of connection on 
the ssh session.

I ask you the same question that mdbovo asked, what model do you have? I guess 
I have the same "wlxkj652" and the ethernet kernel module to be loaded is the 
same, isn't?

Thanx in advance for your time.

David.

Original comment by DavidFL....@gmail.com on 1 Dec 2010 at 5:48

GoogleCodeExporter commented 9 years ago
Hi David,

I did not use the modules after my proof of concept was done. I compiled the 
USB modules in to the kernel and disabled the STARnic device completely. I had 
to change the startup scripts as they were not friendly towards the USB-Ether 
device (Setting the MAC address) 

Original comment by tuxbox.g...@gmail.com on 2 Dec 2010 at 10:58

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I'm not clear on this. Are you using a external usb wifi adapter or just the 
original hardware with a different driver module? Just to confirm, I *did* read 
all the comments on this issue. I guess you are not using the existing 
hardware, but I want to confirm for sure before I try this. 

Original comment by payte...@gmail.com on 6 Dec 2010 at 1:25

GoogleCodeExporter commented 9 years ago
I have found some tweaks to reduce the SAMBA freezing on wifi problem (I.E. Not 
Fixed, But Better).

1. There have been discussions on issue 100 about this problem with one person 
indicating they are not having this problem on wifi. It turns out they are 
using a newer 802.11n router. So that got me thinking that maybe my existing 
802.11g router may be a piece of the puzzle. Using a wifi locating utility, I 
discovered several other lans nearby. Most of them were on Channel 6, Some were 
one 1, none were on any other channels. As I understand it of the 11 possible 
channel choices, there really only 3 bands being around 1,6 and 11. So I moved 
my channel selection away from the others to 11.

2. I also did some searching on Google and found that as you increase wireless 
router power output, you may also increase noise output, and there is a point 
where you can actually start to *degrade* your signal to noise ratio.  So using 
that wifi locating utility, I started reducing the power output until I saw the 
signal level started to decline, Then moved it up one notch to be safe. I ended 
up at 50% power output for my location.

3. Next I started comparing the Kernel network parameters on the NAS to my 
existing Puppy Linux install on my notebooks. These are the differences that I 
ran across:

Kernel Param.                   NAS         Puppy Linux
/proc/sys/net/ipv4/icmp_ratelimit       100         1000
/proc/sys/net/ipv4/tcp_max_syn_backlog          128         1024 But I set it to 256 
for now. 

So I changed these two and it seems to have helped with how often and how long 
the NAS freezes. icmp_ratelimit helps with data packet losses and I think 
tcp_max_syn_backlog has something to do with the 3-way handshake between the 
Client,Router and NAS.

I am sure the original developer probably received recommendations for these 
settings based on the fact this NAS only has 32MB Ram.  However after I made 
these changes and cleared the cache out by:

sync; echo 3 > /proc/sys/vm/drop_caches

Top only shows <7MB total ram usage so I think I'm OK with these changes.
I also noticed these parameters were different but I did not really see any 
further improvement changing them:

/proc/sys/net/ipv4/route/gc_thresh      512         16384
/proc/sys/net/ipv4/route/max_size       8192            65536
/proc/sys/net/ipv4/route/redirect_load      2           5
/proc/sys/net/ipv4/route/redirect_silence   2048            5120

But that maybe just my situation.

So my general theory here is wifi having it's weakness with packet loss, 
interference etc and the NAS being not very powerful resource wise, sort of 
chokes when it encounters the packet loss issues. And the newer routers 
probably have  better resources to deal with the wifi problems so they "present 
less total issues" for the NAS to deal with. The fact that I have no problems 
with wired transfers and only wireless transfers sort of confirms my theory.

Sorry for the long winded post, I wanted to give all the facts/info as I see 
them at this moment.

Hope this helps...

Original comment by payte...@gmail.com on 10 Dec 2010 at 1:37

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
This issue makes the NS-K330 completely useless for me (and I suspect many 
others).
Like others I have no problem when my laptop is connected to the router by wire.
When connected wirelessly it will never work longer than a minute or two.
I hope my observations will help ANY progress:
- which harddisk I used made no difference
- which formatting of the harddisk I used made no difference
- which firmware (original/snake/latest snake 1.3.2) made no difference
- switching off NTP made no difference
- when filetransfer seems to freeze the monitor tells me the NAS's activity is 
not maxing out but zero.

I really hope the devellopers will take this issue seriously, even if the fix 
might be outside of the firmware. We should have the people and the knowledge 
to fix this mystery. I can't believe so many people have this issue (making the 
whole NAS useless) and still no one was able to publish a solution. If I do 
find the solution myself I will let you know.

Original comment by mail...@gmail.com on 10 Jan 2011 at 10:51

GoogleCodeExporter commented 9 years ago
I don't know what happened with the claims of tuxboxguru about an alternate 
driver based on USB. Don't we have all the same hardware? The driver doesn't 
work for me.

Original comment by mdb...@gmail.com on 10 Jan 2011 at 11:34

GoogleCodeExporter commented 9 years ago
Have the same file transfer problem, also find that I can only transfer a 
maximum file size of around 2 megabytes at the one time either collectively or 
as a single file before the transfer bombs out. It may have something to do 
with the size of the memory on my wlx-652, as I had the same problem before 
installing Snake OS and I have never had any such problems on this (wireless) 
network if I download from a computer rather than the NAS. Not sure what could 
cause this. Too little free memory perhaps? Paul.

Original comment by paulhy...@gmail.com on 6 Feb 2011 at 12:50

GoogleCodeExporter commented 9 years ago
WIFI Issues
I have the 650BT device with a 2TB drive installed and formatted NTFS.
My swap partition is on a thumb drive connected to the USB port on the 650BT. 
4GB formatted EXT3
 When my PC's were connected via G WIFI, I had these problems:

(I have two XP and one Win 7 computer connected via wireless G).

- During large file transfers (~200MB) either to NAS OR from NAS to computer. 
File transfer just stops sometimes with explorer.exe crash. (All the desktop 
icons disappear and then reappear).
- Frequently when just 'drilling' down through directory structures several 
layers -  Windows Explorer will also freeze and crash.
- When playing large MPG files stored on NAS to Windows media player. WMP will 
stop playing and complain about lost connection or missing file etc.
- Also after failing file transfer Windows explorer.exe will sometimes halt and 
reboot itself (both XP and 7).
- Have same issues using the NTFS drive AND when using the EXT3 thumb drive.
- Had the same issues with original firmware and latest Snake OS.
- The NAS (Snake OS) does not crash at all. Happily running before and after 
with no problem when the above issues happen. My original firmware crashed and 
I had to reboot the NAS but not sure if related.

When my laptop computer is connected to my router via hardwire CAT5 cable then 
I DO NOT see any of the above problems.
I have now changed to a new router Linksys 400N and wireless N network.(Old 
router was WRT54G) The problems seem to have mostly gone away when using the 
higher speed N wireless. Problems still happen on my laptop with G wireless but 
then computer is close enough to my router that I can easily connect via cat5 
cable instead.
OK I have also notice the problem one time so far when using my N @ 5 GHz but 
at the time there was low signal strength / throughput.
Note I have not done extensive testing yet using the N wireless.

Note That similar problems above are reported on many forums using various 
commercial NAS devices as well but no one has specified what type of network 
they are running, G or N or wired. Do a Web search: [explorer crash NAS] or 
[WIFI crash NAS] etc.
Some report better results when changing from WPA2 to WEP.

Go here for a writeup on my 650BT NAS: 
http://75.95.181.105:86/Comp/650BT/650BT.html

Original comment by klri...@prodigy.net on 26 Feb 2011 at 2:55

GoogleCodeExporter commented 9 years ago
If the StarNIC driver is a culprit, maybe we should look for alternative driver 
?
Here are some links I found.

From what I understand, str8132 is an old name for CNS21XX.

I see the NIC driver for Linux is still developed:
https://github.com/dmarion/linux-2.6-cns21xx

There exists also a FreeBSD port for our NAS:
http://tinyhack.com/2010/07/06/cns21xx-port-completed/

Original comment by stanisl...@gmail.com on 6 Mar 2011 at 12:46

GoogleCodeExporter commented 9 years ago
I have an NS-K330 with the latest version of snakeos installed. I have the same 
problem. On my network, I can SMB transfer 67.4MB before I get the timeout. A 
hardwired connection works fine. I use an Airlink AR430W running gargoyle as my 
router. two devices are connected with a 3 foot cat5e cable. I have a 1TB 
"clickfree" drive on port A, formatted ext3, with full allowed permissions and 
owned by root:root and a 2gig rally2 drive in port B as a swapfile. 

The SMB transfer works fine over wired. Since the wireless and wired drivers 
exist on the gargoyle router, I don't think its a hardware driver issue. It 
seems to me it must be something in either the keep-alive of the hard-drive, or 
something in the error/pause handling of the data stream. 

Any ideas?

Original comment by rod.naugler@gmail.com on 25 Mar 2011 at 7:06

GoogleCodeExporter commented 9 years ago
In continuation to tuxbox.guru working solution that uses USB-to-Ethernet 
adapter:

It's hard to find a non-asix decent adapter that is both faster than USB 1 
(~1.5 mbyte/s) and has Linux driver for the old 2.6.16 kernel on which SnakeOS 
is based.

How do you find ASIX adapter ? Just look for Wii-compatible USB-to-Ethernet 
one. They are available for $10-$12 from eBay or DealExtreme.

----------------
Of course, the better solution is to try installing a newer StarNIC driver (as 
found in LSDK 7.8.2, kernel 2.6.24. Currently SnakeOS is built with LSDK 6.8.2, 
kernel 2.6.16) or using a re-written driver for the most recent kernel 2.6.3x 
as found in OpenWRT, which still requires upgrading the SnakeOS kernel and 
implies a lot of work.

Does anybody have a courage and time to investigate newer LSDK and/or OpenWRT 
(or even FreeBSD that was ported to this NAS) ? 

Original comment by stanisl...@gmail.com on 30 Mar 2011 at 12:46

GoogleCodeExporter commented 9 years ago
I bough ($7.69 on DealExtreme) a MOSCHIP 7832-based USB-Ethernet adapter, 
back-ported it's driver (mcs7830) to 2.6.16 kernel on which SnakeOS is based, 
and it also solves the wireless problem, and works rock stable. Even wired 
access feels more responsive.

As you see not only ASIX-based adapter can solve the problem.

In the attached package you can find a mcs7830 driver, and also usbnet.sh 
script that activates driver and configures network, and a modified script 
etc\init.d\cron which runs the mentioned usbnet.sh on SnakeOS startup (but you 
may do it where you want).
After copying these files into /etc you will need to save SnakeOS configuration 
so the files will be restored after reboot.

How this works: SnakeOS starts using standard Ethernet port.
If the mcs7830 adapter is attached - it will be used and the built-in port will 
be shut down. If the adapter is not detected - SnakeOS will work with the 
built-in port.
So the script is totally safe.

Original comment by stanisl...@gmail.com on 1 May 2011 at 8:57

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I don't understand how this works.
Where does the USB-Ethernet adapter go? Having USB harddisks, and a NAS NS-K330 
with USB connections for storage, and an ethernet connection to connect the 
router I just don't see it.
Sorry for my ignorance!

USB-Ethernet adapter: http://www.dealextreme.com/details.dx/sku.34691
NAS NS-K330: http://www.dealextreme.com/details.dx/sku.26320

Original comment by mail...@gmail.com on 2 May 2011 at 7:39

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
NAS NS-K330 has 2 USB ports and the built-in Ethernet port. 
You connect 
- the USB hard disk to one of the two USB ports
- the USB-Ethernet adapter into the other USB port

then you should connect your Ethernet cable to the adapter's Ethernet port 
instead of the built-in one in the NAS.

The built-in Ethernet port (or it's driver ? who knows) is faulty, that's why 
we replace it with the USB-Ethernet adapter that really works and disable the 
built-in Ethernet port.
Of course this solution is not relevant if you need both USB ports for storage, 
but you may try to connect a USB hub to get enough USB ports.

Original comment by stanisl...@gmail.com on 2 May 2011 at 10:00

GoogleCodeExporter commented 9 years ago
Thanks for clearing that up.
What I still don't understand then is how the regular setup works fine when 
connecting my laptop to the router by (ethernet) cable instead of wireless.
Because in that case the NAS performs fine while it is also connected to the 
router via that same (original) ethernet port of the NAS.

Original comment by mail...@gmail.com on 2 May 2011 at 10:13

GoogleCodeExporter commented 9 years ago
Great to hear there is a fix for the wireless issue, although it's a shame it 
requires more hardware and several weeks waiting. I wonder what the chances of 
a patch/update being released that fixes the NAS itself...

Original comment by vew...@googlemail.com on 3 May 2011 at 9:38

GoogleCodeExporter commented 9 years ago
The problem seems to be in the ethernet port hardware. I don't think a patch 
could solve the issue. At least this is what I undertood following this thread.

I ordered the USB adapter on DealExtreme too and I'll try the solution proposed 
by stanisl...@gmail.com as soon as I'll receive it. Thanks for the great job!

Original comment by enrico.b...@gmail.com on 3 May 2011 at 12:41

GoogleCodeExporter commented 9 years ago
How does the ethernet connection of the NAS to the router fail when a laptop is 
connected wirelessly to that router, but not when that laptop is connected to 
the router by ethernet?
Hard to believe a hardware problem could cause that selective behavior...

Original comment by mail...@gmail.com on 3 May 2011 at 5:32

GoogleCodeExporter commented 9 years ago
Believe it or not, this works for tuxbox.guru (the clever guy who invented this 
solution) and his ASIX-based USB-Ethernet adapter, and it works for me and my 
MOSCHIP 7832-based USB-Ethernet adapter.

As for "how can it be" - maybe wireless connection leads to substantial packet 
loss and their retransmission, which usually doesn't happen in wired 
connections ? And the built-in StarNIC Ethernet port (or it's driver) are just 
buggy in case of numerous packets loss ? It's just a guess, but it sure can be 
the case.

As I wrote before, there is a chance this issue can be also solved by fixing 
the StarNIC driver. There exist 3 newer drivers - one comes with LSDK 7.8.2 
(based on kernel 2.6.24), other was totally rewritten for OpenWRT, and the 
third is the part of FreeBSD port. Back-porting them to SnakeOS (based on LSDK 
6.8.2, kernel 2.6.16) is either impossible or requires total rewriting of 
SnakeOS. After spending days and weeks in attempts to install newer StarNIC 
driver, I decided I have not enough time and knowledge to finish this task and 
decided to go with tuxbox.guru's solution, but with a cheaper Ethernet adapter.

But if you feel you can take up a challenge, you may try yourself installing on 
the NAS the FreeBSD distributive, or fix the currently broken OpenWRT code, or 
port SnakeOS from LSDK 6.8.2 to 7.8.2, or even backport their StarNIC drivers 
back to kernel 2.6.16.

Original comment by stanisl...@gmail.com on 3 May 2011 at 7:12

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Everybody confirms this is the real deal? 
http://www.dealextreme.com/p/usb-2-0-10-100mbps-rj45-lan-ethernet-network-adapte
r-dongle-34691

Original comment by gfernan...@gmail.com on 11 May 2011 at 1:14

GoogleCodeExporter commented 9 years ago
gfernandes, I use exactly this adapter you linked to.

Original comment by stanisl...@gmail.com on 13 May 2011 at 12:06

GoogleCodeExporter commented 9 years ago
So I purchased the usb adapter ( 
http://www.dealextreme.com/p/usb-2-0-10-100mbps-rj45-lan-ethernet-network-adapte
r-dongle-34691 ), copied across the files uploaded by stanisl (after changing 
the ip address to something suitable for my network), saved the config and 
restarted. Unfortunately the usb interface is not detected, and the network 
port on the NAS is active instead.

Any ideas for what might be going wrong, or how to diagnose the problem? Cheers.

Original comment by vew...@googlemail.com on 18 May 2011 at 10:38

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hi all,

Can someone of the experts on this issue make a step by step manual of the 
solution?, I think this is a relevant issue in order to be able to take the 
most of our NAS.

I am not a Linux expert (as many of us I think), so it would be nice if someone 
can tell us the final steps followed and the software/drivers/file 
modifications/hardware needed, for example, I assume that you communicate with 
the NAS through telnet, but I don't know how to do that, where do I put the 
files (necessary drivers and stuff)?, In the local hard drive?.

Can this modifications be included in the next SnakeOS release?

For all your help, thanks in advance.

Best regards.

Original comment by shanem...@gmail.com on 18 May 2011 at 10:12

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Any suggestions for my problem two posts above?

After some more fiddling around I think the problem is the NAS doesn't detect 
the usb adapter properly (it does work on windows, and comes up as a MosChip 
device in device manager). My kernel version is 2.6.16.

I also manually ran the script removing the check on the device being attached, 
but all I got was the message: ': unknown symbol in module, or unknown parameter

Any suggestions would be greatly appreciated!
----------------------------------------------

The parts from the log relating to USB are:

# /bin/dmesg |grep "USB"
str8100-ehci str8100-ehci: new USB bus registered, assigned bus number 1
str8100-ehci str8100-ehci: USB 0.0 started, EHCI 1.00, driver 10 Dec 2004
hub 1-0:1.0: USB hub found
ohci_hcd: 2005 April 22 USB 1.1 'Open' Host Controller (OHCI) Driver (STR8100)
str8100-ohci str8100-ohci: new USB bus registered, assigned bus number 2
hub 2-0:1.0: USB hub found
ohci_hcd: 2005 April 22 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)
usb 1-1: new high speed USB device using str8100-ehci and address 2
usb 1-2: new high speed USB device using str8100-ehci and address 3
drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver
Initializing USB Mass Storage driver...
scsi0 : SCSI emulation for USB Mass Storage devices
USB Mass Storage support registered.

and

# /bin/dmesg |grep "usb"
usbcore: registered new driver usbfs
usbcore: registered new driver hub
usb usb1: configuration #1 chosen from 1 choice
usb usb2: configuration #1 chosen from 1 choice
usb 1-1: new high speed USB device using str8100-ehci and address 2
usb 1-1: configuration #1 chosen from 1 choice
usb 1-2: new high speed USB device using str8100-ehci and address 3
usb 1-2: configuration #1 chosen from 1 choice
usbcore: registered new driver usblp
drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver
usbcore: registered new driver usb-storage
usb-storage: device found at 3
usb-storage: waiting for device to settle before scanning
usb-storage: device scan complete
Adding 262136k swap on /usb/sda1/swapfile.  Priority:-1 extents:224 
across:87925952k

Original comment by vew...@googlemail.com on 22 May 2011 at 2:59

GoogleCodeExporter commented 9 years ago
vewdon, it seems you have some hardware problem, because the USB-net adapter 
should appear twice in the dmesg - once when detected as new hardware attached, 
and the other time when the .ko driver is loaded. I will post here these lines 
from the log later.
Can you open the adapter and check the chip used ?
Do you have some other usbnet.ko module on your system ?
What happens if you disable usbnet.sh from being auto-started and then run 
manually 2 insmod commands from it ?

Original comment by stanisl...@gmail.com on 22 May 2011 at 7:52