I don't really know where to report this, as Apple's bugtrackers seem to be private.
And I'm hoping somebody else has a fix, because this is highly irritating.
I can crash my macOS High Sierra machine consistently, just by reading from a serial line.
To explain more, I've just been working on a silly side-project, using an Arduino Pro Mini. A tiny 8Mhz machine.
The code is fairly simple, see here [0].
Now, if I try and read from the serial line for that, then the program trying to read will freeze up.
It works across any program: Arduino IDE's serial monitor, gnu screen, picocom, even cat and head.
e.g.
cat /dev/tty.usbserial-A703CXL3
Terminal still takes input, but seems to do nothing with it, and I can't open a new terminal.
So, if I go with the nuclear option, and take the USB-serial connection out of the computer, High Sierra crashes to reboot instantly.
I think this might be related to the htop[1] or task_for_pid[2] bugs, but I don't know.
Here's the kicker though: Since this program started those crashes, I can't read from any serial device without the same problem, whether or not I'm using the same serial line reader. (Different boards connected using different cables still cause the problem).
And not being able to use a serial line is a problem for my everyday.
(I should also note that same device and same cable that caused this, works perfectly fine on my crappy Linux laptop.)
[0] https://gist.github.com/shakna-israel/6e6f7d6dcec871505f2d9b0f033ea584
[1] https://github.com/hishamhm/htop/issues/682
[2] https://jvns.ca/blog/2018/01/28/mac-freeze/