hal-acl-tool crashed with SIGSEGV in polkit_authorization_db_is_session_authorized()

Bug #361223 reported by mrokos
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
hal (Ubuntu)
New
Medium
Unassigned

Bug Description

Binary package hint: hal

hi
i`m runing under 9.05 with all avilble updates,
MoBo asus a7n8x e deluxe
CPU Athlon Barton 3200+
2x512 Ram

and thats all :)
when i come back to my computer after 15 minutes brake, a saw this report.
BR
Ł

ProblemType: Crash
Architecture: i386
CrashCounter: 1
DistroRelease: Ubuntu 9.04
ExecutablePath: /usr/lib/hal/hal-acl-tool
NonfreeKernelModules: nvidia
Package: hal 0.5.12~rc1+git20090403-0ubuntu1
ProcAttrCurrent: unconfined
ProcCmdline: /usr/lib/hal/hal-acl-tool --reconfigure
ProcEnviron: PATH=(custom, no user)
Signal: 11
SourcePackage: hal
StacktraceTop:
 ?? () from /usr/lib/libpolkit.so.2
 ?? () from /usr/lib/libpolkit.so.2
 polkit_authorization_db_is_session_authorized ()
 polkit_context_is_session_authorized ()
 polkit_context_can_session_do_action ()
Title: hal-acl-tool crashed with SIGSEGV in polkit_authorization_db_is_session_authorized()
Uname: Linux 2.6.28-11-generic i686
UserGroups:

Revision history for this message
mrokos (l-mroczkowski) wrote :
visibility: private → public
Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt (retraced)

StacktraceTop:?? () from /usr/lib/libpolkit.so.2
_internal_foreach (authdb=0x9113048,
polkit_authorization_db_is_session_authorized (
polkit_context_is_session_authorized (pk_context=0x9113008,
polkit_context_can_session_do_action (pk_context=0x9113008,

Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt (retraced)
Changed in hal (Ubuntu):
importance: Undecided → Medium
tags: removed: need-i386-retrace
Revision history for this message
Ian! D. Allen (idallen) wrote :
Download full text (11.9 KiB)

Upgraded from 8.04 to 8.10 and found a high load average and huge numbers
of "polkit-read-aut" called from "hal-acl-tool" in my lastcomm logs:

# lastcomm | grep "Apr 14 20:46" | wc -l
9772

# lastcomm | grep "Apr 14 20:46" | grep -c polkit-read-aut
9591

# lastcomm | grep "Apr 14 20:46" | grep -c hal-acl-tool
32

The command line is actually "hal-acl-tool --reconfigure" which calls
polkit-read-auth-helper (over and over and over!).

To slow this down, I replaced /usr/lib/policykit/polkit-read-auth-helper
with a shell script that dumped some environment into a file and did a
"sleep 1" before calling the real binary (renamed to "polkit-ian").
That sleep slowed things down and helped the load average a bit:

# lastcomm | grep "Apr 15 20:40" | wc -l
539

#~[10127] lastcomm | grep "Apr 15 20:40" | grep -c 'polkit-ian'
59

# lastcomm | grep "Apr 15 20:40" | grep -c 'hal-acl-tool'
3

but now I get "X" entries beside all the hal-acl-tool calls:

# lastcomm | grep hal-acl-tool | wc -l
2364

# lastcomm | grep hal-acl-tool | grep X | wc -l
2364

# lastcomm | grep hal-acl-tool | grep X | head -2
hal-acl-tool X root ?? 0.01 secs Wed Apr 15 20:44
hal-acl-tool X root ?? 0.01 secs Wed Apr 15 20:41

I modified my script to run an strace of polkit-read-auth-helper to see
what it was doing 9,772 times per minute and here's one of those dumps:

# grep '^open\|^stat\|^access' /tmp/idebug3.24683
access("/etc/suid-debug", F_OK) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK) = 0
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
access("/etc/ld.so.nohwcap", F_OK) = 0
open("/usr/local/lib/libpolkit-dbus.so.2", O_RDONLY) = 3
access("/etc/ld.so.nohwcap", F_OK) = 0
open("/lib/libpthread.so.0", O_RDONLY) = 3
access("/etc/ld.so.nohwcap", F_OK) = 0
open("/lib/libc.so.6", O_RDONLY) = 3
access("/etc/ld.so.nohwcap", F_OK) = 0
open("/lib/libdbus-1.so.3", O_RDONLY) = 3
access("/etc/ld.so.nohwcap", F_OK) = 0
open("/usr/local/lib/libpolkit.so.2", O_RDONLY) = 3
access("/etc/ld.so.nohwcap", F_OK) = 0
open("/lib/libselinux.so.1", O_RDONLY) = 3
access("/etc/ld.so.nohwcap", F_OK) = 0
open("/usr/local/lib/libexpat.so.1", O_RDONLY) = 3
access("/etc/ld.so.nohwcap", F_OK) = 0
open("/lib/libdl.so.2", O_RDONLY) = 3
open("/etc/selinux/config", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
statfs64("/selinux", 84, 0xbfe85500) = -1 ENOENT (No such file or directory)
open("/proc/mounts", O_RDONLY|O_LARGEFILE) = 3
open("/etc/nsswitch.conf", O_RDONLY) = 3
open("/etc/ld.so.cache", O_RDONLY) = 3
access("/etc/ld.so.nohwcap", F_OK) = 0
open("/lib/libnss_compat.so.2", O_RDONLY) = 3
access("/etc/ld.so.nohwcap", F_OK) = 0
open("/lib/libnsl.so.1", O_RDONLY) = 3
open("/etc/ld.so.cache", O_RDONLY) = 3
access("/etc/ld.so.nohwcap", F_OK) = 0
open("/lib/libnss_nis.so.2", O_RDONLY) = 3
access("/etc/ld.so.nohwcap", F_OK) = 0
open("/lib/libnss_files.so.2", O_RDONLY) = 3
open("/etc/group", O_RDONLY|0x80000 /* O_??? */) = 3
open("/etc/passwd", O_RDO...

Revision history for this message
Ian! D. Allen (idallen) wrote :
Download full text (15.7 KiB)

The sleep in polkit-read-auth-helper is critical in changing the behaviour
of hal-acl-tool. (Looking into the strace of hal-acl-tool, I wonder if
this is due to hal-acl-tool using real-time signals, e.g. SIGRTMIN, and
thus requiring that polkit-read-auth-helper respond quickly?) If I rename
polkit-read-auth-helper to polkit-ian and replace it with this C program:

int main(int argc, char **argv) {
        execv("/usr/lib/policykit/polkit-ian",argv);
}

nothing changes - the load average stays way up and I see the looping of
thousands of polkit-ian called by hal-acl-tool.

# lastcomm
[...]
polkit-ian root ?? 0.00 secs Thu Apr 16 07:01
polkit-ian root ?? 0.00 secs Thu Apr 16 07:01
polkit-ian root ?? 0.00 secs Thu Apr 16 07:01
polkit-ian root ?? 0.00 secs Thu Apr 16 07:01
hal-acl-tool S root ?? 0.13 secs Thu Apr 16 07:00
polkit-ian root ?? 0.00 secs Thu Apr 16 07:01
polkit-ian root ?? 0.00 secs Thu Apr 16 07:01
polkit-ian root ?? 0.00 secs Thu Apr 16 07:01
polkit-ian root ?? 0.00 secs Thu Apr 16 07:01
[...]

An inotify watch shows this repeated over and over:

# inotifywait -m -r /var/run/hald/
Setting up watches. Beware: since -r was given, this may take a while!
Watches established.
/var/run/hald/ CREATE acl-list.7AAKSU
/var/run/hald/ OPEN acl-list.7AAKSU
/var/run/hald/ MODIFY acl-list.7AAKSU
/var/run/hald/ CLOSE_WRITE,CLOSE acl-list.7AAKSU
/var/run/hald/ MOVED_FROM acl-list.7AAKSU
/var/run/hald/ MOVED_TO acl-list
/var/run/hald/ CLOSE_WRITE,CLOSE acl-list
/var/run/hald/ CREATE acl-list.D908RU
/var/run/hald/ OPEN acl-list.D908RU
/var/run/hald/ MODIFY acl-list.D908RU
/var/run/hald/ CLOSE_WRITE,CLOSE acl-list.D908RU
/var/run/hald/ MOVED_FROM acl-list.D908RU
/var/run/hald/ MOVED_TO acl-list
/var/run/hald/ CLOSE_WRITE,CLOSE acl-list
[... about 50 lines of output every 10 seconds ...]

# cat /var/run/hald/acl-list
/dev/kvm /org/freedesktop/Hal/devices/kvm u 777
/dev/scd0 /org/freedesktop/Hal/devices/storage_model_CD_ROM_DRIVE_466 u
        777
/dev/scd1 /org/freedesktop/Hal/devices/storage_model_CD_RW_GCE_8525B u
        777

If I insert "sleep(1);" in front of the execv in the C program, the load
average drops and hal-acl-tool starts exiting badly ("X"):

[...]
polkit-ian root ?? 0.00 secs Thu Apr 16 07:01
hal-acl-tool X root ?? 0.10 secs Thu Apr 16 07:01
polkit-ian root ?? 0.00 secs Thu Apr 16 07:01
[...]

and everything changes in the inotify watch:

# inotifywait -m -r /var/run/hald/
Setting up watches. Beware: since -r was given, this may take a while!
Watches established.
/var/run/hald/ CLOSE_WRITE,CLOSE acl-list
/var/run/hald/ OPEN acl-list
/var/run/hald/ CLOSE_WRITE,CLOSE acl-list
/var/run/hald/ OPEN acl-list
/var/run/hald/ CLOSE_WRITE,CLOSE acl-list
/var/run/hald/ OPEN acl-list
/var/run/hald/ CLOSE_WRITE,CLOSE acl-list
/var/run/hald/ OPEN acl-list
/var/run/hald/ CLOSE_WRITE,CLOSE acl-list
/var/run/hald/ OPEN acl-list
[... ...

Revision history for this message
James Westby (james-w) wrote :

Hi Ian,

I don't see that your problem is to do with the crash that was originally
reported in this bug, so please report a new bug so that they can be
tracked separately.

Thanks,

James

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.