From owner-freebsd-i386@FreeBSD.ORG Wed Feb 15 16:40:05 2006 Return-Path: X-Original-To: freebsd-i386@hub.freebsd.org Delivered-To: freebsd-i386@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0C27016A420 for ; Wed, 15 Feb 2006 16:40:05 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8122143D49 for ; Wed, 15 Feb 2006 16:40:04 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k1FGe43N043793 for ; Wed, 15 Feb 2006 16:40:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k1FGe4oo043791; Wed, 15 Feb 2006 16:40:04 GMT (envelope-from gnats) Resent-Date: Wed, 15 Feb 2006 16:40:04 GMT Resent-Message-Id: <200602151640.k1FGe4oo043791@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-i386@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Fabien THOMAS Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8325616A45C for ; Wed, 15 Feb 2006 16:38:14 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5120543D49 for ; Wed, 15 Feb 2006 16:38:14 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k1FGcDC5071408 for ; Wed, 15 Feb 2006 16:38:14 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id k1FGcDI2071407; Wed, 15 Feb 2006 16:38:13 GMT (envelope-from nobody) Message-Id: <200602151638.k1FGcDI2071407@www.freebsd.org> Date: Wed, 15 Feb 2006 16:38:13 GMT From: Fabien THOMAS To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Cc: Subject: i386/93396: dlopen crash with locked page X-BeenThere: freebsd-i386@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: I386-specific issues for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Feb 2006 16:40:05 -0000 >Number: 93396 >Category: i386 >Synopsis: dlopen crash with locked page >Confidential: no >Severity: critical >Priority: medium >Responsible: freebsd-i386 >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Feb 15 16:40:03 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Fabien THOMAS >Release: 6.1 BETA1 >Organization: NETASQ >Environment: FreeBSD build 6.1-PRERELEASE FreeBSD 6.1-PRERELEASE #0: Fri Feb 10 18:39:05 CET 2006 root@build:/usr/obj/usr/src/sys/SMP i386 >Description: When process page are locked any dlopen will crash. It is not related to 6.1 BETA version (it crash under 6.0 RELEASE). >How-To-Repeat: cc -pthread -o dltest dltest.c ./dltest Bus error (core dumped) gdb: (gdb) bt #0 0x28058e7c in memset () from /libexec/ld-elf.so.1 #1 0x2806d060 in ?? () #2 0x28051909 in map_object () from /libexec/ld-elf.so.1 #3 0x2804e9ed in elf_hash () from /libexec/ld-elf.so.1 #4 0x2805073d in dlopen () from /libexec/ld-elf.so.1 #5 0x080487ec in main () dltest.c: #include #include #include #include #include #include #include static void page_lockall (void) { int res; struct rlimit rlimit; rlimit.rlim_cur = RLIM_INFINITY; rlimit.rlim_max = RLIM_INFINITY; setrlimit (RLIMIT_MEMLOCK, &rlimit); mlockall (MCL_CURRENT | MCL_FUTURE); } int main (int argc, char **argv) { void *dl_handle; page_lockall(); dl_handle = dlopen ("/usr/lib/pam_guest.so", RTLD_NOW); dlclose(dl_handle); } >Fix: >Release-Note: >Audit-Trail: >Unformatted: