Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 181741 - sys-apps/hal-0.5.9-r1 segmentation fault
Summary: sys-apps/hal-0.5.9-r1 segmentation fault
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Project Gentopia
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-12 11:52 UTC by luminoso
Modified: 2007-06-13 23:13 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
hald verbose segmentation fault (hald_segfault,39.94 KB, text/plain)
2007-06-12 12:28 UTC, luminoso
Details
hald new verbose output (verbose,158.66 KB, text/plain)
2007-06-12 20:01 UTC, luminoso
Details
hald verbose output with strace (strace,841.14 KB, text/plain)
2007-06-12 20:02 UTC, luminoso
Details
hald verbose output with strace and NO acpi (hald-verbose-debug-strace-no_acpi,920 bytes, text/plain)
2007-06-12 21:10 UTC, luminoso
Details
hald verbose output with strace and NO acpi (hald-verbose-output-with-strace-and-no-acpi,158.60 KB, text/plain)
2007-06-12 21:15 UTC, luminoso
Details
segfault (error5,842.08 KB, text/plain)
2007-06-12 21:35 UTC, luminoso
Details

Note You need to log in before you can comment on or make changes to this bug.
Description luminoso 2007-06-12 11:52:49 UTC
sys-apps/hal-0.5.9-r1 fails to run because /usr/share/hal/fdi/preprobe is missing.
Hal-0.5.7.1-r5 runs just fine

Reproducible: Always

Steps to Reproduce:
1.emerge sys-apps/hal-0.5.9-r1
2.try to run hald --daemon=no --verbose=yes
3.already tried:
emerge -C dbus hal && emerge dbus hal
4.i also tried to:
LDFLAGS="" CFLAGS="-march=i686" CCACHE="" MAKEOPTS="" emerge hal

Actual Results:  
# hald --daemon=no --verbose=yes
12:41:07.162 [I] hald.c:533: hal 0.5.9
12:41:07.162 [I] hald.c:598: Will not daemonize
12:41:07.162 [I] hald_dbus.c:4807: local server is listening at unix:abstract=/var/run/hald/dbus-XBe5VhBgI7,guid=c9f512be9be54620b2fcb000466e8653
12:41:07.164 [I] hald_runner.c:299: Runner has pid 7261
12:41:07.165 [W] ci-tracker.c:200: Could not get uid for connection: org.freedesktop.DBus.Error.NameHasNoOwner Could not get UID of name 'org.freedesktop.DBus': no such name
12:41:07.165 [E] hald_dbus.c:4462: Cannot get caller info for org.freedesktop.DBus
Runner started - allowed paths are '/usr/libexec:/usr/lib/hal/scripts:/usr/bin'
12:41:07.165 [I] hald_runner.c:180: runner connection is 0x8094a40
12:41:07.167 [I] mmap_cache.c:161: Regenerating fdi cache..
Run started hald-generate-fdi-cache (10000) (0)
!  full path is '/usr/libexec/hald-generate-fdi-cache', program_dir is '/usr/libexec'
12:41:07.169 [I] create_cache.c:608: Loading rules
12:41:07.169 [E] create_cache.c:525: Cannot scan '/usr/share/hal/fdi/preprobe': No such file or directory
12:41:07.169 [E] create_cache.c:683: Error generating fdi cache
/usr/libexec/hald-generate-fdi-cache exited
12:41:07.170 [I] mmap_cache.c:137: In regen_cache_cb exit_type=0, return_code=1
12:41:07.170 [E] mmap_cache.c:190: fdi cache regeneration failed!
12:41:07.170 [I] mmap_cache.c:193: fdi cache generation done
12:41:07.170 [I] mmap_cache.c:251: cache mtime is 1181646338
12:41:07.170 [E] osspec.c:310: Unable to inotify_add_watch() for '/usr/share/hal/fdi/preprobe': No such file or directory
*** [DIE] osspec.c:watch_fdi_files():389 : Error watching fdi files

Expected Results:  
hald did not run

Portage 2.1.2.9 (default-linux/x86/2007.0/desktop, gcc-4.1.2, glibc-2.5-r3, 2.6.21-ck1 i686)
=================================================================
System uname: 2.6.21-ck1 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz
Gentoo Base System release 1.12.10
Timestamp of tree: Tue, 12 Jun 2007 08:20:01 +0000
ccache version 2.4 [enabled]
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.4.4-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r7
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.23b
virtual/os-headers:  2.6.21
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4 -msse2 -mfpmath=sse -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/php/apache1-php5/ext-active/ /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -march=pentium4 -msse2 -mfpmath=sse -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="ftp://darkstar.ist.utl.pt/pub/gentoo/ ftp://213.186.33.37/gentoo-distfiles/ ftp://194.117.143.71/sites/gentoo ftp://194.117.143.69/sites/gentoo ftp://194.117.143.70/sites/gentoo"
LANG="en_US"
LC_ALL="pt_PT.ISO-8859-15"
LDFLAGS="-Wl,-O1"
LINGUAS="pt_PT pt"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/distfiles/pkg"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/vmware"
SYNC="rsync://darkstar.ist.utl.pt/gentoo-portage"
USE="X a52 aac acl acpi adn adns aiglx alsa amr apache2 arts asf audiofile bash-completion bcmath berkdb bitmap-fonts blas bluetooh bzip2 cairo calendar caps cdb cdinstall cdparanoia cdr chardet cjk cli cracklib crypt css curl curlweappers dbus dio dlloader dri dts dv dvd dvdr dvdread emboss enca encode ethereal exif expat fam fastcgi fb fbcon ffmpeg firefox flac flash fortran ftp gd gdbm gif glitz glut gmp gnutls gpm graphviz gstreamer gtk gtk2 hal iconv imagemagick imlib iodbc isdnlog java javascript jbig jpeg jpeg2k kde kdexdeltas kerberos lcms ldap libg++ libnotify lm_sensors lzo mad matroska memlimit mhash midi mikmod mmap mmx mng mozbranding mp3 mpeg msn mudflap musepack mysql mysqli ncurses nls nmap nptl nptlonly nsplugin nvidia offensive ogg openal opengl openmp pcre pdf perl plotutils png posix pppd pt python qbdm qt3 qt3support qt4 quicktime rar readline real reflection rtc samba sdl session slang smp sndfile speex spl sql srt sse sse2 ssl svg svga szip tcpd tga threads tiff truetype truetype-fonts type1-fonts unicode usb userlocales visualization vorbis wavpack win32codecs wma wmf wxwindows x264 x86 xcb xcomposite xml xorg xosd xpm xprint xsl xv xvid xvmc zlib" ALSA_CARDS="emu10k1" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="pt_PT pt" USERLAND="GNU" VIDEO_CARDS="nv nvidia"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 luminoso 2007-06-12 12:28:10 UTC
Created attachment 121800 [details]
hald verbose segmentation fault

fdi problem fixed.
not it segfaults!!!!

and with no verbose look like this:

# hald --daemon=no --verbose=no
Runner started - allowed paths are '/usr/libexec:/usr/lib/hal/scripts:/usr/bin'
Run started hald-probe-smbios (10000) (0)
!  full path is '/usr/libexec/hald-probe-smbios', program_dir is '/usr/libexec'
/usr/libexec/hald-probe-smbios exited
Run started hal-storage-cleanup-all-mountpoints (10000) (0)
!  full path is '/usr/libexec/hal-storage-cleanup-all-mountpoints', program_dir is '/usr/libexec'
12686: XYA attempting to get lock on /media/.hal-mtab-lock
12686: XYA got lock on /media/.hal-mtab-lock
in hal-storage-cleanup-all-mountpoints
hal_mtab = ''
12686: XYA released lock on /media/.hal-mtab-lock
/usr/libexec/hal-storage-cleanup-all-mountpoints exited
Run started hald-probe-serial (10000) (0)
!  full path is '/usr/libexec/hald-probe-serial', program_dir is '/usr/libexec'
Run started hald-addon-cpufreq (0) (0)
!  full path is '/usr/libexec/hald-addon-cpufreq', program_dir is '/usr/libexec'
/usr/libexec/hald-probe-serial exited
13:19:21.191 [W] addon-cpufreq.c:1363: CPUFreq not supported. Exiting...
/usr/libexec/hald-addon-cpufreq exited
Run started hald-addon-acpi (0) (0)
!  full path is '/usr/libexec/hald-addon-acpi', program_dir is '/usr/libexec'
Run started hald-probe-serial (10000) (0)
!  full path is '/usr/libexec/hald-probe-serial', program_dir is '/usr/libexec'
/usr/libexec/hald-probe-serial exited
Segmentation fault
Comment 2 Doug Goldstein (RETIRED) gentoo-dev 2007-06-12 18:20:45 UTC
you need to provide verbose output. You also need to attach strace to it.

Based on the initial issue you posted to this bug, it seems like you've very much hosed something on your system since HAL installs /usr/share/hal/fdi/preprobe
Comment 3 luminoso 2007-06-12 20:01:38 UTC
Created attachment 121849 [details]
hald new verbose output

here's hald verbose output
Comment 4 luminoso 2007-06-12 20:02:15 UTC
Created attachment 121852 [details]
hald verbose output with strace

here's hald verbose output with strace command
Comment 5 Doug Goldstein (RETIRED) gentoo-dev 2007-06-12 20:45:12 UTC
Do you have acpid running? Something is holding your /proc/acpi/event but then HAL can't talk to acpid via it's socket. It's getting permission denied.

As far as the crash, HAL appears to attempt to read an entry from /sys and immediately segfaults... which is very odd...
Comment 6 luminoso 2007-06-12 21:10:14 UTC
Created attachment 121862 [details]
hald verbose output with strace and NO acpi

no i don't have acpid running.
so i did:

emerge -C hal
"lsoft | grep hal" and killed all processes using old hal files
USE="-acpi kernel_linux crypt" emerge hal

and here's new strace log
Comment 7 luminoso 2007-06-12 21:15:44 UTC
Created attachment 121863 [details]
hald verbose output with strace and NO acpi

sorry my mistake!
Here's the right one
Comment 8 Doug Goldstein (RETIRED) gentoo-dev 2007-06-12 21:26:56 UTC
Why are you doing USE="kernel_linux". That should not be a USE flag you should be touching.

Also, USE=acpi does not imply using acpid. It just tries to read ACPI data, first it will try to connect to /proc/acpi/event. Which it can not on your system, which means some application is holding /proc/acpi/event... which could very well be another instance of HAL or something else funky on your system. If you actually do have an app using that, you should be using acpid since that allows multiple consumers of acpi event data.
Comment 9 Doug Goldstein (RETIRED) gentoo-dev 2007-06-12 21:27:52 UTC
Based on the latest log you posted, HAL is up and running 100%.
Comment 10 luminoso 2007-06-12 21:35:43 UTC
Created attachment 121864 [details]
segfault

No..

/etc/init.d/hald restart
 * Caching service dependencies ...                                                                                                                        [ ok ]
 * Starting Hardware Abstraction Layer daemon ...                                                                                                          [ !! ]


and:

No..

strace hald --verbose=yes --daemon=no &> error5

also:

# lsof | grep /sys/
X         26467       root    4u      REG        0,0       256       9899 /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/config

humm
and now? just ask! :)
Comment 11 Doug Goldstein (RETIRED) gentoo-dev 2007-06-13 15:36:52 UTC
The last comment isn't helpful at all. All you've done is shown that on your system HAL doesn't start via the init script.

You can run it via strace but gave no indication if it dies or keeps running.

lsof proves nothing because HAL reads those entries on start up and doesn't keep them opened so lsof will show you absolutely nothing.

The new log provides no new information other than HAL segfaults when it reads that same /sys entry, which points to a bad kernel since a read/open of a /sys entry shouldn't segfault a system.

At this point I would say you're going to have to reproduce this issue under gentoo-sources.
Comment 12 Doug Goldstein (RETIRED) gentoo-dev 2007-06-13 15:40:20 UTC
cd /sys/devices/pnp0/00:07/driver; ls ../../../bus/pnp/drivers/serial

try running that as well.
Comment 13 luminoso 2007-06-13 15:59:13 UTC
# pwd
/sys/devices/pnp0/00:07/driver
# ls ../../../bus/pnp/drivers/serial
ls: cannot access ../../../bus/pnp/drivers/serial: No such file or directory


hummmmmm
Comment 14 Doug Goldstein (RETIRED) gentoo-dev 2007-06-13 16:14:19 UTC
ls -l /sys/devices/pnp0/00:07/
ls -l /sys/devices/pnp0/00:07/driver
ls -l /sys/bus/pnp/
ls -l /sys/bus/pnp/drivers/
Comment 15 luminoso 2007-06-13 16:21:07 UTC
# ls -l /sys/devices/pnp0/00:07/
total 0
lrwxrwxrwx 1 root root    0 2007-06-13 16:49 driver -> ../../../bus/pnp/drivers/serial
-r--r--r-- 1 root root 4096 2007-06-13 17:11 id
-r--r--r-- 1 root root 4096 2007-06-13 17:11 options
drwxr-xr-x 2 root root    0 2007-06-11 03:16 power
-rw-r--r-- 1 root root 4096 2007-06-13 17:11 resources
lrwxrwxrwx 1 root root    0 2007-06-13 17:11 subsystem -> ../../../bus/pnp
drwxr-xr-x 3 root root    0 2007-06-12 13:13 ttyS0
--w------- 1 root root 4096 2007-06-13 17:11 uevent

# ls -l /sys/devices/pnp0/00:07/driver
lrwxrwxrwx 1 root root 0 2007-06-13 16:49 /sys/devices/pnp0/00:07/driver -> ../../../bus/pnp/drivers/serial

# ls -l /sys/bus/pnp/
total 0
drwxr-xr-x 2 root root 0 2007-06-12 13:13 devices
drwxr-xr-x 6 root root 0 2007-06-11 01:45 drivers

# ls -l /sys/bus/pnp/drivers
total 0
drwxr-xr-x 2 root root 0 2007-06-09 05:21 i8042 aux
drwxr-xr-x 2 root root 0 2007-06-09 05:21 i8042 kbd
drwxr-xr-x 2 root root 0 2007-06-09 05:21 serial
drwxr-xr-x 2 root root 0 2007-06-09 05:21 system
Comment 16 Doug Goldstein (RETIRED) gentoo-dev 2007-06-13 16:27:35 UTC
cat /sys/bus/pnp/drivers/serial
Comment 17 luminoso 2007-06-13 16:38:11 UTC
# cat /sys/bus/pnp/drivers/serial
cat: /sys/bus/pnp/drivers/serial: Is a directory

MORE:
# ls /sys/bus/pnp/drivers/serial
00:07  00:08  bind  unbind

# cat /sys/bus/pnp/drivers/serial/*bind*
cat: /sys/bus/pnp/drivers/serial/bind: Permission denied
cat: /sys/bus/pnp/drivers/serial/unbind: Permission denied
Comment 18 Doug Goldstein (RETIRED) gentoo-dev 2007-06-13 16:41:20 UTC
At this point I'd say you really need to reproduce the error under gentoo-sources. You also might want to consider removing ISA PnP support from your kernel unless you have ISA bits.
Comment 19 luminoso 2007-06-13 18:08:28 UTC
So.. for this new gentoo-sources I will use my .config
..and...

# grep ISA .config
CONFIG_GENERIC_ISA_DMA=y
# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
CONFIG_ISA_DMA_API=y
# CONFIG_ISA is not set
CONFIG_I2C_ISA=m
# CONFIG_I2C_PCA_ISA is not set

CONFIG_GENERIC_ISA_DMA and CONFIG_ISA_DMA_API=y are selected every 'make oldconfig'.

am I missing something?
Comment 20 luminoso 2007-06-13 23:12:25 UTC
solved.
rebooted with kernel-2.6.22-rc4-ck1 :)
Comment 21 luminoso 2007-06-13 23:13:11 UTC
and thank you so much for your time! :)
!!!