[Bug 1068] New: calling stop() of periodic task blocks until the current period ends

Dmytro Poplavskiy <[email protected]> Wed, 26 Aug 2015 08:21:30 +0200
Newsgroups gmane.science.robotics.orocos.devel
Message-ID <[email protected]/>
http://bugs.orocos.org/show_bug.cgi?id=1068

           Summary: calling stop() of periodic task blocks until the
                    current period ends
           Product: Toolchain
           Version: master
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P3
         Component: RTT
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]
   Estimated Hours: 0.0


Created attachment 876
  --> http://bugs.orocos.org/attachment.cgi?id=876
test application

For the task with periodic activity (1 second for example)
calling

task.configure()
task.start()
task.stop()

blocks at stop() for one second.
This cause problems for tasks with large update interval.


This is caused by RTT::os::Thread::stop() trying to lock task->breaker:
MutexTimedLock lock(breaker, getStopTimeout() ); 

while the same mutex is locked by periodic activity thread:
MutexLock lock(task->breaker);

while calling rtos_task_wait_period(task->getTask())

I'd expect the breaker mutex to protect task->step() and some housekeeping, but
not sleeping between updates.

-- 
Configure bugmail: http://bugs.orocos.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
You are the assignee for the bug.
-- 
Orocos-Dev mailing list
[email protected]
http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev