• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: Problem with cron  (Read 1912 times)
9ral4f
Newbie
*

Karma: 0
Posts: 3


View Profile
« on: October 25, 2009, 11:10:04 AM »

Hi.

I compiled ooRexx (http://www.oorexx.org/) v4 on my SheevaPlug. Rexx programs work fine from the command line. But when I try to start a rexx-script via cron, after succesfully running, rexx doesn't exit. It stays in memory, on each run filling up my plug's precious memory with about 4 MB.

My plug has been updated with sheevaplug installer 1.0, booting from a sdcard.

I asked first in newsgroup comp.lang.rexx, but obviously this problem is unique. I suspect this is a linux problem on the plug. Anyone else had any problems like this?

Ralf
Logged

birdman
Sr. Member
****

Karma: 4
Posts: 443


View Profile WWW
« Reply #1 on: October 25, 2009, 07:42:49 PM »

It stays in memory, on each run filling up my plug's precious memory with about 4 MB.
So the process is still there.
Does it have a log file (if not - can it have one).  Have you looked at it?
Have you checked on what files it has open (in /proc/<pid>/fd)?
Is it actually doing anything, or is it waiting on something?  Try running strace on it.
Logged

9ral4f
Newbie
*

Karma: 0
Posts: 3


View Profile
« Reply #2 on: October 26, 2009, 10:49:07 AM »

So the process is still there.
Yes, according to htop, it just sits there, apparently not running. After a SIGTERM it goes away and frees it's memory.
Quote
Does it have a log file (if not - can it have one).
Apparently not. I can only trace script execution, not the interpreter itself.
Quote
Have you checked on what files it has open (in /proc/<pid>/fd)?
I have now. /proc/(pid of rexx)/fd is empty.
Quote
Is it actually doing anything, or is it waiting on something?
The interpreted script exits fine. I have postfix/mutt installed (http://computingplugs.com/index.php/Postfix_and_Mutt), and after each execution I get mail from cron. So rexx really just sits there, apparently doing nothing.
Quote
Try running strace on it.
I'll do that, when I have more time at hand. But the plug is my first real experience with linux. Tracing programs is not what I'm used to do... :-)

Ralf

BTW: Apart from this one problem, I think the plug is the best computer related investment I ever did... I'm running transmission, hiawatha with php and mysql, vsftpd, mediatomb, privoxy and squid on it, replacing a 100+ watts windows server machine. And it works really well.
Logged

birdman
Sr. Member
****

Karma: 4
Posts: 443


View Profile WWW
« Reply #3 on: October 26, 2009, 09:03:26 PM »

So rexx really just sits there, apparently doing nothing.
It could be waiting for another process that you haven't noticed, yet.  Did any other process have the rexx pid as it's parent's pid?  Is it threaded?
Logged

9ral4f
Newbie
*

Karma: 0
Posts: 3


View Profile
« Reply #4 on: October 26, 2009, 11:47:40 PM »

I suspect I may have a oorexx bug here. strace via htop on the idling process reads:
Code:
futex(0x40160f18, FUTEX_WAIT_PRIVATE, 2, NULL
So it is waiting endlessly for another process to change a specific memory address. Since the idling process actually seems to be a child process of oorexx itself, created while executing the rexx script , I' ll put this case to the oorexx-authorities...

Thanks for your help so far. I really never heard of strace or the the /proc-vfs until now. I'm a bloody beginner on linux.

Ralf

Logged

Pages: [1]
Print
Jump to: