Complete system crash caused by library
Posted: Thu Nov 22, 2018 11:44 am
Hi everyone,
In a C / C ++ application, the API is accessed and the signals are captured / processed. From time to time, however, shows the following behavior:
The Red Pitaya - the entire operating system - crashes unexpectedly. Crashing means that I only disconnect the power supply and reconnect, so the device reboots. I can only guess what it can be. Errors such as dividing by 0 or incorrect memory accesses cause runtime errors and the operating system gets these errors. In contrast, the error I describe always occurs when I access the library. Presumably, the library will be accessed in the background in addition to my application, causing a system crash. Therefore I have with following commands e.g. the web interface deactivated:
...
system ("cat /opt/redpitaya/fpga/fpga_0.94.bit> / dev / xdevcfg");
system ("systemctl stop redpitaya_nginx.service");
system ("systemctl stop redpitaya_scpi");
system ("systemctl stop jupyter");
sleep (3);
...
(API access through my application)
Additionally, I put a sleep function behind the commands. Hopefully, this will give me enough time to stop accessing the library when my application accesses it. Sometimes my application runs and the entire system crashes - that is, although several functions of the API have been used several times. My question is: Is any other instance accessing the library at the same time as my application, resulting in a complete system crash? Or. what must be disabled to avoid this problem?
Thank you very much
Martin
In a C / C ++ application, the API is accessed and the signals are captured / processed. From time to time, however, shows the following behavior:
The Red Pitaya - the entire operating system - crashes unexpectedly. Crashing means that I only disconnect the power supply and reconnect, so the device reboots. I can only guess what it can be. Errors such as dividing by 0 or incorrect memory accesses cause runtime errors and the operating system gets these errors. In contrast, the error I describe always occurs when I access the library. Presumably, the library will be accessed in the background in addition to my application, causing a system crash. Therefore I have with following commands e.g. the web interface deactivated:
...
system ("cat /opt/redpitaya/fpga/fpga_0.94.bit> / dev / xdevcfg");
system ("systemctl stop redpitaya_nginx.service");
system ("systemctl stop redpitaya_scpi");
system ("systemctl stop jupyter");
sleep (3);
...
(API access through my application)
Additionally, I put a sleep function behind the commands. Hopefully, this will give me enough time to stop accessing the library when my application accesses it. Sometimes my application runs and the entire system crashes - that is, although several functions of the API have been used several times. My question is: Is any other instance accessing the library at the same time as my application, resulting in a complete system crash? Or. what must be disabled to avoid this problem?
Thank you very much
Martin