From nobody Sat May 06 20:42:16 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 4QDKHF2pPtz496C2 for ; Sat, 6 May 2023 20:42:17 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QDKHD478tz40wF for ; Sat, 6 May 2023 20:42:16 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683405736; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M+36sT4y0kWOSDJOkk64BJ1JdfPRbsjRmIBl+IsGWTI=; b=fnqZwi+ogfpjUDGi348+6Fi4g+0nzPNHm6YPekd1aaaQ9ApcudqtoIyAfHL4ubswJKfYDw qcdvdOUtf+T50LmGIp1NEjW9dT5L5Dmf+paahv3st8bo7lZCpejQm5BEZaxvbEz/gwT1hd SEFIlYGR1oOX+jOlf3GWA2aZIJM+AP7evRQZS30Xy4noFbfXEhFmSyV/KELQQGAIydeuHW dEc+8aGTEokwnaKyxdIAR3nN/94RuPWkP2IVuZ2Pt1TVoI1aXOOpTaMgvWn1dtA8ri8PjG NP7d2s1qe0cSieAjTEe5SFCeXbxPwFaZN+eL8GV5x/T79PZP656whPJYqu/12w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683405736; a=rsa-sha256; cv=none; b=aqQsiI6ksUvrkGcNiU3IEmO2+J5cAy9+Id1wKRBFu57kjc1yuMNcsUZYWSnJ+LBI6hbmaJ SsU42WC2WwtCpSzw8ctK83V06paZ0lIBXVij2JUPw1dswh2iRWVnr/fPsDLO4yFtd9P4fI ezQyvBznOzizEck27XmF+iau2VPOsFlqEs41SbQKGfKJZx61hv+WUfvF9ldFYqo4G7EVfT R8CJB/f1u9Ll+tlO7QSqjXz/FioES2M4HRdhEM1g7q1+xkCFR+Y9UP9V6rsqrtf3nwmy2I 82sjXwaOmbrVRCmPfRjJHxe+IcQzspfZnJTSRWErbb2hx7zGbhAM6gbBoC4pMA== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QDKHD3DYDzrLM for ; Sat, 6 May 2023 20:42:16 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 346KgGFg088448 for ; Sat, 6 May 2023 20:42:16 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 346KgG8k088447 for freebsd-arm@FreeBSD.org; Sat, 6 May 2023 20:42:16 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: freebsd-arm@FreeBSD.org Subject: [Bug 271288] FreeBSD 13.2; Alignment Fault ; network related Date: Sat, 06 May 2023 20:42:16 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: arm X-Bugzilla-Version: 13.2-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: martin@bxlr.sk X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-arm@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated 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 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D271288 Bug ID: 271288 Summary: FreeBSD 13.2; Alignment Fault ; network related Product: Base System Version: 13.2-RELEASE Hardware: arm OS: Any Status: New Severity: Affects Some People Priority: --- Component: arm Assignee: freebsd-arm@FreeBSD.org Reporter: martin@bxlr.sk In qemu, using FreeBSD-13.2-RELEASE-arm-armv7-GENERICSD.img image, with out without virtio network system fails to boot and crashes on data alignment fault. With virtio VM started as: qemu-system-arm -M virt -m 2048 -nic tap -bios u-boot.bin -hda FreeBSD-13.2-RELEASE-arm-armv7-GENERICSD.img -s \ -device virtio-net-pci,netdev=3Dnetwork0 -netdev tap,id=3Dnetwork0,br=3Dbr0 Crashes the system during network initialization: DHCPDISCOVER on vtnet0 to 255.255.255.255 port 67 interval 7 Fatal kernel mode data abort: 'Alignment Fault' on read trapframe: 0xd5ec5a60 FSR=3D00000001, FAR=3Dd8e4f01a, spsr=3D20000013 r0 =3D00000000, r1 =3D00000001, r2 =3D00000001, r3 =3Dd5ec5b4c r4 =3D00000014, r5 =3Dd8dd4300, r6 =3Dd8e4f02e, r7 =3D00000134 r8 =3D00000000, r9 =3D00000134, r10=3Dd8e4f01a, r11=3Dd5ec5b90 r12=3D4400ffff, ssp=3Dd5ec5af0, slr=3Dc04a9728, pc =3Dc04a9750 panic: Fatal abort cpuid =3D 0 time =3D 1680843368 KDB: stack backtrace: #0 0xc035786c at kdb_backtrace+0x48 #1 0xc02fdd20 at vpanic+0x140 #2 0xc02fdbe0 at vpanic+0 #3 0xc06304ac at abort_align+0 #4 0xc063052c at abort_align+0x80 #5 0xc063017c at abort_handler+0x480 #6 0xc060f480 at exception_exit+0 #7 0xc04a9750 at udp_input+0x288 #8 0xc0473f54 at ip_input+0x1e0 #9 0xc04447c0 at netisr_dispatch_src+0xf8 #10 0xc043bf2c at ether_demux+0x1a4 #11 0xc043d5e4 at ether_nh_input+0x480 #12 0xc04447c0 at netisr_dispatch_src+0xf8 #13 0xc043c404 at ether_input+0x50 #14 0xc01c0838 at vtnet_rx_vq_process+0x880 #15 0xc01b70d0 at vtpci_intx_intr+0xac #16 0xc02b87f0 at ithread_loop+0x2ec #17 0xc02b465c at fork_exit+0xc0 Uptime: 49s Quick check with gdb reveals: Breakpoint 2, udp_input (mp=3D, offp=3D, prot= o=3D17) at /usr/src/sys/netinet/udp_usrreq.c:504 504 in /usr/src/sys/netinet/udp_usrreq.c =3D> 0xc04a9750 : 03 00 9a e8 ldm r10, {r0, r1} 0xc04a9754 : 00 20 a0 e3 mov r2, #0 0xc04a9758 : 08 30 da e5 ldrb r3, [r10, #8] (gdb) i r $r10 $cpsr r10 0xd8ebc01a -655638502 cpsr 0x20000013 536870931 (gdb) I simplified the setup and removed the tap interface from the qemu setup. Machine boots but crashes while I try to SSH to it: login: Fatal kernel mode data abort: 'Alignment Fault' on read trapframe: 0xd5ecea18 FSR=3D00000001, FAR=3De1141032, spsr=3D60000013 r0 =3D00000014, r1 =3D0000003c, r2 =3D00000010, r3 =3D00000010 r4 =3De114102e, r5 =3Dd8e84200, r6 =3D00000028, r7 =3D00000000 r8 =3D00000014, r9 =3D00000000, r10=3D00000028, r11=3Dd5eceb88 r12=3Dd8e84200, ssp=3Dd5eceaa8, slr=3Dc04847c8, pc =3Dc0482e58 panic: Fatal abort cpuid =3D 0 time =3D 1680843499 KDB: stack backtrace: #0 0xc035786c at kdb_backtrace+0x48 #1 0xc02fdd20 at vpanic+0x140 #2 0xc02fdbe0 at vpanic+0 #3 0xc06304ac at abort_align+0 #4 0xc063052c at abort_align+0x80 #5 0xc063017c at abort_handler+0x480 #6 0xc060f480 at exception_exit+0 #7 0xc0482e58 at tcp_input_with_port+0x4c4 #8 0xc04847c8 at tcp_input+0x10 #9 0xc0473f54 at ip_input+0x1e0 #10 0xc04447c0 at netisr_dispatch_src+0xf8 #11 0xc043bf2c at ether_demux+0x1a4 #12 0xc043d5e4 at ether_nh_input+0x480 #13 0xc04447c0 at netisr_dispatch_src+0xf8 #14 0xc043c404 at ether_input+0x50 #15 0xc01c0838 at vtnet_rx_vq_process+0x880 #16 0xc01b70d0 at vtpci_intx_intr+0xac #17 0xc02b87f0 at ithread_loop+0x2ec Uptime: 1m17s Breakpoint 3, tcp_fields_to_host (th=3D0xe114402e) at /usr/src/sys/netinet/tcp_var.h:1126 1126 /usr/src/sys/netinet/tcp_var.h: No such file or directory. =3D> 0xc0482e58 : 03 00 94 e9 ldmib r= 4, {r0, r1} (gdb) i r $r4 $cpsr r4 0xe114402e -518766546 cpsr 0x60000013 1610612755 (gdb) It seems data structures are not aligned to their native boundaries. --=20 You are receiving this mail because: You are the assignee for the bug.=