From owner-freebsd-bugs@FreeBSD.ORG Sat May 21 11:20:08 2011 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 BB6041065675 for ; Sat, 21 May 2011 11:20:08 +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 7E5C38FC1C for ; Sat, 21 May 2011 11:20:08 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p4LBK8vj001993 for ; Sat, 21 May 2011 11:20:08 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p4LBK8TE001992; Sat, 21 May 2011 11:20:08 GMT (envelope-from gnats) Resent-Date: Sat, 21 May 2011 11:20:08 GMT Resent-Message-Id: <201105211120.p4LBK8TE001992@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, Patrick Lamaiziere Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA76E106566B for ; Sat, 21 May 2011 11:18:00 +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 A9D1A8FC14 for ; Sat, 21 May 2011 11:18:00 +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 p4LBI0Yg037179 for ; Sat, 21 May 2011 11:18:00 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id p4LBI08x037178; Sat, 21 May 2011 11:18:00 GMT (envelope-from nobody) Message-Id: <201105211118.p4LBI08x037178@red.freebsd.org> Date: Sat, 21 May 2011 11:18:00 GMT From: Patrick Lamaiziere To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: kern/157234: //proc/curproc/file returns "unknown" with a binary called via a nullfs mountpoint 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: Sat, 21 May 2011 11:20:08 -0000 >Number: 157234 >Category: kern >Synopsis: //proc/curproc/file returns "unknown" with a binary called via a nullfs mountpoint >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: Sat May 21 11:20:08 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Patrick Lamaiziere >Release: 8.2-STABLE / i386 >Organization: >Environment: FreeBSD roxette.lamaiziere.net 8.2-STABLE FreeBSD 8.2-STABLE #0: Fri May 20 19:12:02 CEST 2011 root@roxette:/usr/obj/usr/src/sys/GENERIC i386 >Description: Hello, I use a nullfs mount /journal/usrlocal in /usr/local : mount: /dev/ada0s2e.journal on /journal (ufs, asynchronous, local, gjournal) procfs on /proc (procfs, local) /journal/usrlocal on /usr/local (nullfs, local) /proc/curproc/file returns "unknown" with a binary called via a nullfs mountpoint, but not if called directly. test program (test.c) #include #include #include main() { ssize_t n = 0; char link[1024]; n = readlink("/proc/curproc/file", link, 1024); if (n == -1) { printf("error : %d\n", errno); } else { printf("file = %s\n", link); } } build and copy "test" binary into /usr/local/bin $ /journal/usrlocal/bin/test file = /journal/usrlocal/bin/test $ /usr/local/bin/test file = unknown This prevents me to run java (it uses curproc file to find where are its libraries) Thanks, regards. >How-To-Repeat: See above >Fix: >Release-Note: >Audit-Trail: >Unformatted: