Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 286046 - sys-apps/hal-0.5.11-r9 hald segfault when initializing RAID partition block device
Summary: sys-apps/hal-0.5.11-r9 hald segfault when initializing RAID partition block d...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Daniel Gryniewicz (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on: 313389
Blocks:
  Show dependency tree
 
Reported: 2009-09-23 04:23 UTC by Jeff Hansen
Modified: 2011-09-18 09:27 UTC (History)
2 users (show)

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


Attachments
Fix crash in hald.c (md-crash.patch,996 bytes, patch)
2009-09-23 04:24 UTC, Jeff Hansen
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff Hansen 2009-09-23 04:23:53 UTC
My hald always used to segfault around the time it printed out this:

Sep 22 22:12:34 ren hald[28592]: 22:12:34.556 [I] blockdev.c:874: block_add: sys
fs_path=/sys/devices/virtual/block/md3/md3p1 dev=/dev/md3p1 is_part=1, parent=0x
00000000
Sep 22 22:12:34 ren hald[28592]: 22:12:34.556 [I] blockdev.c:886: Handling /dev/
md3p1 as MD device
Segmentation fault

I have a partition table at the beginning of a RAID device (yes, unusual, but that's what I have), which is exactly how you can reproduce this problem.  I found that a couple of the strcmps fail to check for a null pointer being returned when getting the "storage.drive_type" on the parent device (apparently MD devices don't set this up properly).  This is around line ~1394 and ~1404 of hald.c.

After I applied the attached patch, it no longer crashes, and my system can run hald fine.

More recent upstream versions of hald have fixed this problem already, but the problem persists in sys-apps/hal-0.5.11-r9.


Reproducible: Always

Steps to Reproduce:
1. Create a RAID device, and set up a partition table on it.
2. Start hald


Actual Results:  
hald segfaults, and all programs that use hald are unhappy.

Expected Results:  
hald should not crash.

Please add the attached patch to sys-apps/hal-0.5.11-rX; it fixes the problem.
Comment 1 Jeff Hansen 2009-09-23 04:24:32 UTC
Created attachment 204992 [details, diff]
Fix crash in hald.c
Comment 2 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-09-23 11:20:50 UTC
please check if hal-0.5.13 fails in the same way and provide emerge --info.
Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2011-09-18 09:27:44 UTC
sys-apps/hal was removed from tree wrt #313389, closing as OBSOLETE