0

From time to time when breaking a python3 program I encounter a very strange problem. To illustrate it I have taken the screenshot:enter image description here

Started program works (like the htop in the another terminal window) but I am unable to do anything else. Only restart (power off, not the shutdown unfortunately as I cant run any command). Any clues?

I suspect this part of my code:

def SafeSend163216(self, val16_1, val32_2, val16_3):
    s = signal.signal(signal.SIGINT, signal.SIG_IGN)
    self.Send16(val16_1)
    self.Send32(val32_2)
    self.Send16(val16_3)
    signal.signal(signal.SIGINT, s)

it send data through the SPI and I do not want send sequence to be interrupted by CTRL-C.

How the python script can break the bash ?

  • can you post the last lines of ps aux once your program freeze? – Technico.top Oct 3 '17 at 9:51
  • 1
    the problem is that the program does not freeze :). It breaks, but i cant run any commands – P__J__ Oct 3 '17 at 9:53
  • It looks like your python script is destroying your path and/or enviroment settings. You could try to run 'ls' with its full path: /bin/ls If this works we'll need more of your code to where it messes up. – 88weighed Oct 3 '17 at 14:46
  • @88weighed that was the very first thing I have tried. But nothing works. – P__J__ Oct 3 '17 at 14:47
  • the script does not touch anything in the environment, does not open any files except the SPI. The only "system" bit is this one. It happens very occasionally - only 2 -4 times in couple of hundreds runs – P__J__ Oct 3 '17 at 14:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.