From owner-freebsd-stable@FreeBSD.ORG Thu Feb 9 15:23:31 2006 Return-Path: X-Original-To: freebsd-stable@FreeBSD.ORG Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0777816A420 for ; Thu, 9 Feb 2006 15:23:31 +0000 (GMT) (envelope-from jt@barfoos.de) Received: from mail.zuto.de (badlands.zuto.de [217.160.140.225]) by mx1.FreeBSD.org (Postfix) with ESMTP id C664C43D46 for ; Thu, 9 Feb 2006 15:23:29 +0000 (GMT) (envelope-from jt@barfoos.de) Received: from localhost (localhost [127.0.0.1]) by mail.zuto.de (Postfix) with ESMTP id 213FA1E43A for ; Thu, 9 Feb 2006 16:23:27 +0100 (CET) Received: from mail.zuto.de ([127.0.0.1]) by localhost (badlands [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 06378-09 for ; Thu, 9 Feb 2006 16:23:18 +0100 (CET) Received: from anastasia.lan.barfoos.de (unknown [10.11.1.1]) by mail.zuto.de (Postfix) with SMTP id C169C1E433 for ; Thu, 9 Feb 2006 16:23:14 +0100 (CET) Received: (qmail 38953 invoked by uid 1001); 9 Feb 2006 15:23:04 -0000 Date: Thu, 9 Feb 2006 16:23:04 +0100 From: Jens Trzaska To: freebsd-stable@FreeBSD.ORG Message-ID: <20060209152304.GB36749@anastasia.lan.barfoos.de> References: <20060209122530.GA36749@anastasia.lan.barfoos.de> <200602091429.k19ETeFc014392@lurza.secnetix.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200602091429.k19ETeFc014392@lurza.secnetix.de> X-Operating-System: FreeBSD 4.11-RELEASE, i386 X-GPG-Key-ID: = 96FE36DB X-GPG-Key-Fingerprint: 1C9B 7EF8 1A22 1740 9F1B AB7B 17D2 64E1 96FE 36DB X-GPG-Key-Location: http://www.elug.de/schluessel/96FE36DB.asc X-Accept-Language: de,en User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavis at zuto.de Cc: olli@lurza.secnetix.de Subject: Re: truss and /sbin/init X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Feb 2006 15:23:31 -0000 * Oliver Fromme [2006-02-09 15:32]: > Jens Trzaska wrote: > > David Kirchner [2006-02-08 16:53]: > > > The memory is apparently locked in core, according to the L flag for > > > 'ps'. This should probably be documented in the truss man page to > > > avoid confusion. > > > > Does you or perhaps someone else know why init is locked in core? Its > > not the case in 4.x and I can't see why a regular userspace process > > is locked. > > It _is_ the case in 4.x: > > $ uname -rs > FreeBSD 4.11-STABLE > $ ps -p 1 > PID TT STAT TIME COMMAND > 1 ?? ILs 0:17.41 /sbin/init -- You are right. I just checked by 'ls /proc/1/mem' which is available in 4.11. Its locked. But I am more or less able to use truss on init. Not very successful but I am for example able to track signals. anastasia:~#truss -p 1 SIGNAL 1 SIGNAL 1 SIGNAL 1 -- CANNOT READ REGISTERS -- -- CANNOT READ REGISTERS -- -- CANNOT READ REGISTERS -- -- CANNOT READ REGISTERS -- > As for the reason: Well, init(8) is special. Its existence > is critical for the running system, so it cannot be paged > out to swap space. That makes sense. Thank you for the explaination. Linux strace shows the user a bit more where the problem may be located: pepper:/home/jt# strace -p 1 attach: ptrace(PTRACE_ATTACH, ...): Operation not permitted jens