[Bug 259781] Serial ports intermittently not getting any data
Date: Thu, 11 Nov 2021 17:42:42 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=259781 Bug ID: 259781 Summary: Serial ports intermittently not getting any data Product: Base System Version: 13.0-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: mark@kane.mn Created attachment 229433 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=229433&action=edit dmesg_amd64 I'm running into an issue with serial ports randomly not seeing any data on certain boots where nothing has changed, except rebooting. After hundreds of boot tests the problem occurs about 40% of the time. For debugging purposes I have simplified the setup down to just 2 serial ports and seeing if cu(1) in base is able to see data. The actual application is 4 serial ports each accessed by their own Java application. - For example, /dev/ttyu1 is connected to a temperature sensor that constantly outputs data and /dev/ttyu4 is connected to a GPS receiver that constantly outputs data. - On any given boot of FreeBSD, cu(1) may see data from one, both, or neither of the ports. In the case where a port isn't receiving data, cu(1) prints "Connected" but there is no data from the serial port. - Without making any changes to the system, rebooting via `shutdown -r now`, `shutdown -p now`, or `shutdown -c now` may allow one or both of the serial ports to start seeing data again. - On the next boot with no changes the behavior seems random whether one, both, or neither port will have data. - On a test round with 200 reboots and no changes made, 85 boots have at least one of the serial ports in the broken state with no data and the other 115 reboots have both ports working correctly. - No amount of fiddling with stty options has changed this behavior. The default lines for these ports in /etc/ttys being present or commented out also seems to have no effect. - hw.puc.msi_disable=1 has no effect. - I have not found any way to "reset" the ports back to a working state with data while FreeBSD is booted short of trying a reboot, which may or may not allow either/both ports to work again. - Does not appear to be a hardware issue. Testing the same serial ports on OpenBSD or Linux has 0 failures after 100+ boots of each OS. - Tested on both amd64 hardware and i386-only hardware, and multiple identical units of each arch. Attached are dmesgs from both the amd64 and i386 hardware. Any thoughts or potential workarounds to try would be much appreciated. Thanks. -- You are receiving this mail because: You are the assignee for the bug.