Events are blocked or slowed down after a while

Hi Reynald,

I guess, I found the problem for not reproducing of the problem. I was confused by the output of the

PyTango._tango.__tangolib_version__

which returned ‘9.2.5’ always, whereas the PyTango used the libtango9 version 9.3.3. I guess the reason was the order of installation of the pytango. I installed it from the pip whereas the 9.2.5 version of libtango9 was installed. It seems that the tango library version value of the PyTango package is statically included and not dynamically taken from the used libtango.

Now I cleaned my system and I can offer some output of my test script (see attachment).

I’ll will reinstall the 4.2.5 version of zmq and report about the results

Jens

Hi Reynald,

here my results:

I tried the following versions of ZMQ 4.1.6 (lib version: 5.0.2), 4.2.1 (lib: 5.1.1), 4.2.5 (lib: 5.1.5), and 4.3.1 (lib: 5.2.1), but none of them was working.:frowning:

To give you some information, what the test script is doing, see attached file.

Jens

What are you using as value for your TANGO_HOST environment variable?
What are you using in the TANGO_HOST part of your fully qualified attribute name (FQAN) when you are subscribing to events?
It looks like you are using localhost string in the FQAN when subscribing to events.

Is taco6 the name of the computer where the event client is running?

Are you sure the device server exporting test/sim/sensor device is using cppTango 9.3.3?

The TANGO_HOST variable is not set. The devices name includes the host name (localhost is equivalent with taco6.ictrl.frm2.tum.de). The client is running on the same machine.

The server is running with the the same tango lib as the client. It’s a python based server. It generates the expected events (monitored by Astor/Jive).

Jens

Hi,

I cannot reproduce your problem with a simple C++ client in 9.3.3 subscribing to a periodic event on an attribute from a TangoTest C++ device server (using C++ Tango lib 9.3.3) using an FQAN starting with tango://localhost:10000 and having TANGO_HOST environment variable undefined.
I don’t get all these “xxx not found in event callback map !!!” errors and I receive all the events, so it looks like I am not in the same conditions as you.

Normally, if you are using the C++ Tango lib 9.3.3 on the client side and on the device server side, they should now agree on the channel name and you should not get these heartbeat problems and you should also not get these “tango://taco6.ictrl.frm2.tum.de:10000/test/sim/sensor/value.periodic not found in event callback map” errors (unless there is a special case we didn’t foresee of course).

It looks like the device server is sending events using tango://taco6.ictrl.frm2.tum.de:10000/test/sim/sensor/value.periodic channel name but the event client is expecting something else.
If they both use C++ tango library 9.3.3, the device server should communicate the channel name it will use to the client during the subscription phase and the client should know it and should not get such errors.
So it really looks like they are not both using 9.3.3 C++ library in your case?

[quote=“Reynald”]
One solution to overcome this bug is to install cppTango 9.3.3 from the source code or using the Bintray cppTango dev Debian package (install instructions when clicking on the “Set me up!” blue button).[/quote]

Hi Reynald,
thank you very much for this simple solution.
Could you remind me if this repo can be used for stable use or if it should be considered as a repo for versions currently in development?

Regards.

Hi Reynald,

[quote=“Reynald”]Hi Jens,
I added this line in /etc/apt/sources.list:

deb [trusted=yes] https://dl.bintray.com/tango-controls/debian stretch main

Then I did:

sudo apt update
sudo apt install libtango9lts-dev

This installed the include files under /usr/local/include and the 9.3.3 lib under /usr/local/lib on my Debian Stretch VM.

Hoping this helps.
Reynald[/quote]

in a VM VirtualBox, i installed a Debian Stretch 9.8 and did as you said:

  • added this line in the /etc/apt/sources.list
deb [trusted=yes] https://dl.bintray.com/tango-controls/debian stretch main
sudo apt update
sudo apt install libtango9lts-dev

The libzmq5 package version is always the same :frowning:
4.2.1-4+deb9u1

is there anything I did not understand?

Thanks.

@JCM,

Installing tango from bintray’s debian repo does not affect libzmq. To change libzmq version you need to do it manually. For instance, cppTango travis deployment configuration:


git clone -b v4.2.2 https://${CI_USER_TOKEN}@github.com/zeromq/cppzmq.git cppzmq
cmake -H/home/tango/cppzmq -B/home/tango/cppzmq/build -DCMAKE_INSTALL_PREFIX=/home/tango
make -C /home/tango/cppzmq/build install

Here we basically clone specific version of zmq and use cmake & make install to build/install it.

Bintray Debian repo can be used to test latest development versions of cppTango.
But the Debian package available on BinTray are different than the official Debian ones (installing libtango at different locations for instance) but they still depend on libzmq5-dev or libzmq3-dev Debian packages.

[quote=“Ingvord”]


git clone -b v4.2.2 https://${CI_USER_TOKEN}@github.com/zeromq/cppzmq.git cppzmq
cmake -H/home/tango/cppzmq -B/home/tango/cppzmq/build -DCMAKE_INSTALL_PREFIX=/home/tango
make -C /home/tango/cppzmq/build install

Here we basically clone specific version of zmq and use cmake & make install to build/install it.[/quote]

What Ingvord wrote here is not fully correct.
The lines he wrote are not installing a specific version of libzmq, they are installing a specific version of cppzmq, which is just providing include files (zmq.hpp for instance) needed to be able to use ZMQ in a C++ fashion way.

libzmq GitHub repository is GitHub - zeromq/libzmq: ZeroMQ core engine in C++, implements ZMTP/3.1

In any case, as I wrote before, even if you are using a buggy version of libzmq, if you use cppTango 9.3.3, the events should work since a work-around was found for a bug which was affecting us in ZMQ 4.20 and ZMQ 4.2.1.

Cheers,
Reynald

So i solved my problem of not receiving events after a while :wink:

Install a new v4.3.1 version of libzmq:
git clone -b v4.3.1 GitHub - zeromq/libzmq: ZeroMQ core engine in C++, implements ZMTP/3.1

Follow the instructions in INSTALL to build and compile.

The ‘make install’ generates the .so here: /usr/local/lib

To run a c++ or python program using this version, configure an environment variable in a shell:
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

then launch the program … in this same shell …

I did a test over several hours.
No blocking of events neither with c++ DS nor with Python who subscribes events :smiley:

Thanks again.