Abort during deployment under xenomai

Hi,

As I where trying to convert my deployment to Lua, I am bumbimp into this
abort code :

...
0.630 [CRITICAL][Thread] Could not allocate configuration semaphore 'sem'
for
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
./run.sh: line 30: 16239 Aborted rosrun ocl
deployer-$OROCOS_TARGET -s $ROOT_DEPLOYMENT_FILE
This append when I connect "too much" ports to the deployer (I mean I tried
to add different ports, and it always fail with the same number of ports).
Do I forgot some memory size configuration somewhere ?
I am using orocos 2.4, with a xenomai deployer that uses lua services to
deploy the application. Note that the rtt_dot_service is loaded also (I
don't know how he could be involved, but never know...)

Abort during deployment under xenomai

On Thu, Oct 13, 2011 at 12:45 AM, Willy Lambert <lambert [dot] willy [..] ...> wrote:
> Hi,
> As I where trying to convert my deployment to Lua, I am bumbimp into this
> abort code :
> ...
> 0.630 [CRITICAL][Thread] Could not allocate configuration semaphore 'sem'
> for
> terminate called after throwing an instance of 'std::bad_alloc'
>   what():  std::bad_alloc
> ./run.sh: line 30: 16239 Aborted                 rosrun ocl
> deployer-$OROCOS_TARGET -s $ROOT_DEPLOYMENT_FILE
> This append when I connect "too much" ports to the deployer (I mean I tried
> to add different ports, and it always fail with the same number of ports).
> Do I forgot some memory size configuration somewhere ?
> I am using orocos 2.4, with a xenomai deployer that uses lua services to
> deploy the application. Note that the rtt_dot_service is loaded also (I
> don't know how he could be involved, but never know...)

Afaikt, this is a kernel option of Xenomai. So reconfigure your kernel
and check for the registry size. Also check /proc/xenomai for any clues...

Peter
--
Orocos-Users mailing list
Orocos-Users [..] ...
http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users

Abort during deployment under xenomai

2011/10/13 Peter Soetens <peter [..] ...>

> On Thu, Oct 13, 2011 at 12:45 AM, Willy Lambert <lambert [dot] willy [..] ...>
> wrote:
> > Hi,
> > As I where trying to convert my deployment to Lua, I am bumbimp into this
> > abort code :
> > ...
> > 0.630 [CRITICAL][Thread] Could not allocate configuration semaphore 'sem'
> > for
> > terminate called after throwing an instance of 'std::bad_alloc'
> > what(): std::bad_alloc
> > ./run.sh: line 30: 16239 Aborted rosrun ocl
> > deployer-$OROCOS_TARGET -s $ROOT_DEPLOYMENT_FILE
> > This append when I connect "too much" ports to the deployer (I mean I
> tried
> > to add different ports, and it always fail with the same number of
> ports).
> > Do I forgot some memory size configuration somewhere ?
> > I am using orocos 2.4, with a xenomai deployer that uses lua services to
> > deploy the application. Note that the rtt_dot_service is loaded also (I
> > don't know how he could be involved, but never know...)
>
> Afaikt, this is a kernel option of Xenomai. So reconfigure your kernel
> and check for the registry size. Also check /proc/xenomai for any clues...
>
>
arg, I did resize the default section because we had this problem at B.A,
maybe it is not enougth. So it seems to be a pure xenomai question, should
I ask on their mailing list ?

> Peter
>

Abort during deployment under xenomai

On Thu, Oct 13, 2011 at 11:01 PM, Willy Lambert <lambert [dot] willy [..] ...> wrote:
>
>
> 2011/10/13 Peter Soetens <peter [..] ...>
>>
>> On Thu, Oct 13, 2011 at 12:45 AM, Willy Lambert <lambert [dot] willy [..] ...>
>> wrote:
>> > Hi,
>> > As I where trying to convert my deployment to Lua, I am bumbimp into
>> > this
>> > abort code :
>> > ...
>> > 0.630 [CRITICAL][Thread] Could not allocate configuration semaphore
>> > 'sem'
>> > for
>> > terminate called after throwing an instance of 'std::bad_alloc'
>> >   what():  std::bad_alloc
>> > ./run.sh: line 30: 16239 Aborted                 rosrun ocl
>> > deployer-$OROCOS_TARGET -s $ROOT_DEPLOYMENT_FILE
>> > This append when I connect "too much" ports to the deployer (I mean I
>> > tried
>> > to add different ports, and it always fail with the same number of
>> > ports).
>> > Do I forgot some memory size configuration somewhere ?
>> > I am using orocos 2.4, with a xenomai deployer that uses lua services to
>> > deploy the application. Note that the rtt_dot_service is loaded also (I
>> > don't know how he could be involved, but never know...)
>>
>> Afaikt, this is a kernel option of Xenomai. So reconfigure your kernel
>> and check for the registry size. Also check /proc/xenomai for any clues...
>>
>
> arg, I did resize the default section because we had this problem at B.A,
> maybe it is not enougth.  So it seems to be a pure xenomai question, should
> I ask on their mailing list ?

Maybe there is a way to create semaphores as such that they don't need
this registry. I would recommend fixing _that_ in RTT's fosi instead
or raising the registry limit all the time.

Peter
--
Orocos-Users mailing list
Orocos-Users [..] ...
http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users

Abort during deployment under xenomai

2011/10/13 Peter Soetens <peter [..] ...>

> On Thu, Oct 13, 2011 at 11:01 PM, Willy Lambert <lambert [dot] willy [..] ...>
> wrote:
> >
> >
> > 2011/10/13 Peter Soetens <peter [..] ...>
> >>
> >> On Thu, Oct 13, 2011 at 12:45 AM, Willy Lambert <
> lambert [dot] willy [..] ...>
> >> wrote:
> >> > Hi,
> >> > As I where trying to convert my deployment to Lua, I am bumbimp into
> >> > this
> >> > abort code :
> >> > ...
> >> > 0.630 [CRITICAL][Thread] Could not allocate configuration semaphore
> >> > 'sem'
> >> > for
> >> > terminate called after throwing an instance of 'std::bad_alloc'
> >> > what(): std::bad_alloc
> >> > ./run.sh: line 30: 16239 Aborted rosrun ocl
> >> > deployer-$OROCOS_TARGET -s $ROOT_DEPLOYMENT_FILE
> >> > This append when I connect "too much" ports to the deployer (I mean I
> >> > tried
> >> > to add different ports, and it always fail with the same number of
> >> > ports).
> >> > Do I forgot some memory size configuration somewhere ?
> >> > I am using orocos 2.4, with a xenomai deployer that uses lua services
> to
> >> > deploy the application. Note that the rtt_dot_service is loaded also
> (I
> >> > don't know how he could be involved, but never know...)
> >>
> >> Afaikt, this is a kernel option of Xenomai. So reconfigure your kernel
> >> and check for the registry size. Also check /proc/xenomai for any
> clues...
> >>
> >
> > arg, I did resize the default section because we had this problem at B.A,
> > maybe it is not enougth. So it seems to be a pure xenomai question,
> should
> > I ask on their mailing list ?
>
> Maybe there is a way to create semaphores as such that they don't need
> this registry. I would recommend fixing _that_ in RTT's fosi instead
> or raising the registry limit all the time.
>
>
For my information, what is generating this huge amount of semaphores
? Which registry is it ?

> Peter
>

Abort during deployment under xenomai

On Thu, Oct 13, 2011 at 11:05 PM, Willy Lambert <lambert [dot] willy [..] ...> wrote:
>
>
> 2011/10/13 Peter Soetens <peter [..] ...>
>>
>> On Thu, Oct 13, 2011 at 11:01 PM, Willy Lambert <lambert [dot] willy [..] ...>
>> wrote:
>> >
>> >
>> > 2011/10/13 Peter Soetens <peter [..] ...>
>> >>
>> >> On Thu, Oct 13, 2011 at 12:45 AM, Willy Lambert
>> >> <lambert [dot] willy [..] ...>
>> >> wrote:
>> >> > Hi,
>> >> > As I where trying to convert my deployment to Lua, I am bumbimp into
>> >> > this
>> >> > abort code :
>> >> > ...
>> >> > 0.630 [CRITICAL][Thread] Could not allocate configuration semaphore
>> >> > 'sem'
>> >> > for
>> >> > terminate called after throwing an instance of 'std::bad_alloc'
>> >> >   what():  std::bad_alloc
>> >> > ./run.sh: line 30: 16239 Aborted                 rosrun ocl
>> >> > deployer-$OROCOS_TARGET -s $ROOT_DEPLOYMENT_FILE
>> >> > This append when I connect "too much" ports to the deployer (I mean I
>> >> > tried
>> >> > to add different ports, and it always fail with the same number of
>> >> > ports).
>> >> > Do I forgot some memory size configuration somewhere ?
>> >> > I am using orocos 2.4, with a xenomai deployer that uses lua services
>> >> > to
>> >> > deploy the application. Note that the rtt_dot_service is loaded also
>> >> > (I
>> >> > don't know how he could be involved, but never know...)
>> >>
>> >> Afaikt, this is a kernel option of Xenomai. So reconfigure your kernel
>> >> and check for the registry size. Also check /proc/xenomai for any
>> >> clues...
>> >>
>> >
>> > arg, I did resize the default section because we had this problem at
>> > B.A,
>> > maybe it is not enougth.  So it seems to be a pure xenomai question,
>> > should
>> > I ask on their mailing list ?
>>
>> Maybe there is a way to create semaphores as such that they don't need
>> this registry. I would recommend fixing _that_ in RTT's fosi instead
>> or raising the registry limit all the time.
>>
>
> For my information, what is generating this huge amount of semaphores
> ? Which registry is it ?

The Orocos Mutex maps to the Xenomai semaphore. Since each port is
protected by a Mutex to do its connection management, this can add up.
A connection does not add a mutex, unless the protocol it uses would
do so (like the Locked connections).

We have also two semaphores for each thread, and a semaphore for each
execution engine, with a condition variable.

None of these can be avoided and their lack would crash your current
program if removed :-)

Peter
--
Orocos-Users mailing list
Orocos-Users [..] ...
http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users

Abort during deployment under xenomai

2011/10/13 Peter Soetens <peter [..] ...>

> On Thu, Oct 13, 2011 at 11:05 PM, Willy Lambert <lambert [dot] willy [..] ...>
> wrote:
> >
> >
> > 2011/10/13 Peter Soetens <peter [..] ...>
> >>
> >> On Thu, Oct 13, 2011 at 11:01 PM, Willy Lambert <
> lambert [dot] willy [..] ...>
> >> wrote:
> >> >
> >> >
> >> > 2011/10/13 Peter Soetens <peter [..] ...>
> >> >>
> >> >> On Thu, Oct 13, 2011 at 12:45 AM, Willy Lambert
> >> >> <lambert [dot] willy [..] ...>
> >> >> wrote:
> >> >> > Hi,
> >> >> > As I where trying to convert my deployment to Lua, I am bumbimp
> into
> >> >> > this
> >> >> > abort code :
> >> >> > ...
> >> >> > 0.630 [CRITICAL][Thread] Could not allocate configuration semaphore
> >> >> > 'sem'
> >> >> > for
> >> >> > terminate called after throwing an instance of 'std::bad_alloc'
> >> >> > what(): std::bad_alloc
> >> >> > ./run.sh: line 30: 16239 Aborted rosrun ocl
> >> >> > deployer-$OROCOS_TARGET -s $ROOT_DEPLOYMENT_FILE
> >> >> > This append when I connect "too much" ports to the deployer (I mean
> I
> >> >> > tried
> >> >> > to add different ports, and it always fail with the same number of
> >> >> > ports).
> >> >> > Do I forgot some memory size configuration somewhere ?
> >> >> > I am using orocos 2.4, with a xenomai deployer that uses lua
> services
> >> >> > to
> >> >> > deploy the application. Note that the rtt_dot_service is loaded
> also
> >> >> > (I
> >> >> > don't know how he could be involved, but never know...)
> >> >>
> >> >> Afaikt, this is a kernel option of Xenomai. So reconfigure your
> kernel
> >> >> and check for the registry size. Also check /proc/xenomai for any
> >> >> clues...
> >> >>
> >> >
> >> > arg, I did resize the default section because we had this problem at
> >> > B.A,
> >> > maybe it is not enougth. So it seems to be a pure xenomai question,
> >> > should
> >> > I ask on their mailing list ?
> >>
> >> Maybe there is a way to create semaphores as such that they don't need
> >> this registry. I would recommend fixing _that_ in RTT's fosi instead
> >> or raising the registry limit all the time.
> >>
> >
> > For my information, what is generating this huge amount of semaphores
> > ? Which registry is it ?
>
> The Orocos Mutex maps to the Xenomai semaphore. Since each port is
> protected by a Mutex to do its connection management, this can add up.
> A connection does not add a mutex, unless the protocol it uses would
> do so (like the Locked connections).
>
> We have also two semaphores for each thread, and a semaphore for each
> execution engine, with a condition variable.
>
> None of these can be avoided and their lack would crash your current
> program if removed :-)
>

Oh, I am not searching to remove them :p Just trying to know what's
happening underneath

>
> Peter
>

Abort during deployment under xenomai

On Oct 13, 2011, at 17:23 , Peter Soetens wrote:

> On Thu, Oct 13, 2011 at 11:05 PM, Willy Lambert <lambert [dot] willy [..] ...> wrote:
>>
>>
>> 2011/10/13 Peter Soetens <peter [..] ...>
>>>
>>> On Thu, Oct 13, 2011 at 11:01 PM, Willy Lambert <lambert [dot] willy [..] ...>
>>> wrote:
>>>>
>>>>
>>>> 2011/10/13 Peter Soetens <peter [..] ...>
>>>>>
>>>>> On Thu, Oct 13, 2011 at 12:45 AM, Willy Lambert
>>>>> <lambert [dot] willy [..] ...>
>>>>> wrote:
>>>>>> Hi,
>>>>>> As I where trying to convert my deployment to Lua, I am bumbimp into
>>>>>> this
>>>>>> abort code :
>>>>>> ...
>>>>>> 0.630 [CRITICAL][Thread] Could not allocate configuration semaphore
>>>>>> 'sem'
>>>>>> for
>>>>>> terminate called after throwing an instance of 'std::bad_alloc'
>>>>>> what(): std::bad_alloc
>>>>>> ./run.sh: line 30: 16239 Aborted rosrun ocl
>>>>>> deployer-$OROCOS_TARGET -s $ROOT_DEPLOYMENT_FILE
>>>>>> This append when I connect "too much" ports to the deployer (I mean I
>>>>>> tried
>>>>>> to add different ports, and it always fail with the same number of
>>>>>> ports).
>>>>>> Do I forgot some memory size configuration somewhere ?
>>>>>> I am using orocos 2.4, with a xenomai deployer that uses lua services
>>>>>> to
>>>>>> deploy the application. Note that the rtt_dot_service is loaded also
>>>>>> (I
>>>>>> don't know how he could be involved, but never know...)
>>>>>
>>>>> Afaikt, this is a kernel option of Xenomai. So reconfigure your kernel
>>>>> and check for the registry size. Also check /proc/xenomai for any
>>>>> clues...
>>>>>
>>>>
>>>> arg, I did resize the default section because we had this problem at
>>>> B.A,
>>>> maybe it is not enougth. So it seems to be a pure xenomai question,
>>>> should
>>>> I ask on their mailing list ?
>>>
>>> Maybe there is a way to create semaphores as such that they don't need
>>> this registry. I would recommend fixing _that_ in RTT's fosi instead
>>> or raising the registry limit all the time.
>>>
>>
>> For my information, what is generating this huge amount of semaphores
>> ? Which registry is it ?
>
> The Orocos Mutex maps to the Xenomai semaphore. Since each port is
> protected by a Mutex to do its connection management, this can add up.
> A connection does not add a mutex, unless the protocol it uses would
> do so (like the Locked connections).

Are you saying that every port always has a mutex for connection management, or that a port only has a connection management mutex if it is part of a locked connection?

I thought connections weren't real-time safe to make/break? From a stall the thread point of view IIRC, not multi-thread safe.

> We have also two semaphores for each thread, and a semaphore for each
> execution engine, with a condition variable.
>
> None of these can be avoided and their lack would crash your current
> program if removed :-)
>
> Peter

Abort during deployment under xenomai

On Thu, Oct 13, 2011 at 11:29 PM, S Roderick <kiwi [dot] net [..] ...> wrote:
> On Oct 13, 2011, at 17:23 , Peter Soetens wrote:
>
>> On Thu, Oct 13, 2011 at 11:05 PM, Willy Lambert <lambert [dot] willy [..] ...> wrote:
>>>
>>>
>>> 2011/10/13 Peter Soetens <peter [..] ...>
>>>>
>>>> On Thu, Oct 13, 2011 at 11:01 PM, Willy Lambert <lambert [dot] willy [..] ...>
>>>> wrote:
>>>>>
>>>>>
>>>>> 2011/10/13 Peter Soetens <peter [..] ...>
>>>>>>
>>>>>> On Thu, Oct 13, 2011 at 12:45 AM, Willy Lambert
>>>>>> <lambert [dot] willy [..] ...>
>>>>>> wrote:
>>>>>>> Hi,
>>>>>>> As I where trying to convert my deployment to Lua, I am bumbimp into
>>>>>>> this
>>>>>>> abort code :
>>>>>>> ...
>>>>>>> 0.630 [CRITICAL][Thread] Could not allocate configuration semaphore
>>>>>>> 'sem'
>>>>>>> for
>>>>>>> terminate called after throwing an instance of 'std::bad_alloc'
>>>>>>>   what():  std::bad_alloc
>>>>>>> ./run.sh: line 30: 16239 Aborted                 rosrun ocl
>>>>>>> deployer-$OROCOS_TARGET -s $ROOT_DEPLOYMENT_FILE
>>>>>>> This append when I connect "too much" ports to the deployer (I mean I
>>>>>>> tried
>>>>>>> to add different ports, and it always fail with the same number of
>>>>>>> ports).
>>>>>>> Do I forgot some memory size configuration somewhere ?
>>>>>>> I am using orocos 2.4, with a xenomai deployer that uses lua services
>>>>>>> to
>>>>>>> deploy the application. Note that the rtt_dot_service is loaded also
>>>>>>> (I
>>>>>>> don't know how he could be involved, but never know...)
>>>>>>
>>>>>> Afaikt, this is a kernel option of Xenomai. So reconfigure your kernel
>>>>>> and check for the registry size. Also check /proc/xenomai for any
>>>>>> clues...
>>>>>>
>>>>>
>>>>> arg, I did resize the default section because we had this problem at
>>>>> B.A,
>>>>> maybe it is not enougth.  So it seems to be a pure xenomai question,
>>>>> should
>>>>> I ask on their mailing list ?
>>>>
>>>> Maybe there is a way to create semaphores as such that they don't need
>>>> this registry. I would recommend fixing _that_ in RTT's fosi instead
>>>> or raising the registry limit all the time.
>>>>
>>>
>>> For my information, what is generating this huge amount of semaphores
>>> ? Which registry is it ?
>>
>> The Orocos Mutex maps to the Xenomai semaphore. Since each port is
>> protected by a Mutex to do its connection management, this can add up.
>> A connection does not add a mutex, unless the protocol it uses would
>> do so (like the Locked connections).
>
> Are you saying that every port always has a mutex for connection management, or that a port only has a connection management mutex if it is part of a locked connection?

- Every port has a mutex for connection management
- Every locked data/buffer connection has its own mutex to protect the
data within

>
> I thought connections weren't real-time safe to make/break? From a stall the thread point of view IIRC, not multi-thread safe.

That's true, it are other parties/components that setup/tear down the
connection. In the critical section; they will block the read or write
of a port during a short time.

The mutex is necessary for: Say that during the (asynchronous!)
transmission using CORBA an exception happens and the connection is
cleaned up as a result of this, or, a new connection is added to a
running component, or a connection is removed in a running
component...
In all these cases, the mutex will guarantee that no dangling pointer
will occur.

Peter
--
Orocos-Users mailing list
Orocos-Users [..] ...
http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users