Re: Wierd panic with 7.4.7 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Wierd panic with 7.4.7
Date
Msg-id 11752.1119942518@sss.pgh.pa.us
Whole thread Raw
In response to Wierd panic with 7.4.7  ("Joshua D. Drake" <jd@commandprompt.com>)
Responses Re: Wierd panic with 7.4.7
Re: Wierd panic with 7.4.7
List pgsql-hackers
"Joshua D. Drake" <jd@commandprompt.com> writes:
> 2005-06-27 16:37:53 ERROR:  could not send data to client: Broken pipe
> 2005-06-27 16:37:53 PANIC:  cannot abort transaction 146017848, it was 
> already committed

A reasonable guess as to what happened there is:

1. Client process dies just as server is committing a transaction on its  behalf.

2. For some reason, server tries to send a message to client while it's  doing post-commit cleanup (before it gets to
thepoint of resetting  its state to show that it's not in the transaction anymore).
 

3. Kernel rejects message, causing elog(ERROR), causing entry to  AbortTransaction, causing above panic.

There are a couple of big problems with this theory, though.  In the
first place, there aren't any messages sent to the client during
post-commit; unless possibly it's an error message due to a failure
during post-commit, and that should have shown up in the server log.
In the second place, we don't treat communication failures as ERRORs,
so how did step 3 happen?

Do you know what the dead client was doing?  Can you reproduce this?
        regards, tom lane


pgsql-hackers by date:

Previous
From: ITAGAKI Takahiro
Date:
Subject: Re: [PATCHES] O_DIRECT for WAL writes
Next
From: "Dave Page"
Date:
Subject: Re: For review: Server instrumentation patch