[Rock-dev] [rock] #442: roby/syskit: Cleanup of Syskit::InstanceRequirements::Task
rock
noreply at opendfki.de
Fri Apr 4 12:30:55 CEST 2014
#442: roby/syskit: Cleanup of Syskit::InstanceRequirements::Task
--------------------+--------------------
Reporter: thro02 | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: base | Keywords: syskit
--------------------+--------------------
Not all obsolete instances of Syskit::InstanceRequirements::Task are
picked up by the garbage collector.
Situation is as follows:
The orogen task monster_interface::InterfaceModule is used standalone and
as dependency in an action, i.e.
-- Modelling in syskit (simplified)
{{{
module 'Sherpa'
profile 'Common' do
define("monster_interface", monster_interface::InterfaceModule)
end
end
class RobotActions < Roby::Action::Interface
use_profile Sherpa::Common
def set_posture(arguments = Hash.new)
task = Sherpa::Tasks::SetPosture.new(arguments)
monster = task.depends_on(monster_interface::InterfaceModule,
:role => 'monster_interface')
task
end
end
}}}
-- Calling at runtime via shell --
1. monster_interface_def!
2. set_posture!
leads to a Roby::TaskStructure::PlannedBy
{{{
MonsterInterface::InterfaceModule::0x01
--> Syskit::InstanceRequirements::Task::0x01 [ <--- this one originates
from the monster_interface_def! call ]
--> Syskit::InstanceRequirements::Task::0x02 [ <-- this one orignates
from the set_posture call ]
}}}
When the set_posture action ends, one would expect the second
Syskit::InstanceRequirements::Task to be cleaned up, however it isn't
since its original dependency was defined on another
MonsterInterface::InterfaceModule instance (say
MonsterInterface::InterfaceModule::0x02) which has been merged into
MonsterInterface::InterfaceModule::0x01.
Thus only if MonsterInterface::InterfaceModule::0x01 is removed the
PlannedBy relation is cleaned up properly.
If calling the set_posture method more frequently we have a 'memory leak'
and time consuming network merges.
The current workaround clears the Syskit::InstanceRequirementsTasks in the
Roby garbage collection based on some general constraints, i.e. checking
for parents and matching the InstanceRequirementsTask interface. However,
that should be actually fixed in Syskit and not in Roby.
--
Ticket URL: <https://rock.opendfki.de/ticket/442>
rock <https://rock.opendfki.de>
rock: the robot construction kit
More information about the Rock-dev
mailing list