kiteretro / Circuit-Sword

GNU General Public License v3.0
134 stars 27 forks source link

CSO freezes on large wifi transfers without user input #43

Closed c-hri-s closed 6 years ago

c-hri-s commented 6 years ago

Discussed here; https://www.sudomod.com/forum/viewtopic.php?f=51&t=5558

To replicate:

  1. Initiate a large transfer over Wifi (I tested with a 650MB file)
  2. At some stage the CSO will dim the screen
  3. At a later stage the CSO will become unresponsive, although you can interact with it via SSH. The power button does not initiate the shut down.

The issue seems to be related to fetching CPU temperature which starts to hang (/opt/vc/bin/vcgencmd measure_temp doesn't return). This also has the side effect of preventing you SSHing into the device as that command is called in the bash profile. If you interrupt the login you are able to successfully ssh into the device to debug, although the device seems to behave somewhat strangely (hanging on CPU temp and other operations). When in this frozen state you are able to successfully transfer data to/from the device via SCP/Samba, and are able to execute other commands.

The issue is not related to Emulation Station, this occurs even if you quit ES and have the device sitting at the console screen.

The issue doesn't seem related to general idling, as if you disable wifi and leave the device untouched it doesn't freeze even after extended idle.

This isn't a critical issue as large data transfers shouldn't be frequent. The most annoying symptom is that you would need to force shutdown the device if you aren't able to SSH into the unit from a PC. This could cause SD corruption.

c-hri-s commented 6 years ago

Just to confirm this still happens on the retropie-4.4-rpi2_rpi3-wifi_CSO_CM3_20180603-154410 build.

kiteretro commented 6 years ago

Thanks Chris, RE: Large file transfer; use something like Paragon EXTFS instead. Still this temperature thing is very problematic and is most likely resolved by replacing the CM3 module itself.

cturczynskyj commented 6 years ago

I have experienced this same issue myself. I definitely saw my CSO hang when running a script to retrieve temperatures. I was also transferring files and wondered what affect that had on temperatures. Breaking out of the script with control+c worked and running the same script would hang again. This would continue until reboot.

kiteretro commented 6 years ago

Issue appears to relate to large files with wifi. The wifi is kernel level code, same for CPU temperature stuff. The wifi kernel module is in the staging area, so there may still be bugs. The solution for this problem is to use something like "Paragon EXTFS" for large files, or try WinSCP. Closing because there isn't anything I can specifically do here :|