Thread

  1. openbsd, plpython, missing threading symbols

    Andrew Dunstan <andrew@dunslane.net> — 2005-08-03T14:33:21Z

    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
    
    
  2. Re: openbsd, plpython, missing threading symbols

    Tom Lane <tgl@sss.pgh.pa.us> — 2005-08-03T15:46:29Z

    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
    
    
  3. Re: openbsd, plpython, missing threading symbols

    Andrew Dunstan <andrew@dunslane.net> — 2005-08-03T20:28:21Z

    
    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
    
    
  4. Re: openbsd, plpython, missing threading symbols

    Tom Lane <tgl@sss.pgh.pa.us> — 2005-08-03T20:49:15Z

    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
    
    
  5. Re: openbsd, plpython, missing threading symbols

    Stefan Kaltenbrunner <stefan@kaltenbrunner.cc> — 2005-08-04T18:14:51Z

    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 thread support. 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
    
    
  6. Re: openbsd, plpython, missing threading symbols

    Marko Kreen <marko@l-t.ee> — 2005-08-04T19:52:02Z

    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
    
    
  7. Re: openbsd, plpython, missing threading symbols

    Bruce Momjian <pgman@candle.pha.pa.us> — 2005-08-13T02:27:16Z

    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, Pennsylvania 19073
    
    
  8. Re: openbsd, plpython, missing threading symbols

    Marko Kreen <marko@l-t.ee> — 2005-08-13T09:25:45Z

    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
    
    
  9. Re: openbsd, plpython, missing threading symbols

    Bruce Momjian <pgman@candle.pha.pa.us> — 2005-09-26T16:48:19Z

    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, Pennsylvania 19073