We are seeing a similar segfault scenario in 9.4.1 without assertions enabl=
ed. We upgraded 4 of our production instances from 9.3.5 to 9.4.1 over the =
weekend.
We had staged on 9.4.0, and then 9.4.1 for over a month without seeing this=
error, but the staging work load is much lower than production.
postgres=3D# show debug_assertions;
debug_assertions
------------------
off
(1 row)
postgres=3D# set debug_assertions =3D 'on' ;
ERROR: assertion checking is not supported by this build
postgres=3D#
We believe the error occurred when an insert query was running inside a tr=
ansaction, and another query attempted to insert into the same table.
Postgres Log says :
2015-03-16 02:43:25.762 PDT,,,5481,,5504121c.1569,3,,2015-03-14 03:49:00 PD=
T,,0,LOG,00000,"server process (PID 9471) was terminated by signal 11: Segm=
entation fault","Failed process was running: INSERT into ad_instances (adin=
stid, cid, kid, adrefid, termid, sync_match_type,
status_code, start_date, syn=
c_keyword)
SELECT nextval('public.ad_instances_adinstid_seq'), ci=
d, kw.kid, adg.adrefid,
termid, ai_mtid, 'u', now(), sync_keyword
FROM tmp_keywords_1100218810
JOIN keywords kw using (keyword)
JOIN adgroups adg using (adref,cid)
WHERE keyword_type =3D 'n'
AND cid =3D 1100218810
GROUP BY cid, kw.kid, adg.adrefid, termid, ai_mtid, sy=
nc_keyword, tmp_keywords_1100218810.status_code",,,,,,,,""
Application log says:
2015-03-16 02:43:25.763 PDT,"release","c10036",4349,"op02.lon5.efrontier.co=
m:39404",5506a408.10fd,27,"idle in transaction",2015-03-16 02:36:08 PDT,44/=
292306,3267900389,WARNING,57P02,"terminating connection because of crash of=
another server process","The postmaster has commanded this server process =
to roll back the current transaction and exit, because another server proce=
ss exited abnormally and possibly corrupted shared memory.","In a moment yo=
u should be able to reconnect to the database and repeat your command.",,,,=
,,,"ad_status"
/var/log/messages says:
Mar 16 02:40:35 user27 kernel: : postgres[9471]: segfault at 30 ip 00000000=
0066148b sp 00007fffa9c5f5f0 error 4 in postgres[400000+54d000]
We have not been able to reproduce the error, but we are testing scenarios =
in our staging environment now.