Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id D68BF189E838 for ; Tue, 10 Apr 2012 07:34:33 -0300 (ADT) Received: from mahout.postgresql.org ([98.129.198.123]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SHYP6-0008B6-GW for pgsql-bugs@postgresql.org; Tue, 10 Apr 2012 10:34:33 +0000 Received: from [204.145.124.246] (helo=wrigleys.postgresql.org) by mahout.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SHYOt-0001Sj-BY for pgsql-bugs@postgresql.org; Tue, 10 Apr 2012 10:34:15 +0000 Received: from www-data by wrigleys.postgresql.org with local (Exim 4.72) (envelope-from ) id 1SHYOt-0004vu-08 for pgsql-bugs@postgresql.org; Tue, 10 Apr 2012 10:34:15 +0000 Date: Tue, 10 Apr 2012 10:34:15 +0000 Message-Id: Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: BUG #6578: Deadlock in libpq after upgrading from 8.4.7 to 8.4.11 To: pgsql-bugs@postgresql.org From: rnysmile@yahoo.com X-Pg-Spam-Score: 0.6 (/) X-Archive-Number: 201204/58 X-Sequence-Number: 32809 The following bug has been logged on the website: Bug reference: 6578 Logged by: Deadlock in libpq Email address: rnysmile@yahoo.com PostgreSQL version: 8.4.11 Operating system: Ubuntu 11.04 Description: = We wrote a C++ program using libpq to access postgres. it is a heavy load service, about 100 concurrent postgres access. It works very well for two years. This month, we upgrade the libpq5 from 8.4.7 to 8.4.11.(libpq-dev 8.4.11-0ubuntu0.11.04) Our service program become unstable after upgrading. gdb shows that everything is halt at libpq (100 threads halt at the same position). #0 0x00007f0cec7377c4 in __lll_lock_wait () from /lib/x86_64-linux-gnu/libpthread.so.0 #1 0x00007f0cec7325b4 in _L_lock_944 () from /lib/x86_64-linux-gnu/libpthread.so.0 #2 0x00007f0cec7323ca in pthread_mutex_lock () from /lib/x86_64-linux-gnu/libpthread.so.0 #3 0x00007f0ced10eaa0 in ?? () from /usr/lib/libpq.so.5 #4 0x00007f0cebb31085 in engine_table_select () from /lib/libcrypto.so.0.9.8 #5 0x00007f0cebb47228 in EVP_CipherInit_ex () from /lib/libcrypto.so.0.9.8 we tried to upgraded the libpq to 9.1.3, it will not deadlock but crash from time to time. After search the mailing list, we found someone else have the similar problem: http://archives.postgresql.org/pgsql-general/2011-03/msg00895.php =