Links

Content Skeleton

This Page

Previous topic

ZMQRoot/MyTMessage dtor issue

Next topic

Chroma Use Of CURand

CZRT : ChromaZMQRootTest

  1. TODO: bring echoserver code into czrt folder, its already in the nuwapkg

Memory Issue

With MyTMessage used on stack in the test (rather than heap) get pointer being freed was not allocated as it goes out of scope:

ChromaZMQRootTest(36786,0x7fff7ab15310) malloc: *** error for object 0x10561df08: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug

Suspect something funny related to the TObject status bits and the fact that the object is serialized in one place and deserialised elsewhere. Saw something similar with pyzmq which was resolved using PyROOT ROOT.SetOwnnership(kFALSE).

Currently MyTMessage usage on heap without deletion looks like a leak. Need to investigate TObject internals to understand further.

Running Echoserver

[blyth@belle7 cmt]$ czrt-nuwapkg-testserver
=== nuwacmt-config : for pkg /data1/env/local/dyb/NuWa-trunk/dybgaudi/Utilities/ChromaZMQRootTest
Removing all previous make fragments from i686-slc5-gcc41-dbg
Creating setup scripts.
Creating cleanup scripts.
ZMQEchoServer.exe
do_bind tcp://*:5555

FUNCTIONS

czrt-build
cmake controlled build
czrt-build-full
build after first deleting the build directory
czrt-nuwapkg-cpto
copy source into the corresponding DYB NuWa pkg

SCRIPTS

czrt.sh
send test CPL TObject to the configured zmq-broker-url-frontend

Local DEBUG

  1. Initially czrt.sh gives symbol loading issue

  2. After a czrt-build runs, but meets NUU network blockage:

    delta:collada blyth$ czrt.sh
    
       zmq-broker-url          : tcp://203.64.184.126:5001
       zmq-broker-url-frontend : tcp://203.64.184.126:5001
       zmq-broker-url-backend  : tcp://203.64.184.126:5002
    
       zmq-broker-host         : 203.64.184.126
    
    ZMQRoot::ZMQRoot envvar [CHROMA_CLIENT_CONFIG][Q] config [tcp://203.64.184.126:5001]
    ChromaPhotonList::Print  [6]
    ZMQRoot::SendObject sent bytes: 457
  3. Attempt to tunnel through the block, getting refused:

    delta:~ blyth$ czrt.sh --zmqtunnelnode=N
    
       zmq-broker-url          : tcp://203.64.184.126:5001
       zmq-broker-url-frontend : tcp://203.64.184.126:5001
       zmq-broker-url-backend  : tcp://203.64.184.126:5002
    
       zmq-broker-host         : 203.64.184.126
    
    === ssh-tunnel-open : opening ssh tunnel using below command
    ssh -fN -p 22 -L 127.0.0.1:64542:203.64.184.126:5001 N
    === ssh-tunnel-open : modifying ZMQ_BROKER_URL_FRONTEND to tcp://127.0.0.1:64542 in order to use the ssh tunnel
    ZMQRoot::ZMQRoot envvar [CHROMA_CLIENT_CONFIG][Q] config [tcp://127.0.0.1:64542]
    ChromaPhotonList::Print  [6]
    ZMQRoot::SendObject sent bytes: 457
    channel 1: open failed: connect failed: Connection refused
    channel 1: open failed: connect failed: Connection refused
    channel 1: open failed: connect failed: Connection refused

NuWa DEBUG

Not getting through, nothing showing on broker:

[blyth@belle7 env]$ LD_LIBRARY_PATH=$DYB/external/zmq/4.0.4/i686-slc5-gcc41-dbg/lib:$LD_LIBRARY_PATH CHROMA_CLIENT_CONFIG=tcp://127.0.0.1:5001 ChromaZMQRootTest.exe
ZMQRoot::ZMQRoot envvar [CHROMA_CLIENT_CONFIG] config [tcp://127.0.0.1:5001]
ChromaPhotonList::Print UID [0] [6]
ZMQRoot::SendObject sent bytes: 457

works locally

[blyth@belle7 src]$ LD_LIBRARY_PATH=$DYB/external/zmq/4.0.4/i686-slc5-gcc41-dbg/lib:$LD_LIBRARY_PATH ECHO_SERVER_CONFIG=tcp://*:4000 ZMQEchoServer.exe
do_bind tcp://*:4000
do_receive zmq_msg_recv waiting...
do_receive got bytes:457
do_send... sending msg of  457 bytes
do_send... queued  457 bytes
do_receive zmq_msg_recv waiting...

[blyth@belle7 ~]$ LD_LIBRARY_PATH=$DYB/external/zmq/4.0.4/i686-slc5-gcc41-dbg/lib:$LD_LIBRARY_PATH CHROMA_CLIENT_CONFIG=tcp://127.0.0.1:4000 ChromaZMQRootTest.exe
ZMQRoot::ZMQRoot envvar [CHROMA_CLIENT_CONFIG] config [tcp://127.0.0.1:4000]
ChromaPhotonList::Print UID [0] [6]
ZMQRoot::SendObject sent bytes: 457
ZMQRoot::ReceiveObject received bytes: 457
ZMQRoot::ReceiveObject reading TObject from the TMessage
ZMQRoot::ReceiveObject returning TObject
ReceiveObject
ChromaPhotonList::Print UID [0] [6]
ChromaPhotonList::Print UID [0] [6]
ChromaPhotonList::Details [6]
 index 0 pos (1,1,1) mom (2,2,2) pol (3,3,3) _t 0 _wavelength 100 _pmtid 101
 index 1 pos (1,1,1) mom (2,2,2) pol (3,3,3) _t 0 _wavelength 100 _pmtid 101
 index 2 pos (1,1,1) mom (2,2,2) pol (3,3,3) _t 0 _wavelength 100 _pmtid 101
 index 3 pos (1,1,1) mom (2,2,2) pol (3,3,3) _t 0 _wavelength 100 _pmtid 101
 index 4 pos (1,1,1) mom (2,2,2) pol (3,3,3) _t 0 _wavelength 100 _pmtid 101
 index 5 pos (1,1,1) mom (2,2,2) pol (3,3,3) _t 0 _wavelength 100 _pmtid 101
[blyth@belle7 ~]$