Received: from list by lists.gnu.org with archive (Exim 4.71) id 1S0nun-0007Sc-GH for mharc-grub-devel@gnu.org; Fri, 24 Feb 2012 00:41:57 -0500 Received: from eggs.gnu.org ([140.186.70.92]:59377) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0nuk-0007SV-FO for grub-devel@gnu.org; Fri, 24 Feb 2012 00:41:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S0nuh-00059K-QA for grub-devel@gnu.org; Fri, 24 Feb 2012 00:41:53 -0500 Received: from che.mayfirst.org ([209.234.253.108]:38681) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0nuh-00059C-Bv for grub-devel@gnu.org; Fri, 24 Feb 2012 00:41:51 -0500 Received: from pip.fifthhorseman.net (lair.fifthhorseman.net [108.58.6.98]) by che.mayfirst.org (Postfix) with ESMTPSA id 12D7FF970; Fri, 24 Feb 2012 00:41:45 -0500 (EST) Received: by pip.fifthhorseman.net (Postfix, from userid 1000) id 8CDA411884; Fri, 24 Feb 2012 00:42:04 -0500 (EST) From: Daniel Kahn Gillmor To: Vladimir =?utf-8?Q?'=CF=86-coder=2Fphcoder'?= Serbinenko , grub-devel@gnu.org Subject: Re: grub RAID heuristics (how can we avoid "superfluous RAID member (2 found)") In-Reply-To: <4F45D1FB.2070205@gmail.com> References: <4F29DEF7.80009@fifthhorseman.net> <4F45D1FB.2070205@gmail.com> User-Agent: Notmuch/0.11.1 (http://notmuchmail.org) Emacs/23.3.1 (i486-pc-linux-gnu) Date: Fri, 24 Feb 2012 00:41:58 -0500 Message-ID: <87haygrdnd.fsf@pip.fifthhorseman.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 209.234.253.108 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 05:41:56 -0000 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Thu, 23 Feb 2012 06:43:23 +0100, Vladimir '=CF=86-coder/phcoder' Serbine= nko wrote: > Try attached patch hrm, i get a segmentation fault from "grub-probe /" even without this patch when building from bzr trunk (r3964, i think). The test machine i've set up looks like this uses a common layering scheme: disk =E2=86=92 partition =E2=86=92 mdadm (0.90 superblock) =E2=86=92 lvm = =E2=86=92 filesystem Here are the details and a backtrace of me trying: 0 root@trash:~# parted /dev/sda unit s print Model: ATA WDC WD200BB-75DE (scsi) Disk /dev/sda: 39062500s Sector size (logical/physical): 512B/512B Partition Table: msdos Number Start End Size Type File system Flags 1 8192s 12542018s 12533827s primary 2 12550144s 39062499s 26512356s primary 0 root@trash:~# parted /dev/sdb unit s print Model: ATA QUANTUM FIREBALL (scsi) Disk /dev/sdb: 26520480s Sector size (logical/physical): 512B/512B Partition Table: msdos Number Start End Size Type File system Flags 1 4096s 26520479s 26516384s primary 0 root@trash:~# cat /proc/mdstat=20 Personalities : [raid1]=20 md0 : active raid1 sdb1[0] sda2[1] 13256064 blocks [2/2] [UU] =20=20=20=20=20=20 unused devices: 0 root@trash:~# pvs PV VG Fmt Attr PSize PFree /dev/md0 vg_trash0 lvm2 a-- 12.64g 9.64g 0 root@trash:~# vgs VG #PV #LV #SN Attr VSize VFree vg_trash0 1 1 0 wz--n- 12.64g 9.64g 0 root@trash:~# lvs LV VG Attr LSize Origin Snap% Move Log Copy% Convert root vg_trash0 -wi-ao 3.00g=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 0 root@trash:~# grep ' / ' /proc/mounts=20 rootfs / rootfs rw 0 0 /dev/mapper/vg_trash0-root / ext3 rw,relatime,errors=3Dremount-ro,user_xatt= r,acl,barrier=3D1,data=3Dordered 0 0 0 root@trash:~# cd -=20 /home/dkg/src/grub/grub 0 root@trash:/home/dkg/src/grub/grub# gdb ./grub-probe GNU gdb (GDB) 7.4-debian Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i486-linux-gnu". For bug reporting instructions, please see: ... Reading symbols from /home/dkg/src/grub/grub/grub-probe...(no debugging sym= bols found)...done. (gdb) run -v / Starting program: /home/dkg/src/grub/grub/grub-probe -v / [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1". /home/dkg/src/grub/grub/grub-probe: info: changing current directory to /de= v/mapper. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to /de= v. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to md. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to dri. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to snd. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to by-= path. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to cpu. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to vg_= trash0. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to /de= v. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to md. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to dri. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to snd. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to by-= path. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to cpu. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to vg_= trash0. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to dis= k. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to by-= uuid. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to by-= path. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to by-= id. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to blo= ck. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to /de= v. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to md. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to dri. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to snd. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to by-= path. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to cpu. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to vg_= trash0. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to dis= k. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to by-= uuid. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to by-= path. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to by-= id. /home/dkg/src/grub/grub/grub-probe: info: changing current directory to blo= ck. /home/dkg/src/grub/grub/grub-probe: info: Looking for /dev/sdb1. /home/dkg/src/grub/grub/grub-probe: info: /dev/sdb1 starts from 4096. /home/dkg/src/grub/grub/grub-probe: info: opening the device hd1. /home/dkg/src/grub/grub/grub-probe: info: the size of hd1 is 26520480. /home/dkg/src/grub/grub/grub-probe: info: the size of hd1 is 26520480. /home/dkg/src/grub/grub/grub-probe: info: Scanning for DISKFILTER devices o= n disk hd1. /home/dkg/src/grub/grub/grub-probe: info: no LVM signature found. /home/dkg/src/grub/grub/grub-probe: info: Found array md/md0. /home/dkg/src/grub/grub/grub-probe: info: Inserting hd1 into md/md0 (mdraid= 09) . /home/dkg/src/grub/grub/grub-probe: info: the size of hd1 is 26520480. /home/dkg/src/grub/grub/grub-probe: info: Scanning for DISKFILTER devices o= n disk md/md0. /home/dkg/src/grub/grub/grub-probe: info: no LVM signature found. /home/dkg/src/grub/grub/grub-probe: info: scanning md/md0 for LDM. /home/dkg/src/grub/grub/grub-probe: info: no LDM signature found. /home/dkg/src/grub/grub/grub-probe: info: Scanning for DISKFILTER devices o= n disk md/md0. /home/dkg/src/grub/grub/grub-probe: info: Found array vg_trash0. /home/dkg/src/grub/grub/grub-probe: info: Inserting md/md0 into vg_trash0 (= lvm) . /home/dkg/src/grub/grub/grub-probe: info: Scanning for DISKFILTER devices o= n disk lvm/vg_trash0-root. /home/dkg/src/grub/grub/grub-probe: info: no LVM signature found. /home/dkg/src/grub/grub/grub-probe: info: scanning lvm/vg_trash0-root for L= DM. /home/dkg/src/grub/grub/grub-probe: info: no LDM signature found. /home/dkg/src/grub/grub/grub-probe: info: Scanning for DISKFILTER devices o= n disk hd1. /home/dkg/src/grub/grub/grub-probe: info: Inserting hd1 into vg_trash0 (lvm) . Program received signal SIGSEGV, Segmentation fault. 0x080e7850 in grub_util_get_ldm () (gdb) bt #0 0x080e7850 in grub_util_get_ldm () #1 0x080d834e in grub_util_biosdisk_get_grub_dev () #2 0x080d7195 in grub_util_pull_device () #3 0x080d716a in grub_util_pull_device () #4 0x080d7081 in grub_util_pull_device () #5 0x0804ab2c in probe () #6 0x0804bcdc in main () (gdb)=20 Applying the patch doesn't help me avoid the segfault. So i haven't really tested the patch. --dkg --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQJ8BAEBCgBmBQJPRyMoXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQwRUU1QkU5NzkyODJEODBCOUY3NTQwRjFD Q0QyRUQ5NEQyMTczOUU5AAoJEMzS7ZTSFznprXEQAI8tYUanubnVI6YjkspfHhwN F8Ut2+2cDKf+M7ismva4/8ZX6ucPxw8gDf0TUfEM2U6ONe2g6w4QAXbWmg8sNbZw jV+E9vSmIkGqBuQC+wghp6Q6lCdC5yGTW0gdsh+thDJARdPerB3ty7vbb8Cb4Hop bFB3yp/9zjjBgnZuK8YA1MlgisfmDqqpnisj2D0lbjN5uRY4SnMdKiWCLzpReYZm qIppblhbdjO2CZnChBfmumd13zF75TezY+mZSeFdDeuM3NB4/e6N1L0dzThVRAKR yuz0c4aUZ257LYsE9l+hACh9laaPARWMRtaNvQkJ/slUcEL2/KN0rC+kjtt+SCAQ +K4qQiH2Uqp/BjEO8tubvsCy0S2G/BS3lYOKCWjO7HqAd8gDN0uFqLP0LCMnWS5b yFNs6fjR96puyGOPLu6TxVDWM+W2eoy19MWim9A7VYobqgzeMZBJtNVYDiLIIHqZ 5eMDvMGLjovSk8Wp9pvbKb+zLhRKX866/A8PSAg3jmdm6xAxeSlDFA9ZifM4oZEJ 2dlUvUTZWtqkXY3+T75ivBMMEP9N63d2zYDOYCtkS4+M1Uztwtenv1PD4mnvvYxN 58PccDrwBn7Sse/ECHxGaYckOXFW07gDNrJzaADj92Kf8cUId4CqStFye+8Y6D81 xN3ZbRrS9dFWyOBUTIT2 =r7ZK -----END PGP SIGNATURE----- --=-=-=--