[openrtm-staff:552] Re: directモード

宮本信彦 n-miyamoto @ aist.go.jp
2016年 7月 13日 (水) 12:43:37 JST


安藤様

宮本です。


direct接続したときに発生する不具合ですが、原因を特定できたのでご報告します。

まず原因箇所はOutPortBaseクラスのgetLocalInPort関数の以下の部分でした。


CORBA::ORB_var orb = RTC::Manager::instance().getORB();

PortableServer::POA_var poa = RTC::Manager::instance().getPOA();



この部分を以下のように修正したら不具合は発生しなくなりました。


CORBA::ORB_var orb = CORBA::ORB::_duplicate(RTC::Manager::instance().getORB());

PortableServer::POA_var poa = PortableServer::POA::_duplicate(RTC::Manager::instance().getPOA());




修正前のようにgetORB関数で取得したポインタをそのまま渡してしまうと、ORB_varのデストラクタでCORBA::release関数を呼び出してリファレンスカウントが1つ減ります。
つまりgetLocalInPort関数を呼び出すたびにリファレンスカウントが減ってしまうのが原因なので、_duplicate関数でリファレンスカウントを増やしてやれば不具合はなくなるはずです。





ソースコードを読んだ結果、以下の部分にも同様の記述があったので修正する必要があると思います。


・CORBA_SeqUtil.cppのrefToVstring関数
・CorbaNamingクラスのコンストラクタ



以上です。


--------------------------------------------------
宮本 信彦 n-miyamoto @ aist.go.jp
産業技術総合研究所 ロボットイノベーション研究センター
ロボットソフトウェアプラットフォーム研究チーム
テクニカルスタッフ


From: 安藤慶昭
Sent: Tuesday, July 12, 2016 1:09 PM
To: 金広文男 <f-kanehiro @ aist.go.jp>; 宮本信彦 <n-miyamoto @ aist.go.jp>
Cc: openrtm-staff <openrtm-staff @ openrtm.org>
Subject: Re: directモード

宮本さま


安藤です

たびたびすみません、本件ちょっと調査してみていただけないでしょうか?
よろしくお願いいたします。



2016-07-08 19:32 GMT+09:00 金広文男 <f-kanehiro @ aist.go.jp<mailto:f-kanehiro @ aist.go.jp>>:
安藤様、

金広文男です。

trunkバージョンでdirectモードを試そうとしています。
例の如くpythonからポートの接続を行おうとすると、ランダムなタイミングで落ちます。
その時のメッセージとバックトレースは以下の通りです。
なにか分かりますでしょうか?

omniORB: Application check failed. This indicates a bug in the application
 using omniORB.  See the comment in the source code for more info.
 file: ../../../../../src/lib/omniORB/orbcore/poa.cc
 line: 1879
 info: pd_destroyed == 2
omniORB: Assertion failed.  This indicates a bug in the application
using omniORB, or maybe in omniORB itself.
 file: ../../../../../src/lib/omniORB/orbcore/objectAdapter.cc
 line: 199
 info: pd_signal == 0
pure virtual method called
terminate called without an active exception

Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7fff8f7fe700 (LWP 4650)]
0x00007ffff5f30c37 in __GI_raise (sig=sig @ entry=6)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56      ../nptl/sysdeps/unix/sysv/linux/raise.c: そのようなファイルやディレクトリはありません.
(gdb) bt
#0  0x00007ffff5f30c37 in __GI_raise (sig=sig @ entry=6)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007ffff5f34028 in __GI_abort () at abort.c:89
#2  0x00007ffff6535535 in __gnu_cxx::__verbose_terminate_handler() ()
   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3  0x00007ffff65336d6 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4  0x00007ffff6533703 in std::terminate() ()
   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5  0x00007ffff65341bf in __cxa_pure_virtual ()
   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6  0x00007fffcb0fede6 in omniLocalIdentity::dispatch(omniCallDescriptor&) ()
   from /usr/lib/libomniORB4.so.1
#7  0x00007fffcb10d8d5 in omniObjRef::_invoke(omniCallDescriptor&, bool) ()
   from /usr/lib/libomniORB4.so.1
#8  0x00007fffcbc9b27f in RTC::_objref_PortService::notify_disconnect (
    this=0x7fff8410ecd0,
    connector_id=0x7fff841c1070 "629208e8-d9ee-4388-89ee-ec442f5e060a")
    at ../../../../src/lib/rtm/idl/RTCSK.cc:5439
#9  0x00007fffcbc50830 in RTC::PortBase::disconnect (this=0x2f09958,
    connector_id=0x7fff841c1070 "629208e8-d9ee-4388-89ee-ec442f5e060a")
    at PortBase.cpp:368
#10 0x00007fffcbc4f7e1 in RTC::PortBase::connect (this=0x2f09958,
    connector_profile=...) at PortBase.cpp:211
#11 0x00007fffcbc3522d in RTC::InPortBase::connect (this=0x2f09958,
    connector_profile=...) at InPortBase.cpp:458
#12 0x00007fffcbc9ac71 in _0RL_lcfn_bf82f9885dac07a6_64000000 (
    cd=0x7fff8f7fcd70, svnt=0x2f0a380)
    at ../../../../src/lib/rtm/idl/RTCSK.cc:5290
#13 0x00007fffcb1284b9 in omniCallHandle::upcall(omniServant*, omniCallDescriptor&) () from /usr/lib/libomniORB4.so.1
#14 0x00007fffcbc9b869 in RTC::_impl_PortService::_dispatch (this=0x2f09958,
    _handle=...) at ../../../../src/lib/rtm/idl/RTCSK.cc:5504
#15 0x00007fffcb11a07d in omni::omniOrbPOA::dispatch(omniCallHandle&, omniLocalIdentity*) () from /usr/lib/libomniORB4.so.1
#16 0x00007fffcb0feb38 in omniLocalIdentity::dispatch(omniCallHandle&) ()
   from /usr/lib/libomniORB4.so.1
#17 0x00007fffcb127517 in omniInProcessIdentity::dispatch(omniCallDescriptor&)
    () from /usr/lib/libomniORB4.so.1
#18 0x00007fffcb10d8d5 in omniObjRef::_invoke(omniCallDescriptor&, bool) ()
   from /usr/lib/libomniORB4.so.1


-------------- next part --------------
HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...
URL: <http://www.openrtm.org/pipermail/openrtm-staff/attachments/20160713/1f62ce5a/attachment.html>


More information about the openrtm-staff mailing list