Skip site navigation (1) Skip section navigation (2)

Re: BUG #6086: Segmentation fault

From: noordsij <noordsij(at)cs(dot)helsinki(dot)fi>
To: Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Pg Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #6086: Segmentation fault
Date: 2011-07-26 13:54:45
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
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 when
starting postgresql.

Before advocating any particular solution, I'd like to throw this out first
and see how strongly people feel about this.

Cheers, and thanks to everyone who replied so far

In response to


pgsql-bugs by date

Next:From: Greg JohnsonDate: 2011-07-26 17:56:55
Subject: Re: BUG #6127: pg_restore failing: unexpected message type 0x58 during COPY from stdin
Previous:From: Kevin GrittnerDate: 2011-07-26 13:44:18
Subject: Re: BUG #6130: TOAST tables bug restoring to PostgreSQL 9.0.4

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group