Hello,<br /><br />I have a custom code in postgres which runs properly in some occasions and segfaults some times. The
traceis as below :<br /><br />Program received signal SIGSEGV, Segmentation fault.<br />0x081ae8c4 in LWLockRelease
(lockid=664)<br/> at ../../../../src/include/storage/s_lock.h:128<br />128 __asm__ __volatile__(<br
/><br/><br />(gdb) where<br />#0 0x081ae8c4 in LWLockRelease (lockid=664)<br /> at
../../../../src/include/storage/s_lock.h:128<br/>#1 0x0808f820 in heap_fetch_tuple (relation=0xb5d986d8,
snapshot=0xa298aa0,<br /> buffer=305, tid=0xa23f600, tuple=0xa29db0c, pgstat_info=0xa29db30, <br />
tupStat=0xbfac9374)at heapam.c:3404<br />#2 0x08144df2 in ExecNestLoop (node=0xa298f30) at nodeNestloop.c:452<br />#3
0x08136840in ExecProcNode (node=0xa298f30) at execProcnode.c:352<br />#4 0x08135ba1 in ExecutorRun
(queryDesc=0xa298ac8,<br /> direction=ForwardScanDirection, count=0) at execMain.c:1162<br />#5 0x081b7e60 in
PortalRunSelect(portal=0xa296a98, <br /> forward=<value optimized out>, count=0, dest=0x82d3308) at
pquery.c:794<br/>#6 0x081b8a88 in PortalRun (portal=0xa296a98, count=2147483647, <br /> dest=0x82d3308,
altdest=0x82d3308,completionTag=0xbfac9608 "")<br /> at pquery.c:646<br />#7 0x081b48fc in exec_simple_query (<br
/> query_string=0xa275b58 "select l_orderkey as a from tpcd.orders, tpcd.lineitem where o_orderkey=l_orderkey ;\n")
atpostgres.c:1003<br />#8 0x081b6371 in PostgresMain (argc=1, argv=0xa2379f0, <br /> username=0xa238398 "suresh")
atpostgres.c:3221<br />#9 0x081532e3 in main (argc=2, argv=Cannot access memory at address 0xfffffffd<br />) at
main.c:411<br/><br />It segfaults in the locking _asm_ code. What could be the reason for this variable behavior ?<br
/><br/>Thanks and regards,<br />Suresh<br /><p><hr size="1" />Never miss a thing. <a
href="http://us.rd.yahoo.com/evt=51438/*http://www.yahoo.com/r/hs">Make Yahoo your homepage.</a>