#935 alarm doesn't


The slightly modified example of the Alarm class never wakes up in 4.0.1 linux, although it works in 3.2.0

routerstate@twinz:~/nvt$ uname -a
Linux twinz 2.6.26-2-686 #1 SMP Tue Mar 9 17:35:51 UTC 2010 i686 GNU/Linux
routerstate@twinz:~/nvt$ ./example.rex
REXX-ooRexx_3.2.0(MT) 6.02 30 Oct 2007
It is now 9:22pm.Please Call the Bank
[uninstalled 3.2.0 and installed 4.0.1]
routerstate@twinz:~/nvt$ ./example.rex
REXX-ooRexx_4.0.1(MT) 6.03 2 May 2010
[30 second wait, then killall example.rex]

Installed from:

gigo@twinz:~$ ls ooRexx*.deb
ooRexx-3.2.0-1.debian40.i386.deb ooRexx-4.0.1.i586.debian50.deb


  • Geoff Stevens

    Geoff Stevens - 2010-08-31

    test program to demonstrate problem

  • Geoff Stevens

    Geoff Stevens - 2010-08-31

    This is on Debian 5 32 bit.

  • Mark Miesfeld

    Mark Miesfeld - 2010-08-31

    Thanks, the development team appreciates people taking the time to submit bug reports. We can't always respond to bugs as quickly as we would like, but someone will look at this when they get a chance.

  • Mark Miesfeld

    Mark Miesfeld - 2010-09-18

    Geoff, just to let you know, I can reproduce this.

    Rick or David -

    I looked at this, the pthread_cond_timedwait() in SysSemaphore::wait(uint32_t t) simply does not return when the time is up. Everything is set up right as far as I can see, the wait time gets specified as seconds in absolute time. Plus the actual code implementation, though refactored some, looks exactly the same as 3.2.0.

    Maybe you have some ideas?

  • Geoff Stevens

    Geoff Stevens - 2012-10-14

    I started using a private alarm class with a SysSleep in it, then forgot about it, then ran into the problem again on 4.1.1.

    Looking up the call chain, interpreter/platform/unix/TimeSupport::alarm_starTimer calls common/platform/unix/SysSemaphore::wait(uint32_t t) using an automatic SysSemaphore object. The SysSemaphore constructor was called without the boolean create parameter set to true, so none of the mutex or condvar stuff is set up. You'd think that might blow up, but alas not: it just waits forever.

    I tried
    SysSemaphore sem(true);
    but that got me a SysSemaphore object full of funny values, for no doubt excellent C++ reasons.

    after the context->SetObjectVariable() calls made it work as we'd want it to.

  • Mark Miesfeld

    Mark Miesfeld - 2012-11-07
    • labels: Interpreter --> Interpreter, fixed
    • status: open --> pending
    • assigned_to: Mark Miesfeld
    • pending_work_items: --> complete
    • milestone: v4.0.1 --> 4.1.3
  • Mark Miesfeld

    Mark Miesfeld - 2012-11-07

    Committed revision 8568. [r8568]



    Commit: [r8568]

  • Mark Miesfeld

    Mark Miesfeld - 2012-11-07

    Thanks for opening this Geoff, and for the hint.

    Committed revision 8568. r[8568] trunk
    Committed revision 8569. r[8569] 4.1 fixes

  • Mark Miesfeld

    Mark Miesfeld - 2013-07-09
    • status: pending --> closed
  • Mark Miesfeld

    Mark Miesfeld - 2013-07-09

    This bug is fixed in the ooRexx 4.1.3 release.



Cancel  Add attachments