From owner-freebsd-stable@FreeBSD.ORG Wed Sep 28 08:12:17 2005 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 80AF316A41F for ; Wed, 28 Sep 2005 08:12:17 +0000 (GMT) (envelope-from matthew@thebunker.net) Received: from male.aldigital.co.uk (male.thebunker.net [213.129.64.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id 00D8C43D4C for ; Wed, 28 Sep 2005 08:12:09 +0000 (GMT) (envelope-from matthew@thebunker.net) Received: from lack-of-gravitas.thebunker.net (gateway.ash.thebunker.net [213.129.64.4]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by male.aldigital.co.uk (Postfix) with ESMTP id 77C47976EF for ; Wed, 28 Sep 2005 09:12:08 +0100 (BST) Received: from lack-of-gravitas.thebunker.net (localhost [127.0.0.1]) by lack-of-gravitas.thebunker.net (8.13.4/8.13.4) with ESMTP id j8S8C79S087492 for ; Wed, 28 Sep 2005 09:12:07 +0100 (BST) (envelope-from matthew@lack-of-gravitas.thebunker.net) Received: (from matthew@localhost) by lack-of-gravitas.thebunker.net (8.13.4/8.13.4/Submit) id j8S8C6Dk087491 for freebsd-stable@freebsd.org; Wed, 28 Sep 2005 09:12:06 +0100 (BST) (envelope-from matthew) Date: Wed, 28 Sep 2005 09:12:06 +0100 From: Matthew Seaman To: freebsd-stable@freebsd.org Message-ID: <20050928081206.GA71583@lack-of-gravitas.thebunker.net> Mail-Followup-To: freebsd-stable@freebsd.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tKW2IUtsqtDRztdT" Content-Disposition: inline User-Agent: Mutt/1.5.11 Subject: Strange interaction between rcNG and procfs 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: Wed, 28 Sep 2005 08:12:17 -0000 --tKW2IUtsqtDRztdT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Dear all, I just ran into an odd problem. In some circumstances it seems that you will need to have /proc mounted in order for rcNG startup scripts to work correctly. I ran into this while configuring mysql 4.1.14 server on a 'large' 5.4-RELEASE-p7 DB server (4GB RAM, MAXDSIZ and MAXSSIZ bumped to 2GB in kernel config and mysql currently configured to malloc about 1.8GB when it starts up) -- however smaller scale mysql installations on other 5.4-RELEASE or 6.0-BETA don't exhibit the same effect. Without /proc mounted I get this: zloty:~:# umount /proc=20 zloty:~:# /usr/local/etc/rc.d/mysql-server.sh start Starting mysql. zloty:~:# /usr/local/etc/rc.d/mysql-server.sh status mysql is not running. zloty:~:# ps -auxwwww | grep mysqld=20 mysql 7387 0.0 0.0 1660 1260 p1 S 8:57AM 0:00.01 /bin/sh= /usr/local/bin/mysqld_safe --defaults-extra-file=3D/store/mysql-z-master/m= y.cnf --user=3Dmysql --datadir=3D/store/mysql-z-master --pid-file=3D/store/= mysql-z-master/zloty.hosted-at.thebunker.net.pid mysql 7416 0.0 8.0 1925400 271848 p1 S 8:57AM 0:01.17 [mys= qld] root 7427 0.0 0.0 1444 912 p1 R+ 8:57AM 0:00.00 grep my= sqld Note that the process name of the real mysqld has been replaced by [mysqld] -- I thought things in [square brackets] in ps output indicatd kernel threads? This also prevents mysql server being shutdown cleanly using the rcNG scripts: zloty:~:# /usr/local/etc/rc.d/mysql-server.sh stop mysql not running? (check /store/mysql-z-master/zloty.hosted-at.thebunk= er.net.pid). Mounting /proc restores the expected behaviour: zloty:~:# mount /proc=20 zloty:~:# /usr/local/etc/rc.d/mysql-server.sh status mysql is running as pid 7416. zloty:~:# ps -auxwwww | grep mysqld mysql 7387 0.0 0.0 1660 1260 p1 I 8:57AM 0:00.01 /bin/sh= /usr/local/bin/mysqld_safe --defaults-extra-file=3D/store/mysql-z-master/m= y.cnf --user=3Dmysql --datadir=3D/store/mysql-z-master --pid-file=3D/store/= mysql-z-master/zloty.hosted-at.thebunker.net.pid mysql 7416 0.0 8.0 1925400 271848 p1 S 8:57AM 0:01.36 /usr= /local/libexec/mysqld --defaults-extra-file=3D/store/mysql-z-master/my.cnf = --basedir=3D/usr/local --datadir=3D/store/mysql-z-master --user=3Dmysql --p= id-file=3D/store/mysql-z-master/zloty.hosted-at.thebunker.net.pid --open-fi= les-limit=3D8192 --port=3D3306 --socket=3D/tmp/mysql.sock root 7468 0.0 0.0 1424 888 p1 RL+ 9:01AM 0:00.00 grep my= sqld Is this expected behaviour? Am I correct in my supposition that effect occurs because of the large process size -- as I said above, I don't see this at all with smaller mysql installations, where the rcNG scripts work independently of /proc being mounted. Is it documented anywhere? All I can find is the mention in the ps(1) man page that /proc has to be mounted to get full functionality. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 8 Dane Court Manor School Rd PGP: http://www.infracaninophile.co.uk/pgpkey Tilmanstone Tel: +44 1304 617253 Kent, CT14 0JL UK --tKW2IUtsqtDRztdT Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iQCVAwUBQzpQVpr7OpndfbmCAQISFgQArZn/ejZEQHMm1kSo39Ea51nVjLa/5cV2 E/Gap4ftFVl9MT2fihlNSQHojA6CUC+xGQzMmM+mJkNFm74Hi2nb1gsoTjHchkL0 ZLkpKBZj2iDAI5TadtBxN7mAdgUFn5RHsPG6+LxhWii47nEH4VJeonq43pk7FENn n6euv4JRw/U= =jAQi -----END PGP SIGNATURE----- --tKW2IUtsqtDRztdT--