Bug 119017 - internal fatal error on files of certain size
internal fatal error on files of certain size
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: gawk (Show other bugs)
1
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Thomas Woerner
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-03-23 16:59 EST by Keith McDuffee
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-10-08 07:16:19 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Keith McDuffee 2004-03-23 16:59:09 EST
Description of problem:


Version-Release number of selected component (if applicable):

gawk-3.1.3-3 through gawk-3.1.3-7


How reproducible:

Every time file is of certain size (not sure what sizes exactly yet).


Steps to Reproduce:

Example here with a comment-only file (for simplicity sake):

$ cat test1.awk
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
$ wc test1.awk
      9       9     594 test1.awk
$ cat test2.awk 
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
$ wc test2.awk 
      8       8     528 test2.awk
$ /usr/bin/awk -f test2.awk 
awk: test2.awk:9: fatal error: internal error
Aborted


Additional info:

Error not reproducable on generic, user build of gawk-3.1.3
Comment 1 Keith McDuffee 2004-03-23 17:00:04 EST
Description of problem:

Certain size files cause gawk to abort with error.  Once the file
meets a certain size, gawk seems to work fine.
Comment 2 Keith McDuffee 2004-03-23 17:01:01 EST
Steps to Reproduce:

Example here with a comment-only file (for simplicity sake):

$ cat test1.awk
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
$ wc test1.awk
      9       9     594 test1.awk
$ /usr/bin/awk -f test1.awk
$ cat test2.awk 
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
$ wc test2.awk 
      8       8     528 test2.awk
$ /usr/bin/awk -f test2.awk 
awk: test2.awk:9: fatal error: internal error
Aborted
Comment 3 Thomas Woerner 2004-03-31 04:23:01 EST
I can not reproduce this error:

$ wc test1.awk
  9   9 594 test1.awk
$ wc test2.awk
  8   8 528 test2.awk
$ /usr/bin/awk -f test1.awk 
$ /usr/bin/awk -f test2.awk 
$ $ rpm -q gawk
gawk-3.1.3-7
$

Can you send me the debug output of "/usr/bin/awk -f test2.awk", please?
Comment 4 Keith McDuffee 2004-03-31 09:42:46 EST
Let me know if you expected more info than this:

$ /bin/gawk --version
GNU Awk 3.1.3
Copyright (C) 1989, 1991-2003 Free Software Foundation.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
USA.

$ cat test2.awk 
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################

$ cksum test2.awk 
2021776911 528 test2.awk

$ cksum /bin/gawk 
12423910 256476 /bin/gawk

$ gdb /bin/gawk
GNU gdb Red Hat Linux (5.3.90-0.20030710.41rh)
Copyright 2003 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 "i386-redhat-linux-gnu"...
(no debugging symbols found)...Using host libthread_db library
"/lib/tls/libthread_db.so.1".

(gdb) run -f test2.awk
Starting program: /bin/gawk -f test2.awk
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
0x007d1963 in memmove () from /lib/tls/libc.so.6
(gdb) where
#0  0x007d1963 in memmove () from /lib/tls/libc.so.6
#1  0x00000001 in ?? ()
#2  0x08050e9d in getfname ()
#3  0x08cfe952 in ?? ()
#4  0xfffffe46 in ?? ()
#5  0x08cfd958 in ?? ()
#6  0xbff8526c in ?? ()
(gdb) 
Comment 5 Thomas Woerner 2004-03-31 09:59:36 EST
I'd need this:

$ rpm -q gawk
$ rpm -V gawk
$ rpm -q glibc
$ rpm -V glibc
$ ldd /bin/awk

Please install 
http://people.redhat.com/twoerner/RPMS/fc2/gawk-debuginfo-3.1.3-7.i386.rpm
and run gdb again.
Comment 6 Keith McDuffee 2004-03-31 10:18:54 EST
$ rpm -q gawk
gawk-3.1.3-7

$ rpm -V gawk
prelink: /bin/gawk: R_386_JMP_SLOT not pointing into .got section
S.?.....   /bin/gawk
....L...   /bin/igawk
....L...   /bin/pgawk
prelink: /usr/libexec/awk/grcat: R_386_JMP_SLOT not pointing into .got
section
S.?.....   /usr/libexec/awk/grcat
prelink: /usr/libexec/awk/pwcat: R_386_JMP_SLOT not pointing into .got
section
S.?.....   /usr/libexec/awk/pwcat

$ rpm -q glibc
glibc-2.3.2-101

$ rpm -V glibc
..?.....   /usr/sbin/glibc_post_upgrade

$ gdb /bin/gawk
GNU gdb Red Hat Linux (5.3.90-0.20030710.41rh)
Copyright 2003 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 "i386-redhat-linux-gnu"...Using host
libthread_db library "/lib/tls/libthread_db.so.1".

(gdb) run -f test2.awk
Starting program: /bin/gawk -f test2.awk

Program received signal SIGSEGV, Segmentation fault.
0x007d1963 in memmove () from /lib/tls/libc.so.6
(gdb) where
#0  0x007d1963 in memmove () from /lib/tls/libc.so.6
#1  0x00000001 in ?? ()
#2  0x08050e9d in get_src_buf () at awkgram.y:1319
#3  0x08051257 in nextc () at awkgram.y:1393
#4  0x08051485 in yylex () at awkgram.y:1531
#5  0x080507aa in yyparse () at y.tab.c:1485
#6  0x08064c75 in main (argc=3, argv=0xbfec8754) at main.c:537
Comment 7 Keith McDuffee 2004-03-31 10:23:49 EST
$ ldd /bin/awk
        libdl.so.2 => /lib/libdl.so.2 (0x008b9000)
        libm.so.6 => /lib/tls/libm.so.6 (0x00895000)
        libc.so.6 => /lib/tls/libc.so.6 (0x0075a000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00742000)
Comment 8 Thomas Woerner 2004-04-01 04:08:39 EST
Please update prelink to the fc2 version and try again.
Comment 9 Thomas Woerner 2004-04-01 04:29:02 EST
Please reinstall gawk, there seems to be a big problem with it.

"rpm -V gawk" may not report anything.

To get rid of the prelink warnings, please install the fc2 prelink
package.
Comment 10 Keith McDuffee 2004-04-06 08:56:59 EDT
Installed fc2 gawk:

# rpm -ivh --force /mnt/Fedora/RPMS/gawk-3.1.3-7.i386.rpm
...
$ rpm -q gawk
gawk-3.1.3-7
# rpm -V gawk
#

Debugging for new gawk:

$ gdb /bin/gawk
GNU gdb Red Hat Linux (5.3.90-0.20030710.41rh)
Copyright 2003 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 "i386-redhat-linux-gnu"...Using host
libthread_db library "/lib/tls/libthread_db.so.1".

(gdb) run -f test2.awk
Starting program: /bin/gawk -f test2.awk

Program received signal SIGSEGV, Segmentation fault.
0x007d1963 in memmove () from /lib/tls/libc.so.6
(gdb) where
#0  0x007d1963 in memmove () from /lib/tls/libc.so.6
#1  0x00000001 in ?? ()
#2  0x08050e9d in get_src_buf () at awkgram.y:1319
#3  0x08051257 in nextc () at awkgram.y:1393
#4  0x08051485 in yylex () at awkgram.y:1531
#5  0x080507aa in yyparse () at y.tab.c:1485
#6  0x08064c75 in main (argc=3, argv=0xbff1c4f4) at main.c:537
(gdb) 
Comment 11 Keith McDuffee 2004-04-06 22:59:39 EDT
fc2 prelink is requring me to install/upgrade too many other packages:

# rpm -Uvh prelink-0.3.1-2.i386.rpm
warning: prelink-0.3.1-2.i386.rpm: V3 DSA signature: NOKEY, key ID
30c9ecf8
error: Failed dependencies:
        libselinux.so.1 is needed by prelink-0.3.1-2
# ls libse*
libselinux-1.6-3.i386.rpm
# rpm -ivh libselinux-1.6-3.i386.rpm
warning: libselinux-1.6-3.i386.rpm: V3 DSA signature: NOKEY, key ID
30c9ecf8
error: Failed dependencies:
        libc.so.6(GLIBC_2.3.4) is needed by libselinux-1.6-3
Comment 12 Thomas Woerner 2004-07-02 10:50:56 EDT
I have rechecked this with FC1 (glibc-2.3.2-101 and gawk-3.1.3-3 or
gawk-3.1.3-7), but I can not reproduce the problem at all.
Comment 13 Thomas Woerner 2004-10-08 07:16:19 EDT
Closing.

Note You need to log in before you can comment on or make changes to this bug.