Bug 435973

Summary: hal ACL list got irrevocably corupted
Product: [Fedora] Fedora Reporter: Martin Jürgens <ma>
Component: halAssignee: David Zeuthen <davidz>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 9CC: mclasen, pierre-bugzilla, richard
Target Milestone: ---Keywords: EasyFix, Patch
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-07-14 17:50:55 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
hald.log
none
hald.log none

Description Martin Jürgens 2008-03-04 18:41:39 UTC
Description of problem:
PulseAudio does not start by default on my system. But when I want to start it
using the command pulseaudio, it says the following:

W: main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operation not permitted
W: main.c: setrlimit(RLIMIT_RTPRIO, (9, 9)) failed: Operation not permitted
ALSA lib conf.c:3952:(snd_config_expand) Unknown parameters 0
ALSA lib pcm.c:2144:(snd_pcm_open_noupdate) Unknown PCM front:0
ALSA lib conf.c:3952:(snd_config_expand) Unknown parameters 0
ALSA lib pcm.c:2144:(snd_pcm_open_noupdate) Unknown PCM surround40:0
ALSA lib conf.c:3952:(snd_config_expand) Unknown parameters 0
ALSA lib pcm.c:2144:(snd_pcm_open_noupdate) Unknown PCM surround41:0
ALSA lib conf.c:3952:(snd_config_expand) Unknown parameters 0
ALSA lib pcm.c:2144:(snd_pcm_open_noupdate) Unknown PCM surround50:0
ALSA lib conf.c:3952:(snd_config_expand) Unknown parameters 0
ALSA lib pcm.c:2144:(snd_pcm_open_noupdate) Unknown PCM surround51:0
ALSA lib conf.c:3952:(snd_config_expand) Unknown parameters 0
ALSA lib pcm.c:2144:(snd_pcm_open_noupdate) Unknown PCM surround71:0
ALSA lib pcm_hw.c:1240:(_snd_pcm_hw_open) Invalid value for card
E: alsa-util.c: Error opening PCM device hw:0: No such device
E: module.c: Failed to load  module "module-alsa-sink" (argument: "device_id=0
sink_name=alsa_output.pci_1106_3059_sound_card_0_alsa_playback_0"):
initialization failed.
ALSA lib conf.c:3952:(snd_config_expand) Unknown parameters 0
ALSA lib pcm.c:2144:(snd_pcm_open_noupdate) Unknown PCM front:0
ALSA lib conf.c:3952:(snd_config_expand) Unknown parameters 0
ALSA lib pcm.c:2144:(snd_pcm_open_noupdate) Unknown PCM surround40:0
ALSA lib conf.c:3952:(snd_config_expand) Unknown parameters 0
ALSA lib pcm.c:2144:(snd_pcm_open_noupdate) Unknown PCM surround41:0
ALSA lib conf.c:3952:(snd_config_expand) Unknown parameters 0
ALSA lib pcm.c:2144:(snd_pcm_open_noupdate) Unknown PCM surround50:0
ALSA lib conf.c:3952:(snd_config_expand) Unknown parameters 0
ALSA lib pcm.c:2144:(snd_pcm_open_noupdate) Unknown PCM surround51:0
ALSA lib conf.c:3952:(snd_config_expand) Unknown parameters 0
ALSA lib pcm.c:2144:(snd_pcm_open_noupdate) Unknown PCM surround71:0
ALSA lib pcm_hw.c:1240:(_snd_pcm_hw_open) Invalid value for card
E: alsa-util.c: Error opening PCM device hw:0: No such device
E: module.c: Failed to load  module "module-alsa-source" (argument: "device_id=0
source_name=alsa_input.pci_1106_3059_sound_card_0_alsa_capture_0"):
initialization failed.

:::::::::

The weird thing is that when I login as root and run pulseaudio, it works
without problems.


Version-Release number of selected component (if applicable):
alsa-utils-1.0.16-2.fc9.i386

How reproducible:
Every time

Steps to Reproduce:
1. Make sure pulseaudio does not run: pulseaudio -k
2. Run pulseaudio: pulseaudio
3.
  
Actual results:
The errors mentioned above

Expected results:
Should work

Additional info:
The issue started to appear at some time in F8. I updated the system to rawhide
then, but it still appears. It is weird that it works using my root account and
does not work using a normal user account. When I have pulseaudio uninstalled,
alsamixer also gives the error :No such device: as normal user.

Comment 1 Martin Jürgens 2008-03-04 18:59:15 UTC
Smolt UUID pub_f47c6320-b4a5-4b12-ab78-0a969b689530

Comment 2 Martin Stransky 2008-03-05 07:08:38 UTC
Well, and why do you think it's alsa-lib bug???

Comment 3 Lubomir Kundrak 2008-03-05 07:27:18 UTC
Does HAL assign the tight permissions to the device?
Please run getfacl /dev/snd/* and see if your name appears there.
Hevr you suspended/resumed the machine or switched virtual consoles?

Comment 4 Lubomir Kundrak 2008-03-05 09:15:02 UTC
s/tight/right/

Comment 5 Martin Jürgens 2008-03-05 14:36:55 UTC
I used to suspend my system, but to see if it is caused by suspending I rebooted
it cleanly and did not do any VT switches.

getfacl /dev/snd/* does not show my user name, the output is as follows:

$ getfacl /dev/snd/*
getfacl: Removing leading '/' from absolute path names
# file: dev/snd/controlC0
# owner: root
# group: root
user::rw-
group::rw-
other::---

# file: dev/snd/controlC1
# owner: root
# group: root
user::rw-
group::rw-
other::---

# file: dev/snd/pcmC0D0c
# owner: root
# group: root
user::rw-
group::rw-
other::---

# file: dev/snd/pcmC0D0p
# owner: root
# group: root
user::rw-
group::rw-
other::---

# file: dev/snd/pcmC0D1c
# owner: root
# group: root
user::rw-
group::rw-
other::---

# file: dev/snd/pcmC0D1p
# owner: root
# group: root
user::rw-
group::rw-
other::---

# file: dev/snd/pcmC1D0c
# owner: root
# group: root
user::rw-
group::rw-
other::---

# file: dev/snd/pcmC1D0p
# owner: root
# group: root
user::rw-
group::rw-
other::---

# file: dev/snd/seq
# owner: root
# group: root
user::rw-
group::rw-
other::---

# file: dev/snd/timer
# owner: root
# group: root
user::rw-
group::rw-
other::---



Comment 6 Lubomir Kundrak 2008-03-05 15:09:07 UTC
And do you run HAL?
please issue these commands:

$ rpm -q hal
To see what version of hal do you run

$ rpm -V hal
to check if the installation is not corrupted

$ /sbin/chkconfig --list haldaemon
to see if the hal daemon is enabled

$ /sbin/service haldaemon status
to check if it runs

and (as root)

# cat /var/lib/hal/acl-list
to see hal's notion of acls in effect

Thanks

Comment 7 Lubomir Kundrak 2008-03-05 15:10:57 UTC
Also, do you run consolekit? Is your login manager consolekit-aware?
Please issue:

$ ck-list-sessions
to see what sessions are present and active.

By the way, do you have a serial console?

Comment 8 Martin Jürgens 2008-03-05 16:47:28 UTC
$ rpm -q hal
hal-0.5.10-6.fc9.i386
hal-0.5.11-0.git20080304.2.fc9.i386

$ rpm -V hal
.......T  c /etc/dbus-1/system.d/hal.conf
.......T  c /etc/rc.d/init.d/haldaemon
.......T    /etc/udev/rules.d/90-hal.rules
..5....T    /sbin/umount.hal
..5....T    /usr/bin/hal-device
..5....T    /usr/bin/hal-disable-polling
..5....T    /usr/bin/hal-find-by-capability
..5....T    /usr/bin/hal-find-by-property
..5....T    /usr/bin/hal-get-property
..5....T    /usr/bin/hal-is-caller-locked-out
..5....T    /usr/bin/hal-is-caller-privileged
..5....T    /usr/bin/hal-lock
..5....T    /usr/bin/hal-set-property
..5....T    /usr/bin/hal-setup-keymap
..5....T    /usr/bin/lshal
.......T    /usr/lib/hal/scripts/hal-functions
.......T    /usr/lib/hal/scripts/hal-luks-remove
.......T    /usr/lib/hal/scripts/hal-luks-setup
.......T    /usr/lib/hal/scripts/hal-luks-teardown
.......T    /usr/lib/hal/scripts/hal-system-killswitch-get-power
.......T    /usr/lib/hal/scripts/hal-system-killswitch-set-power
.......T    /usr/lib/hal/scripts/hal-system-lcd-get-brightness
.......T    /usr/lib/hal/scripts/hal-system-lcd-set-brightness
.......T    /usr/lib/hal/scripts/hal-system-power-hibernate
.......T    /usr/lib/hal/scripts/hal-system-power-reboot
.......T    /usr/lib/hal/scripts/hal-system-power-set-power-save
.......T    /usr/lib/hal/scripts/hal-system-power-shutdown
.......T    /usr/lib/hal/scripts/hal-system-power-suspend
.......T    /usr/lib/hal/scripts/hal-system-power-suspend-hybrid
.......T    /usr/lib/hal/scripts/linux/hal-luks-remove-linux
.......T    /usr/lib/hal/scripts/linux/hal-luks-setup-linux
.......T    /usr/lib/hal/scripts/linux/hal-luks-teardown-linux
S.5....T    /usr/lib/hal/scripts/linux/hal-system-killswitch-get-power-linux
S.5....T    /usr/lib/hal/scripts/linux/hal-system-killswitch-set-power-linux
.......T    /usr/lib/hal/scripts/linux/hal-system-lcd-get-brightness-linux
.......T    /usr/lib/hal/scripts/linux/hal-system-lcd-set-brightness-linux
.......T    /usr/lib/hal/scripts/linux/hal-system-power-hibernate-linux
.......T    /usr/lib/hal/scripts/linux/hal-system-power-reboot-linux
.......T    /usr/lib/hal/scripts/linux/hal-system-power-set-power-save-linux
.......T    /usr/lib/hal/scripts/linux/hal-system-power-shutdown-linux
.......T    /usr/lib/hal/scripts/linux/hal-system-power-suspend-hybrid-linux
.......T    /usr/lib/hal/scripts/linux/hal-system-power-suspend-linux
S.5....T    /usr/libexec/hal-acl-tool
..5....T    /usr/libexec/hal-ipw-killswitch-linux
S.5....T    /usr/libexec/hal-storage-cleanup-all-mountpoints
S.5....T    /usr/libexec/hal-storage-cleanup-mountpoint
S.5....T    /usr/libexec/hal-storage-closetray
S.5....T    /usr/libexec/hal-storage-eject
S.5....T    /usr/libexec/hal-storage-mount
S.5....T    /usr/libexec/hal-storage-unmount
..5....T    /usr/libexec/hal-system-power-pm-is-supported
..5....T    /usr/libexec/hal-system-power-pmu
..5....T    /usr/libexec/hal-system-sonypic
S.5....T    /usr/libexec/hald-addon-acpi
..5....T    /usr/libexec/hald-addon-acpi-buttons-toshiba
S.5....T    /usr/libexec/hald-addon-cpufreq
S.5....T    /usr/libexec/hald-addon-hid-ups
S.5....T    /usr/libexec/hald-addon-input
S.5....T    /usr/libexec/hald-addon-macbook-backlight
S.5....T    /usr/libexec/hald-addon-macbookpro-backlight
..5....T    /usr/libexec/hald-addon-pmu
S.5....T    /usr/libexec/hald-addon-storage
S.5....T    /usr/libexec/hald-addon-usb-csr
S.5....T    /usr/libexec/hald-generate-fdi-cache
..5....T    /usr/libexec/hald-probe-hiddev
..5....T    /usr/libexec/hald-probe-ieee1394-unit
S.5....T    /usr/libexec/hald-probe-input
S.5....T    /usr/libexec/hald-probe-net-bluetooth
..5....T    /usr/libexec/hald-probe-pc-floppy
..5....T    /usr/libexec/hald-probe-printer
..5....T    /usr/libexec/hald-probe-serial
S.5....T    /usr/libexec/hald-probe-smbios
S.5....T    /usr/libexec/hald-probe-storage
S.5....T    /usr/libexec/hald-probe-volume
..5....T    /usr/libexec/hald-runner
S.5....T    /usr/sbin/hald
.......T    /usr/share/hal/fdi/fdi.dtd
.......T    /usr/share/hal/fdi/policy/10osvendor/10-cpufreq.fdi
.......T    /usr/share/hal/fdi/policy/10osvendor/10-ibm-buttons.fdi
.......T    /usr/share/hal/fdi/policy/10osvendor/10-input-policy.fdi
.......T    /usr/share/hal/fdi/policy/10osvendor/10-keymap.fdi
.......T    /usr/share/hal/fdi/policy/10osvendor/10-laptop-panel-mgmt-policy.fdi
.......T    /usr/share/hal/fdi/policy/10osvendor/10-macbook-backlight.fdi
S.5....T    /usr/share/hal/fdi/policy/10osvendor/10-macbookpro-utils.fdi
.......T    /usr/share/hal/fdi/policy/10osvendor/10-power-mgmt-policy.fdi
.......T    /usr/share/hal/fdi/policy/10osvendor/10-rfkill-switch.fdi
.......T    /usr/share/hal/fdi/policy/10osvendor/10-toshiba-buttons.fdi
.......T    /usr/share/hal/fdi/policy/10osvendor/10-usbcsr-mice.fdi
.......T    /usr/share/hal/fdi/policy/10osvendor/10-x11-input.fdi
.......T    /usr/share/hal/fdi/policy/10osvendor/15-storage-luks.fdi
S.5....T    /usr/share/hal/fdi/policy/10osvendor/20-acl-management.fdi
S.5....T    /usr/share/hal/fdi/policy/10osvendor/20-storage-methods.fdi
..5....T  d /usr/share/man/man1/hal-disable-polling.1.gz
..5....T  d /usr/share/man/man1/hal-find-by-capability.1.gz
..5....T  d /usr/share/man/man1/hal-find-by-property.1.gz
..5....T  d /usr/share/man/man1/hal-get-property.1.gz
..5....T  d /usr/share/man/man1/hal-is-caller-locked-out.1.gz
..5....T  d /usr/share/man/man1/hal-is-caller-privileged.1.gz
..5....T  d /usr/share/man/man1/hal-lock.1.gz
..5....T  d /usr/share/man/man1/hal-set-property.1.gz
..5....T  d /usr/share/man/man1/lshal.1.gz
S.5....T  d /usr/share/man/man8/hald.8.gz


LC_ALL=C /sbin/chkconfig --list haldaemon
haldaemon      	0:off	1:off	2:off	3:on	4:on	5:on	6:off

$ LC_ALL=C /sbin/service haldaemon status
hald (PID 2241) wird ausgeführt... (means its running)

$ ck-list-sessions
Session2:
	uid = '501'
	realname = 'Martin Jürgens'
	seat = 'Seat1'
	session-type = ''
	active = TRUE
	x11-display = ':0'
	x11-display-device = '/dev/tty7'
	display-device = ''
	remote-host-name = ''
	is-local = TRUE
	on-since = '2008-03-05T16:39:45Z'


# cat /var/lib/hal/acl-list
3244

Comment 9 Lubomir Kundrak 2008-03-05 16:57:02 UTC
(In reply to comment #8)
> $ rpm -q hal
> hal-0.5.10-6.fc9.i386
> hal-0.5.11-0.git20080304.2.fc9.i386
> 
> $ rpm -V hal
...

Sooo you seem to have two haldeaemons installed at one time.
I have no idea how could that have happened -- did you interrupt a yum update or
something?

Anyways, remove them, install correctly and restart haldaemon:
# rpm -q hal |xargs rpm -e --nodeps force
# yum -y install hal
# service haldaemon restart

See if situation with ACLs improves then.

Thanks!

Comment 10 Martin Jürgens 2008-03-05 17:18:21 UTC
Did not improve the situation :(

$ rpm -qa | grep hal
hal-info-20080215-1.fc9.noarch
hal-libs-0.5.11-0.git20080304.2.fc9.i386
hal-0.5.11-0.git20080304.2.fc9.i386

$ ps -A | grep hal
 5123 ?        00:00:01 hald
 5124 ?        00:00:00 hald-runner
 5138 ?        00:00:00 hald-addon-acpi
 5145 ?        00:00:00 hald-addon-stor
 5176 ?        00:00:00 hald-addon-inpu

# cat /var/lib/hal/acl-list
3244


If you need more information, please let me know. Thanks for your fast replies :)


Comment 11 Lubomir Kundrak 2008-03-05 17:25:51 UTC
(as root:)
1.) Please stop the haldaemon service.

2.) run hald debugging
# /usr/sbin/hald --daemon=no --verbose=yes 2>&1 |tee hald.log

3.) do a VT switch to the text console and back (ctrl+alt+f1, alt+f7)

4.) Terminate the running hald with ctrl+c

5.) attach the hald.log file to this log

Thanks!

Comment 12 Martin Jürgens 2008-03-05 17:46:32 UTC
Created attachment 296902 [details]
hald.log

Here it is. I was not able to do the VT switch because of some rawhide
regression (pressing ctrl alt f1 prints ;7P to the DE instead of doing the
switch)

Comment 13 Lubomir Kundrak 2008-03-05 20:34:33 UTC
You can use "chvt 1" to change the virtual console.

Regarding the bug with ;7P, there was something similar with FC6 and cs/sk
layout. Is there a bug filed for that?

Anyways; your problem is this:

****************************************************
7448: got lock on /var/lib/hal/acl-list
7448: adding ACL's for /dev/snd/timer
Line is malformed: '3244
'
Error getting ACL's currently applied

****************************************************

HAL apparently doesn't like the line in your acl-list. No matter how could it be
added there, do this as root to truncate that file:

# >/dev/snd/timer

and restart hal:

# /sbin/service haldaemon restart

That should fix the situation -- please let me know if it helped.
Also, please do not close this bug until hal is changed to handle these situations.

Thanks!

Comment 14 Martin Jürgens 2008-03-05 21:07:23 UTC
> You can use "chvt 1" to change the virtual console.

Right, thanks :)

> Regarding the bug with ;7P, there was something similar with FC6 and cs/sk
layout. Is there a bug filed for that?

I remember having seen one. However, there seem to be lots of regressions in the
Xorg shipped in rawhide like SELinux flipping out because of Xorg and US-keymap
only. Until the latest updates pressing any key crashes Xorg.

I tried the workaround you gave me, but it did not work. I am going to attach
the new hald.log

Comment 15 Martin Jürgens 2008-03-05 21:08:25 UTC
Created attachment 296935 [details]
hald.log

Comment 16 Martin Jürgens 2008-03-05 21:22:09 UTC
I noticed that there are also other errors in the hald.log for multiple sound
devices like /dev/sequencer2 and /dev/snd/seq.

Comment 17 Lubomir Kundrak 2008-03-05 21:30:04 UTC
[WARN  4924] kit-hash.c:206:kit_hash_insert(): key != NULL
 Not built with -rdynamic so unable to print a backtrace

Ah, yes. I'm going to sleep now and will try to look at it tomorrow.

Comment 18 Lubomir Kundrak 2008-03-06 07:15:15 UTC
Those are just warnings, and would not cause this.
Nevertheless, I must have been smoking something *bad* yesterday; of course not
/dev/snd/timer is to be truncated, but /var/lib/hal/acl-list.

# >/var/lib/hal/acl-list

In case this doesn't help, then I'm interested how did that "3244" line make it
into the acl-list. In that case the output of hal that is being launched just
after truncation is interesting to me.

Thanks

Comment 19 Lubomir Kundrak 2008-03-06 07:44:50 UTC
When it comes to those warnings; they just cause policykit not work for root I
guess. It have been fixed here:

http://gitweb.freedesktop.org/?p=PolicyKit.git;a=commitdiff;h=4aa626d0f8b9bf9a72880a567e48f472228eca8c

Comment 20 Martin Jürgens 2008-03-06 08:47:14 UTC
It works fine now which is great! Many thanks.

Comment 21 Lubomir Kundrak 2008-03-06 09:15:22 UTC
And no matter what corrupted the acl-list; here's the proposed fix:

http://lists.freedesktop.org/archives/hal/2008-March/011029.html
http://lists.freedesktop.org/archives/hal/2008-March/011030.html

Reassigning to hal.

Comment 22 Bug Zapper 2008-05-14 05:46:07 UTC
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 23 Richard Hughes 2008-05-30 11:25:11 UTC
Is this now fixed with the new HAL in F9?

Comment 24 Martin Jürgens 2008-05-30 13:06:39 UTC
I don't know as the problem appeared only once and as Lubomir's fix solved the
problem.

If the patches

http://lists.freedesktop.org/archives/hal/2008-March/011029.html
http://lists.freedesktop.org/archives/hal/2008-March/011030.html

are committed to the HAL in Fedora 9, it can be probably closed. But better
contact Lubomir.

Comment 25 Bug Zapper 2009-06-09 23:40:44 UTC
This message is a reminder that Fedora 9 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 9.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '9'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 9's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 9 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 26 Bug Zapper 2009-07-14 17:50:55 UTC
Fedora 9 changed to end-of-life (EOL) status on 2009-07-10. Fedora 9 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.