DragonFly bugs List (threaded) for 2003-11
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Re: panic truss'ing linux ls
Linux has added, among other things, a new exit system call,
"group_exit". It tells an entire thread group to exit. I don't
believe we really support Linux's thread semantics correctly,
so I've mapped it, for the moment, to sys_exit. This allows
ls and everything else to work without dumping core. I don't know
what the ramifications of NPTL will be on Linux compatibility.
truss will still dump core when run against a linux binary, I haven't
I haven't waited for build world to complete to see if it will fix
itself. Compiling truss in its own directory fails painfully.
Linux seems to be using PAM pretty heavily these days to work around
the cripple root/everyone else security model. Is this something worth
importing for compatibility purposes?
-Kip
On Sat, 1 Nov 2003 qhwt@xxxxxxxxxxxxx wrote:
> Hello.
>
> How to reproduce:
>
> - install linux_base-8-8.0_1 from ports
> - mount /proc, because truss needs it
> - truss /compat/linux/bin/ls -l
>
> `/compat/linux/bin/ls -l' without truss dies with signal 12, not a panic. Maybe
> truss'ing on a linux process is not a good thing?
>
> Traceback:
>
> Script started on Sat Nov 1 01:48:09 2003
> GNU gdb 4.18 (FreeBSD)
> Copyright 1998 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB. Type "show warranty" for details.
> This GDB was configured as "i386-unknown-freebsd"...Deprecated bfd_read called at /home/source/dragonfly/src/gnu/usr.bin/binutils/gdb/../../../../contrib/gdb/gdb/dbxread.c line 2627 in elfstab_build_psymtabs
> Deprecated bfd_read called at /home/source/dragonfly/src/gnu/usr.bin/binutils/gdb/../../../../contrib/gdb/gdb/dbxread.c line 933 in fill_symbuf
>
> 1 cpu [ff800000,32768]
> IdlePTD at phsyical address 0x00452000
> PCB EIP=c018a3fe ESP=ce601864 EBP=ce601870
> initial pcb at physical address 0x002b8f00
> panicstr: page fault
> panic messages:
> ---
> dmesg: kvm_read:
> ---
>
> cannot read proc pointer at c0ed51f0
>
> (kgdb) bt
> #0 dumpsys () at /home/source/dragonfly/src/sys/kern/kern_shutdown.c:499
> #1 0xc018a1ec in boot (howto=256) at /home/source/dragonfly/src/sys/kern/kern_shutdown.c:332
> #2 0xc018a630 in poweroff_wait (junk=0xc02892aa, howto=-1071084402)
> at /home/source/dragonfly/src/sys/kern/kern_shutdown.c:611
> #3 0xc0237603 in trap_fatal (frame=0xce601938, eva=120)
> at /home/source/dragonfly/src/sys/i386/i386/trap.c:1116
> #4 0xc0237209 in trap_pfault (frame=0xce601938, usermode=0, eva=120)
> at /home/source/dragonfly/src/sys/i386/i386/trap.c:1005
> #5 0xc0236ea0 in trap (frame={tf_fs = -841744360, tf_es = -832569328, tf_ds = -841678832,
> tf_edi = -832562668, tf_esi = 3, tf_ebp = -832562808, tf_isp = -832562844,
> tf_ebx = -836177984, tf_edx = 0, tf_ecx = -837513336, tf_eax = 0, tf_trapno = 12,
> tf_err = 0, tf_eip = -1072214485, tf_cs = 8, tf_eflags = 66182, tf_esp = 0,
> tf_ss = -837517312}) at /home/source/dragonfly/src/sys/i386/i386/trap.c:594
> #6 0xc0174e2b in elf_putfiles (p=0xcdd5fc40, dst=0xce148000, off=0xce601a14)
> at /home/source/dragonfly/src/sys/kern/imgact_elf.c:1256
> #7 0xc0174bb3 in elf_puthdr (p=0xcdd5fc40, dst=0xce148000, off=0xce601a14, status=0xc7c91d10,
> fpregset=0xc7c91d78, psinfo=0xc7c91e28, numsegs=10)
> at /home/source/dragonfly/src/sys/kern/imgact_elf.c:1124
> #8 0xc0174aef in elf_corehdr (p=0xcdd5fc40, fp=0xc0ee5910, cred=0xc1087f20, numsegs=10,
> hdr=0xce148000, hdrsize=8192) at /home/source/dragonfly/src/sys/kern/imgact_elf.c:1084
> #9 0xc01747b5 in generic_elf_coredump (p=0xcdd5fc40, fp=0xc0ee5910, limit=9223372036854775807)
> at /home/source/dragonfly/src/sys/kern/imgact_elf.c:866
> #10 0xc01746a1 in elf_coredump (p=0xcdd5fc40, vp=0xce440e40, limit=9223372036854775807)
> at /home/source/dragonfly/src/sys/kern/imgact_elf.c:817
> #11 0xc018c4e7 in coredump (p=0xcdd5fc40) at /home/source/dragonfly/src/sys/kern/kern_sig.c:1475
> #12 0xc018bf22 in sigexit (p=0xcdd5fc40, sig=12)
> at /home/source/dragonfly/src/sys/kern/kern_sig.c:1306
> #13 0xc018bcc0 in postsig (sig=12) at /home/source/dragonfly/src/sys/kern/kern_sig.c:1222
> #14 0xc0236a0b in userret (p=0xcdd5fc40, frame=0xce601d48, oticks=0)
> at /home/source/dragonfly/src/sys/i386/i386/trap.c:278
> #15 0xc0237a1a in syscall2 (frame={tf_fs = 47, tf_es = 47, tf_ds = 47, tf_edi = 0, tf_esi = 0,
> tf_ebp = -1077937008, tf_isp = -832561804, tf_ebx = 134567056, tf_edx = 1143, tf_ecx = 11,
> tf_eax = 0, tf_trapno = 7, tf_err = 2, tf_eip = 671798508, tf_cs = 31, tf_eflags = 658,
> tf_esp = -1077937100, tf_ss = 47}) at /home/source/dragonfly/src/sys/i386/i386/trap.c:1370
> #16 0xc0229b6a in Xint0x80_syscall ()
> cannot read proc at 0
> (kgdb) fram 6
> #6 0xc0174e2b in elf_putfiles (p=0xcdd5fc40, dst=0xce148000, off=0xce601a14)
> at /home/source/dragonfly/src/sys/kern/imgact_elf.c:1256
> 1256 cfi->cfi_fh.fh_fsid = vp->v_mount->mnt_stat.f_fsid;
> (kgdb) list
> 1251 cfi = (struct ckpt_fileinfo *)((char *)dst + *off);
> 1252 cfi->cfi_index = i;
> 1253 cfi->cfi_flags = fp->f_flag;
> 1254 cfi->cfi_offset = fp->f_offset;
> 1255 vp = (struct vnode *)fp->f_data;
> 1256 cfi->cfi_fh.fh_fsid = vp->v_mount->mnt_stat.f_fsid;
> 1257 error = VFS_VPTOFH(vp, &cfi->cfi_fh.fh_fid);
> 1258 }
> 1259 *off += sizeof(struct ckpt_fileinfo);
> 1260 }
>
> (kgdb) info locals
> off = (int *) 0xce601a14
> i = 3
> cfh = (struct ckpt_filehdr *) 0xce148f60
> cfi = (struct ckpt_fileinfo *) 0x0
> fp = (struct file *) 0x0
> vp = (struct vnode *) 0x0
> (kgdb) up
> #7 0xc0174bb3 in elf_puthdr (p=0xcdd5fc40, dst=0xce148000, off=0xce601a14, status=0xc7c91d10,
> fpregset=0xc7c91d78, psinfo=0xc7c91e28, numsegs=10)
> at /home/source/dragonfly/src/sys/kern/imgact_elf.c:1124
> 1124 elf_putfiles(p, dst, off);
> (kgdb) fram 5
> #5 0xc0236ea0 in trap (frame={tf_fs = -841744360, tf_es = -832569328, tf_ds = -841678832,
> tf_edi = -832562668, tf_esi = 3, tf_ebp = -832562808, tf_isp = -832562844,
> tf_ebx = -836177984, tf_edx = 0, tf_ecx = -837513336, tf_eax = 0, tf_trapno = 12,
> tf_err = 0, tf_eip = -1072214485, tf_cs = 8, tf_eflags = 66182, tf_esp = 0,
> tf_ss = -837517312}) at /home/source/dragonfly/src/sys/i386/i386/trap.c:594
> 594 (void) trap_pfault(&frame, FALSE, eva);
> (kgdb)
> Script done on Sat Nov 1 01:49:10 2003
>
> $ uname -a
> FreeBSD gzl.local 4.8-STABLE FreeBSD 4.8-STABLE #0: Tue Oct 28 11:11:25 JST 2003 dragonfly@xxxxxxxxx:/usr/obj/home/source/dragonfly/src/sys/GZL i386
>
> Regards.
>
Index: sys/emulation/linux/i386/linux_proto.h
===================================================================
RCS file: /home/dcvs/src/sys/emulation/linux/i386/linux_proto.h,v
retrieving revision 1.10
diff -a -u -B -b -r1.10 linux_proto.h
--- sys/emulation/linux/i386/linux_proto.h 21 Oct 2003 01:05:09 -0000 1.10
+++ sys/emulation/linux/i386/linux_proto.h 9 Nov 2003 20:41:42 -0000
@@ -2,8 +2,8 @@
* System call prototypes.
*
* DO NOT EDIT-- this file is automatically generated.
- * $DragonFly: src/sys/emulation/linux/i386/linux_proto.h,v 1.10 2003/10/21 01:05:09 daver Exp $
- * created from DragonFly: src/sys/emulation/linux/i386/syscalls.master,v 1.3 2003/08/07 21:17:18 dillon Exp
+ * $DragonFly$
+ * created from DragonFly: src/sys/emulation/linux/i386/syscalls.master,v 1.4 2003/10/21 01:05:09 daver Exp
*/
#ifndef _LINUX_SYSPROTO_H_
Index: sys/emulation/linux/i386/linux_syscall.h
===================================================================
RCS file: /home/dcvs/src/sys/emulation/linux/i386/linux_syscall.h,v
retrieving revision 1.10
diff -a -u -B -b -r1.10 linux_syscall.h
--- sys/emulation/linux/i386/linux_syscall.h 21 Oct 2003 01:05:09 -0000 1.10
+++ sys/emulation/linux/i386/linux_syscall.h 9 Nov 2003 20:41:42 -0000
@@ -2,8 +2,8 @@
* System call numbers.
*
* DO NOT EDIT-- this file is automatically generated.
- * $DragonFly: src/sys/emulation/linux/i386/linux_syscall.h,v 1.10 2003/10/21 01:05:09 daver Exp $
- * created from DragonFly: src/sys/emulation/linux/i386/syscalls.master,v 1.3 2003/08/07 21:17:18 dillon Exp
+ * $DragonFly$
+ * created from DragonFly: src/sys/emulation/linux/i386/syscalls.master,v 1.4 2003/10/21 01:05:09 daver Exp
*/
#define LINUX_SYS_exit 1
@@ -213,4 +213,5 @@
#define LINUX_SYS_linux_madvise 219
#define LINUX_SYS_linux_getdents64 220
#define LINUX_SYS_linux_fcntl64 221
-#define LINUX_SYS_MAXSYSCALL 222
+#define LINUX_SYS_sys_exit 252
+#define LINUX_SYS_MAXSYSCALL 253
Index: sys/emulation/linux/i386/linux_sysent.c
===================================================================
RCS file: /home/dcvs/src/sys/emulation/linux/i386/linux_sysent.c,v
retrieving revision 1.10
diff -a -u -B -b -r1.10 linux_sysent.c
--- sys/emulation/linux/i386/linux_sysent.c 21 Oct 2003 01:05:09 -0000 1.10
+++ sys/emulation/linux/i386/linux_sysent.c 9 Nov 2003 20:41:42 -0000
@@ -2,8 +2,8 @@
* System call switch table.
*
* DO NOT EDIT-- this file is automatically generated.
- * $DragonFly: src/sys/emulation/linux/i386/linux_sysent.c,v 1.10 2003/10/21 01:05:09 daver Exp $
- * created from DragonFly: src/sys/emulation/linux/i386/syscalls.master,v 1.3 2003/08/07 21:17:18 dillon Exp
+ * $DragonFly$
+ * created from DragonFly: src/sys/emulation/linux/i386/syscalls.master,v 1.4 2003/10/21 01:05:09 daver Exp
*/
#include "opt_compat.h"
@@ -239,4 +239,35 @@
{ 0, (sy_call_t *)linux_madvise }, /* 219 = linux_madvise */
{ AS(linux_getdents64_args), (sy_call_t *)linux_getdents64 }, /* 220 = linux_getdents64 */
{ AS(linux_fcntl64_args), (sy_call_t *)linux_fcntl64 }, /* 221 = linux_fcntl64 */
+ { 0, (sy_call_t *)nosys }, /* 222 = none */
+ { 0, (sy_call_t *)nosys }, /* 223 = security */
+ { 0, (sy_call_t *)nosys }, /* 224 = gettid */
+ { 0, (sy_call_t *)nosys }, /* 225 = readahead */
+ { 0, (sy_call_t *)nosys }, /* 226 = setxattr */
+ { 0, (sy_call_t *)nosys }, /* 227 = lsetxattr */
+ { 0, (sy_call_t *)nosys }, /* 228 = fsetxattr */
+ { 0, (sy_call_t *)nosys }, /* 229 = getxattr */
+ { 0, (sy_call_t *)nosys }, /* 230 = lgetxattr */
+ { 0, (sy_call_t *)nosys }, /* 231 = fgetxattr */
+ { 0, (sy_call_t *)nosys }, /* 232 = listxattr */
+ { 0, (sy_call_t *)nosys }, /* 233 = llistxattr */
+ { 0, (sy_call_t *)nosys }, /* 234 = flistxattr */
+ { 0, (sy_call_t *)nosys }, /* 235 = removexattr */
+ { 0, (sy_call_t *)nosys }, /* 236 = lremovexattr */
+ { 0, (sy_call_t *)nosys }, /* 237 = fremovexattr */
+ { 0, (sy_call_t *)nosys }, /* 238 = tkill */
+ { 0, (sy_call_t *)nosys }, /* 239 = sendfile64 */
+ { 0, (sy_call_t *)nosys }, /* 240 = futex */
+ { 0, (sy_call_t *)nosys }, /* 241 = sched_setaffinity */
+ { 0, (sy_call_t *)nosys }, /* 242 = sched_getaffinity */
+ { 0, (sy_call_t *)nosys }, /* 243 = set_thread_area */
+ { 0, (sy_call_t *)nosys }, /* 244 = get_thread_area */
+ { 0, (sy_call_t *)nosys }, /* 245 = io_setup */
+ { 0, (sy_call_t *)nosys }, /* 246 = io_destroy */
+ { 0, (sy_call_t *)nosys }, /* 247 = io_getevents */
+ { 0, (sy_call_t *)nosys }, /* 248 = io_submit */
+ { 0, (sy_call_t *)nosys }, /* 249 = io_cancel */
+ { 0, (sy_call_t *)nosys }, /* 250 = alloc_hugepages */
+ { 0, (sy_call_t *)nosys }, /* 251 = free_hugepages */
+ { AS(sys_exit_args), (sy_call_t *)sys_exit }, /* 252 = sys_exit */
};
Index: sys/emulation/linux/i386/linux_union.h
===================================================================
RCS file: /home/dcvs/src/sys/emulation/linux/i386/linux_union.h,v
retrieving revision 1.6
diff -a -u -B -b -r1.6 linux_union.h
--- sys/emulation/linux/i386/linux_union.h 21 Oct 2003 01:05:09 -0000 1.6
+++ sys/emulation/linux/i386/linux_union.h 9 Nov 2003 20:41:42 -0000
@@ -2,8 +2,8 @@
* Union of syscall args for messaging.
*
* DO NOT EDIT-- this file is automatically generated.
- * $DragonFly: src/sys/emulation/linux/i386/linux_union.h,v 1.6 2003/10/21 01:05:09 daver Exp $
- * created from DragonFly: src/sys/emulation/linux/i386/syscalls.master,v 1.3 2003/08/07 21:17:18 dillon Exp
+ * $DragonFly$
+ * created from DragonFly: src/sys/emulation/linux/i386/syscalls.master,v 1.4 2003/10/21 01:05:09 daver Exp
*/
union sysunion {
Index: sys/emulation/linux/i386/syscalls.master
===================================================================
RCS file: /home/dcvs/src/sys/emulation/linux/i386/syscalls.master,v
retrieving revision 1.4
diff -a -u -B -b -r1.4 syscalls.master
--- sys/emulation/linux/i386/syscalls.master 21 Oct 2003 01:05:09 -0000 1.4
+++ sys/emulation/linux/i386/syscalls.master 9 Nov 2003 20:55:50 -0000
@@ -339,3 +339,34 @@
l_uint count); }
221 STD LINUX { int linux_fcntl64(l_uint fd, l_uint cmd, \
l_ulong arg); }
+222 UNIMPL LINUX none
+223 UNIMPL LINUX security
+224 UNIMPL LINUX gettid
+225 UNIMPL LINUX readahead
+226 UNIMPL LINUX setxattr
+227 UNIMPL LINUX lsetxattr
+228 UNIMPL LINUX fsetxattr
+229 UNIMPL LINUX getxattr
+230 UNIMPL LINUX lgetxattr
+231 UNIMPL LINUX fgetxattr
+232 UNIMPL LINUX listxattr
+233 UNIMPL LINUX llistxattr
+234 UNIMPL LINUX flistxattr
+235 UNIMPL LINUX removexattr
+236 UNIMPL LINUX lremovexattr
+237 UNIMPL LINUX fremovexattr
+238 UNIMPL LINUX tkill
+239 UNIMPL LINUX sendfile64
+240 UNIMPL LINUX futex
+241 UNIMPL LINUX sched_setaffinity
+242 UNIMPL LINUX sched_getaffinity
+243 UNIMPL LINUX set_thread_area
+244 UNIMPL LINUX get_thread_area
+245 UNIMPL LINUX io_setup
+246 UNIMPL LINUX io_destroy
+247 UNIMPL LINUX io_getevents
+248 UNIMPL LINUX io_submit
+249 UNIMPL LINUX io_cancel
+250 UNIMPL LINUX alloc_hugepages
+251 UNIMPL LINUX free_hugepages
+252 NOPROTO LINUX { void sys_exit(struct sys_exit_args *uap); }
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]