#261 Segmentation fault

3.2.0
closed
David Ashley
5
2012-08-14
2007-04-30
Anonymous
No

phillb@webwombat.com

[phillb@vmfc6devwv64 tmp]$ ./helloworld.rexx
Segmentation fault
[phillb@vmfc6devwv64 tmp]$

However:

[phillb@vmfc6devwv64 tmp]$ su -
Password:
[root@vmfc6devwv64 ~]# cd /tmp
[root@vmfc6devwv64 tmp]# ./helloworld.rexx
hello world
[root@vmfc6devwv64 tmp]#

On an identical machine with only one difference it works. The difference is no LDAP auth.

Info:

[root@vmfc6devwv64 tmp]# rexx -v
Open Object Rexx Interpreter Version 3.1.2 for LINUX
Build date: Apr 20 2007
Copyright (c) IBM Corporation 1995, 2004.
Copyright (c) RexxLA 2005-2007.
All Rights Reserved.
This program and the accompanying materials
are made available under the terms of the Common Public License v1.0
which accompanies this distribution.
http://www.oorexx.org/license.html

Syntax is "rexx [-v] filename [arguments]".
[root@vmfc6devwv64 tmp]#

Source of helloworld.rexx:

[phillb@vmfc6devwv64 tmp]$ cat helloworld.rexx

!/usr/bin/rexx

say "hello world"
[phillb@vmfc6devwv64 tmp]$

Debug:

[phillb@vmfc6devwv64 tmp]$ gdb rexx
GNU gdb Red Hat Linux (6.5-15.fc6rh)
Copyright (C) 2006 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 "x86_64-redhat-linux-gnu"...(no debugging symbols found)
Using host libthread_db library "/lib64/libthread_db.so.1".

(gdb) set args /tmp/helloworld.rexx
(gdb) run
Starting program: /usr/bin/rexx /tmp/helloworld.rexx
warning: Lowest section in system-supplied DSO at 0xffffe000 is .hash at ffffe0b4
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 4159616720 (LWP 23386)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 4159616720 (LWP 23386)]
RxAPIHOMEset () at ./rexxapi/unix/RexxAPIManager.cpp:505
505 ./rexxapi/unix/RexxAPIManager.cpp: No such file or directory.
in ./rexxapi/unix/RexxAPIManager.cpp
Current language: auto; currently c++
(gdb) backtrace

0 RxAPIHOMEset () at ./rexxapi/unix/RexxAPIManager.cpp:505

1 0xf7fc2916 in RexxInitialize () at ./kernel/runtime/RexxStartup.cpp:264

2 0xf7f9d3c5 in RexxStart (argcount=0, arglist=0xffb85168, programname=0xffb87be1 "/tmp/helloworld.rexx", instore=0x0, envname=0x8048ad0 "bash", calltype=0, exits=0x0, retcode=0xffb85166,

result=0x0) at ./kernel/platform/unix/RexxMain.cpp:237

3 0x08048901 in main ()

(gdb) quit
The program is running. Exit anyway? (y or n) y
[phillb@vmfc6devwv64 tmp]$

Discussion

  • Mark Miesfeld
    Mark Miesfeld
    2007-04-30

    Logged In: YES
    user_id=191588
    Originator: NO

    ooRexx 3.1.2 will not run as a 64 bit application, only 32 bit.

    It's been some time since I've been on a x86_64 Linux system. As I remember, there wasn't anything special you had to do to run 32 bit applications. But, this seems as though in one case it is running as a 32 bit application and in the failing case, only has access to 64 bit libraries?

     
  • David Ashley
    David Ashley
    2007-05-17

    Logged In: YES
    user_id=931756
    Originator: NO

    Rick and I are looking at the code where this seems to seg fault and it is leading us down a path that could resolve this situation long-term. In the mantime, we have a potential workaround.

    We believe that if the user sets either the RXHOME or the HOME environment variables prior to starting rexx the problem will be resolved. The location set in these environment variables needs to be writable by the user. Normally these would be the user's home subdirectory but they could also be /tmp if need be or any other writable location.

    Please let us know if this works for you.

     
  • David Ashley
    David Ashley
    2007-05-17

    Logged In: YES
    user_id=931756
    Originator: NO

    I have implemented a fix for this on Linux systems (systems that support the getpwuid API). Systems that use other methods to obtain the user's HOME subdir may still need the workaround listed below.

     
  • David Ashley
    David Ashley
    2007-05-17

    Logged In: YES
    user_id=931756
    Originator: NO

    I added code for fixing this under AIX in SVN revision 392.

     


Anonymous


Cancel   Add attachments