From owner-freebsd-arm@freebsd.org Thu Sep 15 23:52:08 2016 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62529BDC09C for ; Thu, 15 Sep 2016 23:52:08 +0000 (UTC) (envelope-from pz-freebsd-arm@ziemba.us) Received: from osmtp.ziemba.us (osmtp.ziemba.us [208.106.105.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 203E5FEB for ; Thu, 15 Sep 2016 23:52:07 +0000 (UTC) (envelope-from pz-freebsd-arm@ziemba.us) Received: from hairball.ziemba.us (localhost.ziemba.us [127.0.0.1]) by hairball.ziemba.us (8.14.9/8.14.9) with ESMTP id u8FNQ6ga068871 for ; Thu, 15 Sep 2016 16:26:06 -0700 (PDT) (envelope-from pz-freebsd-arm@ziemba.us) Received: (from mailnull@localhost) by hairball.ziemba.us (8.14.9/8.14.9/Submit) id u8FNQ4xi068865 for freebsd-arm@freebsd.org; Thu, 15 Sep 2016 16:26:04 -0700 (PDT) (envelope-from pz-freebsd-arm@ziemba.us) X-Authentication-Warning: hairball.ziemba.us: mailnull set sender to pz-freebsd-arm@ziemba.us using -f Received: (from news@localhost) by usenet.ziemba.us (8.14.5/8.14.5/Submit) id u8FNNpwS074906 for treehouse-mail-freebsd-arm@hairball.ziemba.us; Thu, 15 Sep 2016 16:23:51 -0700 (PDT) (envelope-from news) From: "G. Paul Ziemba" To: freebsd-arm@freebsd.org Subject: RPI2 12.0-CURRENT r305028 bootup crash in pf Date: Thu, 15 Sep 2016 23:23:51 +0000 (UTC) Message-id: Reply-to: unp@ziemba.us Errors-to: "G. Paul Ziemba" X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Sep 2016 23:52:08 -0000 There seems to be a problem in the latest RPI2 image at ftp.freebsd.org:/pub/FreeBSD/snapshots/arm/armv6/ISO-IMAGES/12.0/FreeBSD-12.0-CURRENT-arm-armv6-RPI2-20160829-r305028.img.xz The kernel stops during boot in the pf code. Some relevant details: 1. There is no pf.conf file (I renamed my existing one in the course of simplifying the test case; failure occurs regardless) 2. pf_enable="YES" in rc.conf 3. Problem seems to occur ONLY when pflog_enable="YES" is also in rc.conf 4. During my tests, I did not have ue1 (usb ethernet) attached. ue0 is, of course, the on-board usb ethernet. I don't have a serial console (so couldn't capture text), but I did attach a HDMI monitor and took a photo of the output. I have hand- transcribed the final part of the kernel output showing error messages. I believe the below to be character-for-character accurate. I'm going to try building an image with crochet and debugging with that, but it looks as if there have been prior problems in this area (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=201932) so perhaps others have ideas where to begin. Suggestions welcome! --- start of transcription ---- ue0: on smsc0 ue0: Ethernet address: b8:27:eb:ee:1e:f1 ugen0.4: at usbus0 ukbd0: on usbus0 kbd1 at ukbd0 random: unblocking device. smsc0: chip 0xec00, rev. 0002 ue0: link state changed to DOWN Kernel page fault with the following non-sleepable locks held: exclusive sleep mutex pf fragments (pf fragments) r = 0 (0xc4c36728) locked @ /usr/src/sys/modules/pf/../../netpfil/pf/pf_norm.c:224 stack backtrace: Fatal lernel mode data abort: 'Translation Fault (L1)' on read trapframe: 0xd6b90d40 FSR=00000005, FAR=00000004, spsr=80000013 r0 =00000000, r1 =00000001, r2 =ffffffff, r3 =c087792c r4 =00000014, r5 =c4c2b39a, r6 =c4c36720, r7 =00000000 r8 =c4c3635c, r9 =c4c36378, r10=00000000, r11=d6b90df0 r12=c4c36728, ssp=d6b90dd0, slr=c02a51a4, pc =c4c1e88c timeout stopping cpus lock order reversal: (Giant after non-sleepable) 1st 0xc4c36728 pf fragments (pf fragments) @ /usr/src/sys/modules/pf/../../netpfil/pf/pf_norm.c:224 2nd 0xc08b191c Giant (Giant) @ /usr/src/sys/dev/usb/input/ukbd.c:2018 stack backtrace: --- end of transcription ---- There was no further text on the screen (i.e., no second stack backtrace). ---- start /etc/rc.conf ---- hostname="bogart.ziemba.us" defaultrouter="10.0.0.1" ifconfig_ue0="inet 10.0.0.84/16" ifconfig_ue1="inet 192.168.0.2/24 fib 1" ifconfig_DEFAULT="DHCP" vlans_ue0="101" create_args_ue0_101="fib 1" ifconfig_ue0_101="inet 10.126.0.3/16 fib 1" static_routes="fib1default" route_fib1default="default 10.126.0.2 -fib 1" dhcpd_enable="YES" dhcpd_conf="/usr/local/etc/dhcpd.conf" dhcpd_ifaces="" dhcpd_withumask="022" sshd_enable="YES" inetd_enable="YES" sendmail_enable="NONE" sendmail_submit_enable="NO" sendmail_outbound_enable="NO" sendmail_msp_queue_enable="NO" growfs_enable="YES" fsck_y_enable="YES" saver="blank" ntpd_enable="YES" ntpd_sync_on_start="YES" # NO /etc/pf.conf is present for this test pf_enable="YES" pf_rules="/etc/pf.conf" pf_flags="" # uncommenting the following two lines results in failure at boot #pflog_enable="YES" #pflog_logfile="/tmp/pflog" ---- end /etc/rc.conf ---- -- G. Paul Ziemba FreeBSD unix: 4:26PM up 25 days, 19:05, 16 users, load averages: 1.67, 2.00, 1.92