[Tango-cs-bug-info] [tango-cs:bugs] #826 unsubscribe_event fails in delete_device

0 views
Skip to first unread message

tango-cs...@lists.sourceforge.net

unread,
Oct 27, 2016, 12:31:08 PM10/27/16
to Tango-cs...@lists.sf.net

[bugs:#826] unsubscribe_event fails in delete_device

Status: open
Created: Thu Oct 27, 2016 04:30 PM UTC by Giovanni Cerretani
Last Updated: Thu Oct 27, 2016 04:30 PM UTC
Owner: nobody

As reported in the forum post

http://www.tango-controls.org/community/forum/c/development/python/unsubscribe_event-fails-in-delete_device/

I can't shutdown a PyTango server that is running more than one Device subscribed to a certain attribute event.

The unsubscribe_event(...) is called in delete_device().

Currently each Device of my server is subscribed to two events, but I have problems only with the first type of event. More details are explained in the forum post. No problem on deleting and recreating the devices with the Init() command, but only when killing the whole server.

The one that makes problems is a spectrum of 8 DevUShort, while the one that works is a spectrum of 8 DevBoolean. If I do not subscribe to the DevUShort attribute, everything is killed correctly.

This is the exception raised by unsubscribe_event(...) called in delete_device().

DevFailed[
DevError[
    desc = Failed to disconnect from event!
           Error while trying to unsubscribe the heartbeat ZMQ socket from the channel heartbeat publisher
           ZMQ message: No such file or directory
  origin = ZmqEventConsumer::disconnect_event
  reason = API_ZmqFailed
severity = ERR]
]

In this case I have to press CTRL+C several times, and at the end I get a segmentation fault here:

#0 0x00007f6867101b98 in set_svr_shutting_down (this=0x1db1690) at ../../../../lib/cpp/server/utils.h:893
#1 Tango::Util::shutdown_server (this=0x1db1690) at ../../../../lib/cpp/server/utils_shut.cpp:79
#2 0x00007f68670f0175 in Tango::DServerSignal::ThSig::run_undetached (this=0x1ddf510, ptr=<value optimized out>) at ../../../../lib/cpp/server/thsig.cpp:202
#3 0x00007f6865936e7e in omni_thread_wrapper () from /virgo/ext/omniORB/omniORB-4.1.4/Linux-x86_64-SL6/lib/libomnithread.so.3
#4 0x000000379dc07a51 in start_thread () from /lib64/libpthread.so.0
#5 0x000000379d0e896d in clone () from /lib64/libc.so.6

Sent from sourceforge.net because Tango-cs...@lists.sf.net is subscribed to https://sourceforge.net/p/tango-cs/bugs/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/tango-cs/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.

message-footer.txt

tango-cs...@lists.sourceforge.net

unread,
Oct 27, 2016, 12:59:22 PM10/27/16
to Tango-cs...@lists.sf.net

The problem is related to the "relative change" I set in POGO for that attribute, in the class of the device I'm subscribing to. It was set to "1". If I remove that setting, everything seems to work properly. In the class I fire the event manually, with
set_change_event("amcStatus", true, false);
in the init_device().

message-footer.txt

tango-cs...@lists.sourceforge.net

unread,
Nov 3, 2016, 4:32:27 AM11/3/16
to Tango-cs...@lists.sf.net

Hello,

I am not able to reproduce this problem. I am using Tango 9 in C++. I have "low level"
devices with state, att1 and att2 (spectrum - DevUShort) correctly configured to generate change event. I have "high level" devices (3 to be precise) in another DS. In their init_device, they
1- Connect to low level device. Each high level dev have a different low level dev.
2- Subscribe to change_event on state, att1 and att2 from the low level dev
3-Store event id(s) in the object
In their delete_device method, those devices unsubscribe from the events

I am able to "control C" the DS, to do Init command and also to do RestartDevice on their
admin device.

Do you confirm that you have the problem using Tango 9?

Sincerely

Emmanuel


[bugs:#826] unsubscribe_event fails in delete_device

Status: open
Created: Thu Oct 27, 2016 04:30 PM UTC by Giovanni Cerretani

Last Updated: Thu Oct 27, 2016 04:58 PM UTC
Owner: nobody

message-footer.txt
Reply all
Reply to author
Forward
0 new messages