Date: Thu, 21 Oct 2004 16:36:59 +0400 (MSD) From: Andrew Belashov <bel@orel.ru> To: FreeBSD-gnats-submit@FreeBSD.org Subject: sparc64/72962: [sysinstall] Sysinstall panics on sparc64 if /dev/cd0 present Message-ID: <200410211236.i9LCax5Z076485@white.orel.ru> Resent-Message-ID: <200410211240.i9LCeSOJ044717@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 72962 >Category: sparc64 >Synopsis: [sysinstall] Sysinstall panics on sparc64 if /dev/cd0 present >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-sparc64 >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Oct 21 12:40:28 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Andrew Belashov >Release: FreeBSD 5.3-BETA7 sparc64 >Organization: JSC CenterTelecom >Environment: System: FreeBSD bel.localdomain 5.3-BETA7 FreeBSD 5.3-BETA7 #11: Thu Oct 14 13:02:53 MSD 2004 bel@bel.localdomain:/usr/obj/usr/src/sys/SUNC3D sparc64 $ dmesg|grep cd cd0 at sym0 bus 0 target 6 lun 0 cd0: <TOSHIBA DVD-ROM SD-M1401 1009> Removable CD-ROM SCSI-2 device cd0: 20.000MB/s transfers (20.000MHz, offset 16) cd0: Attempt to query device size failed: NOT READY, Medium not present >Description: On sparc64 systems sysinstall panics after "Probing devices, please wait (this can take a while)...": Floating point exception (core dumped) >How-To-Repeat: # gdb53 /usr/obj/usr/src/usr.sbin/sysinstall/sysinstall GNU gdb 5.3 (FreeBSD) [...] This GDB was configured as "sparc64-portbld-freebsd5.2"... (gdb) run Program received signal SIGFPE, Arithmetic exception. 0x00000000001241f4 in Int_Open_Disk (name=0x2a4350 "cd0", conftxt=0x276a1c "0") at /usr/src/lib/libdisk/open_disk.c:270 270 o = d->chunks->size / (hd * sc); (gdb) l 265 /* PLATFORM POLICY BEGIN ------------------------------------- */ 266 /* We have a chance to do things on a blank disk here */ 267 if (platform == p_sparc64 && d->chunks->part->part == NULL) { 268 hd = d->bios_hd; 269 sc = d->bios_sect; 270 o = d->chunks->size / (hd * sc); 271 o *= (hd * sc); 272 o -= 2 * hd * sc; 273 if (Add_Chunk(d, 0, o, name, freebsd, 0, 0, "-")) { 274 DPRINT(("Failed to add 'freebsd' chunk")); (gdb) p hd $1 = 0 (gdb) p sc $2 = 0 (gdb) p d[0] $3 = {name = 0x2a4360 "cd0", bios_cyl = 0, bios_hd = 0, bios_sect = 0, bootmgr = 0x0, bootmgr_size = 0, boot1 = 0x0, chunks = 0x29c200, sector_size = 512} >Fix: It is necessary to fix libdisk(3). --- libdisk.patch begins here --- --- lib/libdisk/open_disk.c.orig Tue Oct 12 16:02:58 2004 +++ lib/libdisk/open_disk.c Thu Oct 21 16:19:40 2004 @@ -267,6 +267,8 @@ Int_Open_Disk(const char *name, char *co if (platform == p_sparc64 && d->chunks->part->part == NULL) { hd = d->bios_hd; sc = d->bios_sect; + if ((hd * sc) == 0) + return (NULL); o = d->chunks->size / (hd * sc); o *= (hd * sc); o -= 2 * hd * sc; --- libdisk.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200410211236.i9LCax5Z076485>