ports/160580: databases/postgresql[89] broken

Eugene M. Zheganin eugene at zhegan.in
Fri Sep 9 08:00:20 UTC 2011


>Number:         160580
>Category:       ports
>Synopsis:       databases/postgresql[89] broken
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Sep 09 08:00:19 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Eugene M. Zheganin
>Release:        8.2-RELEASE
>Organization:
RealService LLC
>Environment:
FreeBSD moscow-alpha 8.2-RELEASE FreeBSD 8.2-RELEASE #1: Tue Aug 23 17:40:12 YEKST 2011     emz at moscow-alpha:/usr/obj/usr/src/sys/MOSCOW  amd64
>Description:
databases/postgresql[89] port broken.

New versions of postgresql library libpq contain pthread_mutex_unlock() syscall (fe-connect.c file). When using postgresql along with net/samba35 (both times I got this bug with net/samba35, I'm not sure if it's reproduceable with older or other versions of samba port), and, especially, it's nss_winbind.so library (including it in nsswitch.conf configuration file) the psql console utility fails to start, complaining about 

failed to unlock mutex.

The server itself also complains about this error, but starts and works fine.

Being recompiled with custom patch against fe-connect.c, to display what exactly pthread_mutex_unlock() call returns, I can say that it returns 1, which is the EPERM error.

There is an opinion from one of FreeBSD developers, which states that pthread code is broken in FreeBSD port patches, not in postgresql itself.

There are several workarounds about this problem.
>How-To-Repeat:
Install databases/postgresql90-server port. Install net/samba35 port. Configure nsswitch.conf to use nss_winbind.so backend. Launch psql.
>Fix:
1) Stop using nss_winbind.so backend
2) Assemble the port without port patches, commenting out the post-patch: target in port Makefile.

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list