Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Nov 2021 17:42:42 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 259781] Serial ports intermittently not getting any data
Message-ID:  <bug-259781-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D259781

            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=3D229433&action=
=3Dedit
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.=20

For debugging purposes I have simplified the setup down to just 2 serial po=
rts
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 constan=
tly
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 neith=
er
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, b=
oth,
or neither port will have data.
- On a test round with 200 reboots and no changes made, 85 boots have at le=
ast
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 a=
lso
seems to have no effect.
- hw.puc.msi_disable=3D1 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 identi=
cal
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.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-259781-227>