From: Tom Lane <tgl@sss.pgh.pa.us>
To: noordsij <noordsij@cs.helsinki.fi>
Cc: Stefan Kaltenbrunner <stefan@kaltenbrunner.cc>
Cc: Alvaro Herrera <alvherre@commandprompt.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Pg Bugs <pgsql-bugs@postgresql.org>
Subject: Re: BUG #6086: Segmentation fault
Date: Tue, 26 Jul 2011 14:07:17 -0400
Message-ID: <13571.1311703637@sss.pgh.pa.us> (raw)
In-Reply-To: <f82ce27210f51a2faf8879d4f14e5cab@cs.helsinki.fi>
References: <201106300732.p5U7W0Bj001711@wwwmaster.postgresql.org>
<CA+Tgmob6iFkry0Vg+whf2ALUaxYZAiSWCo8aDD5SH+9dzXad8A@mail.gmail.com>
<e2e7673675e48059cf6712462467f4f6@cs.helsinki.fi>
<CA+TgmoYo3BGBf1hh43FNyQ976HA4k_w5jexZnki8EEL+mHHhXw@mail.gmail.com>
<1311609295-sup-6784@alvh.no-ip.org>
<4E2DA57D.5010100@kaltenbrunner.cc>
<f82ce27210f51a2faf8879d4f14e5cab@cs.helsinki.fi>
noordsij <noordsij@cs.helsinki.fi> writes:
> After a few hours of watching strange things happening I finally stumbled
> on the cause.
> Very short summary: the postgres binary needs to be linked to libpthread,
> as this will ensure a special fork() inside libthr (the FreeBSD libpthread
> implementation/wrapper) is used which correctly deals with any pthread
> usage (I am guessing especially statically initialized pthread_X variables
> in for example libxml2).
> This can be accomplished by adding "-lpthread" to the LDFLAGS when building
> either libxml2 or postgresql itself, or by preloading libpthread.so when
> starting postgresql.
Linking pthreads into the backend is likely to cause more problems than
it solves, especially if you're proposing that we do that everywhere.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, noordsij@cs.helsinki.fi, stefan@kaltenbrunner.cc, alvherre@commandprompt.com, robertmhaas@gmail.com
Subject: Re: BUG #6086: Segmentation fault
In-Reply-To: <13571.1311703637@sss.pgh.pa.us>
References: <201106300732.p5U7W0Bj001711@wwwmaster.postgresql.org> <CA+Tgmob6iFkry0Vg+whf2ALUaxYZAiSWCo8aDD5SH+9dzXad8A@mail.gmail.com> <e2e7673675e48059cf6712462467f4f6@cs.helsinki.fi> <CA+TgmoYo3BGBf1hh43FNyQ976HA4k_w5jexZnki8EEL+mHHhXw@mail.gmail.com> <1311609295-sup-6784@alvh.no-ip.org> <4E2DA57D.5010100@kaltenbrunner.cc> <f82ce27210f51a2faf8879d4f14e5cab@cs.helsinki.fi> <13571.1311703637@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox