Skip site navigation (1)Skip section navigation (2)
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>

next in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050928081206.GA71583>