Menu

#779 Tango::leavefunc hangs after a PyTango device server terminates

open
nobody
None
PyTango
5
2016-02-24
2016-02-24
No

We recently updated our system:

  • CentOS 7
  • PyTango 8.1.8
  • Tango 8.1.2 (+ patch 1, 2, 3 and 4)
  • zeromq 4.0.5

We noticed that the exit function tango::leavefunc hangs after a device server terminates, if this server has subscribed to a tango event at some point.

Here's a simple device server to reproduce this problem (make sure the polling is enabled on sys/tg_test/1/State):

import PyTango.server

class Dummy(PyTango.server.Device):
    __metaclass__ = PyTango.server.DeviceMeta

    def init_device(self):
        self.proxy = PyTango.DeviceProxy('sys/tg_test/1')
        self.eid = self.proxy.subscribe_event(
            'State', PyTango.EventType.CHANGE_EVENT, self.cb)

    def cb(self, ev):
        print(ev)

    def delete_device(self):
        self.proxy.unsubscribe_event(self.eid)

Dummy.run_server()
print('Done!')
# atexit will now call PyTango.__leavefunc and hang

Discussion


Log in to post a comment.