BUG #6249: Segmentation fault in VirtualXactLock() - Mailing list pgsql-bugs

From Fujii Masao
Subject BUG #6249: Segmentation fault in VirtualXactLock()
Date
Msg-id 201110110144.p9B1idhO038422@wwwmaster.postgresql.org
Whole thread Raw
Responses Re: BUG #6249: Segmentation fault in VirtualXactLock()  (Fujii Masao <masao.fujii@gmail.com>)
List pgsql-bugs
The following bug has been logged online:

Bug reference:      6249
Logged by:          Fujii Masao
Email address:      masao.fujii@gmail.com
PostgreSQL version: 9.2dev
Operating system:   Linux hermes 2.6.38-11-generic #50-Ubuntu SMP Mon Sep 12
21:18:14 UTC 2011 i686 i686 i386 GNU/Linux
Description:        Segmentation fault in VirtualXactLock()
Details:

When I built Streaming Replication and Hot Standby environment, set
max_standby_streaming_delay to 1s and ran the following shell script which
creates the conflict between read-only query and recovery, SEGV occurred on
the standby.

----------------------
#!/bin/sh

# Master's port: 5432
# Standby's port: 9999

psql -c "CREATE TABLE tbl (id int)" -p 5432
psql -c "INSERT INTO tbl VALUES(1)" -p 5432

sleep 1

psql -c "SELECT pg_sleep(60) FROM tbl" -p 9999 &

sleep 1

psql -c "DELETE FROM tbl" -p 5432
psql -c "VACUUM tbl" -p 5432
----------------------

backtrace is:
Core was generated by `postgres: startup process   recovering 000000'.
Program terminated with signal 11, Segmentation fault.
#0  0x083114db in VirtualXactLock ()
(gdb) bt
#0  0x083114db in VirtualXactLock ()
#1  0x083072d1 in ResolveRecoveryConflictWithVirtualXIDs ()
#2  0x08307355 in ResolveRecoveryConflictWithSnapshot ()
#3  0x080b8abc in heap_xlog_clean ()
#4  0x080bc31a in heap2_redo ()
#5  0x080f02fd in StartupXLOG ()
#6  0x080f6c70 in StartupProcessMain ()
#7  0x0811d5f9 in AuxiliaryProcessMain ()
#8  0x082d17e4 in StartChildProcess ()
#9  0x082cd151 in PostmasterMain ()
#10 0x0824d6b4 in main ()

I was not able to reproduce this issue on 9.1.1. So the bug would exist only
on 9.2dev.

pgsql-bugs by date:

Previous
From: STIEG Heimo
Date:
Subject: Re: BUG #6247: Freeswitch will crash after 2-3 days within odbc connection
Next
From: Fujii Masao
Date:
Subject: Re: BUG #6249: Segmentation fault in VirtualXactLock()