#218 Segmentation fault on complex program

v3.1
closed
5
2012-08-14
2006-12-28
Swifty
No

Open Object Rexx Interpreter Version 3.1.1 for
LINUX
OpenSuSE 9.3 (so says System admin)
2.6.11.4-21.14-default #1 Thu Aug 24 09:51:41 UTC 2006 (from uname -a)

On the linux system where my program should run, it segmentation faults before executing even the very first instruction ("Trace ?r" at the moment).

When the program was smaller I could work around the segmentation faults by adding extra "Say" statements.

The identical program (less the "Trace ?r") runs without error under IBM Object Rexx on my Windows XP system.

Discussion

  • Swifty

    Swifty - 2006-12-28

    Program that causes segmentation fault

     
  • Swifty

    Swifty - 2006-12-28

    Logged In: YES
    user_id=1364573
    Originator: YES

    Debug output:
    swifty@jerry:~> gdb rexx
    GNU gdb 6.3
    Copyright 2004 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 "i586-suse-linux"...(no debugging symbols
    found)
    Using host libthread_db library "/lib/tls/libthread_db.so.1".

    (gdb) set args /srv/www/htdocs/swifty/cgi-bin/sudoku2
    (gdb) run
    Starting program: /usr/bin/rexx /srv/www/htdocs/swifty/cgi-bin/sudoku2
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    [Thread debugging using libthread_db enabled]
    [New Thread 1077397184 (LWP 16558)]
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)

    Program received signal SIGSEGV, Segmentation fault.
    [Switching to Thread 1077397184 (LWP 16558)]
    0x40455ccc in ?? ()
    (gdb) where

    0 0x40455ccc in ?? ()

    1 0x400e1020 in RexxNativeActivation::run () from

    /opt/ooRexx/lib/ooRexx/librexx.so.3

    2 0x4007512d in RexxMethod::run () from

    /opt/ooRexx/lib/ooRexx/librexx.so.3

    3 0x400757e8 in RexxMethod::call () from

    /opt/ooRexx/lib/ooRexx/librexx.so.3

    4 0x4007dfb6 in RexxObject::shriekRun () from

    /opt/ooRexx/lib/ooRexx/librexx.so.3

    5 0x400bbc8f in SysRunProgram () from

    /opt/ooRexx/lib/ooRexx/librexx.so.3

    6 0x400dee60 in RexxLocal::runProgram () from

    /opt/ooRexx/lib/ooRexx/librexx.so.3

    7 0x4007545e in RexxMethod::run () from

    /opt/ooRexx/lib/ooRexx/librexx.so.3

    8 0x4007edc6 in RexxObject::messageSend () from

    /opt/ooRexx/lib/ooRexx/librexx.so.3

    9 0x400d334f in RexxSendMessage () from

    /opt/ooRexx/lib/ooRexx/librexx.so.3

    10 0x400bc263 in RexxStart () from /opt/ooRexx/lib/ooRexx/librexx.so.3

    11 0x08048996 in ?? ()

    12 0x40277e90 in __libc_start_main () from /lib/tls/libc.so.6

    13 0x080487c1 in ?? ()

    (gdb)

     
  • Mark Miesfeld

    Mark Miesfeld - 2006-12-28

    Logged In: YES
    user_id=191588
    Originator: NO

    Simple back trace from gdb:

    Raven:/work/tools/work.ooRexx/bugs/bug.1623151 # gdb rexx
    GNU gdb 6.4
    ...
    This GDB was configured as "i686-pc-linux-gnu"...(no debugging symbols found)
    Using host libthread_db library "/lib/libthread_db.so.1".

    (gdb) set args ttt.rexx
    (gdb) run
    Starting program: /usr/bin/rexx ttt.rexx
    ...
    [Thread debugging using libthread_db enabled]
    [New Thread -1212119376 (LWP 26200)]
    (no debugging symbols found)
    ...

    Program received signal SIGSEGV, Segmentation fault.
    [Switching to Thread -1212119376 (LWP 26200)]
    0xb7f32f93 in RexxBehaviour::methodLookup () from /opt/ooRexx/lib/ooRexx/librexx.so.3
    (gdb) where

    0 0xb7f32f93 in RexxBehaviour::methodLookup () from /opt/ooRexx/lib/ooRexx/librexx.so.3

    1 0xb7eddd75 in RexxObject::messageSend () from /opt/ooRexx/lib/ooRexx/librexx.so.3

    2 0xb7ee3ee9 in RexxString::hash () from /opt/ooRexx/lib/ooRexx/librexx.so.3

    3 0xb7f36f3c in RexxHashTable::stringGet () from /opt/ooRexx/lib/ooRexx/librexx.so.3

    4 0xb7f0fa95 in RexxSource::addVariable () from /opt/ooRexx/lib/ooRexx/librexx.so.3

    5 0xb7f1226a in RexxSource::addText () from /opt/ooRexx/lib/ooRexx/librexx.so.3

    6 0xb7f138b3 in RexxSource::subTerm () from /opt/ooRexx/lib/ooRexx/librexx.so.3

    7 0xb7f142a7 in RexxSource::messageTerm () from /opt/ooRexx/lib/ooRexx/librexx.so.3

    8 0xb7f143f9 in RexxSource::instruction () from /opt/ooRexx/lib/ooRexx/librexx.so.3

    9 0xb7f14b18 in RexxSource::translateBlock () from /opt/ooRexx/lib/ooRexx/librexx.so.3

    10 0xb7f16007 in RexxSource::directive () from /opt/ooRexx/lib/ooRexx/librexx.so.3

    11 0xb7f166b8 in RexxSource::translate () from /opt/ooRexx/lib/ooRexx/librexx.so.3

    12 0xb7f16968 in RexxSource::method () from /opt/ooRexx/lib/ooRexx/librexx.so.3

    13 0xb7ed32f8 in RexxMethodClass::newRexxMethod () from /opt/ooRexx/lib/ooRexx/librexx.so.3

    14 0xb7ed336b in RexxMethodClass::newRexxBuffer () from /opt/ooRexx/lib/ooRexx/librexx.so.3

    15 0xb7f1bbac in SysRestoreProgram () from /opt/ooRexx/lib/ooRexx/librexx.so.3

    16 0xb7f284cd in RexxActivation::loadRequired () from /opt/ooRexx/lib/ooRexx/librexx.so.3

    17 0xb7f10c81 in RexxSource::processInstall () from /opt/ooRexx/lib/ooRexx/librexx.so.3

    18 0xb7f29ea4 in RexxActivation::run () from /opt/ooRexx/lib/ooRexx/librexx.so.3

    19 0xb7ed4775 in RexxMethod::call () from /opt/ooRexx/lib/ooRexx/librexx.so.3

    20 0xb7f285c2 in RexxActivation::loadRequired () from /opt/ooRexx/lib/ooRexx/librexx.so.3

    21 0xb7f10c81 in RexxSource::processInstall () from /opt/ooRexx/lib/ooRexx/librexx.so.3

    22 0xb7f29ea4 in RexxActivation::run () from /opt/ooRexx/lib/ooRexx/librexx.so.3

    23 0xb7ed4849 in RexxMethod::call () from /opt/ooRexx/lib/ooRexx/librexx.so.3

    24 0xb7edcfc6 in RexxObject::shriekRun () from /opt/ooRexx/lib/ooRexx/librexx.so.3

    25 0xb7f1abdf in SysRunProgram () from /opt/ooRexx/lib/ooRexx/librexx.so.3

    26 0xb7f3ddb0 in RexxLocal::runProgram () from /opt/ooRexx/lib/ooRexx/librexx.so.3

    27 0xb7ed446e in RexxMethod::run () from /opt/ooRexx/lib/ooRexx/librexx.so.3

    28 0xb7edddd6 in RexxObject::messageSend () from /opt/ooRexx/lib/ooRexx/librexx.so.3

    29 0xb7f3229f in RexxSendMessage () from /opt/ooRexx/lib/ooRexx/librexx.so.3

    30 0xb7f1b1b3 in RexxStart () from /opt/ooRexx/lib/ooRexx/librexx.so.3

    31 0x08048996 in ?? ()

    32 0xb7c1f87c in __libc_start_main () from /lib/libc.so.6

    33 0x080487c1 in ?? ()

    (gdb) quit

     
  • Mark Miesfeld

    Mark Miesfeld - 2006-12-28

    Logged In: YES
    user_id=191588
    Originator: NO

    I put in a comment that starts with: Simple back trace from gdb:

    That should be ignored, it was meant for a different bug.

     
  • Swifty

    Swifty - 2006-12-28

    Logged In: YES
    user_id=1364573
    Originator: YES

    Here is a brief description of the program attached to this bug report (sodoku1).
    It is entirely self contained, that is, it makes no calls to external routines. It is 1584 lines, almost pure "Classic" Rexx, that is, it makes almost no use of the "Object" part of Object Rexx. It contains 51 subroutines, and three ::Routine routines. The ::Routines are there for only one reason - they do not get traced when you are debugging. They contain code that is guaranteed bug-free.
    The program is a CGI script, intended to run under an Apache webserver. It takes its input entirely from environment variables and SYSIN. Its output, other than a logging facility to a file, is entirely to STDOUT. The output to STDOUT (when it is working) consists of an HTTP header, followed by a blank line, followed by HTML.
    Before the most recent change I was getting occasional Segmentation faults. I would get the fault every time I ran the program, but adding an extra "Say" statement here or there would usually make the fault go away. Once the fault was bypassed in this way it never came back, until I changed the program. The most recent change was the addition of a large subroutine "Line_Square". After adding this routine I could not find any combination of additional "Say" statements that would "cure" the Segmentation faults.

     


Anonymous

Cancel  Add attachments





Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks