Segfault when running the restart server command
sourceforge issue #623:
EDIT: duplicate ofThe segfault happens in two cases: 1 - not handled exception during the creation of DeviceClass object 2 - A restart server command
What I do: open Jive, start server wizard, enter server name and instance name, then start server, add new device as usual. On wizard finish I reply "yes" to "Would you like to reinitialize the server?", and server crashes. If I start server again, it works perfectly.
Python code:
import sys
import PyTango
from PyTango.server import Device, DeviceMeta, run, command
class MyTangoDevice(Device, metaclass=DeviceMeta):
@command
def f(self):
pass
if __name__ == "__main__":
# sys.argv = ["MyServer", "MyInstance"] # Uncomment this line or call as "python3 MyServer.py MyInstance"
print("PyTango version: {}".format(PyTango.__version__))
run([MyTangoDevice])
Tested on:
- Ubuntu desktop:
$ uname -a
Linux dmitrykuk 4.10.0-42-generic #46-Ubuntu SMP Mon Dec 4 14:38:01 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 17.04
Release: 17.04
Codename: zesty
- Some Debian Jessie machine.
Console:
PyTango version: 8.1.9
Unknown exception while trying to fill database cache...
Failed to import EventChannelFactory notifd/factory/dmitrykuk from the Tango database
Ready to accept request
Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
Edited by triage