From owner-freebsd-bugs@FreeBSD.ORG Fri Jul 13 07:30:03 2012 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9AC27106566B for ; Fri, 13 Jul 2012 07:30:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 53FE28FC0C for ; Fri, 13 Jul 2012 07:30:03 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q6D7U3QE032949 for ; Fri, 13 Jul 2012 07:30:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q6D7U3a8032945; Fri, 13 Jul 2012 07:30:03 GMT (envelope-from gnats) Resent-Date: Fri, 13 Jul 2012 07:30:03 GMT Resent-Message-Id: <201207130730.q6D7U3a8032945@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Richard Yao Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0E19B1065672 for ; Fri, 13 Jul 2012 07:25:12 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id ED7738FC12 for ; Fri, 13 Jul 2012 07:25:11 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q6D7PBOk047394 for ; Fri, 13 Jul 2012 07:25:11 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id q6D7PBXp047385; Fri, 13 Jul 2012 07:25:11 GMT (envelope-from nobody) Message-Id: <201207130725.q6D7PBXp047385@red.freebsd.org> Date: Fri, 13 Jul 2012 07:25:11 GMT From: Richard Yao To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: kern/169814: ptrace is broken in Linux emulation X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jul 2012 07:30:03 -0000 >Number: 169814 >Category: kern >Synopsis: ptrace is broken in Linux emulation >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Jul 13 07:30:02 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Richard Yao >Release: FreeBSD 9.0-RELEASE >Organization: Gentoo >Environment: Linux linux 2.6.16 FreeBSD Gentoo 9.0-r3 #0: Sun May 27 20:29:34 EDT 2012 i686 AMD Phenom(tm) II X6 1090T Processor AuthenticAMD GNU/Linux >Description: ptrace is broken, which causes sys-libs/glibc to fail to build in a Gentoo Linux jail under Linux emulation: http://bpaste.net/show/34782/ This issue can also be demonstrated using strace: # strace echo Hello World strace: test_ptrace_setoptions_for_all: PTRACE_TRACEME doesn't work: Function not implemented strace: test_ptrace_setoptions_for_all: unexpected exit status 1 >How-To-Repeat: mkdir /mnt/linux wget ftp://gentoo.osuosl.org/pub/gentoo/releases/amd64/current-stage3/*.tar.bz2 -O - | tar -x -C /mnt/linux cp /etc/resolv.conf /mnt/linux/etc/resolv.conf mount -t linprocfs none /mnt/linux/proc mount -t linsysfs none /mnt/linux/sys mount -t devfs none /mnt/linux/dev mount -t fdescfs none /mnt/linux/dev/fd chroot /mnt/linux /bin/bash env-update source /etc/profile export PS1="(chroot) $PS1" cd emerge-webrsync ln -sf /bin/busybox /bin/tar ln -sf /bin/busybox /bin/rm ln -sf /bin/busybox /usr/bin/touch # And finally: emerge strace strace echo Hello World # Alternatively, rebuild glibc: emerge --oneshot sys-libs/glibc >Fix: There is no known fix or workaround. >Release-Note: >Audit-Trail: >Unformatted: