On 2021-01-19 19:15, Nick Holland wrote:
On 1/19/21 4:35 PM, Adam Thompson wrote:
I ran into this exact problem last year. It'll be in the list archives. According to Theo (if I understood him correctly) it's partly due to the
way BSD serial ports have always worked, i.e. in a rather
under-specified manner.
Apparently the core tty(4) code around this particular symptom hasn't
really changed at all since OpenBSD forked.

I'm curious what you think "this exact problem" is.

Based on later messages in the thread, it's clear I did *not* have the exact same problem, after all. I was experiencing ttys that remained busy after the process that opened them had closed.

So, for example, if I used "screen /dev/cua0 9600", after exiting screen(1), confirming with ps(1) that all screen processes were gone, and confirming with lsof/fstat that nothing still had either cua00 or tty00 open, if I re-ran "screen /dev/cua00 9600" - or ANY other application, including cu(1) - the new process would simply block. ktrace(8) confirmed that the open(2) call was simply blocking... forever. I could reproduce it with cu(1) as well as screen. Don't think I tried any other apps.

I recall that someone suggested at the time that it might be signal line related, but it didn't matter whether I had full RS-232 CTS/RTS and/or DCD/DSR signalling, basic 3-wire signalling only, or even if I unplugged the cable entirely, the blocking behaviour stuck around until I rebooted. Granted, rebooting on a single-port terminal server isn't the end of the world, but it was a PITA that I got tired of. (Oh, if I used a USB serial adapter, unplugging and replugging the USB dongle also cleared the problem.)


I'm not going to say serial support in OpenBSD is perfect, but it works
Darned Well,

Mostly, I agree. I still don't know what was different about this one use case. Pretty sure it wasn't hardware - I reproduced it on three vastly different amd64 systems, and with both traditional UARTs and USB dongles. Pretty sure it wasn't (Exclusively) a PEBCAK issue. But still not sure what it was.

I'll try again at some point, and I'll post if/when it happens to me again.

-Adam

Reply via email to