Обсуждение: openbsd, plpython, missing threading symbols
Did we recently make some fixes for FBSD that cured the problem with unresolved pthread* symbols for plpython? If so, should we look at possibly doing something similar for OpenBSD? That might clean up buildfarm member spoonbill which has been failing ever since we started testing PLs. Stefan has upgraded the buildfarm code on this machine so we can now see all the logs from tha various buildfarm stages, if that is any help. cheers andrew
Andrew Dunstan <andrew@dunslane.net> writes: > Did we recently make some fixes for FBSD that cured the problem with > unresolved pthread* symbols for plpython? No, it's not fixed. I think the owner of the freebsd buildfarm machine masked the problem by building an unthreaded libpython. The only fix that so far looks like it would work is to build the backend with threading (CPPFLAGS += -D_THREAD_SAFE and LIBS += -pthread, IIUC). This seems sufficiently invasive that I'm quite loath to do it. Does anyone have a handle on the likely performance and stability costs of doing this on BSDen? The alternative is to say that plpython isn't supported on BSDen unless you choose to build an unthreaded libpython. Unpleasant as that may be, I do not care for the proposition that plpython gets to dictate our choice of libc. Whatever costs are incurred by that will be paid by people who are not even using plpython, and that's not the direction I want to see the pain flowing in. regards, tom lane
Tom Lane wrote: >Andrew Dunstan <andrew@dunslane.net> writes: > > >>Did we recently make some fixes for FBSD that cured the problem with >>unresolved pthread* symbols for plpython? >> >> > >No, it's not fixed. I think the owner of the freebsd buildfarm machine >masked the problem by building an unthreaded libpython. > >The only fix that so far looks like it would work is to build the >backend with threading (CPPFLAGS += -D_THREAD_SAFE and LIBS += -pthread, >IIUC). This seems sufficiently invasive that I'm quite loath to do it. >Does anyone have a handle on the likely performance and stability costs >of doing this on BSDen? > >The alternative is to say that plpython isn't supported on BSDen unless >you choose to build an unthreaded libpython. Unpleasant as that may be, >I do not care for the proposition that plpython gets to dictate our >choice of libc. Whatever costs are incurred by that will be paid by >people who are not even using plpython, and that's not the direction >I want to see the pain flowing in. > > > > I'm OK with that, but if that's what's done I think we should check for it up front at configure time and not let it fail at run time like we do now. cheers andrew
Andrew Dunstan <andrew@dunslane.net> writes: > Tom Lane wrote: >> The alternative is to say that plpython isn't supported on BSDen unless >> you choose to build an unthreaded libpython. > I'm OK with that, but if that's what's done I think we should check for > it up front at configure time and not let it fail at run time like we do > now. If you can create a suitable configure test, it'd be fine with me. regards, tom lane
Tom Lane wrote: > Andrew Dunstan <andrew@dunslane.net> writes: > >>Tom Lane wrote: >> >>>The alternative is to say that plpython isn't supported on BSDen unless >>>you choose to build an unthreaded libpython. > > >>I'm OK with that, but if that's what's done I think we should check for >>it up front at configure time and not let it fail at run time like we do >>now. > > > If you can create a suitable configure test, it'd be fine with me. Not sure if it is of any help but mod_python seems to be using this configure.in snippet to detect (and reject) a threaded python installation: # check if python is compiled with threads AC_MSG_CHECKING(whether Python is compiled with thread support) PyTHREADS=`$PYTHON_BIN -c "import sys; print \"thread\" in sys.builtin_module_names"` if test "$PyTHREADS" = "1"; then AC_MSG_RESULT(yes) echo echo " ****** WARNING ******" echo " Python is compiled with threadsupport. Apache 1.3 does not use threads." echo " On some systems this will cause problems during compilation, on others " echo " it may result in unpredictable behaviour of your Apache server. Yet on" echo " others it will work just fine. The recommended approach is to compile" echo " Python without thread support in a separate location and specify it with" echo " --with-python option to this ./configure script." echo else AC_MSG_RESULT([no threads, good]) fi Stefan
On Thu, Aug 04, 2005 at 08:14:51PM +0200, Stefan Kaltenbrunner wrote: > Tom Lane wrote: > >Andrew Dunstan <andrew@dunslane.net> writes: > >>Tom Lane wrote: > >>>The alternative is to say that plpython isn't supported on BSDen unless > >>>you choose to build an unthreaded libpython. > >>I'm OK with that, but if that's what's done I think we should check for > >>it up front at configure time and not let it fail at run time like we do > >>now. > > > > If you can create a suitable configure test, it'd be fine with me. > > Not sure if it is of any help but mod_python seems to be using this > configure.in snippet to detect (and reject) a threaded python installation: Ok, I converted this to patch against config/python.m4. Also made it work with python 2.3, 2.4 that return 'True' not '1'. The error is thrown only on BSD's. As I understand threaded python works fine on other OS'es? Error message may need clarifying. -- marko
Вложения
Where are we going with this patch? It doesn't test specific OS's known to fail. --------------------------------------------------------------------------- Marko Kreen wrote: > On Thu, Aug 04, 2005 at 08:14:51PM +0200, Stefan Kaltenbrunner wrote: > > Tom Lane wrote: > > >Andrew Dunstan <andrew@dunslane.net> writes: > > >>Tom Lane wrote: > > >>>The alternative is to say that plpython isn't supported on BSDen unless > > >>>you choose to build an unthreaded libpython. > > >>I'm OK with that, but if that's what's done I think we should check for > > >>it up front at configure time and not let it fail at run time like we do > > >>now. > > > > > > If you can create a suitable configure test, it'd be fine with me. > > > > Not sure if it is of any help but mod_python seems to be using this > > configure.in snippet to detect (and reject) a threaded python installation: > > Ok, I converted this to patch against config/python.m4. > > Also made it work with python 2.3, 2.4 that return 'True' not '1'. > > The error is thrown only on BSD's. As I understand threaded > python works fine on other OS'es? > > Error message may need clarifying. > > -- > marko > [ Attachment, skipping... ] > > ---------------------------(end of broadcast)--------------------------- > TIP 2: Don't 'kill -9' the postmaster -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001+ If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania19073
On Fri, Aug 12, 2005 at 10:27:16PM -0400, Bruce Momjian wrote: > Where are we going with this patch? It doesn't test specific OS's known > to fail. I hoped people more familiar with the problem would tune it... Here is updated patch where I test specifically 'openbsd*|freebsd*' instead of '*bsd*'. Although AFAIK all BSD's use similar libc/libc_r setup so *bsd* should have been fine. Also I 'clarified' the error message a bit. There is one notable feature of this patch - it will check for threaded Python on all platforms and print the result, this hopefully helps tracking problems on other platforms too. -- marko
Вложения
Patch applied. Thanks. --------------------------------------------------------------------------- Marko Kreen wrote: > On Fri, Aug 12, 2005 at 10:27:16PM -0400, Bruce Momjian wrote: > > Where are we going with this patch? It doesn't test specific OS's known > > to fail. > > I hoped people more familiar with the problem would tune it... > > Here is updated patch where I test specifically > 'openbsd*|freebsd*' instead of '*bsd*'. Although > AFAIK all BSD's use similar libc/libc_r setup so > *bsd* should have been fine. > > Also I 'clarified' the error message a bit. > > There is one notable feature of this patch - it will check > for threaded Python on all platforms and print the result, > this hopefully helps tracking problems on other platforms too. > > -- > marko > [ Attachment, skipping... ] > > ---------------------------(end of broadcast)--------------------------- > TIP 1: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001+ If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania19073