From: | Merlin Moncure <mmoncure(at)gmail(dot)com> |
---|---|
To: | Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> |
Cc: | pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org> |
Subject: | Re: pgAgent crashes on failed connection |
Date: | 2011-08-04 19:30:17 |
Message-ID: | CAHyXU0w7MO=UvGtSjz5z199nHeXuNQxM4HZVJXKGTfwbjtQcMA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-hackers |
On Thu, Aug 4, 2011 at 2:19 PM, Heikki Linnakangas
<heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
> I created 100 identical pgagent jobs, with one step that simply does "SELECT
> pg_sleep(10)". I then forced them all to run immediately, with "UPDATE
> pgagent.pga_job SET jobnextrun=now();". pgagent crashed.
>
> What happened is that the when all those jobs are launched at the same time,
> the server ran into the max_connections limit, and pgagent didn't handle
> that too well. JobThread::JobThread constructor does not check for NULL
> result from DBConn::Get(), and passes a NULL connection to Job::Job, which
> tries to reference it, leading to a segfault.
>
> I propose the attached patch.
hm, in the event that happens, is that logged in the client somehow?
wouldn't you want to throw an exception or something like that?
merlin
From | Date | Subject | |
---|---|---|---|
Next Message | Guillaume Lelarge | 2011-08-05 17:23:10 | pgAgent commit: Update HTTP checkout link for INSTALL file |
Previous Message | Heikki Linnakangas | 2011-08-04 19:19:46 | pgAgent crashes on failed connection |