Re: C set return function differences on 8.0? - Mailing list pgsql-interfaces

From Tim Jackson
Subject Re: C set return function differences on 8.0?
Date
Msg-id 42D2FC28.8070908@ints.com
Whole thread Raw
In response to Re: C set return function differences on 8.0?  (Michael Fuhr <mike@fuhr.org>)
List pgsql-interfaces
Michael Fuhr wrote:

>
>Let's see if attaching a debugger to the backend or adding some
>ereport() calls can at least tell us where the crash is happening.
>Then maybe we can figure out why.
>  
>
I was able to set gdb to the pid of  psql  session and saw that selects 
on the "bad" views segfaulted on pfree()
The documentation for SRF had a comment that said pfree() was not really 
necessary so I commented that code out and now I can select all the 
views. :) 
Perhaps you can advise me on why pfree() would segfault on 8.0 in but 
not 7.4

Anyway the .so generated views are working now as they were on 7.4.
Thanks for your help. Tim


Not sure what all this means but the following lines were gleaned from 
the core dump

cannot allocate memory for thread-local data: ABORT
result == _rtld_local._dl_tls_max_dtv_idx + 1
result <= _rtld_local._dl_tls_max_dtv_idx + 1
@cnt < _rtld_local._dl_tls_dtv_slotinfo_list->len
_rtld_local._dl_tls_dtv_slotinfo_list->next == ((void *)0)
_rtld_local._dl_tls_dtv_slotinfo_list != ((void *)0)
_rtld_local._dl_tls_max_dtv_idx == 0
_rtld_local._dl_tls_dtv_slotinfo_list == ((void *)0)

(size_t) map->l_tls_offset >= map->l_tls_blocksize

map->l_tls_blocksize >= map->l_tls_initimage_size

../sysdeps/unix/sysv/linux/dl-origin.c

FATAL: cannot determine library version

../sysdeps/generic/dl-sysdep.c

Inconsistency detected by ld.so: %s: %u: %s%sAssertion `%s' failed!

Inconsistency detected by ld.so: %s: %u: %s%sUnexpected error: %s.

And Here is what gdb says about the core

Core was generated by `postgres: postgres lubesoft_tj [local] 
SELECT                     '.
Program terminated with signal 11, Segmentation fault.
#0  0x08222a86 in ?? ()
(no debugging symbols found)...Using host libthread_db library 
"/lib/tls/libthread_db.so.1".





pgsql-interfaces by date:

Previous
From: Tim Jackson
Date:
Subject: Re: C set return function differences on 8.0?]]
Next
From: Tom Lane
Date:
Subject: Re: C set return function differences on 8.0?]]