Re: Segfault on exclusion constraint violation

From: Dennis Pozzi <dpozzi(at)adobe(dot)com>
To: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Pg Bugs <pgsql-bugs(at)postgresql(dot)org>, "David Gould (daveg(at)sonic(dot)net)" <daveg(at)sonic(dot)net>, Saravanakumar T R <satr(at)adobe(dot)com>
Subject: Re: Segfault on exclusion constraint violation
Date: 2015-03-17 15:15:56
Message-ID: CO1PR02MB2568CDB341FD4E5E7366BA4CA030@CO1PR02MB256.namprd02.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

We are seeing a similar segfault scenario in 9.4.1 without assertions enabled. 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=# show debug_assertions;
debug_assertions
------------------
off
(1 row)

postgres=# set debug_assertions = 'on' ;
ERROR: assertion checking is not supported by this build
postgres=#

We believe the error occurred when an insert query was running inside a transaction, 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 PDT,,0,LOG,00000,"server process (PID 9471) was terminated by signal 11: Segmentation fault","Failed process was running: INSERT into ad_instances (adinstid, cid, kid, adrefid, termid, sync_match_type,
status_code, start_date, sync_keyword)
SELECT nextval('public.ad_instances_adinstid_seq'), cid, 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 = 'n'
AND cid = 1100218810
GROUP BY cid, kw.kid, adg.adrefid, termid, ai_mtid, sync_keyword, tmp_keywords_1100218810.status_code",,,,,,,,""

Application log says:
2015-03-16 02:43:25.763 PDT,"release","c10036",4349,"op02.lon5.efrontier.com: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 process exited abnormally and possibly corrupted shared memory.","In a moment you 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 000000000066148b 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.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Elena Fernandez Carmona 2015-03-17 15:52:50 Re: compatibilty postgres 9.2 RHEL 6.4
Previous Message jan.mate 2015-03-16 23:03:52 BUG #12872: Inconsistent processing of interval values