Date: Wed, 16 Apr 2014 11:12:52 +0800 From: Jov <amutu@amutu.com> To: freebsd-hackers@freebsd.org Subject: Fwd: PostgreSQL hang On FreeBSD, with CFLAGS='-O2 -pthread' workaround Message-ID: <CADyrUxOA5VW=tdbeicg7xH78YqMxLZYPPnYONSSOuZp1nPS=Fg@mail.gmail.com> In-Reply-To: <CADyrUxOXvh2yqq9Q9hGGO4fMKE1o=uw9ysiOiagMObQQYY9q_A@mail.gmail.com> References: <CADyrUxOXvh2yqq9Q9hGGO4fMKE1o=uw9ysiOiagMObQQYY9q_A@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
move to hacker' list this is postgresql thread about this topic: http://www.postgresql.org/message-id/11613.1397526760@sss.pgh.pa.us Jov blog: http:amutu.com/blog <http://amutu.com/blog> ---------- Forwarded message ---------- From: Jov <amutu@amutu.com> Date: 2014-04-15 9:23 GMT+08:00 Subject: PostgreSQL hang On FreeBSD,with CFLAGS=3D'-O2 -pthread' workaround To: FreeBSD questions <questions@freebsd.org> Cc: =CA=EE=ED=F1=F2=E0=ED=F2=E8=ED =CA=ED=E8=E6=ED=E8=EA <knizhnik@garret.r= u> hi~ FreeBSD hackers, I find some problems when use pg on FreeBSD.On FreeBSD,If installed extension which pthread lib is used,for example plv8,pljava,imcs etc,when query touch these extenstions,the PG backend will hang. there is a solution,which configure postgresql with CFLAGS=3D'-O2 -pthread' and compile pg from source ,then install the extension.But this solution is not offical documented and not easy to use(you must compile pg from source).It may make some extension developers or user waste much time to solve it,and make people complain that PG or FreeBSD not stable. knizhnik has some insight: > Actually I have already reproduced the problem with my lockbench test. It > work when build as application with -pthread, but doesn't work if it buil= t > as shared library and loaded from application built without -pthread. > Unfortunately I do not know other solution rather than rebuilt PostgreSQL > with pthread. Sorry, that I have not informed you about my investigations > and thank you for your help. I also run this test at OS/X - there is no > such problem. this is the ldd output: [jovz@ ~]$ ldd pgsql_pthread/bin/postgres pgsql/bin/postgres: libm.so.5 =3D> /lib/libm.so.5 (0x800cd1000) libthr.so.3 =3D> /lib/libthr.so.3 (0x800ef7000) libc.so.7 =3D> /lib/libc.so.7 (0x80111c000) [jovz@ ~]$ ldd pgsql934/bin/postgres pgsql934/bin/postgres: libm.so.5 =3D> /lib/libm.so.5 (0x800cd1000) libc.so.7 =3D> /lib/libc.so.7 (0x800ef7000) the output make me remember some talk about sshd Zombie recently, which something aoubt libc and libthr. is this a known problem with FreeBSD pthread implement? ref: http://www.postgresql.org/message-id/534785D2.6050105@matrix.gatewaynet.com https://github.com/knizhnik/imcs/issues/25 http://code.google.com/p/plv8js/issues/detail?id=3D34 Jov blog: http:amutu.com/blog <http://amutu.com/blog>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADyrUxOA5VW=tdbeicg7xH78YqMxLZYPPnYONSSOuZp1nPS=Fg>