NewPi
Posts: 66
Joined: Sat Aug 18, 2012 2:52 pm

Re: Network problems and hangs... losing faith... (solved)

Wed Jan 16, 2013 2:59 am

Updating the firmware using rpi-update (after recent which includes the USB errors patch) did the trick for me.
Raspberry Pi Howto, Tips, Tricks and Tools -> http://bit.ly/RPiTricks

NukeEng
Posts: 1
Joined: Thu Apr 25, 2013 4:36 pm

Re: Network problems and hangs... losing faith... (solved)

Thu Apr 25, 2013 4:40 pm

Updating the firmware also solved this issue for me.

I followed the instructions at this link: https://github.com/Hexxeh/rpi-update

frust
Posts: 1
Joined: Thu Jun 20, 2013 2:04 pm

Re: Network problems and hangs... losing faith... (solved)

Thu Jun 20, 2013 2:10 pm

I have the same issue but my pi is new and updatet to the newest version.
While stressing the network I got following in the dmesg log:

Code: Select all

[  633.486413] gsnpsid_show(c0516168) -> platform_dev c0516160, otg_dev d6982660
[  633.487038] guid_show(c0516168) -> platform_dev c0516160, otg_dev d6982660
[  633.493875] gusbcfg_show(c0516168) -> platform_dev c0516160, otg_dev d6982660
[  633.510996] hnpcapable_show(c0516168) -> platform_dev c0516160, otg_dev d6982660
[  633.511744] hprt0_show(c0516168) -> platform_dev c0516160, otg_dev d6982660
[  633.512303] hptxfsiz_show(c0516168) -> platform_dev c0516160, otg_dev d6982660
[  633.513007] hsic_connect_show(c0516168) -> platform_dev c0516160, otg_dev d6982660
[  633.527146] inv_sel_hsic_show(c0516168) -> platform_dev c0516160, otg_dev d6982660
[  633.528222] mode_show(c0516168) -> platform_dev c0516160, otg_dev d6982660
[  633.545568] HZ 100, MSEC_PER_JIFFIE 10, loops_per_jiffy 3489792
After that I "cooled" the network chip with my fingertip and after that it ran better. But not completely without problems. Hangs are less often. So possibly I just "fixed" a bad soldering by pressing on that chip???
Does above log snippet help to debug?

grantonstar
Posts: 30
Joined: Sat Nov 24, 2012 1:08 pm

Re: Network problems and hangs... losing faith... (solved)

Wed Jul 24, 2013 6:20 pm

I've start experiencing similar issues. Using my Pi as a fileserver, bittorrent (transmission) via openvpn. Have barely had any issues until past week with the Pi since I first got it 9 months ago.

Noticed sudden regular freezes, can be daily, sometimes within minutes. All the pi's lights are on, not flashing and cannot SSH into the device (no route to host). Plugging in a keyboard forces a reboot. dmesg and syslog record nothing. It doesn't seem to necessarily correlate with high network or USB activity.

I'm using a charger I bought with the pi from Farnell and a DLink powered hub (recommended as working with the pi). Only thing connected is a couple of external hard drives. I regularly run rpi-update and dist-upgrade to ensure everything is up to date. Prior to last week when this started I had uptimes of over 50 days.

I don't have any tools to measure current but as I said, other than the past week, everything's been fine so it's very odd. The only other difference is the recent heatwave in the UK. What temperature should the pi be? I've been regularly checking /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq and it's been as high as 65000 (65 degrees?).

Anything else I should look out for?

Any help would be appreciated!

broo0ose
Posts: 317
Joined: Wed Dec 14, 2011 3:59 pm
Location: Wirral, UK

Re: Network problems and hangs... losing faith... (solved)

Wed Jul 24, 2013 6:45 pm

grantonstar wrote:I've start experiencing similar issues. Using my Pi as a fileserver, bittorrent (transmission) via openvpn. Have barely had any issues until past week with the Pi since I first got it 9 months ago.

Noticed sudden regular freezes, can be daily, sometimes within minutes. All the pi's lights are on, not flashing and cannot SSH into the device (no route to host). Plugging in a keyboard forces a reboot. dmesg and syslog record nothing. It doesn't seem to necessarily correlate with high network or USB activity.

I'm using a charger I bought with the pi from Farnell and a DLink powered hub (recommended as working with the pi). Only thing connected is a couple of external hard drives. I regularly run rpi-update and dist-upgrade to ensure everything is up to date. Prior to last week when this started I had uptimes of over 50 days.

I don't have any tools to measure current but as I said, other than the past week, everything's been fine so it's very odd. The only other difference is the recent heatwave in the UK. What temperature should the pi be? I've been regularly checking /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq and it's been as high as 65000 (65 degrees?).

Anything else I should look out for?

Any help would be appreciated!
If you are running rpi-update as a matter of course you might need to go back to a firmware version before you started seeing problems. As I understand it the firmware that gets downloaded is bleeding edge. And the chargers I got from Farnell are now in the bin, the voltage it was barely up to RPi minimum.

grantonstar
Posts: 30
Joined: Sat Nov 24, 2012 1:08 pm

Re: Network problems and hangs... losing faith... (solved)

Thu Jul 25, 2013 9:14 am

broo0ose wrote:
grantonstar wrote:I've start experiencing similar issues. Using my Pi as a fileserver, bittorrent (transmission) via openvpn. Have barely had any issues until past week with the Pi since I first got it 9 months ago.

Noticed sudden regular freezes, can be daily, sometimes within minutes. All the pi's lights are on, not flashing and cannot SSH into the device (no route to host). Plugging in a keyboard forces a reboot. dmesg and syslog record nothing. It doesn't seem to necessarily correlate with high network or USB activity.

I'm using a charger I bought with the pi from Farnell and a DLink powered hub (recommended as working with the pi). Only thing connected is a couple of external hard drives. I regularly run rpi-update and dist-upgrade to ensure everything is up to date. Prior to last week when this started I had uptimes of over 50 days.

I don't have any tools to measure current but as I said, other than the past week, everything's been fine so it's very odd. The only other difference is the recent heatwave in the UK. What temperature should the pi be? I've been regularly checking /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq and it's been as high as 65000 (65 degrees?).

Anything else I should look out for?

Any help would be appreciated!
If you are running rpi-update as a matter of course you might need to go back to a firmware version before you started seeing problems. As I understand it the firmware that gets downloaded is bleeding edge. And the chargers I got from Farnell are now in the bin, the voltage it was barely up to RPi minimum.
I hadn't run rpi-update for at least a month (until last night again) and freezing in all but the last few days hasn't been a problem.

It froze again overnight though this time I got a little more prior to that from syslog. Transmission was looping through torrents, connecting to trackers which it seems to do regularly. Then it looks like networking restarts and possibly a reboot (or at least USB devices all being re-registered). Then it freezes, all lights on and nothing else in syslog.

As I've said, this worked near flawlessly for months so it's odd it came about recently when there have been no major changes. Is this behaviour consistent with a faulty or underpeforming power supply? Is there anything I can do to isolate the issue further? Would turning off swap and/or overclocking make a difference?

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5460
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Network problems and hangs... losing faith... (solved)

Thu Jul 25, 2013 10:34 am

grantonstar wrote: I hadn't run rpi-update for at least a month (until last night again) and freezing in all but the last few days hasn't been a problem.
While it doesn't explain why it used to work, I'd recommend updating. Take a backup of sdcard first, and you can revert back if there are problems.
grantonstar wrote: As I've said, this worked near flawlessly for months so it's odd it came about recently when there have been no major changes. Is this behaviour consistent with a faulty or underpeforming power supply? Is there anything I can do to isolate the issue further? Would turning off swap and/or overclocking make a difference?
Could well be a borderline power supply. Perhaps recent warm weather has pushed it over the edge.

grantonstar
Posts: 30
Joined: Sat Nov 24, 2012 1:08 pm

Re: Network problems and hangs... losing faith... (solved)

Thu Jul 25, 2013 11:12 am

dom wrote:
grantonstar wrote: I hadn't run rpi-update for at least a month (until last night again) and freezing in all but the last few days hasn't been a problem.
While it doesn't explain why it used to work, I'd recommend updating. Take a backup of sdcard first, and you can revert back if there are problems.
grantonstar wrote: As I've said, this worked near flawlessly for months so it's odd it came about recently when there have been no major changes. Is this behaviour consistent with a faulty or underpeforming power supply? Is there anything I can do to isolate the issue further? Would turning off swap and/or overclocking make a difference?
Could well be a borderline power supply. Perhaps recent warm weather has pushed it over the edge.
I did an rpi-update and dist-upgrade last night and it froze overnight.

I've added "smsc95xx.turbo_mode=N" to /boot/cmdline.txt to see if that helps. From a look around, I don't get kevent errors or much in dmesg regarding this but will see if it helps.

Re: powersupply, what is recommended? Can I test it using a mobile charger say like one for a Samsung S3?

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5460
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Network problems and hangs... losing faith... (solved)

Thu Jul 25, 2013 1:38 pm

grantonstar wrote:I've added "smsc95xx.turbo_mode=N" to /boot/cmdline.txt to see if that helps. From a look around, I don't get kevent errors or much in dmesg regarding this but will see if it helps.

Re: powersupply, what is recommended? Can I test it using a mobile charger say like one for a Samsung S3?
A Samsung charger may be fine. You can only be sure by testing, and ideally measuring the voltage. See:
http://elinux.org/R-Pi_Troubleshooting# ... r_problems

broo0ose
Posts: 317
Joined: Wed Dec 14, 2011 3:59 pm
Location: Wirral, UK

Re: Network problems and hangs... losing faith... (solved)

Thu Jul 25, 2013 1:48 pm

grantonstar wrote: Re: powersupply, what is recommended? Can I test it using a mobile charger say like one for a Samsung S3?
~Assuming we are talking about UK power supplies.
I switched from the one I bought from Farnell (MWUSBUK1) to the default one from RS. (HNP06UK-MicroUSB)
http://uk.rs-online.com/web/p/plug-in-p ... y/7263069/

I did a fair amount of TP1-TP2 testing at the time and the one from my Samsung S2 was fine, as were the ones from various Android Tablets. But if you want to buy one then then the RS one was well within the specs and was good value.

grantonstar
Posts: 30
Joined: Sat Nov 24, 2012 1:08 pm

Re: Network problems and hangs... losing faith... (solved)

Thu Jul 25, 2013 2:38 pm

I'll give it a try tonight. I also purchased a maplin usb power supply (N06JT) 5V 2mA so will also test it and see.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 25914
Joined: Sat Jul 30, 2011 7:41 pm

Re: Network problems and hangs... losing faith... (solved)

Thu Jul 25, 2013 2:49 pm

Just as a reference point, I was having network drops on a wired connection after random amount of time, it's not power (I use a desktop power supply), but it WAS out of date firmware on the board. An rpi-update fixed the issue. Well, so far so good - been up considerably longer than any previous times.

Thanks Dom!
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“My wife said to me `...you’re not even listening`.
I thought, that’s an odd way to start a conversation.."

grantonstar
Posts: 30
Joined: Sat Nov 24, 2012 1:08 pm

Re: Network problems and hangs... losing faith... (solved)

Fri Jul 26, 2013 8:49 am

broo0ose wrote:
grantonstar wrote: Re: powersupply, what is recommended? Can I test it using a mobile charger say like one for a Samsung S3?
~Assuming we are talking about UK power supplies.
I switched from the one I bought from Farnell (MWUSBUK1) to the default one from RS. (HNP06UK-MicroUSB)
http://uk.rs-online.com/web/p/plug-in-p ... y/7263069/

I did a fair amount of TP1-TP2 testing at the time and the one from my Samsung S2 was fine, as were the ones from various Android Tablets. But if you want to buy one then then the RS one was well within the specs and was good value.
Thanks for all the help.

So another night of testing, this time with a different power supply (Samsung Galaxy S3 - 1.5mA, 5V). Same problem unfortunately.

I managed to copy over syslog before it got rotated. transmission-daemon is looping through torrents, attempting to connect to trackers. This seems to go from roughly 23:00 (I included the last log line) but as you can see below, it looks like a reboot occurs part way. Strangely though, the reboot isnt logged in syslog until after 23:56 when it supposedly occured at 23:17. On reboot, I get the system hang, all lights on and unable to connect.

Code: Select all

Jul 25 23:56:13 raspberrypi transmission-daemon[2919]: 
Jul 25 23:17:21 raspberrypi kernel: imklog 5.8.11, log source = /proc/kmsg started.
Jul 25 23:17:21 raspberrypi rsyslogd: [origin software="rsyslogd" swVersion="5.8.11" x-pid="2324" x-info="http://www.rsyslog.com"] start
Jul 25 23:17:21 raspberrypi kernel: [    0.000000] Booting Linux on physical CPU 0
Jul 25 23:17:21 raspberrypi kernel: [    0.000000] Initializing cgroup subsys cpu
Jul 25 23:17:21 raspberrypi kernel: [    0.000000] Linux version 3.6.11+ ([email protected]) (gcc version 4.7.2 20120731 (prerelease) (crosstool-NG linaro-1.13.1+bzr2458 - Linaro GCC 2012.08) ) #510 PREEMPT Mon Jul 22 21:55:20 BST 2013
My next steps are:

1. Performing a full fsck on the disk where torrents are stored.
2. I don't have an oscillator, so I can try a power supply I purchased from Maplin and see if that makes a difference?
3. I am using monit to monitor a few services. I made some small changes to ping the dynamic DNS host I have over the weekend. I've now disabled monit entirely for the time being and will revert to pre-weekend settings before re-enabling.

My kernel is:

Code: Select all

Linux raspberrypi 3.6.11+ #510 PREEMPT Mon Jul 22 21:55:20 BST 2013 armv6l GNU/Linux
My /boot/cmdline.txt file is:

Code: Select all

dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
Adding smsc95xx.turbo_mode=N didn't change anything. I've seen it recommended elsewhere to add "dwc_otg.dma_enable=1 dwc_otg.dma_burst_size=256". Would these make a different?

Whatever it is, it seems to be a kernel panic like event but without any more info I'm not sure where to go next. Anything else I can do to identify the likely culprit?

grantonstar
Posts: 30
Joined: Sat Nov 24, 2012 1:08 pm

Re: Network problems and hangs... losing faith... (solved)

Sun Jul 28, 2013 12:33 pm

Well after a few more days testing..

I definitely had a power supply issue. The Farnell power supply I bought with the pi was down to 460mA. Replacing that seems to have solved the main part of the issue.

Secondly, I reverted my changes in monit. This I find strange, as monit was checking file system flags for changes, ping testing, checking SSHd was running and using curl to get the return code from a http url, dumping to a file then checking file contents. This was occurring once every 2 minutes. As all of these operations shouldn't tax the usb bus or cpu, it's a bit surprising that disabling them did seem to reduce hangs.

Finally and more puzzling, I did actually have a network/usb crash of some sort that I witnessed. syslog, as I described in a previous post made it look like a reboot but I was streaming a 720p at the time and it never even flickered let alone stopped. Other than NFS though, ssh etc. were not connectable. At the time I was also downloading via transmission and copying files over SMB to another device so I can certainly see how it would have strained the usb/ethernet. Even then though, this is quite new as previously the pi would crawl speed wise but never crash.

jarppa79
Posts: 1
Joined: Wed Jan 06, 2016 10:32 am

Re: Network problems and hangs... losing faith... (solved)

Wed Jan 06, 2016 10:40 am

I also had problem, with Raspberry Pi + USB Wifi module;
- logging temperature to a logfiles, just collect the logging files via WinSCP.
- once or twice a day, networking just hangs.. I don't know why, maybe because of the cheap realtek usb wifi module..
- made a script, to test the routers admin page port 80, every 10 minutes, if not accesible, then reboot.
- now it reboots, once or twice a day, but automaticly. No need to go and do the reset manually.

#!/bin/sh
#Watchdog to check port 80 open or not, reboot if not..
while :

do
sleep 600 ### Every 10 minutes, check again, if port 80 open.
### Sleep here, so that first boot waits 10 minute.
### script automaticly starts at boot, /etc/profile

nc -z 192.168.1.1 80 >/dev/null 2>&1
online=$?

if [ $online -eq 0 ]; then
# echo "Port 80 is Online"
koira="OK"
else
# echo "Port 80 is Offline"
koira="NOT OK"
echo "No connection to 192.168.1.1 port 80" >> /home/pi/watchdog.log
date >> /home/pi/watchdog.log
netstat >> /home/pi/watchdog.log
echo "Rebooting now......................." >> /home/pi/watchdog.log
sleep 1
reboot
fi

done

Return to “Troubleshooting”