Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Jul 2012 07:25:11 GMT
From:      Richard Yao <ryao@gentoo.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/169814: ptrace is broken in Linux emulation
Message-ID:  <201207130725.q6D7PBXp047385@red.freebsd.org>
Resent-Message-ID: <201207130730.q6D7U3a8032945@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201207130725.q6D7PBXp047385>