MASTER storing ALSA mixer element values during shutdown hangs nondeterministically due to internal alsa-plugins pulse check

Bug #274995 reported by astroman on 2008-09-26
432
This bug affects 45 people
Affects Status Importance Assigned to Milestone
NetworkManager
Invalid
Undecided
Unassigned
alsa-utils (Ubuntu)
Medium
Daniel T Chen
Intrepid
Undecided
Unassigned
linux (Fedora)
Fix Released
Unknown
linux (Gentoo Linux)
Fix Released
Medium
linux (Ubuntu)
Undecided
Daniel T Chen
Intrepid
Undecided
Unassigned
network-manager (Ubuntu)
Medium
Unassigned
Intrepid
Undecided
Unassigned
pulseaudio (Ubuntu)
Undecided
Unassigned
Intrepid
Undecided
Unassigned

Bug Description

SRU information follows:

Impact: A subset of users with a default Ubuntu 8.10 install (with libasound2-plugins installed) experience nondeterministic hangs of up to several minutes on shutdown (or startup) when the sound card's mixer control state is (re)stored. This hang is due to a variable, PULSE_INTERNAL, in the pulse ALSA plugin having a non-NULL value when amixer and alsactl are called so that PulseAudio is probed preferentially, triggering name resolution over potentially partially configured network interfaces.

Resolution: In the alsa-utils initscript, unconditionally export PULSE_INTERNAL=0 to prevent native ALSA applications from probing PulseAudio while querying and (re)storing sound card state.

Jaunty patch: http://launchpadlibrarian.net/19941444/alsa-utils_1.0.18-1ubuntu2.debdiff
Intrepid SRU patch: http://launchpadlibrarian.net/19941520/alsa-utils_1.0.17-0ubuntu3.debdiff

TEST CASE: From an active GNOME session in a default Ubuntu 8.10 install, choose to reboot or shutdown. Note the erratic hang while attempting to store ALSA's mixer control state.

Regression potential: No regressions have been identified in production, and only users with both pulseaudio and libasound2-plugins packages installed have the potential to experience this nondeterministic hang.

Original report follows:

Ubuntu 8.10 beta 4 version updated.
When going for reboot or shutdown the system freezes on shuting down alsa.
The only way is to use the power off button of the computer.

My laptop is Insys GameForce.8761SU

Chipset:
• SiS© 671DX + SiS968

Luke Faraone (lfaraone) wrote :

What is the exact message that is displayed?

astroman (astrosousa) wrote :

The message is:

Shuting down ALSA...

The [OK] never apears... and freezes

astroman (astrosousa) wrote :

I notice that when I shutdown the network then this problem disapears and the pc shuts down normally.

My network is not operating correctly. How can I check for errors on this?

My internet connection is now very slow and cannot connect to several servers proprely, including the repositories servers. It happens both in ethernet and wireless.

I also notice that on the ethernet connection I notice several errors on:
Reception Errors, I have ethernet SIS 191 ubuntu 8.10‏.

any help?

Solitaire (bill-s0l) wrote :

Running a Dell Inspiron 8200 with Ubuntu 8:10 beta (Fully up to date)

Sound Card: Intel 82801CA-ICH3
Kernel : 2.6.27-5-generic

My network Wired and Wireless are fine.

Getting the "Shutting down ALSA..."
Have to wait 5 mins for ALSA to timeout for Shutdown to continue.

Alan Hartless (harty83) wrote :

Is anyone's sound actually working with this problem?

I've got the same problem and I just noticed that all I get when there is suppose to be sound is static. For example, play something with sound and all I hear is a scratchy noise.

Michael Rooney (mrooney) wrote :

I have had this happen as well on my Intrepid A5 install, Confirming.

Solitaire (bill-s0l) wrote :

@ Alan Hartless

My Audio is fine, no distortion or static to be heard.

Petrus Gomes (petrusgomes) wrote :

same problem here...Desktop

updated from hardy to 8.10 alpha6
issue with "shutting down ALSA" started with last beta updates...(kernel 2.6.27.5 and 2.6.27.6 generic)

sound and network are OK.

Audio device: ATI Technologies Inc SBx00 Azalia (Intel HDA)

dieterv (dieterv77) wrote :

Just wanted to report that i'm seeing the same problem

Updated to 8.10 beta from up to date 8.04

sound card: Multimedia audio controller: C-Media Electronics Inc CM8738
kernel: 2.6.27-5-generic

I am able to get sound via ALSA, but shutdown hangs on "shutting down ALSA"

Feel free to let me know if there is other info i can provide.

Michael Rooney (mrooney) wrote :

dieterv and anyone else who can duplicate this bug (I've only had it happen once), you can help by removing the 'quiet' and 'splash' options from your boot entry (I think you hit 'e' when the grub timer is going to edit the option). Then when you shut down, it should hopefully give some more output when it gets stuck, such as perhaps the step it is getting stuck on. If you do this and post the output here, we will have a lot more information to go on. Thanks!

Solitaire (bill-s0l) wrote :

Mike

I removed 'quiet' and 'splash' then rebottede the machine twice.
Both times shutdown pauses on 'ALSA' for 5 mins before continuing.

No other message / error / warning was shown.

Anyone know if the shutdown messages kept in a logfile? or is logging stopped before that point?

Michael Rooney (mrooney) wrote :

Okay, if there is no extra info gained without quiet splash, I will mark to Confirmed until someone else can suggest what other information might be useful. I'll ask around.

Hi All,

First, this bug did not have a package associated with it, which is important for ensuring that it gets looked at by the proper developers. You can learn more about finding the right package at https://wiki.ubuntu.com/Bugs/FindRightPackage . This bug should be classified against the 'linux' kernel package so I am reassigning it there.

The second thing to note is that even though everyone here may be experiencing the same issue, it really is likely hardware specific. Unless you have the same hardware as the original bug reporter you should probably open a separate report.

@astroman, since you are the original bug reporter, per the kernel team's bug policy, can you please attach the following information. Please be sure to attach each file as a separate attachment.

* cat /proc/version_signature > version.log
* dmesg > dmesg.log
* sudo lspci -vvnn > lspci-vvnn.log

For more information regarding the kernel team bug policy, please refer to https://wiki.ubuntu.com/KernelTeamBugPolicies . I'm also curious if you try booting with the "reboot=b" boot option if that helps at all. Thanks again and we appreciate your help and feedback.

Michael Rooney (mrooney) wrote :

Hi Solitaire, thanks for filing a separate bug as Leann suggested, I'll link it here for reference, bug 280305.

Alan (mrintegrity) wrote :

Please note that this bug does not appear to be hardware specific, as previously noted, as it is seen with at least the following hardware configurations:

Intel Corporation 82801CA/CAM AC'97 Audio Controller [8086:2485] (rev 02) (Cirrus Logic Device)
VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller
ATI Technologies Inc SBx00 Azalia (Intel HDA)
Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 03)

The alsa-utils init script does not appear to be the culprit either as it starts and stops fine without problem although it is killing this script that will allow the shutdown process to continue.

In the Alpha6 release it was possible to switch to a virtual console, log in and "killall -9 K50alsa-utils" which immediately allowed the shutdown to continue however in the current beta it seems that keyboard login is disabled earlier and this is no longer possible, forcing the user to wait for the script to time out.

I installed ubuntu from an Alpha 6 desktop CD image and immediately ran update manager to get the latest packages.

Cheers,

Alan

Alan (mrintegrity) wrote :

I changed the affected package to alsa-utils as it seems to be related to the init script for this package. Also set status as confirmed.

Changed in linux:
status: Incomplete → Confirmed

Could this bug be related to x64 or does it effect 32 bit users as well?

Alan (mrintegrity) wrote :

I am on 32bit here.

Solitaire (bill-s0l) wrote :

I'm running 32 bit here as well.

Biji (biji) wrote :

32bit here.. probably when pulseaudio get hang but not crashes

eric.zhu5121 (simonz5121) wrote :

Same problem on my desktop with intel duo core 2. the mother board is asus p5ne-sli. the audio is using nvidia mcp55 hda.
each time when shutdown computer, it hangs there at ALSA. My workaround currently is to remove the pulseaudio package, then it's ok.

karlatsaic (krudnick) wrote :

I upgraded to 8.10 and have the exact same issue on a 32-bit Compaq Presario 2100 (circa 2003)

stu (sgeorge) wrote :

I'm on amd64 and same, I have an Asus xonar dx. After about 5 minutes I get something like "bad switch with amixer" and then after about another 5 minutes machine shuts down.

Same here with my Acer 5520G. Opened duplicate bug #285589 before finding this one. Weird bug.

J (jcastillob) wrote :

Same here with Intel 82801CA/CAM AC'97 Audio Controller, but I think the hang is network related: running "ifconfig wlan0 down" before shutdown allows the computer power off without any problem.

So, it looks like power off is blocked by a problem to "kill" wifi connection process. Could it be related in some way to network manager ?

http://changelogs.ubuntu.com/changelogs/pool/main/n/network-manager/network-manager_0.7~~svn20081015t224738-0ubuntu1/changelog

"* new upstream snapshot Wed 2008-10-15 22:47:38 +0000 (bzrrev 3641)
  - a few more follow up fixes for routing routing/subnet/vpn handling."

Could be the culprit here ?!

Insert
ifconfig wlan0 down
at the begin of /etc/init.d/alsa-utils to turn off wireless before shutdown alsa.

Lister (jojo-ditadres) wrote :

Same problem here on an AMD64 64bit system.
However, Network-manager is not installed and no wlan in use/availabe.

If I bring eth0 down before restarting I do not have to wait the 5 minutes for ALSA to shutdown.

Seems like it is not wifi or network-manager related...

Le Kien : your trick doesn't work for me.

Lister : laptop or fixed pc ?

If it is not wifi or network related, why does some people fix this bug by tweaking network connections ?

Lister (jojo-ditadres) wrote :

Fixed pc, a MSI K9N SLI, 6400+.
Tried the trick from Le Kien truc several times now with eth0 instead of wlan0 and it works everytime. If I don't use it, I have to wait a long time for a reboot.
So it does seem to be related to networking somehow.

Lister (jojo-ditadres) wrote :

btw, I do:
sudo ifconfig eth0 down
on the commandline, not via a line in /etc/init.d/alsa-utils.

bitstate (bitstate) wrote :

The fix with shuting down the network interface is confirmed. I experience the same problem with haning on alsa shutdown on a hp laptop with a usb 3g modem. But if i disconnect it using the network manager menu option ( below the list of available networks when left clicking on the network manager icon ) prior to shuting down the laptop it shuts down normally.

J (jcastillob) wrote :

The trick works inserting "ifconfig wlan0 down" (or the active network interface in use) at the begining of the stop) section of /etc/init.d/alsa-utils.
I'm sure it's not network-manager related, my laptop also hangs uninstalling the package and starting wifi via wicd.
Btw, if your alsa-mixer is always mute at system start, and does not remember the last settings, the trick also fixes it.

Well, it looks like it is related to network in a way.

I looked at var/log/syslog while trying to shutdown and when i asked for shutdown, I got this :

Oct 20 11:07:10 fred-laptop kernel: [ 214.557848] __ratelimit: 6 callbacks suppressed
Oct 20 11:07:10 fred-laptop kernel: [ 214.557875] compiz.real[5938]: segfault at 120 ip 000000000041024e sp 00007fff3fabc160 error 4 in compiz.real[400000+3b000]
Oct 20 11:07:11 fred-laptop init: tty4 main process (4660) killed by TERM signal
Oct 20 11:07:11 fred-laptop init: tty5 main process (4661) killed by TERM signal
Oct 20 11:07:11 fred-laptop init: tty2 main process (4667) killed by TERM signal
Oct 20 11:07:11 fred-laptop init: tty3 main process (4669) killed by TERM signal
Oct 20 11:07:11 fred-laptop init: tty6 main process (4670) killed by TERM signal
Oct 20 11:07:11 fred-laptop init: tty1 main process (5729) killed by TERM signal
Oct 20 11:07:11 fred-laptop NetworkManager: <info> (wlan0): device state change: 8 -> 3
Oct 20 11:07:11 fred-laptop NetworkManager: <info> (wlan0): deactivating device (reason: 38).
Oct 20 11:07:11 fred-laptop NetworkManager: <info> wlan0: canceled DHCP transaction, dhcp client pid 6104
Oct 20 11:07:11 fred-laptop kernel: [ 215.153613] wlan0: disassociating by local choice (reason=3)
Oct 20 11:07:11 fred-laptop kernel: [ 215.179213] wlan0: authenticate with AP 00:1a:6b:1b:15:e5
Oct 20 11:07:11 fred-laptop kernel: [ 215.186362] wlan0: authenticated
Oct 20 11:07:11 fred-laptop kernel: [ 215.186374] wlan0: associate with AP 00:1a:6b:1b:15:e5
Oct 20 11:07:11 fred-laptop kernel: [ 215.188443] wlan0: RX AssocResp from 00:1a:6b:1b:15:e5 (capab=0x411 status=0 aid=1)
Oct 20 11:07:11 fred-laptop kernel: [ 215.188449] wlan0: associated
Oct 20 11:07:11 fred-laptop NetworkManager: <WARN> check_one_route(): (wlan0) error -34 returned from rtnl_route_del(): Sucess
Oct 20 11:07:11 fred-laptop avahi-daemon[4926]: Withdrawing address record for 192.168.1.12 on wlan0.
Oct 20 11:07:11 fred-laptop avahi-daemon[4926]: Leaving mDNS multicast group on interface wlan0.IPv4 with address 192.168.1.12.
Oct 20 11:07:11 fred-laptop avahi-daemon[4926]: Interface wlan0.IPv4 no longer relevant for mDNS.
Oct 20 11:07:11 fred-laptop kernel: [ 215.205718] wlan0: disassociating by local choice (reason=3)

And a little later :

[Bluetooth shutdown]
Oct 20 11:07:16 fred-laptop kernel: [ 219.787126] Bluetooth: RFCOMM ver 1.10
Oct 20 11:07:16 fred-laptop avahi-daemon[4926]: Got SIGTERM, quitting.
Oct 20 11:07:17 fred-laptop exiting on signal 15

And when I took a screenshot, it was blocked on acpi exiting.

So I'm kinda lost. Anyway, I'm adding the log I have.

Same problem here on a fixed Pc Dell Vostro 200, audio Intel. The "shutting down alsa" takes several minutes before halt the pc. At th startup instead, some times alsa won't start.

astroman (astrosousa) wrote :

Hi,
sorry for the late reply.

I send in attachment the log required, please take note that i made all the updates.
The freeze is now less frequent, and i notice that disabling the network will prevent the freeze to happen.
 This
I have also a diferent bug. the nm-applet do not show up and i had to install a previous version to apear in order to disable the network through it.

Another thing that may help, or not, my boot on the kernel only operates using the nohz=off option.
I notice that Ubuntu is quite slow opening software and operating it. This is strange since the computer his new:

Chipset:
• SiS© 671DX + SiS968
Intel Pentium Dual Core T2390 1.86Mhz
Nvidia 9300M GS 256Mb
4Gb RAM

Rodney Gordon II (meff) wrote :

Confirming that this bug still exists via asus-utils 1.0.17-0ubuntu2 on a SB Audigy2.

still exist on a fresh update. Less that 10 days to fix it...

varanus (bobiras12) wrote :

i had the same problem with alsa at shutting down, i had to wait 3-4 minutes to reboot or shutdown. i tried the same thing with the network manager. Before rebooting/shutting down pc i switched to offline mode from the network manager and it shut/rebooted normally without any problems.

frapell (frapell) wrote :

This started to happen to me a couple of days ago... i'm using 8.10 (amd64).
anyway, i changed the first line of the /etc/init.d/alsa-utils file to:
#!/bin/sh -x

so i noticed when "freezing" at shutdown, actually does not freeze, is doing something... now i don't know if all that, is logged somewhere, but i tried doing a sudo /etc/init.d/alsa-utils stop and copying the output to this file i'm attaching.

The part that goes from line 75 to line 190 is the part that takes forever... at least when the system is going to reboot (or shutdown)... i'm seeing each part of that (Master, PCM, Synth, etc) that takes like 30 seconds. (when doing /etc/init.d/alsa-utils stop didn't happened, ie it took like 5 seconds to finish everything)

ok, hope this helps...

Regards,
Franco

Daniel T Chen (crimsun) on 2008-10-22
Changed in alsa-utils:
assignee: nobody → crimsun
importance: Undecided → Medium
status: Confirmed → Incomplete
Changed in linux:
status: New → Invalid
Daniel T Chen (crimsun) on 2008-10-23
Changed in alsa-utils:
status: Incomplete → In Progress
Daniel T Chen (crimsun) on 2008-10-23
Changed in alsa-utils:
status: In Progress → Confirmed
Daniel T Chen (crimsun) on 2008-10-25
Changed in network-manager:
assignee: crimsun → nobody
Luke Faraone (lfaraone) on 2008-10-26
Changed in network-manager:
status: Confirmed → Triaged
Alexander Sack (asac) on 2008-10-28
Changed in network-manager:
status: Triaged → Invalid
Alexander Sack (asac) on 2008-10-28
Changed in network-manager:
status: New → Invalid
Daniel T Chen (crimsun) on 2008-10-29
Changed in pulseaudio:
status: New → Invalid
Changed in linux:
assignee: nobody → crimsun
status: Invalid → Incomplete
Daniel T Chen (crimsun) on 2008-11-21
Changed in alsa-utils:
status: New → Invalid
Daniel T Chen (crimsun) on 2008-11-21
Changed in linux:
importance: Undecided → Medium
status: Incomplete → Triaged
Changed in linux:
status: Unknown → Confirmed
status: Unknown → In Progress
Changed in alsa-utils:
status: Invalid → New
Changed in pulseaudio:
status: Invalid → New
Daniel T Chen (crimsun) on 2008-11-25
Changed in linux:
importance: Medium → Undecided
status: Triaged → Invalid
Daniel T Chen (crimsun) on 2008-11-25
Changed in pulseaudio:
status: New → Invalid
Changed in alsa-utils:
assignee: nobody → crimsun
importance: Undecided → Medium
status: New → In Progress
Daniel T Chen (crimsun) on 2008-11-25
description: updated
218 comments hidden view all 298 comments
Daniel T Chen (crimsun) wrote :
Daniel T Chen (crimsun) wrote :
Daniel T Chen (crimsun) on 2008-11-25
description: updated
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package alsa-utils - 1.0.18-1ubuntu2

---------------
alsa-utils (1.0.18-1ubuntu2) jaunty; urgency=low

  * debian/init: Set PULSE_INTERNAL=0 to prevent PulseAudio from
    being inspected for invocations of alsactl and amixer. Fixes
    hangs attempting to (re)store mixer element values as
    reported in LP: #274995.

 -- Daniel T Chen <email address hidden> Tue, 25 Nov 2008 08:06:35 -0500

Changed in alsa-utils:
status: In Progress → Fix Released
Martin Pitt (pitti) wrote :

Accepted into intrepid-proposed, please test and give feedback here. Please see https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in linux:
status: New → Invalid
Changed in alsa-utils:
status: New → Fix Committed
Changed in network-manager:
status: New → Invalid
status: Invalid → Fix Committed
Changed in pulseaudio:
status: New → Invalid
Changed in network-manager:
status: Fix Committed → Invalid
Changed in pulseaudio:
status: Invalid → Fix Committed
Changed in network-manager:
status: Invalid → Fix Committed
status: Fix Committed → Invalid
Martin Pitt (pitti) on 2008-11-26
Changed in pulseaudio:
status: Fix Committed → Invalid
Michael Fay (mfay) wrote :

Downloaded proposed upgrades for PulseAudio and alsa and tried restarting a number of times. So far there has been no delay (which had been several minutes).

goto (gotolaunchpad) wrote :

With intrepid-proposed enabled and and system update & upgrade it runs now without problems, thank you!

Problem solved in my system installing alsa-utils proposed update. Thank you.

Biji (biji) wrote :

Confirmed... problem disappear after updating to proposed.... thanks !

Not fixed for me. I may suffer from another bug. I noticed that the led above my ethernet plug are blinking a lot on shutdown after end screen bar is empty. And I get an APCID exiting message when I press a key :(

I know there is a bug similar to this, but can't remember its number.

cevatcethun (cevatceyhun) wrote :

As I've pointed out earlier changing the alsa-utils file haven't solved my problem (I didn't installed the proposed update). Though this has solved my problem:

----
sudo ln -s /etc/init.d/NetworkManager /etc/rc0.d/K40NetworkManager
sudo ln -s /etc/init.d/NetworkManager /etc/rc6.d/K40NetworkManager
----

ref: http://ubuntuforums.org/showpost.php?p=6216439&postcount=58

Martin Pitt (pitti) wrote :

A friend of mine experienced this as well, and this update fixes the problem for him.

aschuring (aelschuring) wrote :

@cevatcethun : are you sure you are running 8.10 (intrepid)? In comment 257, you said that you're running 8.04, which shouldn't be affected by this bug. So maybe you're seeing the effects of another bug?

The alsa-utils fix works for me as well. Thanks to all involved!

I installed latest updates with Ubuntu 8.10 (proposed updates), the
shutdown is work perfect my desktop machine.

Attila

Walter_Wittel (wittelw) wrote :

I can also confirm the updating with proposed updates enabled fixed the shutdown problem on my Asus eee 900.

Slightly off topic (but I see others have sound problem on this thread, which is how I stumbled on it). My sound was still only static / scratchy sounds as before the upgrade. I suspect some config file got trashed when I held the power button to shut down my system during one of the hangs. Marking all alsa and gstreamer packages for reinstall didn't help.

 FWIW I followed the steps at http://ubuntuforums.org/showthread.php?t=789578 and the static went away but I still had no sound. I ran gstreamer-properties and played with settings and was able to get Test sounds by choosing the ACL662 device rather than default, but still no sound in Rhythmbox. I double-clicked the speaker and with HDA Intel (Alsa mixer) selected as the device toggled the "Headphone" off then back on and plugged in the headphones. Now sound works fine (and switches between speaker and headphones as expected). I haven't rebooted yet but am keeping my finders crossed :-)

Robb Topolski (funchords) wrote :

All,

If you are or were experiencing this delay, there is a related bug report -- bug 301430 -- concerning the omission of localhost in the ipv6 part of /etc/hosts. While bug 274995 is fixed by the update to alsa-tools, the delay uncovered by bug 274995 was only experienced by those of us who had bug 301430 as well. Bug 301430 is marked as "incomplete" and will expire unfixed without confirmation that it affects others. I suspect that everyone who noticed a delay during shutdown owing to 274995 also has an IPv6 misconfiguration in the /etc/hosts file, even if they're not using IPv6 and even if the delay is now fixed. Please help out, check, and advise.

WHAT YOU SHOULD DO:

1. Even if the latest alsa-tools update fixed your problem, please check your /etc/hosts and verify whether or not it was set up correctly.

A CORRECTLY configured file originally had (or has) this line (the whitespace-separated word localhost is included among the hostnames in the ipv6 section of /etc/hosts):
 ::1 localhost ip6-localhost ip6-loopback

An INCORRECTLY configured file had or has this line (the whitespace-separated word localhost is NOT included among the hostnames):
 ::1 ip6-localhost ip6-loopback

2. If your system was or is INCORRECTLY configured, please visit bug 301430 and indicate so via a comment. The /etc/hosts file is created as part of the network installation and configuration. It would be interesting to know whether your install was an upgrade or fresh install. Look for any other developer questions you might be able to answer or add your other relevant insights or observations. Please consider subscribing to the bug by clicking "E-mail me about changes to this bug report) and indicating that the bug affects you (see the links toward the top of the report).

Thanks for your help and congrats on getting bug 274995 fixed!

Robb Topolski

Robb, thanks for the hint. The 274995 proposed fix did not cure the issue for two of my machines, I will try 301430 suggestion tomorrow.

Robb Topolski (funchords) wrote :

Hi Laurent,

That's odd that the 274995 proposed fix doesn't solve the issue. Do you have more than 2 machines?

Did you follow the steps mentioned in https://wiki.ubuntu.com/Testing/EnableProposed to upgrade? Did alsa-utils update to 1.0.17-0ubuntu3 (the proposed fix) or are you using alsa-utils 1.0.17-0ubuntu2 (the previous version)? In /etc/init.d/alsa-utils, do you find the following line?:

export PULSE_INTERNAL=0

(Adding localhost to the ipv6 line doesn't actually fix the alsa-utils problem, it just masks it. The omission mentioned in bug 301430 along with the bug in 274995 causes enough delay to uncover the alsa-utils issue.)

Daniel T Chen (crimsun) wrote :

On 11/29/2008 06:47 PM, Robb Topolski wrote:
>
> That's odd that the 274995 proposed fix doesn't solve the issue. Do you
> have more than 2 machines?

(Please remember that there is a confirmed linux bug, too. We just are
not tracking it in this bug for SRU reasons.)

Download full text (6.6 KiB)

Yes I do have the export:

# grep PULSE_I /etc/init.d/alsa-utils
export PULSE_INTERNAL=0

Even with /etc/hosts line shutdown still hangs on a text screen with a blinking cursor at the top left.

I looked at the logs and it looks like during boot there are some issues with the kernel I didn't see with 8.04.

Nov 30 11:12:47 pc kernel: [ 36.653066] Pid: 4750, comm: hald-probe-seri Not tainted 2.6.27-9-generic #1
Nov 30 11:12:47 pc kernel: [ 36.653074] [<c037c4b6>] ? printk+0x1d/0x1f
Nov 30 11:12:47 pc kernel: [ 36.653097] [<c01781bc>] __report_bad_irq+0x2c/0xa0
Nov 30 11:12:47 pc kernel: [ 36.653113] [<c0178344>] note_interrupt+0x114/0x140
Nov 30 11:12:47 pc kernel: [ 36.653122] [<c01770b1>] ? handle_IRQ_event+0x41/0x80
Nov 30 11:12:47 pc kernel: [ 36.653131] [<c0178d93>] handle_level_irq+0xd3/0x100
Nov 30 11:12:47 pc kernel: [ 36.653139] [<c0152074>] ? tick_periodic+0x34/0x80
Nov 30 11:12:47 pc kernel: [ 36.653148] [<c01520de>] ? tick_handle_periodic+0x1e/0x80
Nov 30 11:12:47 pc kernel: [ 36.653155] [<c0106c15>] do_IRQ+0x45/0x80
Nov 30 11:12:47 pc kernel: [ 36.653166] [<c0137898>] ? irq_exit+0x8/0x90
Nov 30 11:12:47 pc kernel: [ 36.653176] [<c0113f8d>] ? smp_apic_timer_interrupt+0x5d/0x90
Nov 30 11:12:47 pc kernel: [ 36.653191] [<c0105003>] common_interrupt+0x23/0x30
Nov 30 11:12:47 pc kernel: [ 36.653199] [<c013765a>] ? __do_softirq+0x6a/0x120
Nov 30 11:12:47 pc kernel: [ 36.653207] [<c013776d>] do_softirq+0x5d/0x60
Nov 30 11:12:47 pc kernel: [ 36.653213] [<c01378e5>] irq_exit+0x55/0x90
Nov 30 11:12:47 pc kernel: [ 36.653219] [<c0106c1a>] do_IRQ+0x4a/0x80
Nov 30 11:12:47 pc kernel: [ 36.653226] [<c0105003>] common_interrupt+0x23/0x30
Nov 30 11:12:47 pc kernel: [ 36.653233] [<c037e762>] ? _spin_unlock_irqrestore+0x22/0x40
Nov 30 11:12:47 pc kernel: [ 36.653243] [<c02bf0a0>] serial8250_startup+0x200/0x700
Nov 30 11:12:47 pc kernel: [ 36.653257] [<c02b9fca>] uart_startup+0x4a/0x140
Nov 30 11:12:47 pc kernel: [ 36.653265] [<c02baa43>] uart_open+0xb3/0x1c0
Nov 30 11:12:47 pc kernel: [ 36.653272] [<c02ba990>] ? uart_open+0x0/0x1c0
Nov 30 11:12:47 pc kernel: [ 36.653279] [<c02a343c>] __tty_open+0x15c/0x340
Nov 30 11:12:47 pc kernel: [ 36.653292] [<c02a3644>] tty_open+0x24/0x40
Nov 30 11:12:47 pc kernel: [ 36.653299] [<c01b4d95>] chrdev_open+0xd5/0x1b0
Nov 30 11:12:47 pc kernel: [ 36.653311] [<c01b01fc>] __dentry_open+0xbc/0x260
Nov 30 11:12:47 pc kernel: [ 36.653318] [<c01b0477>] nameidata_to_filp+0x47/0x60
Nov 30 11:12:47 pc kernel: [ 36.653325] [<c01b4cc0>] ? chrdev_open+0x0/0x1b0
Nov 30 11:12:47 pc kernel: [ 36.653333] [<c01bdb1d>] do_filp_open+0x1bd/0x790
Nov 30 11:12:47 pc kernel: [ 36.653342] [<c019116a>] ? vma_prio_tree_remove+0x7a/0xf0
Nov 30 11:12:47 pc kernel: [ 36.653356] [<c01e1fce>] ? inotify_inode_queue_event+0xe/0xe0
Nov 30 11:12:47 pc kernel: [ 36.653367] [<c037e6dd>] ? _spin_lock+0xd/0x10
Nov 30 11:12:47 pc kernel: [ 36.653374] [<c01c9619>] ? expand_files+0x9/0x60
Nov 30 11:12:47 pc kernel: [ 36.653383] [<c01c9750>] ? alloc_fd+0xe0/0x100
Nov 30 11:12:47 pc kernel: [ 36.653391] [<c01afff5>] do_sys_open+0x65/0x100
Nov 30 11:12:47 pc...

Read more...

Changed in linux:
status: In Progress → Fix Released
Brion Swanson (brions) wrote :

Laurent, check out bugs #302452 and #286308. They are tracking a potential other bug or two that exhibits the same shutdown/restart behavior as this one, but is not caused by ALSA or necessarily the snd_hda_intel driver.

Brion Swanson (brions) wrote :

Making those bugs links: bug #302452 and bug #286308

Jens Janssen (jayjay) wrote :

For everyone having no sound after incomplete shutdown:
---
sudo /etc/init.d/alsa-utils reset
---

NOTE:
Until now the shutdown-problem ("Shutting down ALSA...") occurred only once for me. After using Power Off Button Ubuntu restarts without sound. But aplay shows following output:
---
 aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: SB [HDA ATI SB], device 0: AD198x Analog [AD198x Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
---

kungmidas (ih82b) wrote :

I had this problem as well. During one evening, I always got the hang at "Shutting down ALSA..." when rebooting or shutting down the PC.

Perhaps not coincidentally, I was having network problems the same evening, due to maintenance from my ISP. (Basically, my local network was fine, I just didn't have an Internet connection).

The next evening, Internet was fine, and the hang was gone.

Also, after the first hang, all sound channels were muted (as in Bug #288039).

aplay -l:

**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: CONEXANT Analog [CONEXANT Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 1: Conexant Digital [Conexant Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Jens Janssen (jayjay) wrote :

Some additional information:
In my case this bug only occurs when connected to VPN (Cisco, vpnc). Upgrading alsa-utils 1.0.17-0ubuntu2 to 1.0.17-0ubuntu3 via intrepid-proposed helps.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package alsa-utils - 1.0.17-0ubuntu3

---------------
alsa-utils (1.0.17-0ubuntu3) intrepid-proposed; urgency=low

  * debian/init: Set PULSE_INTERNAL=0 to prevent PulseAudio from
    being inspected for invocations of alsactl and amixer. Fixes
    hangs attempting to (re)store mixer element values as
    reported in LP: #274995.

 -- Daniel T Chen <email address hidden> Tue, 25 Nov 2008 07:56:08 -0500

Changed in alsa-utils:
status: Fix Committed → Fix Released
Robb Topolski (funchords) wrote :

@Jens -- whatever DNS server you are using while connected to VPN probably doesn't quickly return an answer for a AAAA query for "localhost," while your non-VPN DNS does. alsa-utils 1.0.17-0ubuntu3 should avoid it in all cases. Also, see below.

@kungmidas -- when I change my DNS to some bogus address, I see this delay. When I use good DNS servers, the delay is gone. alsa-utils 1.0.17-0ubuntu3 should avoid it in all cases. Also, see below.

@all, please see https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/274995/comments/273 -- if you were seeing a delay -- even if it is fixed now, you probably also have or had that separate network configuration bug 301430 that allows DNS queries for localhost -- however generated -- to escape your local machine and network.

cevatcethun (cevatceyhun) wrote :

@aschuring

Sorry for the late reply. I have just updated to 8.10. The problem continues.

Have you applied the latest updates? The problem is fixed here.

2008/12/5 cevatcethun <email address hidden>

> @aschuring
>
> Sorry for the late reply. I have just updated to 8.10. The problem
> continues.
>
> --
> MASTER storing ALSA mixer element values during shutdown hangs
> nondeterministically due to internal alsa-plugins pulse check
> https://bugs.launchpad.net/bugs/274995
> You received this bug notification because you are a direct subscriber
> of the bug.
>

cevatcethun (cevatceyhun) wrote :

@Alan

No I didn't apply the updates listed as "proposed" if this is what you asked. But I did install the regular updates.

Catching up with the posts.. I added "localhost" term to my /etc/hosts file which is mentioned above (bug 301430). I'm not sure the problem is completely gone but last few restarts/shutdowns were OK.

Kurtismonger (kurtismonger) wrote :

Some of the comments suggest adding ifconfig eth0 down, which did not work for my Acer Travelmate 4500. However I found one that suggested ifconfig eth0 shutdown, which cleared up the problem after I added a line for each network interface. I don't know enough about it to know if one or both are correct (down vs shutdown), but figured somebody else might find this useful.

Kurtismonger (kurtismonger) wrote :

I spoke to soon. On the next shutdown the problem returned. I'm running a fresh install of 8.10 downloaded on 11/23. I've tried all the suggested fixes except the -proposed updates thing, as I don't know how to do that. I was going to remove PulseAudio, but doing so from Synaptic also removes Ubuntu Desktop. My alsa-utils version is 1.0.17-0ubuntu3.

Robb Topolski (funchords) wrote :

Please see https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed.

Kurtismonger (kurtismonger) wrote :

Ok. So I've added alsa-utils-proposed and pulseaudio-proposed and I'm still getting the acpid: exiting issue every single time I shutdown or restart.

Charles Profitt (cprofitt) wrote :

Kurtismonger

What laptop or desktop are you using? What is your hardware?

Kurtismonger (kurtismonger) wrote :

Machine Specs:
Acer TravelMate 4500/Ubuntu 8.10
Linux 2.6.27-9-generic #1 SMP Thu Nov 20 21:57:00 UTC 2008 i686 GNU/Linux
CPU: Intel Pentium M processor 1.60GHz
Memory: 512MiB
Display: VGA compatible controller Intel 82852/855GM Integrated Graphics Device
eth0: Broadcom BCM4401 100Base-T
eth1: Intel PRO/Wireless 2200BG [Calexico2] Network Connection
Audio: Intel 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller

Jun Inoue (jun-lambda) wrote :

I'm reopening this bug because I'm running into this problem despite the fix dated 2008-12-03. Please let me know if opening a new one is more appropriate.
I'm using the amd64 version of Xubuntu 9.0.4 (default install) on a Sony Vaio VGN-G2. The system stalls during reboot/halt. For reboot, it shows the following error message:

nm-dispatcher.action: Caught signal 15, shutting down...
acpid: exiting

nm-system-settings: SCPlugin-Ifupdown: devices removed (udi: /org/freedesktop/Hal/devices/net_00_1a_80_d6_06_5a)
nm-system-settings: SCPlugin-Ifupdown: devices removed (udi: /oorg/freedesktop/Hal/devices/net_00_1f_3c_85_77_4a)

For halt, the message is just "acpi: exiting\n\n".

The system is still responsive in the sense that the Enter key advances the cursor, and the laptop blanks the screen after inactivity. The problem goes away if I add the link K88NetworkManager to rc0.d and rc6.d.

I got the number 88 from Debian's network-manager package.

Changed in network-manager:
status: Invalid → New
Jun Inoue (jun-lambda) wrote :

Revert. I meant to change the status for network-manager (Ubuntu), not NetworkManager.

Changed in network-manager:
status: New → Invalid

On Tue, Jun 16, 2009 at 10:17 PM, Jun Inoue<email address hidden> wrote:
> Please let me know if opening a new one is more appropriate.

Generally it is, I'd recommend that, unless someone else states
otherwise. When you do, please set this back to Invalid but feel free
to leave a comment with your new bug here for reference!

Jun Inoue (jun-lambda) wrote :

I'm reopening this bug because it reproduces with the latest release, which seems to have the fix released on 2008-12-03. I'm running a default install of Xubuntu 9.0.4 on a Sony Vaio VGN-G2.

Problem: the system hangs during reboot or halt if there is an active wireless connection. During reboot, I get the following message

 * Stopping anac(h)ronistic cron anacron
acpid: exiting

nm-system-settings: SCPlugin-Ifupdown: devices removed (udi: /or/freedesktop/Hal/devices/net_00_1a_80_d6_06_5a)
nm-system-settings: SCPlugin-Ifupdown: devices removed (udi: /org/freedesktop/Hal/devices/net_00_1f_3c_85_77_4a)
nm-dispatcher.action: Caught signal 15, shutting down...

The first line is sometimes different, but I can't seem to get the alternative message at the moment.
The system makes no further progress. For halt, the message is just "acpid: exiting\n\n", or sometimes it's just blank.
The system is not completely frozen; the Enter key advances the cursor and the console is blanked after inactivity (and lights up again in response to a keystroke). Ctrl+Alt+Delete seems to be registering---it doesn't cause the system to make progress but after repeatedly pressing the combination, I see "init: control-alt-delete respawning too fast, stopped".

The reproducibility is not 100% although it's fairly high, well over 50% (subjectively; I didn't acutally count).

The problem goes away if I link /etc/init.d/NetworkManager from rc0.d and rc6.d. I used the prefix K88 following Debian, but perhaps a different number is more appropriate for Ubuntu.

Changed in network-manager (Ubuntu):
status: Invalid → New
Jun Inoue (jun-lambda) wrote :

Revert. I filed my report under #388291 following Michael Rooney's kind advice.
...Sorry to spam everyone with status changes.

Changed in network-manager (Ubuntu):
status: New → Invalid
Changed in linux (Gentoo Linux):
status: Confirmed → Fix Released
Changed in linux (Gentoo Linux):
importance: Unknown → Medium
Displaying first 40 and last 40 comments. View all 298 comments or add a comment.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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