I was recently debugging a problem where one of the units we make was having
problems with one of its serial ports. /dev/ser2 has both incoming and
outgoing data, and is used for control of our product from certain control
systems. One process in our system handles incoming commands from the
serial port as well as ethernet connections.
Over time (approximately 10 days) that serial port became unusable. What we
noticed is commands being sent from an ethernet-based connection wouldn’t
produce any feedback. Being connected via telnet to the unit, we saw that
the process that handles these connections was Reply blocked on Dev. If I
“kill -SIGALRM” the process, the ethernet-based connections receive
I wrote a quick test app to try to determine what was going on. I tried to
write() data out the serial port, but write never returned (my test app
becomes Reply blocked on Dev as well). The process that reads data from
that port never received any data from the connected device either.
Hardware and software flow control is disabled. DTR and RTS are not used
either (disabled with -D and -R options, they must be held low). We
configure the port with the following command:
stty +raw baud=9600 -ohflow -ihflow -osflow -isflow -lkhflow -lksflow
I was looking for info as to what might cause a process to become reply
blocked on Dev. Specifically, what in a serial device may cause the driver
to become unresponsive?