[BUGS] BUG #4049: ecpg library causes signal 11 when --enable-thread-safety is turned on

2008-03-22 Thread Steve Clark

The following bug has been logged online:

Bug reference:  4049
Logged by:  Steve Clark
Email address:  [EMAIL PROTECTED]
PostgreSQL version: 8.3.1
Operating system:   FreeBSD 6.2 patch level 7
Description:ecpg library causes signal 11 when
--enable-thread-safety is turned on
Details: 

The ports for Freebsd turn on --enable-thread-safety during configure 
of pg.

When running my app after some time I have been getting a core dump - 
sig 11.

#0  0x28333b96 in memcpy () from /lib/libc.so.6
(gdb) bt
#0  0x28333b96 in memcpy () from /lib/libc.so.6
#1  0x280d0122 in ecpg_init_sqlca (sqlca=0x0) at misc.c:100
#2  0x280d0264 in ECPGget_sqlca () at misc.c:145
#3  0x280d056c in ecpg_log (
 format=0x280d1d78 "free_params line %d: parameter %d = %s\n") at 
misc.c:243
#4  0x280c9758 in free_params (paramValues=0x836fe00, nParams=104, 
print=1 '\001',
 lineno=3303) at execute.c:1045
#5  0x280c9f08 in ecpg_execute (stmt=0xa726f00) at execute.c:1298
#6  0x280ca978 in ECPGdo (lineno=3303, compat=0, force_indicator=1,
 connection_name=0x0, questionmarks=0 '\0', st=0,
 query=0x806023c "update T_UNIT_STATUS_LOG set ip_address  =  $1 
:: inet   , last_ip_address  =  $2  :: inet   , unit_date  =  $3  :: 
timestamp with time zone  , unit_raw_time  =  $4  , status_date  = now 
() , unit_ac"...) at execute.c:1636
#7  0x08057a46 in UpdateTUSL (pCachedUnit=0x807b680, msg=0xbfbf8850 "",
 p_threshold=80, p_actualIP=0xbfbfe880 "24.39.85.226")
 at srm2_monitor_db.pgc:3303
#8  0x0804f174 in main (argc=3, argv=0xbfbf7fc0) at 
srm2_monitor_server.c:3265
(gdb) f 2
#2  0x280d0264 in ECPGget_sqlca () at misc.c:145
145 ecpg_init_sqlca(sqlca);
(gdb) p sqlca
$1 = (struct sqlca_t *) 0x0

in looking in the code in misc.c

I see:

struct sqlca_t *
ECPGget_sqlca(void)
{
#ifdef ENABLE_THREAD_SAFETY
struct sqlca_t *sqlca;

pthread_once(&sqlca_key_once, ecpg_sqlca_key_init);

sqlca = pthread_getspecific(sqlca_key);
if (sqlca == NULL)
{
sqlca = malloc(sizeof(struct sqlca_t));
^
ecpg_init_sqlca(sqlca);
pthread_setspecific(sqlca_key, sqlca);
}
return (sqlca);
#else
return (&sqlca);
#endif
}

The return from malloc should be checked to make sure it succeeds otherwise
it generates a sig 11.

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


[BUGS] BUG #4050: pg_dump data contains COMMIT statement (8.3, 8.4)

2008-03-22 Thread Vladimir Kokovic

The following bug has been logged online:

Bug reference:  4050
Logged by:  Vladimir Kokovic
Email address:  [EMAIL PROTECTED]
PostgreSQL version: PostgreSQL 8.4
Operating system:   Linux, Kubuntu 8.04 (hardy)
Description:pg_dump data contains COMMIT statement (8.3, 8.4)
Details: 

If database contains LARGE OBJECTS pg_dump inserts COMMIT statement after
last lo_close ! Same thing is with PostgreSQL 8.3 also.

...

1\\235\\000\\000\\1wb\\020\\000\\000\\000\\036Wj\\001\\300\\000\\000\\00
001wb\\020\\000\\000\\000\\346Wj\\001\\300\\000\\
000\\1wb\\020\\000\\000\\000\\256Xj\\001\\300\\000\\000\\1wb\\020\\0
00\\000\\000vYj\\001\\300\\000\\000\\1wb\\020
\\000\\000\\000>Zj\\001\\300\\000\\000\\000');
SELECT lo_close(0);

COMMIT;

--
-- Data for Name: BLOB COMMENTS; Type: BLOB COMMENTS; Schema: -; Owner:
--


SET search_path = adefault_finansije, pg_catalog;

--
-- Name: dur_domaci_ulazni_racuni_pkey; Type: CONSTRAINT; Schema:
adefault_finansije; Owner: vlada; Tablespace:
--

ALTER TABLE ONLY dur_domaci_ulazni_racuni
ADD CONSTRAINT dur_domaci_ulazni_racuni_pkey PRIMARY KEY (id);


...

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


Re: [BUGS] BUG #4050: pg_dump data contains COMMIT statement (8.3, 8.4)

2008-03-22 Thread Tom Lane
"Vladimir Kokovic" <[EMAIL PROTECTED]> writes:
> If database contains LARGE OBJECTS pg_dump inserts COMMIT statement after
> last lo_close ! Same thing is with PostgreSQL 8.3 also.

Well, sure.  It matches the BEGIN before the first lo_open.  Without
those blob-restoring wouldn't work at all.

regards, tom lane

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


Re: [BUGS] BUG #3983: pgxs files missing from binary installation

2008-03-22 Thread Bruce Momjian

Added to Win32 TODO:

o Support pgxs


---

Mike Leahy wrote:
> 
> The following bug has been logged online:
> 
> Bug reference:  3983
> Logged by:  Mike Leahy
> Email address:  [EMAIL PROTECTED]
> PostgreSQL version: 8.3.0
> Operating system:   Win32
> Description:pgxs files missing from binary installation
> Details: 
> 
> I've tried to compile the PL/R module, which I have been doing with 8.2.x
> versions.  PL/R requires the pgxs.mk file, and determines its location from
> pg_config.  The location of pgxs.mk reported by pg_config in my case (from
> windows binary installer) is "C:/Program
> Files/PostgreSQL/8.3/lib/pgxs/src/makefiles/pgxs.mk".  However, there is no
> such pgxs folder located in the /lib directory...nor is there any other
> instance of pgxs.mk anywhere in the PostgreSQL install location.
> 
> There also seem to be no pgxs files in any of the other distributed 8.3
> binaries for win32.  Tom Lane's suggestion in the pgsql-general mailing list
> is that this is a bug with the installer.  At this time, I'm unable to
> compile PL/R for PostgreSQL, which I think has a growing user base that
> relies on the installer normally posted at http://www.joeconway.com/plr.
> 
> ---(end of broadcast)---
> TIP 5: don't forget to increase your free space map settings

-- 
  Bruce Momjian  <[EMAIL PROTECTED]>http://momjian.us
  EnterpriseDB http://postgres.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs