Misleading panic message in backend/access/transam/xlog.c - Mailing list pgsql-hackers

From Michael Banck
Subject Misleading panic message in backend/access/transam/xlog.c
Date
Msg-id 1547031999.32387.16.camel@credativ.de
Whole thread Raw
Responses Re: Misleading panic message in backend/access/transam/xlog.c  (Magnus Hagander <magnus@hagander.net>)
Re: Misleading panic message in backend/access/transam/xlog.c  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
Hi,

there was a report in #postgresql recently about a crash on Google Cloud
SQL with the somewhat misleading message "could not write to log file"
while in fact it was the xlog/wal:

|PANIC:  could not write to log file 000000010000019600000054 at offset
| 13279232, length 245760: Cannot allocate memory 
|ERROR:  could not write block 74666 in file "base/18031/48587": Cannot
| allocate memory 
|CONTEXT:  writing block 74666 of relation base/18031/48587 
|LOG:  server process (PID 5160) was terminated by signal 9: Killed 

The slightly longer logfile can be found here: http://dpaste.com/2T61PS9

I suggest to reword that message, e.g. "could not write to transaction
log file" or "could not write to wal file".

Also, the errno (ENOMEM) is curious (and the user wrote that Google
monitoring reported memory at 16/20GB at the time of the crash), but it
could be a due to running on a cloud-fork? As you have no access to
PGDATA, it sounds difficult to diagnose after the fact.


Michael

-- 
Michael Banck
Projektleiter / Senior Berater
Tel.: +49 2166 9901-171
Fax:  +49 2166 9901-100
Email: michael.banck@credativ.de

credativ GmbH, HRB Mönchengladbach 12080
USt-ID-Nummer: DE204566209
Trompeterallee 108, 41189 Mönchengladbach
Geschäftsführung: Dr. Michael Meskes, Jörg Folz, Sascha Heuer

Unser Umgang mit personenbezogenen Daten unterliegt
folgenden Bestimmungen: https://www.credativ.de/datenschutz


pgsql-hackers by date:

Previous
From: Dmitry Dolgov
Date:
Subject: Re: libpq compression
Next
From: Sergei Kornilov
Date:
Subject: Re: ALTER TABLE with multiple SET NOT NULL