Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 14817 - quik segfaults and installs bogus bootblock while overwriting functional one on ext2 partition
Summary: quik segfaults and installs bogus bootblock while overwriting functional one ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: PPC Linux
: High normal (vote)
Assignee: Jonathan Nall
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-30 20:33 UTC by listbox
Modified: 2012-02-03 09:01 UTC (History)
2 users (show)

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


Attachments
gdb output from segfault (quik.txt,576 bytes, text/plain)
2003-01-31 00:19 UTC, listbox
Details

Note You need to log in before you can comment on or make changes to this bug.
Description listbox 2003-01-30 20:33:13 UTC
User-Agent:       
Build Identifier: 

quik (1-29-02 sync) compiles with gcc3.2.1 now but is non-functional. It
overwrites functioning bootblock while emerging/installing to ext2 /boot
partition. It segfaults when run.

Reproducible: Always
Steps to Reproduce:
1. emerge quik
2. run quik
3. restore from backups
4. repeat
Actual Results:  
machine failed to load kernel - hangs in OF

Expected Results:  
load kernel, exec init

debian quik sources compiled with 2.95.3 function correctly
see bugs 14655 8093
Comment 1 Jonathan Nall 2003-01-30 21:04:35 UTC
can you run:
gdb quik
and at the gdb prompt, type:
run <any quik arguments here>

this should result in a SIGSEGV (a segfault). at this point, at the gdb prompt, type:
where
and post the output here.

sorry, but i don't have an oldworld machine to try this out on
Comment 2 listbox 2003-01-31 00:19:33 UTC
Created attachment 7774 [details]
gdb output from segfault

synced 1-30-02
Comment 3 Graham Forest 2003-02-01 18:34:45 UTC
Hey, whenever you need testing of this, I'm standing by with my trusty 9600/200, I'm fairly comfortable with OF and quik (I used to run it before gcc 3.x).

Mail me, catch me on irc, whatever.
Comment 4 Jonathan Nall 2003-02-01 19:56:35 UTC
listbox: the command to run at the second gdb prompt is 'where' not 'run'.

thanks!
Comment 5 Graham Forest 2003-02-01 20:33:55 UTC
lenin root # gdb quik
GNU gdb 5.2.1
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "powerpc-unknown-linux-gnu"...
(no debugging symbols found)...
(gdb) run  
Starting program: /sbin/quik 

Program received signal SIGSEGV, Segmentation fault.
0x0ff214a4 in _IO_flush_all_lockp () from /lib/libc.so.6
(gdb) where
#0  0x0ff214a4 in _IO_flush_all_lockp () from /lib/libc.so.6
#1  0x0ff215b8 in _IO_flush_all_lockp () from /lib/libc.so.6
#2  0x0fee5234 in exit () from /lib/libc.so.6
#3  0x10002240 in _SDA_BASE_ ()
#4  0x0fecdd34 in __libc_start_main () from /lib/libc.so.6
(gdb)
Comment 6 listbox 2003-02-01 21:44:53 UTC
GNU gdb 5.3
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "powerpc-unknown-linux-gnu"...
(no debugging symbols found)...
(gdb) run -C /boot/quik.conf
Starting program: /sbin/quik -C /boot/quik.conf
(no debugging symbols found)...(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
0x0ff1e31c in _IO_flush_all_lockp () from /lib/libc.so.6
(gdb) where
#0  0x0ff1e31c in _IO_flush_all_lockp () from /lib/libc.so.6
#1  0x0ff1e430 in _IO_flush_all_lockp () from /lib/libc.so.6
#2  0x0ff1e6f8 in _cleanup () from /lib/libc.so.6
#3  0x0fedc900 in exit () from /lib/libc.so.6
#4  0x10002248 in _SDA_BASE_ ()
(gdb) 

sorry, very similar to Graham's errors

tom
Comment 7 Jonathan Nall 2003-02-01 23:17:56 UTC
can both of you guys emerge rsync and make sure you have:
gcc-3.2.1
glibc-2.3.1-r2
binutils-2.13.90.0.18
recompile and see if you get the same behavior. 

from what i and vladimir figured out on IRC, it's choking during the exit(0) call, which implies (to me) some compiler/assembler/linker mismatch. let's try this and see what it does.
Comment 8 listbox 2003-02-02 14:27:49 UTC
updated binutils-2.13.90.0.16 --> binutils-2.13.90.0.18 and received identical gdb output to prior comment
Comment 9 Graham Forest 2003-02-03 01:03:07 UTC
I got very similar output, too. Upgraded GCC (14 hours of compiling), glibc (quite a few, but no that many,  and binutils, output is as follows:

Starting program: /sbin/quik -v
Second-stage loader is on /dev/sdb5
Config file is on partition 5
Writing first-stage QUIK boot block to /dev/sdb5
Making /dev/sdb5 bootable (map entry 5)
Writing block table to boot block on /dev/sdb5
strnpy done
finfo access done
2nd strncpy done
returning from write_block_table()
syncing
done syncing
(no debugging symbols found)...(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
0x0ff1e364 in _IO_flush_all_lockp () from /lib/libc.so.6
(gdb) where
#0  0x0ff1e364 in _IO_flush_all_lockp () from /lib/libc.so.6
#1  0x0ffe8f10 in __DTOR_END__ () from /lib/libc.so.6
#2  0x0ff1e740 in _cleanup () from /lib/libc.so.6
#3  0x0fedc878 in exit () from /lib/libc.so.6
#4  0x10002290 in _SDA_BASE_ ()
#5  0x0fec3dac in __libc_start_main () from /lib/libc.so.6
(gdb)
Comment 10 Jonathan Nall 2003-02-05 00:55:05 UTC
got a potential fix to vladimir. he's testing.
Comment 11 Jonathan Nall 2003-02-07 23:35:18 UTC
please try quik-2.0.1.0-r3 (it's marked ~ppc). there was a bug in the quik code where a missing fclose() was causing glibc's file syncing to SIGSEGV upon exit().

please report back if this works for you. i can confirm it no longer SIGSEGVs, but have no oldworld machine to try it on.
Comment 12 listbox 2003-02-08 16:29:50 UTC
On this machine - Umax s900dp, OF 1.0.5 - quik compiles and executes without errors, but machine hangs in OF while trying to open scsi boot device with no output to OF console. Machine accepts no input after pointing OF at the correct partition - requires forced reboot.
Comment 13 listbox 2003-02-15 17:29:36 UTC
resolved as non-functional
Comment 14 John Davis (zhen) (RETIRED) gentoo-dev 2003-04-04 01:21:11 UTC
db fix
Comment 15 John Davis (zhen) (RETIRED) gentoo-dev 2003-04-04 01:26:03 UTC
db fix