CORBA Dataflow

Hello, I've been playing with Orocos and CORBA lately, mainly to see how
it could fit our needs for VR applications. I conducted some (very
simple) performance tests with Dataflow. I can achieve around 40Mbits
(5Mb/s) transfer rate with latency below 1ms without significant CPU
load (less than 5%). I used two Opteron 252 computers over a 100Mbits
switched ethernet network.

However I ran into some problems (some random crashes). My application
is usually stable, but it randomly crashes unexpectedly without any
apparent reasons. I tried to track the cause without any success.
When I use valgrind, my application crashes always at the same place
everytime.

Here is the source code I used: http://pastebin.com/f5ab9a71b

I start two tasks (task1 and task2) :
$ ./Server task1 &
$ ./Server task2 &

Then I use a small python script to connect the corresponding dataport I
did not find any way to do this using the C++ Orocos API:
ControlTaskProxy::InitOrb(argc, argv);
ControlTaskProxy* mtask1 = ControlTaskProxy::Create(argv[1], false);
ControlTaskProxy* mtask2 = ControlTaskProxy::Create(argv[2], false);
PortInterface * const in = mtask2->ports()->getPort("inData");
PortInterface * const out = mtask1->ports()->getPort("outData");
in->connectTo(out);

This code snippet does not work (maybe because I must use CorbaPort
someway?)

The python script I use to connect the two tasks is using the DataFlow IDL:

test1 = rtt.getTask("test1")
test2 = rtt.getTask("test2")
test1ports = test1.ports()
test2ports = test2.ports()
test1ports.connectPorts("outData", test2ports, "inData")

I have a crash (with valgrind) upon just after the last command
(connectPorts) which complete successfully on the task test1.

Here is the backtrace:

http://pastebin.com/f2da01d3a

I use RTT version 1.8.5 (compiled with -O0 -DDEBUG -g) and ACE/TAO from
ubuntu 9.04 (5.6.3/1.6.3)

CORBA Dataflow

Hi Jean,

On Tue, Sep 8, 2009 at 17:39, Jean Sreng <jean [dot] sreng [..] ...> wrote:

> Hello, I've been playing with Orocos and CORBA lately, mainly to see how
> it could fit our needs for VR applications. I conducted some (very
> simple) performance tests with Dataflow. I can achieve around 40Mbits
> (5Mb/s) transfer rate with latency below 1ms without significant CPU
> load (less than 5%). I used two Opteron 252 computers over a 100Mbits
> switched ethernet network.
>
> However I ran into some problems (some random crashes). My application
> is usually stable, but it randomly crashes unexpectedly without any
> apparent reasons. I tried to track the cause without any success.
> When I use valgrind, my application crashes always at the same place
> everytime.
>

Thanks for the detailed feedback, I really appreciate this. I'll look into
it as soon as 1.10.0 is out. If anyone else could reproduce it (or has seen
it) that would be great too.

>
> Here is the source code I used: http://pastebin.com/f5ab9a71b
>
> I start two tasks (task1 and task2) :
> $ ./Server task1 &
> $ ./Server task2 &
>
> Then I use a small python script to connect the corresponding dataport I
> did not find any way to do this using the C++ Orocos API:
> ControlTaskProxy::InitOrb(argc, argv);
> ControlTaskProxy* mtask1 = ControlTaskProxy::Create(argv[1], false);
> ControlTaskProxy* mtask2 = ControlTaskProxy::Create(argv[2], false);
> PortInterface * const in = mtask2->ports()->getPort("inData");
> PortInterface * const out = mtask1->ports()->getPort("outData");
> in->connectTo(out);
>
> This code snippet does not work (maybe because I must use CorbaPort
> someway?)
>

The reason is that in RTT 1.x, one of both can't be a proxy, so you can say
in->connectTo(out) if either in or out is a local port. This will be fixed
in 2.x, and it can't easily be fixed in 1.x.

>
> The python script I use to connect the two tasks is using the DataFlow IDL:
>
> test1 = rtt.getTask("test1")
> test2 = rtt.getTask("test2")
> test1ports = test1.ports()
> test2ports = test2.ports()
> test1ports.connectPorts("outData", test2ports, "inData")
>

This 'works' because you use the CORBA IDL interface directly instead of the
RTT::ControlTaskProxy wrapper (which has its shortcommings).

>
> I have a crash (with valgrind) upon just after the last command
> (connectPorts) which complete successfully on the task test1.
>
> Here is the backtrace:
>
> http://pastebin.com/f2da01d3a
>
> I use RTT version 1.8.5 (compiled with -O0 -DDEBUG -g) and ACE/TAO from
> ubuntu 9.04 (5.6.3/1.6.3)
>

I'll look into it together with the second problem. I'm curious why this
hasn't been reported before, but I'm sure it can be fixed.

Peter

CORBA Dataflow

Hi Jean,

On Tue, Sep 8, 2009 at 17:39, Jean Sreng <jean [dot] sreng [..] ...> wrote:

> Hello, I've been playing with Orocos and CORBA lately, mainly to see how
> it could fit our needs for VR applications. I conducted some (very
> simple) performance tests with Dataflow. I can achieve around 40Mbits
> (5Mb/s) transfer rate with latency below 1ms without significant CPU
> load (less than 5%). I used two Opteron 252 computers over a 100Mbits
> switched ethernet network.
>
> However I ran into some problems (some random crashes). My application
> is usually stable, but it randomly crashes unexpectedly without any
> apparent reasons. I tried to track the cause without any success.
> When I use valgrind, my application crashes always at the same place
> everytime.
>

Thanks for the detailed feedback, I really appreciate this. I'll look into
it as soon as 1.10.0 is out. If anyone else could reproduce it (or has seen
it) that would be great too.

>
> Here is the source code I used: http://pastebin.com/f5ab9a71b
>
> I start two tasks (task1 and task2) :
> $ ./Server task1 &
> $ ./Server task2 &
>
> Then I use a small python script to connect the corresponding dataport I
> did not find any way to do this using the C++ Orocos API:
> ControlTaskProxy::InitOrb(argc, argv);
> ControlTaskProxy* mtask1 = ControlTaskProxy::Create(argv[1], false);
> ControlTaskProxy* mtask2 = ControlTaskProxy::Create(argv[2], false);
> PortInterface * const in = mtask2->ports()->getPort("inData");
> PortInterface * const out = mtask1->ports()->getPort("outData");
> in->connectTo(out);
>
> This code snippet does not work (maybe because I must use CorbaPort
> someway?)
>

The reason is that in RTT 1.x, one of both can't be a proxy, so you can say
in->connectTo(out) if either in or out is a local port. This will be fixed
in 2.x, and it can't easily be fixed in 1.x.

>
> The python script I use to connect the two tasks is using the DataFlow IDL:
>
> test1 = rtt.getTask("test1")
> test2 = rtt.getTask("test2")
> test1ports = test1.ports()
> test2ports = test2.ports()
> test1ports.connectPorts("outData", test2ports, "inData")
>

This 'works' because you use the CORBA IDL interface directly instead of the
RTT::ControlTaskProxy wrapper (which has its shortcommings).

>
> I have a crash (with valgrind) upon just after the last command
> (connectPorts) which complete successfully on the task test1.
>
> Here is the backtrace:
>
> http://pastebin.com/f2da01d3a
>
> I use RTT version 1.8.5 (compiled with -O0 -DDEBUG -g) and ACE/TAO from
> ubuntu 9.04 (5.6.3/1.6.3)
>

I'll look into it together with the second problem. I'm curious why this
hasn't been reported before, but I'm sure it can be fixed.

Peter

CORBA Dataflow

Jean Sreng wrote:
> Here is the backtrace:
>
> http://pastebin.com/f2da01d3a
>
> I use RTT version 1.8.5 (compiled with -O0 -DDEBUG -g) and ACE/TAO from
> ubuntu 9.04 (5.6.3/1.6.3)

Just to be complete, here is the backtrace of gdb (obtained by a random
crash without valgrind):

http://pastebin.com/f2ebc86ec