Thread: Port Bug Report: Addendum to my earlier report today
============================================================================ POSTGRESQL BUG REPORT TEMPLATE ============================================================================ Your name : Rachel Greenham Your email address : rachel@enlarion.demon.co.uk Category : runtime: front-end: Java Severity : non-critical Summary: Addendum to my earlier report today System Configuration -------------------- Operating System : Linux 2.0.36 ELF PostgreSQL version : 6.5 Compiler used : egcs-2.91.60 Hardware: --------- SuSE 6.0 AMDK6/2 128Mb RAM Linux data 2.0.36 #8 Sat May 1 15:09:56 GMT+1 1999 i586 unknown Versions of other tools: ------------------------ GNU Make version 3.76.1 Linux JDK 1.2 pre-release v2 -------------------------------------------------------------------------- Problem Description: -------------------- To add to the earlier report, I am more and more suspecting that it's due to running Java with native threads (which is acknowledged to be unready). With a task-manager like program running, I noticed that large numbers of postgres (not postmaster)tasks were being spawned, seemingly to match the Java threads that were running, then at one point, one more attempted hit caused the failure. Also, when I then killed off the servlet engine, Postgres died - all processes including postmaster, leaving behind its lock file. Could it be a maximum number of postgres threads problem? Or thread non-safety in the JDBC driver? I'm now running exclusively on green threads to see if it ever appears there. I did see something once, but it may have been an aberration (having restarted java with green threads but not restarting postgres properly after it died, I suspect). So far, under green threads it seems fine. Please note above that as I believe this to be the case, I've downgraded my assessment from critical to non-critical as green-threads operation will do for now. :-) -------------------------------------------------------------------------- Test Case: ---------- Hit the database repeatedly over a period with any operations (including just selects) using the following combination: Linux / JDK 1.2 prev2 with Native threads on Postgres 6.5 with JDBC 6.5-1.2 -------------------------------------------------------------------------- Solution: --------- For the time being, the workaround seems to be to stick to green threads on Linux. --------------------------------------------------------------------------
Hello, I'm trying to make a 6.5 port for OpenBSD and I'm running to problems making the package. Apologies if I'm covering known ground. Version: PostgreSQL 6.5 Compiler: egcs-2.93.22 OS: OpenBSD 2.5 i386 Other tools: bison-1.27 gmake-3.77 I made one patch so far in src (-m486 won't fly on non-i386 hardware): *** template/openbsd.orig Thu Jun 24 03:19:42 1999 --- template/openbsd Thu Jun 24 03:20:15 1999 *************** *** 1,6 **** AROPT:cq SHARED_LIB:-fpic -DPIC ! CFLAGS:-O2 -m486 -pipe SRCH_INC: SRCH_LIB: USE_LOCALE:no --- 1,6 ---- AROPT:cq SHARED_LIB:-fpic -DPIC ! CFLAGS:-O2 -pipe SRCH_INC: SRCH_LIB: USE_LOCALE:no My build starts getting into trouble with src/backend/storage/buffer/buf_init.c: cc -I../../../include -I../../../backend -I/usr/local/include -O2 -pipe -I../. . -c buf_init.c -o buf_init.o buf_init.c: In function `InitBufferPool': buf_init.c:241: `WaitCLSemId' undeclared (first use in this function) buf_init.c:241: (Each undeclared identifier is reported only once buf_init.c:241: for each function it appears in.) gmake[3]: *** [buf_init.o] Error 1 To me it looks like you're missing a declaration, referring to file bufmgr.c: extern IpcSemaphoreId WaitCLSemId; I would add the line but I don't know if that's the real solution. Ciao! --Louis Louis Bertrand <louis@bertrandtech.on.ca> Bertrand Technical Services, Bowmanville, ON, Canada Tel: +1.905.623.8925 Fax: +1.905.623.3852
> I made one patch so far in src (-m486 won't fly on non-i386 hardware): > > *** template/openbsd.orig Thu Jun 24 03:19:42 1999 > --- template/openbsd Thu Jun 24 03:20:15 1999 > *************** > *** 1,6 **** > AROPT:cq > SHARED_LIB:-fpic -DPIC > ! CFLAGS:-O2 -m486 -pipe > SRCH_INC: > SRCH_LIB: > USE_LOCALE:no > --- 1,6 ---- > AROPT:cq > SHARED_LIB:-fpic -DPIC > ! CFLAGS:-O2 -pipe > SRCH_INC: > SRCH_LIB: > USE_LOCALE:no Applied. > My build starts getting into trouble with > src/backend/storage/buffer/buf_init.c: > > cc -I../../../include -I../../../backend -I/usr/local/include -O2 -pipe > -I../. > . -c buf_init.c -o buf_init.o > buf_init.c: In function `InitBufferPool': > buf_init.c:241: `WaitCLSemId' undeclared (first use in this function) > buf_init.c:241: (Each undeclared identifier is reported only once > buf_init.c:241: for each function it appears in.) > gmake[3]: *** [buf_init.o] Error 1 > > To me it looks like you're missing a declaration, referring to file > bufmgr.c: > extern IpcSemaphoreId WaitCLSemId; > > I would add the line but I don't know if that's the real solution. Yes, add them. My new buf_init.c shows: #ifndef HAS_TEST_AND_SET { int status; --> extern IpcSemaphoreId WaitIOSemId; --> extern IpcSemaphoreId WaitCLSemId; WaitIOSemId = IpcSemaphoreCreate(IPCKeyGetWaitIOSemaphoreKey(key), I will add it to the main source tree. We don't have many people using HAS_TEST_AND_SET as undefined. -- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
Thanks for your response. How do I find out when the patched package will be released (I subscribe to announce -- is that enough?). About HAS_TEST_AND_SET: it sounds like OpenBSD should use it. I'll check the port and make sure it's defining the right os/architecture. Ciao! --Louis Louis Bertrand <louis@bertrandtech.on.ca> Bertrand Technical Services, Bowmanville, ON, Canada Tel: +1.905.623.8925 Fax: +1.905.623.3852 OpenBSD: Secure, Robust, Free Operating System <http://www.openbsd.org/> <mailto:louis@openbsd.org> On Sat, 26 Jun 1999, Bruce Momjian wrote: > > I made one patch so far in src (-m486 won't fly on non-i386 hardware): > > > > *** template/openbsd.orig Thu Jun 24 03:19:42 1999 > > --- template/openbsd Thu Jun 24 03:20:15 1999 > > *************** > > *** 1,6 **** > > AROPT:cq > > SHARED_LIB:-fpic -DPIC > > ! CFLAGS:-O2 -m486 -pipe > > SRCH_INC: > > SRCH_LIB: > > USE_LOCALE:no > > --- 1,6 ---- > > AROPT:cq > > SHARED_LIB:-fpic -DPIC > > ! CFLAGS:-O2 -pipe > > SRCH_INC: > > SRCH_LIB: > > USE_LOCALE:no > > Applied. > > > My build starts getting into trouble with > > src/backend/storage/buffer/buf_init.c: > > > > cc -I../../../include -I../../../backend -I/usr/local/include -O2 -pipe > > -I../. > > . -c buf_init.c -o buf_init.o > > buf_init.c: In function `InitBufferPool': > > buf_init.c:241: `WaitCLSemId' undeclared (first use in this function) > > buf_init.c:241: (Each undeclared identifier is reported only once > > buf_init.c:241: for each function it appears in.) > > gmake[3]: *** [buf_init.o] Error 1 > > > > To me it looks like you're missing a declaration, referring to file > > bufmgr.c: > > extern IpcSemaphoreId WaitCLSemId; > > > > I would add the line but I don't know if that's the real solution. > > Yes, add them. My new buf_init.c shows: > > > #ifndef HAS_TEST_AND_SET > { > int status; > --> extern IpcSemaphoreId WaitIOSemId; > --> extern IpcSemaphoreId WaitCLSemId; > > WaitIOSemId = > IpcSemaphoreCreate(IPCKeyGetWaitIOSemaphoreKey(key), > > I will add it to the main source tree. We don't have many people using > HAS_TEST_AND_SET as undefined. > > -- > Bruce Momjian | http://www.op.net/~candle > maillist@candle.pha.pa.us | (610) 853-3000 > + If your life is a hard drive, | 830 Blythe Avenue > + Christ can be your backup. | Drexel Hill, Pennsylvania 19026 > >
> Thanks for your response. How do I find out when the patched package will > be released (I subscribe to announce -- is that enough?). Yes. > > About HAS_TEST_AND_SET: it sounds like OpenBSD should use it. I'll check > the port and make sure it's defining the right os/architecture. Unless you are using a new cpu, you should already have test-and-set for that platform. The solution has been to define separate template/* files for each os/cpu combination to be sure the proper combination gets used. However, the actual locking test is done in include/storage/s_lock.h, and it checks for various cpu types. Not sure how your locking define is getting set. > > Ciao! > --Louis > > Louis Bertrand <louis@bertrandtech.on.ca> > Bertrand Technical Services, Bowmanville, ON, Canada > Tel: +1.905.623.8925 Fax: +1.905.623.3852 > > OpenBSD: Secure, Robust, Free Operating System > <http://www.openbsd.org/> <mailto:louis@openbsd.org> > > > On Sat, 26 Jun 1999, Bruce Momjian wrote: > > > > I made one patch so far in src (-m486 won't fly on non-i386 hardware): > > > > > > *** template/openbsd.orig Thu Jun 24 03:19:42 1999 > > > --- template/openbsd Thu Jun 24 03:20:15 1999 > > > *************** > > > *** 1,6 **** > > > AROPT:cq > > > SHARED_LIB:-fpic -DPIC > > > ! CFLAGS:-O2 -m486 -pipe > > > SRCH_INC: > > > SRCH_LIB: > > > USE_LOCALE:no > > > --- 1,6 ---- > > > AROPT:cq > > > SHARED_LIB:-fpic -DPIC > > > ! CFLAGS:-O2 -pipe > > > SRCH_INC: > > > SRCH_LIB: > > > USE_LOCALE:no > > > > Applied. > > > > > My build starts getting into trouble with > > > src/backend/storage/buffer/buf_init.c: > > > > > > cc -I../../../include -I../../../backend -I/usr/local/include -O2 -pipe > > > -I../. > > > . -c buf_init.c -o buf_init.o > > > buf_init.c: In function `InitBufferPool': > > > buf_init.c:241: `WaitCLSemId' undeclared (first use in this function) > > > buf_init.c:241: (Each undeclared identifier is reported only once > > > buf_init.c:241: for each function it appears in.) > > > gmake[3]: *** [buf_init.o] Error 1 > > > > > > To me it looks like you're missing a declaration, referring to file > > > bufmgr.c: > > > extern IpcSemaphoreId WaitCLSemId; > > > > > > I would add the line but I don't know if that's the real solution. > > > > Yes, add them. My new buf_init.c shows: > > > > > > #ifndef HAS_TEST_AND_SET > > { > > int status; > > --> extern IpcSemaphoreId WaitIOSemId; > > --> extern IpcSemaphoreId WaitCLSemId; > > > > WaitIOSemId = > > IpcSemaphoreCreate(IPCKeyGetWaitIOSemaphoreKey(key), > > > > I will add it to the main source tree. We don't have many people using > > HAS_TEST_AND_SET as undefined. > > > > -- > > Bruce Momjian | http://www.op.net/~candle > > maillist@candle.pha.pa.us | (610) 853-3000 > > + If your life is a hard drive, | 830 Blythe Avenue > > + Christ can be your backup. | Drexel Hill, Pennsylvania 19026 > > > > > > > > -- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
Bruce, Can I get a little bit more help with the OpenBSD port, please? It should be obvious to all by now that I'm not terribly sure of what I'm doing... $ ./config.guess i386-unknown-openbsd2.5 I created a file include/port/openbsd.h, and used bsd.h as the initial contents. It seems to be building but I'm not sure if it's pulling in the right configuration. Thanks --Louis Louis Bertrand <louis@bertrandtech.on.ca> Bertrand Technical Services, Bowmanville, ON, Canada Tel: +1.905.623.8925 Fax: +1.905.623.3852 OpenBSD: Secure, Robust, Free Operating System <http://www.openbsd.org/> <mailto:louis@openbsd.org> On Sat, 26 Jun 1999, Bruce Momjian wrote: > > Thanks for your response. How do I find out when the patched package will > > be released (I subscribe to announce -- is that enough?). > > Yes. > > > > > About HAS_TEST_AND_SET: it sounds like OpenBSD should use it. I'll check > > the port and make sure it's defining the right os/architecture. > > Unless you are using a new cpu, you should already have test-and-set for > that platform. The solution has been to define separate template/* > files for each os/cpu combination to be sure the proper combination gets > used. However, the actual locking test is done in > include/storage/s_lock.h, and it checks for various cpu types. Not sure > how your locking define is getting set. > > > > > > > Ciao! > > --Louis > > > > Louis Bertrand <louis@bertrandtech.on.ca> > > Bertrand Technical Services, Bowmanville, ON, Canada > > Tel: +1.905.623.8925 Fax: +1.905.623.3852 > > > > OpenBSD: Secure, Robust, Free Operating System > > <http://www.openbsd.org/> <mailto:louis@openbsd.org> > > > > > > On Sat, 26 Jun 1999, Bruce Momjian wrote: > > > > > > I made one patch so far in src (-m486 won't fly on non-i386 hardware): > > > > > > > > *** template/openbsd.orig Thu Jun 24 03:19:42 1999 > > > > --- template/openbsd Thu Jun 24 03:20:15 1999 > > > > *************** > > > > *** 1,6 **** > > > > AROPT:cq > > > > SHARED_LIB:-fpic -DPIC > > > > ! CFLAGS:-O2 -m486 -pipe > > > > SRCH_INC: > > > > SRCH_LIB: > > > > USE_LOCALE:no > > > > --- 1,6 ---- > > > > AROPT:cq > > > > SHARED_LIB:-fpic -DPIC > > > > ! CFLAGS:-O2 -pipe > > > > SRCH_INC: > > > > SRCH_LIB: > > > > USE_LOCALE:no > > > > > > Applied. > > > > > > > My build starts getting into trouble with > > > > src/backend/storage/buffer/buf_init.c: > > > > > > > > cc -I../../../include -I../../../backend -I/usr/local/include -O2 -pipe > > > > -I../. > > > > . -c buf_init.c -o buf_init.o > > > > buf_init.c: In function `InitBufferPool': > > > > buf_init.c:241: `WaitCLSemId' undeclared (first use in this function) > > > > buf_init.c:241: (Each undeclared identifier is reported only once > > > > buf_init.c:241: for each function it appears in.) > > > > gmake[3]: *** [buf_init.o] Error 1 > > > > > > > > To me it looks like you're missing a declaration, referring to file > > > > bufmgr.c: > > > > extern IpcSemaphoreId WaitCLSemId; > > > > > > > > I would add the line but I don't know if that's the real solution. > > > > > > Yes, add them. My new buf_init.c shows: > > > > > > > > > #ifndef HAS_TEST_AND_SET > > > { > > > int status; > > > --> extern IpcSemaphoreId WaitIOSemId; > > > --> extern IpcSemaphoreId WaitCLSemId; > > > > > > WaitIOSemId = > > > IpcSemaphoreCreate(IPCKeyGetWaitIOSemaphoreKey(key), > > > > > > I will add it to the main source tree. We don't have many people using > > > HAS_TEST_AND_SET as undefined. > > > > > > -- > > > Bruce Momjian | http://www.op.net/~candle > > > maillist@candle.pha.pa.us | (610) 853-3000 > > > + If your life is a hard drive, | 830 Blythe Avenue > > > + Christ can be your backup. | Drexel Hill, Pennsylvania 19026 > > > > > > > > > > > > > > > > > -- > Bruce Momjian | http://www.op.net/~candle > maillist@candle.pha.pa.us | (610) 853-3000 > + If your life is a hard drive, | 830 Blythe Avenue > + Christ can be your backup. | Drexel Hill, Pennsylvania 19026 > >
> Bruce, > > Can I get a little bit more help with the OpenBSD port, please? It should > be obvious to all by now that I'm not terribly sure of what I'm doing... > > $ ./config.guess > i386-unknown-openbsd2.5 > > I created a file include/port/openbsd.h, and used bsd.h as the initial > contents. It seems to be building but I'm not sure if it's pulling in the > right configuration. I am not sure how that all fits together. Seems configure/configure.in define the os= for the platform. There is also an entry in template/.similar which should match the config.guess pretty closely. Don't use the version numbers unless you need it. That way it will match any openbsd. -- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026