Date: Wed, 28 Sep 2005 09:12:06 +0100 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: freebsd-stable@freebsd.org Subject: Strange interaction between rcNG and procfs Message-ID: <20050928081206.GA71583@lack-of-gravitas.thebunker.net>
index | next in thread | raw e-mail
[-- Attachment #1 --]
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
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
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=/store/mysql-z-master/my.cnf --user=mysql --datadir=/store/mysql-z-master --pid-file=/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 [mysqld]
root 7427 0.0 0.0 1444 912 p1 R+ 8:57AM 0:00.00 grep mysqld
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.thebunker.net.pid).
Mounting /proc restores the expected behaviour:
zloty:~:# mount /proc
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=/store/mysql-z-master/my.cnf --user=mysql --datadir=/store/mysql-z-master --pid-file=/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=/store/mysql-z-master/my.cnf --basedir=/usr/local --datadir=/store/mysql-z-master --user=mysql --pid-file=/store/mysql-z-master/zloty.hosted-at.thebunker.net.pid --open-files-limit=8192 --port=3306 --socket=/tmp/mysql.sock
root 7468 0.0 0.0 1424 888 p1 RL+ 9:01AM 0:00.00 grep mysqld
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
--
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
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (FreeBSD)
iQCVAwUBQzpQVpr7OpndfbmCAQISFgQArZn/ejZEQHMm1kSo39Ea51nVjLa/5cV2
E/Gap4ftFVl9MT2fihlNSQHojA6CUC+xGQzMmM+mJkNFm74Hi2nb1gsoTjHchkL0
ZLkpKBZj2iDAI5TadtBxN7mAdgUFn5RHsPG6+LxhWii47nEH4VJeonq43pk7FENn
n6euv4JRw/U=
=jAQi
-----END PGP SIGNATURE-----
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050928081206.GA71583>
