Unmapped I/O
Fabian Keil
freebsd-listen at fabiankeil.de
Fri Dec 21 14:22:57 UTC 2012
Konstantin Belousov <kostikbel at gmail.com> 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 with [...] [PTK=CCMP GTK=CCMP]
Dec 21 14:27:19 r500 wpa_supplicant[1716]: CTRL-EVENT-CONNECTED - Connection to [...] completed (auth) [id=0 id_str=]
Dec 21 14:27:19 r500 kernel: /sbin/mount_nullfs: <FB>N^P^H<A0>g[...]<B9>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 signal 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 signal 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 at r500 ~ $gdb75 /usr/sbin/syslogd /syslogd.core
[...]
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=0x800daa720, buf=0x1200000137 <Address 0x1200000137 out of bounds>, n=21) at /usr/src/lib/libc/stdio/stdio.c:133
#2 0x0000000800b4c269 in __sflush (fp=<optimized out>, fp=<optimized out>) at /usr/src/lib/libc/stdio/fflush.c:123
#3 0x0000000800af0930 in _fwalk (function=0x800b4c200 <__sflush>) at /usr/src/lib/libc/stdio/fwalk.c:65
#4 0x0000000800b4c060 in _cleanup () at /usr/src/lib/libc/stdio/findfp.c:202
#5 0x0000000800acfabd in exit (status=1) at /usr/src/lib/libc/stdlib/exit.c:69
#6 0x0000000000404bc8 in die (signo=<optimized out>) at /usr/src/usr.sbin/syslogd/syslogd.c:1528
#7 0x0000000000404771 in main (argc=21143816, argv=0x7fff00000000) at /usr/src/usr.sbin/syslogd/syslogd.c:615
fk at r500 ~ $gdb75 /usr/sbin/syslogd /syslogd.core
[...]
[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=0x800daa720, buf=0x1200000137 <Address 0x1200000137 out of bounds>, n=21) at /usr/src/lib/libc/stdio/stdio.c:133
#2 0x0000000800b4c269 in __sflush (fp=<optimized out>, fp=<optimized out>) at /usr/src/lib/libc/stdio/fflush.c:123
#3 0x0000000800af0930 in _fwalk (function=0x800b4c200 <__sflush>) at /usr/src/lib/libc/stdio/fwalk.c:65
#4 0x0000000800b4c060 in _cleanup () at /usr/src/lib/libc/stdio/findfp.c:202
#5 0x0000000800acfabd in exit (status=1) at /usr/src/lib/libc/stdlib/exit.c:69
#6 0x0000000000404bc8 in die (signo=<optimized out>) at /usr/src/usr.sbin/syslogd/syslogd.c:1528
#7 0x0000000000404771 in main (argc=21143816, argv=0x7fff00000000) at /usr/src/usr.sbin/syslogd/syslogd.c:615
fk at r500 ~ $gdb75 /usr/local/bin/bash bash.core
[...]
[New process 100449]
Core was generated by `bash'.
Program terminated with signal 11, Segmentation fault.
#0 0x000000080091b4f0 in _nc_trim_sgr0 (tp=0x8014a2180) from /lib/libncurses.so.8
(gdb) where
#0 0x000000080091b4f0 in _nc_trim_sgr0 (tp=0x8014a2180) from /lib/libncurses.so.8
#1 0x000000080091773d in tgetent (bufp=0x8014a0000 " +C\001\b", name=<optimized out>) at /usr/src/lib/ncurses/ncurses/../../../contrib/ncurses/ncurses/tinfo/lib_termcap.c:162
#2 0x00000000004b46f1 in _rl_init_terminal_io (terminal_name=0x8014061a8 "xterm") at terminal.c:452
#3 0x000000000049a0e4 in readline_initialize_everything () at readline.c:1066
#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=1) at ./parse.y:2231
#9 0x000000000040c5a3 in read_token (command=0) 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=1, argv=0x7fffffffdcd0, env=0x7fffffffdce0) 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20121221/2df87698/attachment.sig>
More information about the freebsd-arch
mailing list