OpenRTM / OpenRTM-aist

OpenRTM-aist: RT-Middleware and OMG RTC implementation in C++ implemented by AIST
https://openrtm.org/
Other
19 stars 12 forks source link

ORB の resolve_initial_references() 使用方法間違いの可能性 #673

Closed r-kurose closed 5 years ago

r-kurose commented 5 years ago

Describe the bug

669 で、 resolve_initial_references() 後のデータがリークしている。

_ptr で受けているが、 _var が正しいのではないか。

下記の2箇所。

    #7 0x7efda34755f3 in RTC::Manager::initORB() /tmp/OpenRTM-aist/src/lib/rtm/Manager.cpp:1524:19
    #6 0x7efda322b1b3 in RTM::ManagerServant::createINSManager() /tmp/OpenRTM-aist/src/lib/rtm/ManagerServant.cpp:1026:31

To Reproduce

669

Reproducibility

669

Expected behavior データが正しく開放されること

Screenshots or Logs

Direct leak of 392 byte(s) in 1 object(s) allocated from:
    #0 0x362f12 in operator new(unsigned long) (/tmp/build/examples/SimpleIO/ConsoleOutComp+0x362f12)
    #1 0x7efda2767fa5 in initialise_poa() /opt/openrtm/omniORB-4.2.3/src/lib/omniORB/orbcore/poa.cc:2494:64
    #2 0x7efda27680bf in omni::omniOrbPOA::rootPOA(int) /opt/openrtm/omniORB-4.2.3/src/lib/omniORB/orbcore/poa.cc:2507:21
    #3 0x7efda276cabf in omni::resolveRootPOAFn() /opt/openrtm/omniORB-4.2.3/src/lib/omniORB/orbcore/poa.cc:3972:72
    #4 0x7efda273618e in omni::resolvePseudo(char const*, unsigned int) /opt/openrtm/omniORB-4.2.3/src/lib/omniORB/orbcore/initRefs.cc:316:23
    #5 0x7efda2737309 in omni::omniInitialReferences::resolve(char const*, unsigned int) /opt/openrtm/omniORB-4.2.3/src/lib/omniORB/orbcore/initRefs.cc:562:35
    #6 0x7efda2721c7e in omniOrbORB::resolve_initial_references(char const*) /opt/openrtm/omniORB-4.2.3/src/lib/omniORB/orbcore/corbaOrb.cc:449:40
    #7 0x7efda34755f3 in RTC::Manager::initORB() /tmp/OpenRTM-aist/src/lib/rtm/Manager.cpp:1524:19
    #8 0x7efda34702e8 in RTC::Manager::init(int, char**) /tmp/OpenRTM-aist/src/lib/rtm/Manager.cpp:122:22
    #9 0x3996e1 in main /tmp/OpenRTM-aist/examples/SimpleIO/ConsoleOutComp.cpp:102:13
    #10 0x7efda12b5b96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310
Indirect leak of 392 byte(s) in 1 object(s) allocated from:
    #0 0x362f12 in operator new(unsigned long) (/tmp/build/examples/SimpleIO/ConsoleOutComp+0x362f12)
    #1 0x7efda276830a in omni::omniOrbPOA::omniINSPOA() /opt/openrtm/omniORB-4.2.3/src/lib/omniORB/orbcore/poa.cc:2550:25
    #2 0x7efda276caca in omni::resolveINSPOAFn() /opt/openrtm/omniORB-4.2.3/src/lib/omniORB/orbcore/poa.cc:3973:75
    #3 0x7efda273618e in omni::resolvePseudo(char const*, unsigned int) /opt/openrtm/omniORB-4.2.3/src/lib/omniORB/orbcore/initRefs.cc:316:23
    #4 0x7efda2737309 in omni::omniInitialReferences::resolve(char const*, unsigned int) /opt/openrtm/omniORB-4.2.3/src/lib/omniORB/orbcore/initRefs.cc:562:35
    #5 0x7efda2721c7e in omniOrbORB::resolve_initial_references(char const*) /opt/openrtm/omniORB-4.2.3/src/lib/omniORB/orbcore/corbaOrb.cc:449:40
    #6 0x7efda322b1b3 in RTM::ManagerServant::createINSManager() /tmp/OpenRTM-aist/src/lib/rtm/ManagerServant.cpp:1026:31
    #7 0x7efda322decd in RTM::ManagerServant::ManagerServant() /tmp/OpenRTM-aist/src/lib/rtm/ManagerServant.cpp:43:10
    #8 0x7efda34794e9 in RTC::Manager::initManagerServant() /tmp/OpenRTM-aist/src/lib/rtm/Manager.cpp:1954:24
    #9 0x7efda3470344 in RTC::Manager::init(int, char**) /tmp/OpenRTM-aist/src/lib/rtm/Manager.cpp:126:22
    #10 0x3996e1 in main /tmp/OpenRTM-aist/examples/SimpleIO/ConsoleOutComp.cpp:102:13
    #11 0x7efda12b5b96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310

Environment

669 参照

Additional context

r-kurose commented 5 years ago

個数は減ったのですが、まだ残りがあるようです。 (#669 2019-10-24 版ログより)

r-kurose commented 5 years ago

_ptr/_var の取り間違いは修正されたようなので閉じます。上記は別の issue で解析からスタートする。