#40630 [NEW]: preg_match_all with a particular regexp causes run-away php/apache process

Ask a Question related to PHP Bugs, Design and Development.

  1. #1

    Default #40630 [NEW]: preg_match_all with a particular regexp causes run-away php/apache process

    From: mfburdett at gmail dot com
    Operating system: FreeBSD 6.2
    PHP version: 5.2.1
    PHP Bug Type: PCRE related
    Bug description: preg_match_all with a particular regexp causes run-away php/apache process

    Description:
    ------------
    preg_match_all with a particular regexp causes a run-away Apache/PHP
    processes which consumes all available CPU. This is on amd64
    architecture; FreeBSD 6.2; PCRE 7.0 and PHP 5.2.1 installed through
    FreeBSD ports.

    Reproduce code:
    ---------------
    $regexp = '%(?:^|,\ *)("(?>[^"]*)(?>""[^"]* )*"|(?: [^",]*))%x';
    preg_match_all($regexp, $string, $matches);

    Expected result:
    ----------------
    It should compile and execute.

    Actual result:
    --------------
    Process consumes all available CPU until killed.

    --
    Edit bug report at [url]http://bugs.php.net/?id=40630&edit=1[/url]
    --
    Try a CVS snapshot (PHP 4.4): [url]http://bugs.php.net/fix.php?id=40630&r=trysnapshot44[/url]
    Try a CVS snapshot (PHP 5.2): [url]http://bugs.php.net/fix.php?id=40630&r=trysnapshot52[/url]
    Try a CVS snapshot (PHP 6.0): [url]http://bugs.php.net/fix.php?id=40630&r=trysnapshot60[/url]
    Fixed in CVS: [url]http://bugs.php.net/fix.php?id=40630&r=fixedcvs[/url]
    Fixed in release: [url]http://bugs.php.net/fix.php?id=40630&r=alreadyfixed[/url]
    Need backtrace: [url]http://bugs.php.net/fix.php?id=40630&r=needtrace[/url]
    Need Reproduce Script: [url]http://bugs.php.net/fix.php?id=40630&r=needscript[/url]
    Try newer version: [url]http://bugs.php.net/fix.php?id=40630&r=oldversion[/url]
    Not developer issue: [url]http://bugs.php.net/fix.php?id=40630&r=support[/url]
    Expected behavior: [url]http://bugs.php.net/fix.php?id=40630&r=notwrong[/url]
    Not enough info: [url]http://bugs.php.net/fix.php?id=40630&r=notenoughinfo[/url]
    Submitted twice: [url]http://bugs.php.net/fix.php?id=40630&r=submittedtwice[/url]
    register_globals: [url]http://bugs.php.net/fix.php?id=40630&r=globals[/url]
    PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=40630&r=php3[/url]
    Daylight Savings: [url]http://bugs.php.net/fix.php?id=40630&r=dst[/url]
    IIS Stability: [url]http://bugs.php.net/fix.php?id=40630&r=isapi[/url]
    Install GNU Sed: [url]http://bugs.php.net/fix.php?id=40630&r=gnused[/url]
    Floating point limitations: [url]http://bugs.php.net/fix.php?id=40630&r=float[/url]
    No Zend Extensions: [url]http://bugs.php.net/fix.php?id=40630&r=nozend[/url]
    MySQL Configuration Error: [url]http://bugs.php.net/fix.php?id=40630&r=mysqlcfg[/url]
    mfburdett at gmail dot com Guest

  2. Similar Questions and Discussions

    1. #21926 [NoF->WFx]: Apache process hangs
      ID: 21926 Updated by: sniper@php.net Reported By: arinto at almedina dot net -Status: No Feedback +Status: ...
    2. #21926 [Com]: Apache process hangs
      ID: 21926 Comment by: huberfelix at web dot de Reported By: arinto at almedina dot net Status: No Feedback Bug...
    3. #21926 [Opn->Fbk]: Apache process hangs
      ID: 21926 Updated by: iliaa@php.net Reported By: arinto at almedina dot net -Status: Open +Status: ...
    4. #24968 [Bgs]: session_set_cookie_params() affects entire apache process
      ID: 24968 Updated by: sniper@php.net Reported By: lucas at sitepoint dot com Status: Bogus Bug Type: ...
    5. Apache error HTTP server process
      this is what the error.log says in E:\oracle\ora92\Apache\Apache\logs Any idea how to fix it? OPM: EW: Process pedro:2355 (pid:4192) died,...
  3. #2

    Default #40630 [Opn->Fbk]: preg_match_all with a particular regexp causes run-away php/apache process

    ID: 40630
    Updated by: [email]nlopess@php.net[/email]
    Reported By: mfburdett at gmail dot com
    -Status: Open
    +Status: Feedback
    Bug Type: PCRE related
    Operating System: FreeBSD 6.2
    PHP Version: 5.2.1
    New Comment:

    Please try using this CVS snapshot:

    [url]http://snaps.php.net/php5.2-latest.tar.gz[/url]

    For Windows:

    [url]http://snaps.php.net/win32/php5.2-win32-latest.zip[/url]




    Previous Comments:
    ------------------------------------------------------------------------

    [2007-02-25 20:02:16] mfburdett at gmail dot com

    Description:
    ------------
    preg_match_all with a particular regexp causes a run-away Apache/PHP
    processes which consumes all available CPU. This is on amd64
    architecture; FreeBSD 6.2; PCRE 7.0 and PHP 5.2.1 installed through
    FreeBSD ports.

    Reproduce code:
    ---------------
    $regexp = '%(?:^|,\ *)("(?>[^"]*)(?>""[^"]* )*"|(?: [^",]*))%x';
    preg_match_all($regexp, $string, $matches);

    Expected result:
    ----------------
    It should compile and execute.

    Actual result:
    --------------
    Process consumes all available CPU until killed.


    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=40630&edit=1[/url]
    nlopess@php.net Guest

  4. #3

    Default #40630 [Fbk->Opn]: preg_match_all with a particular regexp causes run-away php/apache process

    ID: 40630
    User updated by: mfburdett at gmail dot com
    Reported By: mfburdett at gmail dot com
    -Status: Feedback
    +Status: Open
    Bug Type: PCRE related
    Operating System: FreeBSD 6.2
    PHP Version: 5.2.1
    New Comment:

    At the moment I don't have access to a non-production amd64 box, so I
    cannot test the snapshot. I cannot reproduce the issue on a i386 box.


    Previous Comments:
    ------------------------------------------------------------------------

    [2007-02-25 23:07:55] [email]nlopess@php.net[/email]

    Please try using this CVS snapshot:

    [url]http://snaps.php.net/php5.2-latest.tar.gz[/url]

    For Windows:

    [url]http://snaps.php.net/win32/php5.2-win32-latest.zip[/url]



    ------------------------------------------------------------------------

    [2007-02-25 20:02:16] mfburdett at gmail dot com

    Description:
    ------------
    preg_match_all with a particular regexp causes a run-away Apache/PHP
    processes which consumes all available CPU. This is on amd64
    architecture; FreeBSD 6.2; PCRE 7.0 and PHP 5.2.1 installed through
    FreeBSD ports.

    Reproduce code:
    ---------------
    $regexp = '%(?:^|,\ *)("(?>[^"]*)(?>""[^"]* )*"|(?: [^",]*))%x';
    preg_match_all($regexp, $string, $matches);

    Expected result:
    ----------------
    It should compile and execute.

    Actual result:
    --------------
    Process consumes all available CPU until killed.


    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=40630&edit=1[/url]
    mfburdett at gmail dot com Guest

  5. #4

    Default #40630 [Opn->Fbk]: preg_match_all with a particular regexp causes run-away php/apache process

    ID: 40630
    Updated by: [email]tony2001@php.net[/email]
    Reported By: mfburdett at gmail dot com
    -Status: Open
    +Status: Feedback
    Bug Type: PCRE related
    Operating System: FreeBSD 6.2
    PHP Version: 5.2.1
    New Comment:

    Thank you for this bug report. To properly diagnose the problem, we
    need a short but complete example script to be able to reproduce
    this bug ourselves.

    A proper reproducing script starts with <?php and ends with ?>,
    is max. 10-20 lines long and does not require any external
    resources such as databases, etc. If the script requires a
    database to demonstrate the issue, please make sure it creates
    all necessary tables, stored procedures etc.

    Please avoid embedding huge scripts into the report.




    Previous Comments:
    ------------------------------------------------------------------------

    [2007-02-26 00:28:04] mfburdett at gmail dot com

    At the moment I don't have access to a non-production amd64 box, so I
    cannot test the snapshot. I cannot reproduce the issue on a i386 box.

    ------------------------------------------------------------------------

    [2007-02-25 23:07:55] [email]nlopess@php.net[/email]

    Please try using this CVS snapshot:

    [url]http://snaps.php.net/php5.2-latest.tar.gz[/url]

    For Windows:

    [url]http://snaps.php.net/win32/php5.2-win32-latest.zip[/url]



    ------------------------------------------------------------------------

    [2007-02-25 20:02:16] mfburdett at gmail dot com

    Description:
    ------------
    preg_match_all with a particular regexp causes a run-away Apache/PHP
    processes which consumes all available CPU. This is on amd64
    architecture; FreeBSD 6.2; PCRE 7.0 and PHP 5.2.1 installed through
    FreeBSD ports.

    Reproduce code:
    ---------------
    $regexp = '%(?:^|,\ *)("(?>[^"]*)(?>""[^"]* )*"|(?: [^",]*))%x';
    preg_match_all($regexp, $string, $matches);

    Expected result:
    ----------------
    It should compile and execute.

    Actual result:
    --------------
    Process consumes all available CPU until killed.


    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=40630&edit=1[/url]
    tony2001@php.net Guest

  6. #5

    Default #40630 [Fbk->Opn]: preg_match_all with a particular regexp causes run-away php/apache process

    ID: 40630
    User updated by: mfburdett at gmail dot com
    Reported By: mfburdett at gmail dot com
    -Status: Feedback
    +Status: Open
    Bug Type: PCRE related
    Operating System: FreeBSD 6.2
    PHP Version: 5.2.1
    New Comment:

    <?php
    $regexp = '%(?:^|,\ *)("(?>[^"]*)(?>""[^"]* )*"|(?: [^",]*))%x';
    preg_match_all($regexp, $string, $matches);
    ?>


    Previous Comments:
    ------------------------------------------------------------------------

    [2007-02-26 09:31:50] [email]tony2001@php.net[/email]

    Thank you for this bug report. To properly diagnose the problem, we
    need a short but complete example script to be able to reproduce
    this bug ourselves.

    A proper reproducing script starts with <?php and ends with ?>,
    is max. 10-20 lines long and does not require any external
    resources such as databases, etc. If the script requires a
    database to demonstrate the issue, please make sure it creates
    all necessary tables, stored procedures etc.

    Please avoid embedding huge scripts into the report.



    ------------------------------------------------------------------------

    [2007-02-26 00:28:04] mfburdett at gmail dot com

    At the moment I don't have access to a non-production amd64 box, so I
    cannot test the snapshot. I cannot reproduce the issue on a i386 box.

    ------------------------------------------------------------------------

    [2007-02-25 23:07:55] [email]nlopess@php.net[/email]

    Please try using this CVS snapshot:

    [url]http://snaps.php.net/php5.2-latest.tar.gz[/url]

    For Windows:

    [url]http://snaps.php.net/win32/php5.2-win32-latest.zip[/url]



    ------------------------------------------------------------------------

    [2007-02-25 20:02:16] mfburdett at gmail dot com

    Description:
    ------------
    preg_match_all with a particular regexp causes a run-away Apache/PHP
    processes which consumes all available CPU. This is on amd64
    architecture; FreeBSD 6.2; PCRE 7.0 and PHP 5.2.1 installed through
    FreeBSD ports.

    Reproduce code:
    ---------------
    $regexp = '%(?:^|,\ *)("(?>[^"]*)(?>""[^"]* )*"|(?: [^",]*))%x';
    preg_match_all($regexp, $string, $matches);

    Expected result:
    ----------------
    It should compile and execute.

    Actual result:
    --------------
    Process consumes all available CPU until killed.


    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=40630&edit=1[/url]
    mfburdett at gmail dot com Guest

  7. #6

    Default #40630 [Opn->Fbk]: preg_match_all with a particular regexp causes run-away php/apache process

    ID: 40630
    Updated by: [email]tony2001@php.net[/email]
    Reported By: mfburdett at gmail dot com
    -Status: Open
    +Status: Feedback
    Bug Type: PCRE related
    Operating System: FreeBSD 6.2
    PHP Version: 5.2.1
    New Comment:

    Notice: Undefined variable: string


    Previous Comments:
    ------------------------------------------------------------------------

    [2007-02-26 16:32:14] mfburdett at gmail dot com

    <?php
    $regexp = '%(?:^|,\ *)("(?>[^"]*)(?>""[^"]* )*"|(?: [^",]*))%x';
    preg_match_all($regexp, $string, $matches);
    ?>

    ------------------------------------------------------------------------

    [2007-02-26 09:31:50] [email]tony2001@php.net[/email]

    Thank you for this bug report. To properly diagnose the problem, we
    need a short but complete example script to be able to reproduce
    this bug ourselves.

    A proper reproducing script starts with <?php and ends with ?>,
    is max. 10-20 lines long and does not require any external
    resources such as databases, etc. If the script requires a
    database to demonstrate the issue, please make sure it creates
    all necessary tables, stored procedures etc.

    Please avoid embedding huge scripts into the report.



    ------------------------------------------------------------------------

    [2007-02-26 00:28:04] mfburdett at gmail dot com

    At the moment I don't have access to a non-production amd64 box, so I
    cannot test the snapshot. I cannot reproduce the issue on a i386 box.

    ------------------------------------------------------------------------

    [2007-02-25 23:07:55] [email]nlopess@php.net[/email]

    Please try using this CVS snapshot:

    [url]http://snaps.php.net/php5.2-latest.tar.gz[/url]

    For Windows:

    [url]http://snaps.php.net/win32/php5.2-win32-latest.zip[/url]



    ------------------------------------------------------------------------

    [2007-02-25 20:02:16] mfburdett at gmail dot com

    Description:
    ------------
    preg_match_all with a particular regexp causes a run-away Apache/PHP
    processes which consumes all available CPU. This is on amd64
    architecture; FreeBSD 6.2; PCRE 7.0 and PHP 5.2.1 installed through
    FreeBSD ports.

    Reproduce code:
    ---------------
    $regexp = '%(?:^|,\ *)("(?>[^"]*)(?>""[^"]* )*"|(?: [^",]*))%x';
    preg_match_all($regexp, $string, $matches);

    Expected result:
    ----------------
    It should compile and execute.

    Actual result:
    --------------
    Process consumes all available CPU until killed.


    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=40630&edit=1[/url]
    tony2001@php.net Guest

  8. #7

    Default #40630 [Fbk->Opn]: preg_match_all with a particular regexp causes run-away php/apache process

    ID: 40630
    User updated by: mfburdett at gmail dot com
    Reported By: mfburdett at gmail dot com
    -Status: Feedback
    +Status: Open
    Bug Type: PCRE related
    Operating System: FreeBSD 6.2
    PHP Version: 5.2.1
    New Comment:

    <?php
    $regexp = '%(?:^|,\ *)("(?>[^"]*)(?>""[^"]* )*"|(?: [^",]*))%x';
    $string = '';
    preg_match_all($regexp, $string, $matches);
    ?>


    Previous Comments:
    ------------------------------------------------------------------------

    [2007-02-26 16:35:11] [email]tony2001@php.net[/email]

    Notice: Undefined variable: string

    ------------------------------------------------------------------------

    [2007-02-26 16:32:14] mfburdett at gmail dot com

    <?php
    $regexp = '%(?:^|,\ *)("(?>[^"]*)(?>""[^"]* )*"|(?: [^",]*))%x';
    preg_match_all($regexp, $string, $matches);
    ?>

    ------------------------------------------------------------------------

    [2007-02-26 09:31:50] [email]tony2001@php.net[/email]

    Thank you for this bug report. To properly diagnose the problem, we
    need a short but complete example script to be able to reproduce
    this bug ourselves.

    A proper reproducing script starts with <?php and ends with ?>,
    is max. 10-20 lines long and does not require any external
    resources such as databases, etc. If the script requires a
    database to demonstrate the issue, please make sure it creates
    all necessary tables, stored procedures etc.

    Please avoid embedding huge scripts into the report.



    ------------------------------------------------------------------------

    [2007-02-26 00:28:04] mfburdett at gmail dot com

    At the moment I don't have access to a non-production amd64 box, so I
    cannot test the snapshot. I cannot reproduce the issue on a i386 box.

    ------------------------------------------------------------------------

    [2007-02-25 23:07:55] [email]nlopess@php.net[/email]

    Please try using this CVS snapshot:

    [url]http://snaps.php.net/php5.2-latest.tar.gz[/url]

    For Windows:

    [url]http://snaps.php.net/win32/php5.2-win32-latest.zip[/url]



    ------------------------------------------------------------------------

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    [url]http://bugs.php.net/40630[/url]

    --
    Edit this bug report at [url]http://bugs.php.net/?id=40630&edit=1[/url]
    mfburdett at gmail dot com Guest

  9. #8

    Default #40630 [Opn->Fbk]: preg_match_all with a particular regexp causes run-away php/apache process

    ID: 40630
    Updated by: [email]tony2001@php.net[/email]
    Reported By: mfburdett at gmail dot com
    -Status: Open
    +Status: Feedback
    Bug Type: PCRE related
    Operating System: FreeBSD 6.2
    PHP Version: 5.2.1
    New Comment:

    Does PHP CLI work for you?
    What kind of Apache are you using? Version? MPM?
    Can you provide a GDB backtrace?
    Can you try building the snapshot (doesn't matter where, you don't have
    to install it, just build it and run the script using sapi/cli/php).


    Previous Comments:
    ------------------------------------------------------------------------

    [2007-02-26 16:36:22] mfburdett at gmail dot com

    <?php
    $regexp = '%(?:^|,\ *)("(?>[^"]*)(?>""[^"]* )*"|(?: [^",]*))%x';
    $string = '';
    preg_match_all($regexp, $string, $matches);
    ?>

    ------------------------------------------------------------------------

    [2007-02-26 16:35:11] [email]tony2001@php.net[/email]

    Notice: Undefined variable: string

    ------------------------------------------------------------------------

    [2007-02-26 16:32:14] mfburdett at gmail dot com

    <?php
    $regexp = '%(?:^|,\ *)("(?>[^"]*)(?>""[^"]* )*"|(?: [^",]*))%x';
    preg_match_all($regexp, $string, $matches);
    ?>

    ------------------------------------------------------------------------

    [2007-02-26 09:31:50] [email]tony2001@php.net[/email]

    Thank you for this bug report. To properly diagnose the problem, we
    need a short but complete example script to be able to reproduce
    this bug ourselves.

    A proper reproducing script starts with <?php and ends with ?>,
    is max. 10-20 lines long and does not require any external
    resources such as databases, etc. If the script requires a
    database to demonstrate the issue, please make sure it creates
    all necessary tables, stored procedures etc.

    Please avoid embedding huge scripts into the report.



    ------------------------------------------------------------------------

    [2007-02-26 00:28:04] mfburdett at gmail dot com

    At the moment I don't have access to a non-production amd64 box, so I
    cannot test the snapshot. I cannot reproduce the issue on a i386 box.

    ------------------------------------------------------------------------

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    [url]http://bugs.php.net/40630[/url]

    --
    Edit this bug report at [url]http://bugs.php.net/?id=40630&edit=1[/url]
    tony2001@php.net Guest

  10. #9

    Default #40630 [Fbk->Opn]: preg_match_all with a particular regexp causes run-away php/apache process

    ID: 40630
    User updated by: mfburdett at gmail dot com
    Reported By: mfburdett at gmail dot com
    -Status: Feedback
    +Status: Open
    Bug Type: PCRE related
    Operating System: FreeBSD 6.2
    PHP Version: 5.2.1
    New Comment:

    Same issue running the script via PHP commandline. Am installing
    snapshot in home directory now.


    Previous Comments:
    ------------------------------------------------------------------------

    [2007-02-26 16:46:19] [email]tony2001@php.net[/email]

    Does PHP CLI work for you?
    What kind of Apache are you using? Version? MPM?
    Can you provide a GDB backtrace?
    Can you try building the snapshot (doesn't matter where, you don't have
    to install it, just build it and run the script using sapi/cli/php).

    ------------------------------------------------------------------------

    [2007-02-26 16:36:22] mfburdett at gmail dot com

    <?php
    $regexp = '%(?:^|,\ *)("(?>[^"]*)(?>""[^"]* )*"|(?: [^",]*))%x';
    $string = '';
    preg_match_all($regexp, $string, $matches);
    ?>

    ------------------------------------------------------------------------

    [2007-02-26 16:35:11] [email]tony2001@php.net[/email]

    Notice: Undefined variable: string

    ------------------------------------------------------------------------

    [2007-02-26 16:32:14] mfburdett at gmail dot com

    <?php
    $regexp = '%(?:^|,\ *)("(?>[^"]*)(?>""[^"]* )*"|(?: [^",]*))%x';
    preg_match_all($regexp, $string, $matches);
    ?>

    ------------------------------------------------------------------------

    [2007-02-26 09:31:50] [email]tony2001@php.net[/email]

    Thank you for this bug report. To properly diagnose the problem, we
    need a short but complete example script to be able to reproduce
    this bug ourselves.

    A proper reproducing script starts with <?php and ends with ?>,
    is max. 10-20 lines long and does not require any external
    resources such as databases, etc. If the script requires a
    database to demonstrate the issue, please make sure it creates
    all necessary tables, stored procedures etc.

    Please avoid embedding huge scripts into the report.



    ------------------------------------------------------------------------

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    [url]http://bugs.php.net/40630[/url]

    --
    Edit this bug report at [url]http://bugs.php.net/?id=40630&edit=1[/url]
    mfburdett at gmail dot com Guest

  11. #10

    Default #40630 [Opn]: preg_match_all with a particular regexp causes run-away php/apache process

    ID: 40630
    User updated by: mfburdett at gmail dot com
    Reported By: mfburdett at gmail dot com
    Status: Open
    Bug Type: PCRE related
    Operating System: FreeBSD 6.2
    PHP Version: 5.2.1
    New Comment:

    I tested cli php5.2-200702261730 and the issue appears to be resolved
    in that snapshot.


    Previous Comments:
    ------------------------------------------------------------------------

    [2007-02-26 18:07:25] mfburdett at gmail dot com

    Same issue running the script via PHP commandline. Am installing
    snapshot in home directory now.

    ------------------------------------------------------------------------

    [2007-02-26 16:46:19] [email]tony2001@php.net[/email]

    Does PHP CLI work for you?
    What kind of Apache are you using? Version? MPM?
    Can you provide a GDB backtrace?
    Can you try building the snapshot (doesn't matter where, you don't have
    to install it, just build it and run the script using sapi/cli/php).

    ------------------------------------------------------------------------

    [2007-02-26 16:36:22] mfburdett at gmail dot com

    <?php
    $regexp = '%(?:^|,\ *)("(?>[^"]*)(?>""[^"]* )*"|(?: [^",]*))%x';
    $string = '';
    preg_match_all($regexp, $string, $matches);
    ?>

    ------------------------------------------------------------------------

    [2007-02-26 16:35:11] [email]tony2001@php.net[/email]

    Notice: Undefined variable: string

    ------------------------------------------------------------------------

    [2007-02-26 16:32:14] mfburdett at gmail dot com

    <?php
    $regexp = '%(?:^|,\ *)("(?>[^"]*)(?>""[^"]* )*"|(?: [^",]*))%x';
    preg_match_all($regexp, $string, $matches);
    ?>

    ------------------------------------------------------------------------

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    [url]http://bugs.php.net/40630[/url]

    --
    Edit this bug report at [url]http://bugs.php.net/?id=40630&edit=1[/url]
    mfburdett at gmail dot com Guest

  12. #11

    Default #40630 [Opn->Csd]: preg_match_all with a particular regexp causes run-away php/apache process

    ID: 40630
    Updated by: [email]tony2001@php.net[/email]
    Reported By: mfburdett at gmail dot com
    -Status: Open
    +Status: Closed
    Bug Type: PCRE related
    Operating System: FreeBSD 6.2
    PHP Version: 5.2.1
    New Comment:

    Great, marking as closed then.
    Please reopen the report if the issue re-appears and/or you have any
    additional information.


    Previous Comments:
    ------------------------------------------------------------------------

    [2007-02-26 18:18:31] mfburdett at gmail dot com

    I tested cli php5.2-200702261730 and the issue appears to be resolved
    in that snapshot.

    ------------------------------------------------------------------------

    [2007-02-26 18:07:25] mfburdett at gmail dot com

    Same issue running the script via PHP commandline. Am installing
    snapshot in home directory now.

    ------------------------------------------------------------------------

    [2007-02-26 16:46:19] [email]tony2001@php.net[/email]

    Does PHP CLI work for you?
    What kind of Apache are you using? Version? MPM?
    Can you provide a GDB backtrace?
    Can you try building the snapshot (doesn't matter where, you don't have
    to install it, just build it and run the script using sapi/cli/php).

    ------------------------------------------------------------------------

    [2007-02-26 16:36:22] mfburdett at gmail dot com

    <?php
    $regexp = '%(?:^|,\ *)("(?>[^"]*)(?>""[^"]* )*"|(?: [^",]*))%x';
    $string = '';
    preg_match_all($regexp, $string, $matches);
    ?>

    ------------------------------------------------------------------------

    [2007-02-26 16:35:11] [email]tony2001@php.net[/email]

    Notice: Undefined variable: string

    ------------------------------------------------------------------------

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    [url]http://bugs.php.net/40630[/url]

    --
    Edit this bug report at [url]http://bugs.php.net/?id=40630&edit=1[/url]
    tony2001@php.net Guest

  13. #12

    Default #40630 [Csd]: preg_match_all with a particular regexp causes run-away php/apache process

    ID: 40630
    User updated by: mfburdett at gmail dot com
    Reported By: mfburdett at gmail dot com
    Status: Closed
    Bug Type: PCRE related
    Operating System: FreeBSD 6.2
    PHP Version: 5.2.1
    New Comment:

    This issue has been resolved in FreeBSD Ports.
    [url]http://www.freebsd.org/cgi/query-pr.cgi?pr=109542[/url]
    [url]http://www.freebsd.org/cgi/cvsweb.cgi/ports/lang/php5/Makefile.ext.diff?r1=1.41&r2=1.42&f=h[/url]


    Previous Comments:
    ------------------------------------------------------------------------

    [2007-02-26 18:22:19] [email]tony2001@php.net[/email]

    Great, marking as closed then.
    Please reopen the report if the issue re-appears and/or you have any
    additional information.

    ------------------------------------------------------------------------

    [2007-02-26 18:18:31] mfburdett at gmail dot com

    I tested cli php5.2-200702261730 and the issue appears to be resolved
    in that snapshot.

    ------------------------------------------------------------------------

    [2007-02-26 18:07:25] mfburdett at gmail dot com

    Same issue running the script via PHP commandline. Am installing
    snapshot in home directory now.

    ------------------------------------------------------------------------

    [2007-02-26 16:46:19] [email]tony2001@php.net[/email]

    Does PHP CLI work for you?
    What kind of Apache are you using? Version? MPM?
    Can you provide a GDB backtrace?
    Can you try building the snapshot (doesn't matter where, you don't have
    to install it, just build it and run the script using sapi/cli/php).

    ------------------------------------------------------------------------

    [2007-02-26 16:36:22] mfburdett at gmail dot com

    <?php
    $regexp = '%(?:^|,\ *)("(?>[^"]*)(?>""[^"]* )*"|(?: [^",]*))%x';
    $string = '';
    preg_match_all($regexp, $string, $matches);
    ?>

    ------------------------------------------------------------------------

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    [url]http://bugs.php.net/40630[/url]

    --
    Edit this bug report at [url]http://bugs.php.net/?id=40630&edit=1[/url]
    mfburdett at gmail dot com Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139