System hangs (solid) early during shutdown

Bug #779040 reported by John Hunter
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Binary package hint: kdebase

I have just installed Kubuntu 11.04 (download 06-may-2011). Every time I try to Shut Down or Reboot, the system hangs solid (won't react to Ctl-Alt_Del even). On the same machine (HP G72-b20SA) 10.10 showed the same behaviour. 11.04 splash screen hides the log. On 10.10 the final actions are:
init cron main process(1120) killed by TERM signal
init irq_balance main process(1128) killed by ...
init Hy1 main process (1304) killed by ...
Checking for running unattended-upgrades [...] -> rt2800_wait_wtp made ready: Error - WPDMA busy, aborting
Then, in one case, it progressed to:
[....]phy0->rt2x00pci_reg busy_read: Error - Indirect register access failed: offset - 0x00007010, value = 0xffffffff
After 5 mins of frozen screen, pressed the on/off switch off for 5 secs. Reboots take long as disc journals have to be rerun.
More details:
sda1,sda2,sda3 Win7 crud;sda4 extended partition; sda5 more Win7; sda6 swap; sda7 /; sda8 /home; /sda9 /archive;
4 GB ram, intel i3 350M cpu . All Linux partitions are
I suspect some h/w issue: weird disc layout due to Win 7 hogging all the primary partitions.
(Debian Squeeze closes down cleanly but has other problems).
I hope that this helps.

John Hunter

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: konqueror 4:4.6.2-0ubuntu1
ProcVersionSignature: Ubuntu 2.6.38-8.42-generic-pae 2.6.38.2
Uname: Linux 2.6.38-8-generic-pae i686
Architecture: i386
Date: Sat May 7 13:29:08 2011
InstallationMedia: Kubuntu 11.04 "Natty Narwhal" - Release i386 (20110427)
ProcEnviron:
 LANGUAGE=en_GB:en
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
SourcePackage: kdebase
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
John Hunter (jmdh01) wrote :
Revision history for this message
John Hunter (jmdh01) wrote :

I think that Network manager may have something to do with this. I have just tried to close down the eth0 interface by
clicking on the kde taskbar widget; this resulted in an immediate freeze -- needing a power down and reboot. Could my
power down lock ups be caused by trying to get network manager to close down the eth0 interface?

By the way, my Linux data partitions are Reiserfs: sda6 8GB (swap), sda7 32GB /, sda8 70GB /home, sda9 269GB /archive.

Revision history for this message
John Hunter (jmdh01) wrote :

Further: I am getting more evidence that the cause of the trouble lies in either Network Manager or Avahi.
Despite my efforts to persuade it otherwise, I can only get it to use DHCP (which makes life for the rest of
my home network very difficult!). My last attempt was to edit /etc/network/interfaces to add

auto eth0

iface eth0 inet static
   address 192.168.1.5
   netmask 255.255.254.0
   gateway 192.168.1.1

Now it hangs during the boot process, both normal boot and repair mode!

How do I disable the Network manager fungus and get to a state in which I can configure it to join an existing network?
John Hunter

Revision history for this message
John Hunter (jmdh01) wrote :

Through experimentation (trial & error) I have managed to get 11.04 to boot without hanging by adding
two lines [ network 192.168.0,0 \\ broadcast 192.168.1.255 ] to /etc/network/interfaces. I still have to
run "ifup -a" manually. The network manager seems to be an aweful mess: it does not seem to work
sensibly: two missing deducible lines in `interfaces' causes a hard loop in supervisor mode and appears to be
responsible for the hard loop early during shutdown. It could be, of course, the ethernet driver for the Realtec
RTL8101E/RTL8102E PCI Express Fast (r8169 ?) and the Network manager could be innocent!
John Hunter.

Revision history for this message
John Hunter (jmdh01) wrote :

Just searched the internet: it would appear that the r8169 is NOT the correct driver for this NIC. Realtek have produced a
specific driver r8101 V 1.020 which I have just downloaded. I will give it a go tomorrow -- it is a bit late to do that now without
making silly mistakes!

John Hunter

Revision history for this message
John Hunter (jmdh01) wrote :

I have compiled and installed r8101 into /lib/modules/2.6.38-8-generic-pae/kernel/drivers/net and removed r8169
as recommended. On reboot and lsmod r8169 is still there! Where has it come from?? An attempt to remove it
[modprobe -r r8169] results in an error (module r8169 not found!!). This is now starting to defy logic. can someone tell
me (a naive innocent) how to get rid of r8169 and replace it by a genuine r8101. Such is my mistrust of some of the Ubuntu
underhand configuration philosophy, I suspect that renaming /lib/mod...../net/r8101.ko to /lib/mod/.../net/r8169 will not
have the required effect -- in anyway, that would eventually confuse me!

John Hunter

Revision history for this message
John Hunter (jmdh01) wrote :

I think that I have (partially) cracked it! I have dissassembled the initrd.img to find that the offending driver (r8169) is
embedded in it. There needs to be some mechanism to blacklist such rogue drivers at the boot stage: is there a
boot command line option which effect this?

John Hunter

Revision history for this message
John Hunter (jmdh01) wrote :

Ive finally sorted it out. The reason that it has taken so long to sort out is the appalling documentation of the
boot process. Eventually, I had to resort to go through initrd.img with a fine tooth-comb to find buried in the
initrd init script that there was, in fact, a boot time blacklist option. This was not mentioned anywhere in any
of the Debian or Unbuntu documentation or anywhere on the internet. The solution, which has taken three
weeks to find, is to edit the boot parameters in /boot/grub/menu.lst: add "blacklist=r8169".

I would hope that users with less experience than myself would get more support/encouragement. It is now
more than two weeks since I posted the first call for help. In that time, it would appear that the only action taken
is the award of a bug number (779040). No other acknowledgement triage or other action seems to have been
taken. I think that you can now classify this as a bug, possibly a kernel bug, that has been solved. The bug
would appear to be the kernel probing is insufficient to distinguish between early versions of the Realteak
RTL8101/RTL8102 chipset and the latest RTL8101E/RTL8102E PCI Express chipset (for which the r8169 seems
to be only partially compatible).

The problem was not helped by the lack of Ubuntu documentation of how to turn off the dreaded DHCP. I believe
that the (expert) user should be given the option of setting up a static IP address in the install dialog.
On security grounds, all users should be given the option of disabling wlan -- which does wonders for
laptop battery life!

John Hunter

affects: kdebase (Ubuntu) → linux (Ubuntu)
Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 779040

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
John Hunter (jmdh01) wrote :

The bug should be confirmed.

I am amazed that it took nearly 5 months for someone to react!

I have convinced myself that the hang was caused by the the r8169 driver is incompatible with the REALTEK R8101E hardware. removing the r8169 driver and substituting the Realtek supplied r8101e driver cured the problem.

The crass "Network Manager" forced me to change to another Linux distribution. Hence I will not risk attempting to run your "apport-collect" script.

John Hunter

Revision history for this message
doken (doken) wrote :

I have the same driver and hardware and I've also had trouble with shutdown.
As a workaround for me, running "sudo service network-manager stop" before shutdown makes it possible.

Not sure if the fix proposed here (and http://www.rvdavid.net/how-to-get-gigabit-speeds-from-rtl81118168b-pci-express-gigabit-ethernet-controller-on-ubuntu-linux/) is appropriate because I have kernel 3.0 on my updated 11.10.

I guess I cannot use the driver available from Realtek for kernel 2.4, 2.6 on 3.0 right?

Revision history for this message
doken (doken) wrote :

Sorry, update to my previous. Stopping the network-manager is not required, just need to disconnect my wired network connection first (assuming so that I am not connected to any network).

Revision history for this message
Ming Lei (tom-leiming) wrote : Re: [Bug 779040] Re: System hangs (solid) early during shutdown

Rtl8169 has enabled runtime pm, so the bug is very probably caused
by runtime pm operation after shutdown, see some discussions below link:
     http://marc.info/?l=linux-pm&m=132123391726374&w=2
If possible, please apply the patch to see if it can fix your issue.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for linux (Ubuntu) because there has been no activity for 60 days.]

Changed in linux (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.