Skip site navigation (1) Skip section navigation (2)

segfault in locking code

From: Suresh <suiyengar(at)yahoo(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: segfault in locking code
Date: 2008-03-28 14:54:03
Message-ID: 659831.88137.qm@web54506.mail.re2.yahoo.com (view raw or flat)
Thread:
Lists: pgsql-hackers
Hello,

I have a custom code in postgres which runs properly in some occasions and segfaults some times. The trace is as below :

Program received signal SIGSEGV, Segmentation fault.
0x081ae8c4 in LWLockRelease (lockid=664)
    at ../../../../src/include/storage/s_lock.h:128
128             __asm__ __volatile__(


(gdb) where
#0  0x081ae8c4 in LWLockRelease (lockid=664)
    at ../../../../src/include/storage/s_lock.h:128
#1  0x0808f820 in heap_fetch_tuple (relation=0xb5d986d8, snapshot=0xa298aa0, 
    buffer=305, tid=0xa23f600, tuple=0xa29db0c, pgstat_info=0xa29db30, 
    tupStat=0xbfac9374) at heapam.c:3404
#2  0x08144df2 in ExecNestLoop (node=0xa298f30) at nodeNestloop.c:452
#3  0x08136840 in ExecProcNode (node=0xa298f30) at execProcnode.c:352
#4  0x08135ba1 in ExecutorRun (queryDesc=0xa298ac8, 
    direction=ForwardScanDirection, count=0) at execMain.c:1162
#5  0x081b7e60 in PortalRunSelect (portal=0xa296a98, 
    forward=<value optimized out>, count=0, dest=0x82d3308) at pquery.c:794
#6  0x081b8a88 in PortalRun (portal=0xa296a98, count=2147483647, 
    dest=0x82d3308, altdest=0x82d3308, completionTag=0xbfac9608 "")
    at pquery.c:646
#7  0x081b48fc in exec_simple_query (
    query_string=0xa275b58 "select l_orderkey as a from tpcd.orders, tpcd.lineitem where o_orderkey=l_orderkey ;\n") at postgres.c:1003
#8  0x081b6371 in PostgresMain (argc=1, argv=0xa2379f0, 
    username=0xa238398 "suresh") at postgres.c:3221
#9  0x081532e3 in main (argc=2, argv=Cannot access memory at address 0xfffffffd
) at main.c:411

It segfaults in the locking _asm_ code. What could be the reason for this variable behavior ?

Thanks and regards,
Suresh

       
---------------------------------
Never miss a thing.   Make Yahoo your homepage.

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2008-03-28 14:59:59
Subject: Re: advancing snapshot's xmin
Previous:From: Simon RiggsDate: 2008-03-28 14:47:40
Subject: Re: advancing snapshot's xmin

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group