From owner-freebsd-emulation Sun Jul 2 19:54:22 2000 Delivered-To: freebsd-emulation@freebsd.org Received: from io.dreamscape.com (io.dreamscape.com [206.64.128.6]) by hub.freebsd.org (Postfix) with ESMTP id 22BE937BF3C for ; Sun, 2 Jul 2000 19:54:13 -0700 (PDT) (envelope-from krentel@dreamscape.com) Received: from dreamscape.com (sA16-p33.dreamscape.com [209.217.195.160]) by io.dreamscape.com (8.9.3/8.8.4) with ESMTP id WAA27489; Sun, 2 Jul 2000 22:51:13 -0400 (EDT) X-Dreamscape-Track-A: sA16-p33.dreamscape.com [209.217.195.160] X-Dreamscape-Track-B: Sun, 2 Jul 2000 22:51:13 -0400 (EDT) Received: (from krentel@localhost) by dreamscape.com (8.9.3/8.9.3) id WAA00399; Sun, 2 Jul 2000 22:51:56 -0400 (EDT) (envelope-from krentel) Date: Sun, 2 Jul 2000 22:51:56 -0400 (EDT) From: "Mark W. Krentel" Message-Id: <200007030251.WAA00399@dreamscape.com> To: marcel@cup.hp.com Subject: Re: panic running linux binaries from ext2fs Cc: freebsd-emulation@FreeBSD.ORG Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > ls might be a special case in that it may have too much FS dependent > code. A kernel trace should tell us more... Yes, it also looks to me like ls is a special case. I've been trying to reduce the problem to the smallest, simplest case that induces the problem, and so far, ls is my best example. And, I'll remind you that the panic doesn't happen during ./ls. Something in the kernel must get corrupted during ls. The output of ls has too few files, but the panic happens later, usually when I unmount the Linux partition. And of course, I run ./ls as user, not root. > If you can send us the last dozen of lines of a ktrace/truss session, > then we can start working on this... Ok, you may need to give me a few more directions on how to produce that, I haven't done much with ktrace or truss before. Do I need the linux_kdump port? There's a nice section in the Handbook on kgdb and crash dumps. Is there something on ktrace or truss (beyond man)? This output is from Red Hat 6.1. The Linux / partition is about 170 meg, revision 0, no extra features, and block/frag size 1024. I mount that read-only on /mnt, cd to /mnt/bin and run ./ls. This one didn't panic, maybe truss is interfering with that. There are kgdb traces in PR kern/19407. Here's the output of truss ./ls, all 104 lines. syscall linux_brk(0x0) returns 134565888 (0x8055000) syscall linux_open("/etc/ld.so.preload",0,05001460044) errno -2 'No such file or directory' syscall linux_open("/etc/ld.so.cache",0,05001460044) returns 4 (0x4) syscall linux_newfstat(4,0xbfbff6c4) returns 0 (0x0) syscall linux_mmap(0xbfbff700) returns 671510528 (0x28067000) syscall close(4) returns 0 (0x0) syscall linux_open("/lib/libc.so.6",0,05001460044) returns 4 (0x4) syscall linux_newfstat(4,0xbfbff620) returns 0 (0x0) syscall read(0x4,0xbfbfe674,0x1000) returns 4096 (0x1000) syscall linux_mmap(0xbfbfe5e4) returns 671518720 (0x28069000) syscall mprotect(0x28154000,0x78dc,0x0) returns 0 (0x0) syscall linux_mmap(0xbfbfe5e4) returns 672481280 (0x28154000) syscall linux_mmap(0xbfbfe5e4) returns 672497664 (0x28158000) syscall close(4) returns 0 (0x0) syscall mprotect(0x28069000,0xeb000,0x3) returns 0 (0x0) syscall mprotect(0x28069000,0xeb000,0x5) returns 0 (0x0) syscall munmap(0x28067000,0x1509) returns 0 (0x0) syscall linux_personality(0x0) returns 0 (0x0) syscall getpid() returns 219 (0xdb) syscall linux_brk(0x0) returns 134565888 (0x8055000) syscall linux_brk(0x80551a0) returns 134566304 (0x80551a0) syscall linux_brk(0x8056000) returns 134569984 (0x8056000) syscall linux_time(0x0) returns 962587506 (0x395feb72) syscall linux_ioctl(0x1,0x5401,0xbfbffc24) returns 0 (0x0) syscall linux_ioctl(0x1,0x5413,0xbfbffcb0) returns 0 (0x0) syscall linux_brk(0x8059000) returns 134582272 (0x8059000) syscall linux_open("/dev/null",67584,01001277560) returns 4 (0x4) syscall close(4) returns 0 (0x0) syscall linux_newstat(".",0xbfbffbd0) returns 0 (0x0) syscall linux_open(".",67584,01001277560) returns 4 (0x4) syscall linux_newfstat(4,0xbfbffbd0) returns 0 (0x0) syscall linux_fcntl(0x4,0x2,0x1) returns 0 (0x0) syscall linux_getdents(0x4,0xbfbffb54,0xdf) returns 216 (0xd8) syscall linux_lseek(0x4,0x88,0x0) returns 136 (0x88) syscall linux_getdents(0x4,0xbfbffb54,0xdf) returns 208 (0xd0) syscall linux_lseek(0x4,0x120,0x0) returns 288 (0x120) syscall linux_getdents(0x4,0xbfbffb54,0xdf) returns 204 (0xcc) syscall linux_lseek(0x4,0x1b8,0x0) returns 440 (0x1b8) syscall linux_getdents(0x4,0xbfbffb54,0xdf) returns 116 (0x74) syscall linux_getdents(0x4,0xbfbffb54,0xdf) returns 0 (0x0) syscall close(4) returns 0 (0x0) syscall linux_brk(0x805a000) returns 134586368 (0x805a000) syscall linux_newfstat(1,0xbfbfda40) returns 0 (0x0) syscall linux_mmap(0xbfbfda90) returns 671510528 (0x28067000) syscall linux_ioctl(0x1,0x5401,0xbfbfda28) returns 0 (0x0) syscall write(1,0x28067000,52) returns 52 (0x34) syscall write(1,0x28067000,67) returns 67 (0x43) syscall write(1,0x28067000,47) returns 47 (0x2f) syscall write(1,0x28067000,44) returns 44 (0x2c) syscall close(1) returns 0 (0x0) syscall munmap(0x28067000,0x2000) returns 0 (0x0) syscall exit(0x0) process exit, rval = 0 And here's the output from ./ls, but /mnt/bin actually has 89 files. @^ chmod dd gawk ln mknod rm sync awk chown df gawk-3.0.4 loadkeys mktemp rmdir touch bash consolechars egrep grep ls mv sed chgrp cp fgrep igawk mkdir ps sh And here's the contents of the directory. % hd /mnt/bin 00000000 21 5e 00 00 0c 00 01 00 2e 00 00 00 02 00 00 00 |!^..............| 00000010 0c 00 02 00 2e 2e 00 00 23 5e 00 00 10 00 06 00 |........#^......| 00000020 6d 6b 74 65 6d 70 00 00 24 5e 00 00 0c 00 04 00 |mktemp..$^......| 00000030 62 61 73 68 25 5e 00 00 0c 00 02 00 73 68 00 00 |bash%^......sh..| 00000040 26 5e 00 00 0c 00 03 00 61 77 6b 00 27 5e 00 00 |&^......awk.'^..| 00000050 14 00 0a 00 67 61 77 6b 2d 33 2e 30 2e 34 00 00 |....gawk-3.0.4..| 00000060 27 5e 00 00 0c 00 04 00 67 61 77 6b 28 5e 00 00 |'^......gawk(^..| 00000070 10 00 05 00 69 67 61 77 6b 00 00 00 29 5e 00 00 |....igawk...)^..| 00000080 0c 00 03 00 73 65 64 00 2a 5e 00 00 10 00 05 00 |....sed.*^......| 00000090 63 68 67 72 70 00 00 00 2b 5e 00 00 10 00 05 00 |chgrp...+^......| 000000a0 63 68 6d 6f 64 00 00 00 2c 5e 00 00 10 00 05 00 |chmod...,^......| 000000b0 63 68 6f 77 6e 00 00 00 2d 5e 00 00 0c 00 02 00 |chown...-^......| 000000c0 63 70 00 00 2e 5e 00 00 0c 00 02 00 64 64 00 00 |cp...^......dd..| 000000d0 2f 5e 00 00 0c 00 02 00 64 66 00 00 30 5e 00 00 |/^......df..0^..| 000000e0 0c 00 02 00 6c 6e 00 00 31 5e 00 00 0c 00 02 00 |....ln..1^......| 000000f0 6c 73 00 00 32 5e 00 00 10 00 05 00 6d 6b 64 69 |ls..2^......mkdi| 00000100 72 00 00 00 33 5e 00 00 10 00 05 00 6d 6b 6e 6f |r...3^......mkno| 00000110 64 00 00 00 34 5e 00 00 0c 00 02 00 6d 76 00 00 |d...4^......mv..| 00000120 35 5e 00 00 0c 00 02 00 72 6d 00 00 36 5e 00 00 |5^......rm..6^..| 00000130 10 00 05 00 72 6d 64 69 72 00 00 00 37 5e 00 00 |....rmdir...7^..| 00000140 0c 00 04 00 73 79 6e 63 38 5e 00 00 10 00 05 00 |....sync8^......| 00000150 74 6f 75 63 68 00 00 00 39 5e 00 00 14 00 0c 00 |touch...9^......| 00000160 63 6f 6e 73 6f 6c 65 63 68 61 72 73 3a 5e 00 00 |consolechars:^..| 00000170 10 00 08 00 6c 6f 61 64 6b 65 79 73 3b 5e 00 00 |....loadkeys;^..| 00000180 0c 00 02 00 70 73 00 00 3c 5e 00 00 10 00 05 00 |....ps..<^......| 00000190 65 67 72 65 70 00 00 00 3d 5e 00 00 10 00 05 00 |egrep...=^......| 000001a0 66 67 72 65 70 00 00 00 3e 5e 00 00 0c 00 04 00 |fgrep...>^......| 000001b0 67 72 65 70 3f 5e 00 00 0c 00 03 00 63 73 68 00 |grep?^......csh.| 000001c0 40 5e 00 00 0c 00 04 00 74 63 73 68 41 5e 00 00 |@^......tcshA^..| 000001d0 10 00 06 00 64 6f 65 78 65 63 00 00 42 5e 00 00 |....doexec..B^..| 000001e0 10 00 06 00 69 70 63 61 6c 63 00 00 43 5e 00 00 |....ipcalc..C^..| 000001f0 10 00 06 00 75 73 6c 65 65 70 00 00 44 5e 00 00 |....usleep..D^..| 00000200 0c 00 03 00 61 73 68 00 45 5e 00 00 14 00 0a 00 |....ash.E^......| 00000210 61 73 68 2e 73 74 61 74 69 63 00 00 46 5e 00 00 |ash.static..F^..| 00000220 0c 00 03 00 62 73 68 00 47 5e 00 00 0c 00 04 00 |....bsh.G^......| 00000230 63 70 69 6f 48 5e 00 00 0c 00 03 00 63 61 74 00 |cpioH^......cat.| 00000240 49 5e 00 00 0c 00 04 00 73 6f 72 74 4a 5e 00 00 |I^......sortJ^..| 00000250 0c 00 02 00 65 64 00 00 4b 5e 00 00 0c 00 03 00 |....ed..K^......| 00000260 72 65 64 00 4c 5e 00 00 0c 00 04 00 7a 63 61 74 |red.L^......zcat| 00000270 4c 5e 00 00 10 00 06 00 67 75 6e 7a 69 70 00 00 |L^......gunzip..| 00000280 4c 5e 00 00 0c 00 04 00 67 7a 69 70 4d 5e 00 00 |L^......gzipM^..| 00000290 10 00 08 00 62 61 73 65 6e 61 6d 65 4e 5e 00 00 |....basenameN^..| 000002a0 0c 00 04 00 64 61 74 65 4f 5e 00 00 0c 00 04 00 |....dateO^......| 000002b0 65 63 68 6f 50 5e 00 00 10 00 05 00 66 61 6c 73 |echoP^......fals| 000002c0 65 00 00 00 51 5e 00 00 0c 00 04 00 6e 69 63 65 |e...Q^......nice| 000002d0 52 5e 00 00 0c 00 03 00 70 77 64 00 53 5e 00 00 |R^......pwd.S^..| 000002e0 10 00 05 00 73 6c 65 65 70 00 00 00 54 5e 00 00 |....sleep...T^..| 000002f0 0c 00 04 00 73 74 74 79 55 5e 00 00 0c 00 02 00 |....sttyU^......| 00000300 73 75 00 00 56 5e 00 00 0c 00 04 00 74 72 75 65 |su..V^......true| 00000310 57 5e 00 00 10 00 05 00 75 6e 61 6d 65 00 00 00 |W^......uname...| 00000320 58 5e 00 00 10 00 06 00 66 73 63 6f 6e 66 00 00 |X^......fsconf..| 00000330 59 5e 00 00 14 00 09 00 6c 69 6e 75 78 63 6f 6e |Y^......linuxcon| 00000340 66 00 00 00 5a 5e 00 00 10 00 07 00 6c 70 64 63 |f...Z^......lpdc| 00000350 6f 6e 66 00 5b 5e 00 00 10 00 07 00 6e 65 74 63 |onf.[^......netc| 00000360 6f 6e 66 00 5c 5e 00 00 10 00 08 00 72 65 6d 61 |onf.\^......rema| 00000370 64 6d 69 6e 5d 5e 00 00 10 00 08 00 75 73 65 72 |dmin]^......user| 00000380 63 6f 6e 66 5e 5e 00 00 10 00 05 00 78 63 6f 6e |conf^^......xcon| 00000390 66 00 00 00 5f 5e 00 00 0c 00 04 00 6d 61 69 6c |f..._^......mail| 000003a0 60 5e 00 00 10 00 05 00 6d 6f 75 6e 74 00 00 00 |`^......mount...| 000003b0 61 5e 00 00 10 00 06 00 75 6d 6f 75 6e 74 00 00 |a^......umount..| 000003c0 62 5e 00 00 0c 00 02 00 6d 74 00 00 63 5e 00 00 |b^......mt..c^..| 000003d0 18 00 0d 00 64 6e 73 64 6f 6d 61 69 6e 6e 61 6d |....dnsdomainnam| 000003e0 65 00 00 00 64 5e 00 00 1c 00 0a 00 64 6f 6d 61 |e...d^......doma| 000003f0 69 6e 6e 61 6d 65 00 00 00 00 00 00 00 00 00 00 |inname..........| 00000400 65 5e 00 00 10 00 08 00 68 6f 73 74 6e 61 6d 65 |e^......hostname| 00000410 66 5e 00 00 10 00 07 00 6e 65 74 73 74 61 74 00 |f^......netstat.| 00000420 67 5e 00 00 18 00 0d 00 6e 69 73 64 6f 6d 61 69 |g^......nisdomai| 00000430 6e 6e 61 6d 65 00 00 00 68 5e 00 00 14 00 0c 00 |nname...h^......| 00000440 79 70 64 6f 6d 61 69 6e 6e 61 6d 65 69 5e 00 00 |ypdomainnamei^..| 00000450 0c 00 04 00 70 69 6e 67 6a 5e 00 00 0c 00 03 00 |....pingj^......| 00000460 72 70 6d 00 6b 5e 00 00 14 00 09 00 73 65 74 73 |rpm.k^......sets| 00000470 65 72 69 61 6c 00 00 00 6c 5e 00 00 0c 00 04 00 |erial...l^......| 00000480 67 74 61 72 6d 5e 00 00 0c 00 03 00 74 61 72 00 |gtarm^......tar.| 00000490 6e 5e 00 00 0c 00 04 00 61 72 63 68 6f 5e 00 00 |n^......archo^..| 000004a0 10 00 05 00 64 6d 65 73 67 00 00 00 70 5e 00 00 |....dmesg...p^..| 000004b0 0c 00 04 00 6b 69 6c 6c 71 5e 00 00 10 00 05 00 |....killq^......| 000004c0 6c 6f 67 69 6e 00 00 00 72 5e 00 00 0c 00 04 00 |login...r^......| 000004d0 6d 6f 72 65 73 5e 00 00 10 00 08 00 76 69 6d 74 |mores^......vimt| 000004e0 75 74 6f 72 74 5e 00 00 0c 00 02 00 65 78 00 00 |utort^......ex..| 000004f0 75 5e 00 00 0c 00 03 00 72 76 69 00 76 5e 00 00 |u^......rvi.v^..| 00000500 10 00 05 00 72 76 69 65 77 00 00 00 77 5e 00 00 |....rview...w^..| 00000510 0c 00 02 00 76 69 00 00 78 5e 00 00 e8 02 04 00 |....vi..x^......| 00000520 76 69 65 77 79 5e 00 00 dc 02 03 00 6c 73 32 00 |viewy^......ls2.| 00000530 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00000800 Sorry if this is more output than you asked for. --Mark To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message