PyPLC
|
|
---|---|
Hi Sergi, 1 : i can't run ulimit -n 99999. i got this message: bash: ulimit: open files: cannot modify limit: Operation not permitted 2 : i run gdb -c core -f /usr/bin/python #> bt but i got these message: tango-cs@tango9-vm:~/Downloads/PyPLC-master/PyPLC$ gdb -c core -f /usr/bin/python GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1 Copyright (C) 2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"… Reading symbols from /usr/bin/python…(no debugging symbols found)…done. /home/tango-cs/Downloads/PyPLC-master/PyPLC/core: No such file or directory. (gdb) bt No stack. ( 3. PyPLC properties: DynamicAttributes T1=int(Reg(0000)) T2=int(Reg(0001)) T3=int(Reg(0002)) Modbus_name = mdb/test/1 Modbus DS properties - Device Info —————————————- Device: mdb/test/1 type_id: IDL:Tango/Device_5:1.0 iiop_version: 1.2 host: tango9-vm (10.0.2.15) alternate addr.: 192.168.210.104 port: 45546 Server: Modbus/MDBT Server PID: 4697 Exported: true last_exported: 31st May 2017 at 16:21:33 last_unexported: ? - Polling Status ————————————- Thanks |
|
|
---|---|
Hello, If I were you I would try: instead of the ulimit command suggested by Sergi…I think the idea here is to configure Linux to create a core file when there is a crash of a process. I recommend you to have a look at what is gdb (https://www.gnu.org/software/gdb/) and what does the ulimit command (https://ss64.com/bash/ulimit.html) So if this ulimit command succeeds, the next time your PyPLC server will crash, it will create a core file. gdb is a debugger which will allow us to locate which part of the code caused the crash… but you need to have a core file generated to be able to analyze it. It might be that your Linux distribution will generate a core file having a name different than "core" so you will have to adapt the name of the core file passed after -c option of gdb. It might also be that it will create this core file in a special directory. You may refer to your Linux distribution documentation/community to know this location if this is the case. Hoping this helps, Reynald
Rosenberg's Law: Software is easy to make, except when you want it to do something new.
Corollary: The only software that's worth making is software that does something new. |
|
|
---|---|
Hi i add the core compressed file to this link https://drive.google.com/open?id=0B6VsJcfDEMQreUhXbWJtS29nQkE Regards |
|
|
---|---|
Now that you have the core, run again GDB on it to obtain the backtrace (it has to be done in the very same machine) run gdb -c core -f /usr/bin/python #> bt |
|
|
---|---|
Hi Sergi this is the trace :
Regards |
|
|
---|---|
Hi, Here we have something to search for. I'll have a look and come back with an answer next week. Sergi |
|
|
---|---|
Hi, I'm very sorry but I couldn't replicate the error. My guess is that something stored in the Tango DB is corrupting somehow the loading of properties. Could you create a new PyPLC device server with all properties empty except Modbus_name and see if the error also occurs? Sergi |
|
|
---|---|
In case of need, you may have a look to the new C++ equivalent of PyPLC. I think is property-compatible so you may use it as an alternative if your error persists: https://www.ict.inaf.it/indico/event/514/session/8/contribution/47/material/slides/2.pptx |