<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>14817</bug_id>
          
          <creation_ts>2003-01-30 20:33 0000</creation_ts>
          <short_desc>quik segfaults and installs bogus bootblock while overwriting functional one on ext2 partition</short_desc>
          <delta_ts>2006-02-04 06:03:38 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Applications</component>
          <version>unspecified</version>
          <rep_platform>PPC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>listbox@charter.net</reporter>
          <assigned_to>nall@themountaingoats.net</assigned_to>
          <cc>vladimir@rio.com</cc>

      

      
          <long_desc isprivate="0">
            <who>listbox@charter.net</who>
            <bug_when>2003-01-30 20:33:13 0000</bug_when>
            <thetext>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</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>nall@themountaingoats.net</who>
            <bug_when>2003-01-30 21:04:35 0000</bug_when>
            <thetext>can you run:
gdb quik
and at the gdb prompt, type:
run &lt;any quik arguments here&gt;

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&apos;t have an oldworld machine to try this out on
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>listbox@charter.net</who>
            <bug_when>2003-01-31 00:19:33 0000</bug_when>
            <thetext>Created an attachment (id=7774)
gdb output from segfault

synced 1-30-02</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vladimir@rio.com</who>
            <bug_when>2003-02-01 18:34:45 0000</bug_when>
            <thetext>Hey, whenever you need testing of this, I&apos;m standing by with my trusty 9600/200, I&apos;m fairly comfortable with OF and quik (I used to run it before gcc 3.x).

Mail me, catch me on irc, whatever.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>nall@themountaingoats.net</who>
            <bug_when>2003-02-01 19:56:35 0000</bug_when>
            <thetext>listbox: the command to run at the second gdb prompt is &apos;where&apos; not &apos;run&apos;.

thanks!</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vladimir@rio.com</who>
            <bug_when>2003-02-01 20:33:55 0000</bug_when>
            <thetext>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 &quot;show copying&quot; to see the conditions.
There is absolutely no warranty for GDB.  Type &quot;show warranty&quot; for details.
This GDB was configured as &quot;powerpc-unknown-linux-gnu&quot;...
(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)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>listbox@charter.net</who>
            <bug_when>2003-02-01 21:44:53 0000</bug_when>
            <thetext>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 &quot;show copying&quot; to see the conditions.
There is absolutely no warranty for GDB.  Type &quot;show warranty&quot; for details.
This GDB was configured as &quot;powerpc-unknown-linux-gnu&quot;...
(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&apos;s errors

tom</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>nall@themountaingoats.net</who>
            <bug_when>2003-02-01 23:17:56 0000</bug_when>
            <thetext>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&apos;s choking during the exit(0) call, which implies (to me) some compiler/assembler/linker mismatch. let&apos;s try this and see what it does.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>listbox@charter.net</who>
            <bug_when>2003-02-02 14:27:49 0000</bug_when>
            <thetext>updated binutils-2.13.90.0.16 --&gt; binutils-2.13.90.0.18 and received identical gdb output to prior comment</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vladimir@rio.com</who>
            <bug_when>2003-02-03 01:03:07 0000</bug_when>
            <thetext>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)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>nall@themountaingoats.net</who>
            <bug_when>2003-02-05 00:55:05 0000</bug_when>
            <thetext>got a potential fix to vladimir. he&apos;s testing.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>nall@themountaingoats.net</who>
            <bug_when>2003-02-07 23:35:18 0000</bug_when>
            <thetext>please try quik-2.0.1.0-r3 (it&apos;s marked ~ppc). there was a bug in the quik code where a missing fclose() was causing glibc&apos;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.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>listbox@charter.net</who>
            <bug_when>2003-02-08 16:29:50 0000</bug_when>
            <thetext>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.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>listbox@charter.net</who>
            <bug_when>2003-02-15 17:29:36 0000</bug_when>
            <thetext>resolved as non-functional</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>zhen@gentoo.org</who>
            <bug_when>2003-04-04 01:21:11 0000</bug_when>
            <thetext>db fix</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>zhen@gentoo.org</who>
            <bug_when>2003-04-04 01:26:03 0000</bug_when>
            <thetext>db fix</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>7774</attachid>
            <date>2003-01-31 00:19 0000</date>
            <desc>gdb output from segfault</desc>
            <filename>quik.txt</filename>
            <type>text/plain</type>
            <data encoding="base64">KGdkYikgcnVuIC1DIC9ib290L3F1aWsuY29uZgpTdGFydGluZyBwcm9ncmFtOiAvc2Jpbi9xdWlr
IC1DIC9ib290L3F1aWsuY29uZgoobm8gZGVidWdnaW5nIHN5bWJvbHMgZm91bmQpLi4uKG5vIGRl
YnVnZ2luZyBzeW1ib2xzIGZvdW5kKS4uLgpQcm9ncmFtIHJlY2VpdmVkIHNpZ25hbCBTSUdTRUdW
LCBTZWdtZW50YXRpb24gZmF1bHQuCjB4MGZmMWUzMWMgaW4gX0lPX2ZsdXNoX2FsbF9sb2NrcCAo
KSBmcm9tIC9saWIvbGliYy5zby42CihnZGIpIHJ1bgpUaGUgcHJvZ3JhbSBiZWluZyBkZWJ1Z2dl
ZCBoYXMgYmVlbiBzdGFydGVkIGFscmVhZHkuClN0YXJ0IGl0IGZyb20gdGhlIGJlZ2lubmluZz8g
KHkgb3IgbikgeQoKU3RhcnRpbmcgcHJvZ3JhbTogL3NiaW4vcXVpayAtQyAvYm9vdC9xdWlrLmNv
bmYKKG5vIGRlYnVnZ2luZyBzeW1ib2xzIGZvdW5kKS4uLihubyBkZWJ1Z2dpbmcgc3ltYm9scyBm
b3VuZCkuLi4KUHJvZ3JhbSByZWNlaXZlZCBzaWduYWwgU0lHU0VHViwgU2VnbWVudGF0aW9uIGZh
dWx0LgoweDBmZjFlMzFjIGluIF9JT19mbHVzaF9hbGxfbG9ja3AgKCkgZnJvbSAvbGliL2xpYmMu
c28uNgoK
</data>        

          </attachment>
    </bug>

</bugzilla>