#92 Segmentation fault when run from cron

v3.0
closed
5
2012-08-14
2005-09-05
Roy
No

I have a rexx script I wrote. The script runs fine from
the command line. When I attempt to run it via cron, I
get 1637 Segmentation fault

OS is SUSE Linux 9.1 and 9.3. I have tried both the
3.0 RPM and building it from source with equal results.

IBM's rexx for AIX had similar problems years ago
because of the different stdin/stdout when running from
a cron job

Roy

Discussion

  • Graham_Lawrence

    Graham_Lawrence - 2005-09-11

    Logged In: YES
    user_id=1342706

    I too have a segmentation fault trying to execute a Rexx
    script from cron. OS is Mandrake 9. I too built from the
    source. How do I overcome this problem?

     
  • Mark Hessling

    Mark Hessling - 2005-09-13

    Logged In: YES
    user_id=86185

    Please be a bit more specific about the nature of the Rexx
    script you are running. I ran a simple "hello world" program
    and it worked fine from cron.

     
  • Graham_Lawrence

    Graham_Lawrence - 2005-09-13

    Logged In: YES
    user_id=1342706

    Mark, Here are some details about the problem:

    The crontab entry :

            • /home/graham/testrexx >/home/graham/test.log 2>&1

    testrexx :

    /usr/local/bin/rexx test.rex

    test.rex :

    / Display OS /
    Parse source opsys p2 xecname p4
    say 'opsys='opsys'.'
    say 'p2='p2
    say 'xecname='xecname'.'
    say 'p4='p4

    test.log :
    /home/graham/testrexx: line 1: 324 Segmentation fault
    /usr/local/bin/rexx test.rex

    Thanks for looking into the problem.

    Graham

     
  • David Ashley

    David Ashley - 2005-09-21

    Logged In: YES
    user_id=931756

    This is a known problem related to bug 1190516. Redirection
    of the Rexx command line does not work in all cases.
    Unfortunately, the specific broken case is used by cron to
    redirect output from the cron job which in turn causes the
    seg fault. A fix has not yet been developed.

     
  • David Ashley

    David Ashley - 2005-11-10

    Logged In: YES
    user_id=931756

    This all may be related to a bug that was opened on Mod_Rexx
    with ooRexx on Linux. It appears that the location for the
    ooRexx installed executables (/usr/local/bin) is not in
    Cron's path on some Linux distributions. This is also true
    for Apache. Try adding the following line somewhere in
    Cron's startup script.

    export PATH=$PATH:/usr/local/bin:/usr/local/sbin

    Please let me knowif this fixes the problem.

     
  • Graham_Lawrence

    Graham_Lawrence - 2006-01-20

    Logged In: YES
    user_id=1342706

    I'm sorry but it has taken me some time to get around to
    checking a suggested fix. I have put

    PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin

    as the first line in the crontab and can now get my test
    pogram to work.

     
  • David Ashley

    David Ashley - 2006-03-01

    Logged In: YES
    user_id=931756

    The PATH problem should go away starting with version 3.1.0.
    ooRexx will install itself in /opt/ooRexx and create links
    in /usr/bin and usr/lib for its executables and librearies.

     


Anonymous

Cancel  Add attachments





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

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks