I posted this question on stack overflow already but after looking up similar questions I realized this is a much better place for it (and it only got 8 views after 10 hours on a Sunday). If necessary I'll delete this one or the other one.
I'm having a weird problem and I can't seem to find anyone else with a similar issue. I'm connecting to a device similar to a Zedboard or Raspberry Pi through USB using screen (sudo screen /dev/ttyUSB0 115200).
At a random point in time after connecting, the screen will become unresponsive. Normally turning off the device will also terminate the screen session, but when the screen becomes unresponsive, turning off the device does nothing. The only way to get rid of the frozen screen is to force close the terminal.
When attempting to reconnect to the device in a new terminal, the screen stays frozen requiring a force close again. These screens aren't visible by screen --list, but by searching for the screen processes (ps ax | grep ttyUSB0), the screen can be found and multiple are found if reconnecting was attempted. If there were multiple, the others can be easily killed (sudo kill 1234) but when killing the first screen process, the type of process goes from Ss to Ds which I've read means killing won't work and the user just has to wait. It never closes unfortunately.
At this point, when trying to reconnect to the device using the same command, the following error is printed at the top of the screen in rapid succession: "Cannot open line '/dev/ttyUSB0' for R/W: open() blocked, aborted." (for about 0.5 sec) followed by "Sorry, could not find a PTY.". Then the screen closes automatically. At this point, I've tried manually deleting the ttyUSB0 entry in /dev and recreating it using mknod, but it doesn't help. All I can do at this point is hard reset the computer.
I've tried using minicom and the problem still occurs (it will freeze after some amount of usage). Once it freezes, there's no way to reconnect without resetting the computer. I've tried different USB ports on the computer as well.
I'm currently using CentOS 6.5, and I'm currently not able to switch my OS so I hope that isn't the problem. I've tried connecting to the device through a virtual machine (VirtualBox Ubuntu14.04.2) and there actually wasn't a crash for a decent amount of usage but I think it's probably just due to chance since that shouldn't make a difference.
Ideally I'd like to figure out how to fix the problem but I would also be okay with just figuring out how to get it fixed without having to turn off and on the computer.