Bug #2700 Problem with mysql-test-run in mysql-test
Submitted: 10 Feb 2004 7:43 Modified: 4 Mar 2004 7:07
Reporter: Boyd GERBER Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S2 (Serious)
Version:4.0.17 OS:OpenServer 5.0.x
Assigned to: Lenz Grimmer CPU Architecture:Any

[10 Feb 2004 7:43] Boyd GERBER
Description:
ulimit -n 1024 hangs mysql-test-run on OpenServer 5.0.X and cause strange behavior on UnixWare 7.1.x.

How to repeat:
run mysql-test-run on OpenServer 5.0.x and the program hangs.
run it on UnixWare and see how it can effect entire system.

On SCO OS's it is better to NOFILES on OpenServer 5.0.7 and on UnixWare 7.1.x HFNOLIM.  To set these parameters see the Documentation for these OS's.  If these values are in the script they change system from a higher value to a lower value on the system.

This is for UnixWare.

  There are a few important tunables that you may run into like MAXUP,
  ULIMIT, and MAXLINK.  Search your http://localhost:457/ pages for
  Tunable Parameters and read about them.  The first three sections are
  the important ones.  Here's a summary:

  To view a tunable:      /etc/conf/bin/idtune -g MAXUP
  To set a tunable:       /etc/conf/bin/idtune -m MAXUP 250

  Now there are two types of tunable parameters, internet and KERNEL.

    *  internet:  parameter names are lower case
                  tunables stored in /etc/inet/dfl

    *  KERNEL:    parameter names are upper case
                  tunables are stored in /etc/conf/mtune.d
                                         /etc/conf/autotune.d

  Important ones are:                             Default Value:

    *  ULIMIT    block size of the largest file          2097151
                 listed in /etc/default/login

    *  MAXLINK   Maximum number of subdirectories           1000
                 allowed in a directory
                 changed with idtune.

    *  MAXUP     Maximum number of processes an               80
                 unprivileged user can run.
                 changed with idtune.

    *  NPROC     The maximum number of processes             400
                 possible on the system.
                 changed with idtune.

    *  SFSZLIM   Soft size limit for a user file           3FFFFFFF
       HFSZLIM   Hard size limit for a user file           3FFFFFFF

    *  SFNOLIM   Soft limit on the number of files a user opens.
       HFNOLIM   Hard limit on the number of files a user opens.

For MySQL on mysystem I have found that these are the best.

 MAXULWP 1000
 MAXUP   3000
 NPROC   6000
 SFNOLIM 2048
 HSTKLIM 0x2E000000
 SSTKLIM 0x1A000000
 HDATLIM 0x2C000000
 HVMMLIM 0x3E000000
 SVMMLIM 0x2A000000
 SCORLIM 0xA000000
 HCORLIM 0x1A000000
 SDATLIM 0x1A000000

Suggested fix:
*** mysql-test-run.sh.org       2004-01-01 21:01:59.000000000 -0700
--- mysql-test-run.sh   2004-02-06 09:02:09.000000000 -0700
***************
*** 17,23 ****
  TZ=$MY_TZ; export TZ # for UNIX_TIMESTAMP tests to work

  # For query_cache test
! ulimit -n 1024

  #++
  # Program Definitions
--- 17,36 ----
  TZ=$MY_TZ; export TZ # for UNIX_TIMESTAMP tests to work

  # For query_cache test
! SYSTEM=`uname -s`
!
! if [ "$SYSTEM" = "SCO_SV" ]
! then
!         ECHO="echo"
! elif [ "$SYSTEM" = "UnixWare" ]
! then
!         ECHO="echo"
! elif [ "$SYSTEM" = "OpenUNIX" ]
! then
!         ECHO="echo"
! else
!       ulimit -n 1024
! fi

  #++
  # Program Definitions
[25 Feb 2004 8:01] Timothy Smith
Might want to use:

case "$SYSTEM" in
    SCO_SV | UnixWare | OpenUNIX )
        # do nothing
        ;;
    * )
        ulimit -n 1024
        ;;
esac
[4 Mar 2004 7:07] Michael Widenius
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

Tim's suggestion will be in 4.0.19 and 4.1.2