From owner-freebsd-arch@FreeBSD.ORG Fri Dec 21 14:22:57 2012 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3C00CDCC for ; Fri, 21 Dec 2012 14:22:57 +0000 (UTC) (envelope-from freebsd-listen@fabiankeil.de) Received: from smtprelay05.ispgateway.de (smtprelay05.ispgateway.de [80.67.31.98]) by mx1.freebsd.org (Postfix) with ESMTP id BFA878FC17 for ; Fri, 21 Dec 2012 14:22:56 +0000 (UTC) Received: from [78.35.147.221] (helo=fabiankeil.de) by smtprelay05.ispgateway.de with esmtpsa (SSLv3:AES128-SHA:128) (Exim 4.68) (envelope-from ) id 1Tm3KJ-0004JC-Gb; Fri, 21 Dec 2012 15:11:51 +0100 Date: Fri, 21 Dec 2012 15:08:23 +0100 From: Fabian Keil To: Konstantin Belousov Subject: Re: Unmapped I/O Message-ID: <20121221150823.09c9d913@fabiankeil.de> In-Reply-To: <20121219135451.GU71906@kib.kiev.ua> References: <20121219135451.GU71906@kib.kiev.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/lGD3IsDEyeDtcAlfZY15mo8"; protocol="application/pgp-signature" X-Df-Sender: Nzc1MDY3 Cc: arch@freebsd.org X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Dec 2012 14:22:57 -0000 --Sig_/lGD3IsDEyeDtcAlfZY15mo8 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Konstantin Belousov wrote: > The patch at > http://people.freebsd.org/~kib/misc/unmapped.4.patch > implements the 'unmapped buffers'. > I am interested in reviews, tests and suggestions. Note that this > only works now for md(4) and ahci(4), for other drivers the patched > kernel should fall back to the mapped i/o. Using this patch I can't login as either root or user because most of the programs including the login shells segfault: Dec 21 14:27:19 r500 kernel: eval: cp: Exec format error Dec 21 14:27:19 r500 wpa_supplicant[1716]: Trying to associate with [...] Dec 21 14:27:19 r500 wpa_supplicant[1716]: Associated with [...] Dec 21 14:27:19 r500 kernel: [54] wlan0: link state changed to UP Dec 21 14:27:19 r500 wpa_supplicant[1716]: WPA: Key negotiation completed w= ith [...] [PTK=3DCCMP GTK=3DCCMP] Dec 21 14:27:19 r500 wpa_supplicant[1716]: CTRL-EVENT-CONNECTED - Connectio= n to [...] completed (auth) [id=3D0 id_str=3D] Dec 21 14:27:19 r500 kernel: /sbin/mount_nullfs: N^P^Hg[...]0^E= : not found Dec 21 14:27:21 r500 kernel: . Dec 21 14:27:21 r500 kernel: [56] pid 2989 (egrep), uid 0: exited on signal= 11 (core dumped) Dec 21 14:27:36 r500 kernel: [71] pid 3013 (bash), uid 1001: exited on sign= al 11 (core dumped) Dec 21 14:27:36 r500 kernel: [71] pid 3005 (login), uid 0: exited on signal= 11 Dec 21 14:27:46 r500 kernel: [81] pid 3016 (bash), uid 1001: exited on sign= al 11 (core dumped) Dec 21 14:28:52 r500 login: ROOT LOGIN (root) ON ttyv0 Dec 21 14:28:52 r500 kernel: [148] pid 3020 (csh), uid 0: exited on signal = 11 (core dumped) Jails don't start either. fk@r500 ~ $gdb75 /usr/sbin/syslogd /syslogd.core=20 [...] Reading symbols from /usr/sbin/syslogd...done. [New process 100356] Core was generated by `syslogd'. Program terminated with signal 11, Segmentation fault. #0 0x0000000000604878 in ?? () (gdb) where #0 0x0000000000604878 in ?? () #1 0x0000000800b4c667 in _swrite (fp=3D0x800daa720, buf=3D0x1200000137 , n=3D21) at /usr/src/lib/libc/stdio/stdio= .c:133 #2 0x0000000800b4c269 in __sflush (fp=3D, fp=3D) at /usr/src/lib/libc/stdio/fflush.c:123 #3 0x0000000800af0930 in _fwalk (function=3D0x800b4c200 <__sflush>) at /us= r/src/lib/libc/stdio/fwalk.c:65 #4 0x0000000800b4c060 in _cleanup () at /usr/src/lib/libc/stdio/findfp.c:2= 02 #5 0x0000000800acfabd in exit (status=3D1) at /usr/src/lib/libc/stdlib/exi= t.c:69 #6 0x0000000000404bc8 in die (signo=3D) at /usr/src/usr.sbi= n/syslogd/syslogd.c:1528 #7 0x0000000000404771 in main (argc=3D21143816, argv=3D0x7fff00000000) at = /usr/src/usr.sbin/syslogd/syslogd.c:615 fk@r500 ~ $gdb75 /usr/sbin/syslogd /syslogd.core=20 [...] [New process 100356] Core was generated by `syslogd'. Program terminated with signal 11, Segmentation fault. #0 0x0000000000604878 in ?? () (gdb) where #0 0x0000000000604878 in ?? () #1 0x0000000800b4c667 in _swrite (fp=3D0x800daa720, buf=3D0x1200000137 , n=3D21) at /usr/src/lib/libc/stdio/stdio= .c:133 #2 0x0000000800b4c269 in __sflush (fp=3D, fp=3D) at /usr/src/lib/libc/stdio/fflush.c:123 #3 0x0000000800af0930 in _fwalk (function=3D0x800b4c200 <__sflush>) at /us= r/src/lib/libc/stdio/fwalk.c:65 #4 0x0000000800b4c060 in _cleanup () at /usr/src/lib/libc/stdio/findfp.c:2= 02 #5 0x0000000800acfabd in exit (status=3D1) at /usr/src/lib/libc/stdlib/exi= t.c:69 #6 0x0000000000404bc8 in die (signo=3D) at /usr/src/usr.sbi= n/syslogd/syslogd.c:1528 #7 0x0000000000404771 in main (argc=3D21143816, argv=3D0x7fff00000000) at = /usr/src/usr.sbin/syslogd/syslogd.c:615 fk@r500 ~ $gdb75 /usr/local/bin/bash bash.core=20 [...] [New process 100449] Core was generated by `bash'. Program terminated with signal 11, Segmentation fault. #0 0x000000080091b4f0 in _nc_trim_sgr0 (tp=3D0x8014a2180) from /lib/libncu= rses.so.8 (gdb) where #0 0x000000080091b4f0 in _nc_trim_sgr0 (tp=3D0x8014a2180) from /lib/libncu= rses.so.8 #1 0x000000080091773d in tgetent (bufp=3D0x8014a0000 " +C\001\b", name=3D<= optimized out>) at /usr/src/lib/ncurses/ncurses/../../../contrib/ncurses/nc= urses/tinfo/lib_termcap.c:162 #2 0x00000000004b46f1 in _rl_init_terminal_io (terminal_name=3D0x8014061a8= "xterm") at terminal.c:452 #3 0x000000000049a0e4 in readline_initialize_everything () at readline.c:1= 066 #4 0x0000000000499fb2 in rl_initialize () at readline.c:968 #5 0x0000000000460294 in initialize_readline () at bashline.c:522 #6 0x000000000040a687 in yy_readline_get () at ./parse.y:1428 #7 0x000000000040a63d in yy_getc () at ./parse.y:1376 #8 0x000000000040b49f in shell_getc (remove_quoted_newline=3D1) at ./parse= .y:2231 #9 0x000000000040c5a3 in read_token (command=3D0) at ./parse.y:2908 #10 0x000000000040bcc8 in yylex () at ./parse.y:2517 #11 0x0000000000407467 in yyparse () at y.tab.c:2065 #12 0x00000000004070be in parse_command () at eval.c:228 #13 0x00000000004071a4 in read_command () at eval.c:272 #14 0x0000000000406ea4 in reader_loop () at eval.c:137 #15 0x0000000000404f7c in main (argc=3D1, argv=3D0x7fffffffdcd0, env=3D0x7f= ffffffdce0) at shell.c:749 I'm using UFS for / and ZFS (and nullfs ...) for the rest. The ZFS pool is on ada0s1d.eli, swap is on ada0s1b.eli. I didn't update the userland as the patch only seems to touch the kernel. Fabian --Sig_/lGD3IsDEyeDtcAlfZY15mo8 Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlDUbVkACgkQBYqIVf93VJ2ZAwCgseYIPiy+K0cHtLWzq2hYU5aj 7+IAn3xQdI+FtxyfzD0IeRHDm2vo6aBo =oVZk -----END PGP SIGNATURE----- --Sig_/lGD3IsDEyeDtcAlfZY15mo8--