From nobody Fri Oct 27 16:54:53 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SH80h2zqCz4ySFd for ; Fri, 27 Oct 2023 16:55:00 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Received: from www.zefox.net (www.zefox.net [50.1.20.27]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "www.zefox.com", Issuer "www.zefox.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SH80f4fjBz3SWk for ; Fri, 27 Oct 2023 16:54:58 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Authentication-Results: mx1.freebsd.org; dkim=none; spf=none (mx1.freebsd.org: domain of fbsd@www.zefox.net has no SPF policy when checking 50.1.20.27) smtp.mailfrom=fbsd@www.zefox.net; dmarc=none Received: from www.zefox.net (localhost [127.0.0.1]) by www.zefox.net (8.17.1/8.15.2) with ESMTPS id 39RGsrBu078818 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Fri, 27 Oct 2023 09:54:54 -0700 (PDT) (envelope-from fbsd@www.zefox.net) Received: (from fbsd@localhost) by www.zefox.net (8.17.1/8.15.2/Submit) id 39RGsro8078817 for freebsd-arm@freebsd.org; Fri, 27 Oct 2023 09:54:53 -0700 (PDT) (envelope-from fbsd) Date: Fri, 27 Oct 2023 09:54:53 -0700 From: bob prohaska To: freebsd-arm@freebsd.org Subject: Releng/14.0 dropping ssh connections to USB-serial adapter Message-ID: List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spamd-Result: default: False [-1.10 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; AUTH_NA(1.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.999]; MID_RHS_WWW(0.50)[]; WWW_DOT_DOMAIN(0.50)[]; MIME_GOOD(-0.10)[text/plain]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:7065, ipnet:50.1.16.0/20, country:US]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org]; MIME_TRACE(0.00)[0:+]; R_SPF_NA(0.00)[no SPF record]; BLOCKLISTDE_FAIL(0.00)[50.1.20.27:server fail]; RCPT_COUNT_ONE(0.00)[1]; RCVD_COUNT_TWO(0.00)[2]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; DMARC_NA(0.00)[zefox.net]; FROM_HAS_DN(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; RCVD_TLS_LAST(0.00)[] X-Rspamd-Queue-Id: 4SH80f4fjBz3SWk X-Spamd-Bar: - It appears that releng/14.0 is still dropping ssh connections to a USB-serial adapter, though the problem seems absent now on -current. Usbconfig reports ugen1.4: at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (90mA) The USB-end host is a Pi2 v1.1 running armv7, the usb adapter is an FTDI FT232 and the serial end is the serial console of a Pi3. The adapter is plugged directly into the Pi, no USB hub is used. The root filesystem is on a USB mechanical hard disk connected via a powered hub and booting is vi microSD "bootcode.bin" mode. With USB debugging turned on quite a lot of output is generated, the only part I recognize is a "ucom_shutdown" on the USB end's console. That makes termination of the serial connection look intentional. Why the ssh connection to the host exits entirely isn't evident to me. When the connection has dropped, restoring it is straightforward: bob@generic:~ % su Password: # tip ucom Stale lock on cuaU0 PID=1201... overriding. connected authentica [I didn't type this, it somehow got into the data stream] Password: [I simply hit Enter] Login incorrect login: It looks as if part of the serial console login prompt has somehow leaked into the _inbound_ data stream. This is seen on other Pi hosts in my collection, too, but seems unrelated to connections dropping. Meanwhile, the console of the USB-end host reports: login: Oct 27 08:21:23 generic su[3278]: bob to root on /dev/pts/0 ucom_open: tp = 0xd6c3f400 ucom_cfg_open: ucom_dtr: onoff = 1 ucom_line_state: on=0x01, off=0x00 ucom_rts: onoff = 1 ucom_line_state: on=0x02, off=0x00 ucom_ring: onoff = 0 ucom_line_state: on=0x00, off=0x08 ucom_break: onoff = 0 ucom_line_state: on=0x00, off=0x04 ucom_status_change: ucom_param: sc = 0xd6c3f858 ucom_dtr: onoff = 1 ucom_line_state: on=0x01, off=0x00 ucom_rts: onoff = 1 ucom_line_state: on=0x02, off=0x00 ucom_ioctl: cmd = 0x402c7413 ucom_ioctl: cmd = 0x802c7416 ucom_outwakeup: sc = 0xd6c3f858 ucom_outwakeup: sc = 0xd6c3f858 ucom_get_data: cnt=13 ucom_inwakeup: tp=0xd6c3f400 ucom_inwakeup: tp=0xd6c3f400 ucom_get_data: cnt=0 ucom_ioctl: cmd = 0x2000740d ucom_ioctl: cmd = 0x402c7413 ucom_ioctl: cmd = 0x802c7416 ucom_inwakeup: tp=0xd6c3f400 ucom_inwakeup: tp=0xd6c3f400 ucom_param: sc = 0xd6c3f858 ucom_ioctl: cmd = 0x8004667e ucom_ioctl: cmd = 0x8004667d ucom_get_data: cnt=0 ucom_inwakeup: tp=0xd6c3f400 ucom_inwakeup: tp=0xd6c3f400 ucom_inwakeup: tp=0xd6c3f400 ucom_outwakeup: sc = 0xd6c3f858 ucom_get_data: cnt=1 ucom_get_data: cnt=0 ucom_inwakeup: tp=0xd6c3f400 Hitting Enter restores the console login prompt. The connections usually drop over the span of a few hours, seemingly a bit faster when the host is active, as when running buildworld, but I've not tested carefully. This connection dropped after a bit over an hour. The output generated is huge on both ends so I'll place it at http://www.zefox.net/~fbsd/rpi2/ssh_drops_usb_serial Suggestions for betters tests are welcome! Thanks for reading, bob prohaska