Strange interaction between rcNG and procfs

From: Matthew Seaman (m.seaman_at_infracaninophile.co.uk)
Date: 09/28/05

  • Next message: Peter Jeremy: "Re: HEADSUP: bridge(4) removed from HEAD"
    Date: Wed, 28 Sep 2005 09:12:06 +0100
    To: freebsd-stable@freebsd.org
    
    
    

    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
    
    



  • Next message: Peter Jeremy: "Re: HEADSUP: bridge(4) removed from HEAD"

    Relevant Pages

    • php mysql problem
      ... i recently upgraded from fedora core 5 to cent os 4.4 with php 4.3 ... called specific entries from mysql are no longer working ... my code to display the entry looks like ... write all of my scripts ...
      (php.general)
    • Re: Converting from FM 9 to MySQL and keep both
      ... Here it is the starting point: Clinical research DB in FM 9 adv and FM ... Build another DB in MySQL, ... if you want server to execute anything in the way of scripts, make sure EVERY script step is web compatible. ...
      (comp.databases.filemaker)
    • Table and PHP scripts for existing data
      ... I've been using MySQL for several months and enjoyed great success ... when installing other people's scripts to databses I make using ... My challenge is developing from scratch the scripts, ... Dealers that I want to install in MySQL at www.securitydealers.com ...
      (comp.lang.php)
    • Re: Access Query w/VBScript
      ... > I have been usinging a Windows Remote Server to exercise the ASP ... none of the scripts (including the one I have ... > I have experimented with the code for connecting to MySql, ...
      (microsoft.public.scripting.vbscript)
    • Re: su command problem
      ... it goes to a command ... startup scripts for various programs read up when they need it. ... Those scripts will be run in roughly 'sort' order. ... > the mysql account and is supposed to run a command and ...
      (freebsd-questions)