From nobody Wed Jun 08 03:06:03 2022 X-Original-To: freebsd-current@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 E46E1833CB4 for ; Wed, 8 Jun 2022 03:06:12 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from mx.catwhisker.org (mx.catwhisker.org [107.204.234.170]) (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 did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4LHsYv6LFjz3Lly for ; Wed, 8 Jun 2022 03:06:11 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from albert.catwhisker.org (localhost [127.0.0.1]) by albert.catwhisker.org (8.16.1/8.15.2) with ESMTP id 258363S6038864; Wed, 8 Jun 2022 03:06:03 GMT (envelope-from david@albert.catwhisker.org) Received: (from david@localhost) by albert.catwhisker.org (8.16.1/8.16.1/Submit) id 258363p8038863; Tue, 7 Jun 2022 20:06:03 -0700 (PDT) (envelope-from david) Date: Tue, 7 Jun 2022 20:06:03 -0700 From: David Wolfskill To: Oleg Lelchuk Cc: freebsd-current@freebsd.org Subject: Re: A kernel crash after compiling a fresh kernel Message-ID: Mail-Followup-To: David Wolfskill , Oleg Lelchuk , freebsd-current@freebsd.org References: List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="CeSOY/sgAkQ6yCrH" Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4LHsYv6LFjz3Lly X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of david@catwhisker.org designates 107.204.234.170 as permitted sender) smtp.mailfrom=david@catwhisker.org X-Spamd-Result: default: False [-3.41 / 15.00]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; FREEFALL_USER(0.00)[david]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:107.204.234.170]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; DMARC_NA(0.00)[catwhisker.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; SIGNED_PGP(-2.00)[]; NEURAL_SPAM_SHORT(0.99)[0.991]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; MLMMJ_DEST(0.00)[freebsd-current]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:7018, ipnet:107.192.0.0/12, country:US]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N --CeSOY/sgAkQ6yCrH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jun 07, 2022 at 09:37:52PM -0400, Oleg Lelchuk wrote: > The 14-CURRENT running a fresh kernel crashes with these messages: >=20 > __curthread () at /usr/src/sys/amd64/include/pcpu_aux.h:55 > 55 __asm("movq %%gs:%P1,%0" : "=3Dr" (td) : "n" (offsetof(st= ruct > pcpu, > (kgdb) #0 __curthread () at > /usr/src/sys/amd64/include/pcpu_aux.h:55 > #1 dump_savectx () at /usr/src/sys/kern/kern_shutdown.c:401 > #2 0xffffffff80be8ba5 in dumpsys (di=3D0x0) > at /usr/src/sys/x86/include/dump.h:87 > #3 doadump (textdump=3D1) at /usr/src/sys/kern/kern_shutdown.c:430 > #4 kern_reboot (howto=3D260) at /usr/src/sys/kern/kern_shutdown.c:537 > #5 0xffffffff80be8fee in vpanic (fmt=3D, > ap=3Dap@entry=3D0xfffffe01042395a0) at > /usr/src/sys/kern/kern_shutdown.c:975 > #6 0xffffffff80be8d53 in panic (fmt=3D) > at /usr/src/sys/kern/kern_shutdown.c:899 > #7 0xffffffff810c0877 in trap_fatal (frame=3D0xfffffe0104239690, eva=3D0) > at /usr/src/sys/amd64/amd64/trap.c:942 > #8 0xffffffff810c092b in trap_pfault (frame=3D0xfffffe0104239690, > usermode=3Dfalse, signo=3D, ucode=3D) > at /usr/src/sys/amd64/amd64/trap.c:761 > #9 > #10 tcp_sack_output (tp=3Dtp@entry=3D0xfffffe0187312140, > sack_bytes_rexmt=3Dsack_bytes_rexmt@entry=3D0xfffffe010423983c) > at /usr/src/sys/netinet/tcp_sack.c:970 > #11 0xffffffff80dd47a2 in tcp_default_output (tp=3D0xfffffe0187312140) > at /usr/src/sys/netinet/tcp_output.c:310 > #12 0xffffffff80dcd240 in tcp_output (tp=3Dtp@entry=3D0xfffffe0187312140) > at /usr/src/sys/netinet/tcp_var.h:407 > #13 0xffffffff80dcc81a in tcp_do_segment (m=3D0xfffff80203467700, > th=3D0xfffff8001f190022, so=3D0xfffff80015d0fb40, > tp=3D0xfffffe0187312140, > drop_hdrlen=3D64, tlen=3D, iptos=3D0 '\000= ') > at /usr/src/sys/netinet/tcp_input.c:2788 > #14 0xffffffff80dc8def in tcp_input_with_port (mp=3D, > offp=3D, proto=3D, port=3Dp= ort@entry > =3D0) > at /usr/src/sys/netinet/tcp_input.c:1397 > #15 0xffffffff80dc9c8b in tcp_input (mp=3D0xfffff8011c764010, offp=3D0x4, > proto=3D-2128851986) at /usr/src/sys/netinet/tcp_input.c:= 1492 > #16 0xffffffff80db8cd7 in ip_input (m=3D0x0) > at /usr/src/sys/netinet/ip_input.c:840 > #17 0xffffffff80d3842f in netisr_dispatch_src (proto=3D1, > source=3Dsource@entry=3D0, m=3D0xfffff80203467700) > at /usr/src/sys/net/netisr.c:1153 > #18 0xffffffff80d3878f in netisr_dispatch (proto=3D477511696, > m=3D0xffffffff811c4bee) at /usr/src/sys/net/netisr.c:1244 > #19 0xffffffff80d1a7cc in ether_demux (ifp=3Difp@entry=3D0xfffff800028738= 00, > m=3D0x4) at /usr/src/sys/net/if_ethersubr.c:925 > #20 0xffffffff80d1be53 in ether_input_internal (ifp=3D0xfffff80002873800, > m=3D0x4) > at /usr/src/sys/net/if_ethersubr.c:711 > #21 ether_nh_input (m=3D) at > /usr/src/sys/net/if_ethersubr.c:741 > #22 0xffffffff80d3842f in netisr_dispatch_src (proto=3Dproto@entry=3D5, > source=3Dsource@entry=3D0, m=3Dm@entry=3D0xfffff802034677= 00) > at /usr/src/sys/net/netisr.c:1153 > #23 0xffffffff80d3878f in netisr_dispatch (proto=3D477511696, proto@entry= =3D5, > m=3D0xffffffff811c4bee, m@entry=3D0xfffff80203467700) > at /usr/src/sys/net/netisr.c:1244 > #24 0xffffffff80d1ac89 in ether_input (ifp=3D0xfffff80002873800, > m=3D0xfffff80203467700) at /usr/src/sys/net/if_ethersubr.= c:832 > #25 0xffffffff808f41f7 in re_rxeof (sc=3Dsc@entry=3D0xfffffe00e1cce000, > rx_npktsp=3D0x0) at /usr/src/sys/dev/re/if_re.c:2386 > #26 0xffffffff808f1a16 in re_intr_msi (xsc=3D0xfffffe00e1cce000) > at /usr/src/sys/dev/re/if_re.c:2682 > #27 0xffffffff80ba3d49 in intr_event_execute_handlers > (ie=3D0xfffff800020fde00, > p=3D) at /usr/src/sys/kern/kern_intr.c:1205 > #28 ithread_execute_handlers (ie=3D0xfffff800020fde00, p=3D) > at /usr/src/sys/kern/kern_intr.c:1218 > #29 ithread_loop (arg=3Darg@entry=3D0xfffff800020fbf80) > at /usr/src/sys/kern/kern_intr.c:1306 > #30 0xffffffff80ba03e0 in fork_exit ( > callout=3D0xffffffff80ba3ad0 , > arg=3D0xfffff800020fbf80, > frame=3D0xfffffe0104239f40) at > /usr/src/sys/kern/kern_fork.c:1102 > #31 I had a ... vaguely-similar panic on one laptop, after updating sources =66rom main-n256013-85d7875d4291 to main-n256025-91d6afe6e2a9. I placed a screenshot of the backtrace at https://www.catwhisker.org/~david/FreeBSD/head/n256025/console.jpg The files updated were: Updating 85d7875d4291..91d6afe6e2a9 Fast-forward contrib/bsddialog/lib/lib_util.c | 7 +-- sys/arm64/arm64/identcpu.c | 85 +++++++++++++++++++++++++++++= ++++ sys/arm64/include/armreg.h | 30 ++++++++++++ sys/dev/alc/if_alc.c | 5 +- sys/dev/hwpmc/hwpmc_logging.c | 21 ++++---- sys/dev/hwpmc/hwpmc_mod.c | 17 ++++--- sys/dev/iommu/iommu_gas.c | 13 ++++- sys/fs/fdescfs/fdesc_vnops.c | 10 +++- sys/kern/subr_smp.c | 4 +- sys/kern/uipc_usrreq.c | 37 ++++++-------- sys/netinet/tcp_sack.c | 12 +++++ sys/sys/pmc.h | 4 ++ tests/sys/kern/unix_passfd_test.c | 37 ++++++++++---- usr.bin/gcore/elfcore.c | 29 ++--------- usr.sbin/bsdinstall/scripts/docsinstall | 3 +- 15 files changed, 223 insertions(+), 91 deletions(-) Command exit status: 0 I noted that there was a subsequent commit to sys/netinet/tcp_sack.c (231e0dd5d1fb7778b1cb285e5ebee5502d5ad253, to avoid a NULL dereference); while I don't believe I was using SACK, I went ahead and hand-applied that small change & rebuilt; that did not seem to help (as I got a similar-looking panic after the rebuild). Peace, david --=20 David H. Wolfskill david@catwhisker.org "Putin is a paranoid dictator. Putin must go. He started a senseless war and is leading Russia into a ditch." - Egor Polyakov & Alexandra Miroshniko= va See https://www.catwhisker.org/~david/publickey.gpg for my public key. --CeSOY/sgAkQ6yCrH Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iNUEARYKAH0WIQSr0Kzv+UJRY3wfOii0+6PfV4Ix1AUCYqASG18UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0QUJE MEFDRUZGOTQyNTE2MzdDMUYzQTI4QjRGQkEzREY1NzgyMzFENAAKCRC0+6PfV4Ix 1BtbAP9z0pXpNoQtkgEvrCjRt+wPq8yfGMkr6nnuTXOZ4D1tcgD/dgaywRX6Ya+a rMe0+9g7mQA36MRgNSlDDeNJf4z2sw0= =3yWH -----END PGP SIGNATURE----- --CeSOY/sgAkQ6yCrH--