Re: invalid regexp crashes the server on windows or 9.3

From: "Erik Rijkers" <er(at)xs4all(dot)nl>
To: "Marc Mamin" <M(dot)Mamin(at)intershop(dot)de>
Cc: "'pgsql-hackers(at)postgresql(dot)org'" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: invalid regexp crashes the server on windows or 9.3
Date: 2013-09-25 07:54:11
Message-ID: 07fe9ef4f29f205d73e9ff7556e64e08.squirrel@webmail.xs4all.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, September 25, 2013 09:33, Marc Mamin wrote:
> Hi,
>
> This regexp call freezes with almost 100% CPU usage, so I guess it creates an infinite loop.
>
> With Postgres 9.1 on Linux, I can kill the backend cleanly and get following message:
>
> cic_db=# select regexp_matches ('aa bb aa ba baa x','(^((?!aa)))+','gx');
> ERROR: invalid regular expression: nfa has too many states
>
> on Windows and Postgres 9.3, I used the terminate icon from pgAdmin,
> which resulted in a FATAL error, killed all other processes and finally stopped the server.
>
> I guesss this is a windows issue, but we do not have a Postgres 9.3 installation on Linux yet, so that I can't test it.
>

On 9.3 and 9.4devel, on linux (centos 6.4), that statement / regex returns after ~2 minutes (on a modest desktop) with that
same error, but not crashing.

Erik Rijkers

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2013-09-25 08:46:52 Re: FW: REVIEW: Allow formatting in log_line_prefix
Previous Message Amit Kapila 2013-09-25 07:47:35 Re: Minmax indexes