From owner-freebsd-threads@FreeBSD.ORG Wed Jul 30 15:13:44 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D159737B401 for ; Wed, 30 Jul 2003 15:13:44 -0700 (PDT) Received: from perrin.int.nxad.com (internal.ext.nxad.com [69.1.70.251]) by mx1.FreeBSD.org (Postfix) with ESMTP id 55F5543FCB for ; Wed, 30 Jul 2003 15:13:44 -0700 (PDT) (envelope-from sean@nxad.com) Received: by perrin.int.nxad.com (Postfix, from userid 1001) id AFFE120F00; Wed, 30 Jul 2003 15:13:43 -0700 (PDT) Date: Wed, 30 Jul 2003 15:13:43 -0700 From: Sean Chittenden To: Wesley Morgan Message-ID: <20030730221343.GF34647@perrin.int.nxad.com> References: <20030728102545.F1269@catalyst.chemikals.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030728102545.F1269@catalyst.chemikals.org> X-PGP-Key: finger seanc@FreeBSD.org X-PGP-Fingerprint: 3849 3760 1AFE 7B17 11A0 83A6 DD99 E31F BC84 B341 X-Web-Homepage: http://sean.chittenden.org/ User-Agent: Mutt/1.5.4i cc: threads@FreeBSD.org Subject: Re: postgresql-devel "psql" and -current X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jul 2003 22:13:45 -0000 > I've been following the postgresql-devel port on a development box > running -current for some time now. There is some kind of a problem > with the "pager" functionality of psql that causes it to screw up my > terminal to the point of requiring a reset. I haven't got a -stable > box handy to verify this on, but it's a very annoying problem that I > thought might be fixed during the development process, but I'm > beginning to think it is a freebsd-specific problem. Have you seen > anything similar? Whoa, hrm, yeah... I ran into it last night while writing the jail_read_only_transactions patch... and this looks like it's out of my area of expertise. How recent is your -CURRENT? This looks like a libc/libc_r's problem. Let me CC: -threads to see if they have any hints or ideas. Using the most recent snapshot of PostgreSQL, the psql(1) client is crashing when the pager terminates and psql(1) resumes control of the terminal. What's really obnoxious, is when I compile in debugging symbols, I can't get it to core, but I can get it to sit infinitely in poll(2). Without debugging symbols: #0 0x2821eb37 in _pthread_mutex_trylock () from /usr/lib/libc_r.so.5 #1 0x2821ed12 in _pthread_mutex_lock () from /usr/lib/libc_r.so.5 #2 0x2821c838 in pthread_rwlock_rdlock () from /usr/lib/libc_r.so.5 #3 0x281c679c in nsdispatch () from /usr/lib/libc.so.5 #4 0x281a09c5 in getpwuid_r () from /usr/lib/libc.so.5 #5 0x281a0bcb in getpwuid_r () from /usr/lib/libc.so.5 #6 0x281a0acb in getpwuid_r () from /usr/lib/libc.so.5 #7 0x281a0c79 in getpwuid () from /usr/lib/libc.so.5 #8 0x280b78ae in pqGetpwuid () from /home/sean/open_source/postgresql/pgsql/src/test/regress/tmp_check/install/usr/local/pgsql/lib//libpq.so.3 #9 0x280a5c8a in fe_getauthname () from /home/sean/open_source/postgresql/pgsql/src/test/regress/tmp_check/install/usr/local/pgsql/lib//libpq.so.3 #10 0x280a8bdb in pqPacketSend () from /home/sean/open_source/postgresql/pgsql/src/test/regress/tmp_check/install/usr/local/pgsql/lib//libpq.so.3 #11 0x280a5e07 in PQconnectStart () from /home/sean/open_source/postgresql/pgsql/src/test/regress/tmp_check/install/usr/local/pgsql/lib//libpq.so.3 #12 0x280a6408 in PQsetdbLogin () from /home/sean/open_source/postgresql/pgsql/src/test/regress/tmp_check/install/usr/local/pgsql/lib//libpq.so.3 #13 0x0804c8eb in do_connect () #14 0x0804a97c in exec_command () #15 0x0804a66e in HandleSlashCmds () #16 0x0805089b in MainLoop () #17 0x08052030 in main () #18 0x0804a502 in _start () With debugging symbols: 0x2817d91f in poll () from /usr/lib/libc.so.5 (gdb) bt #0 0x2817d91f in poll () from /usr/lib/libc.so.5 #1 0x282279a1 in _thread_kern_sched_state_unlock () from /usr/lib/libc_r.so.5 #2 0x28227395 in _thread_kern_scheduler () from /usr/lib/libc_r.so.5 Any thoughts? I've been away from email for a week or so and am out of the loop atm. I'm working on recompiling my libs with -g, but it'll be another 6hrs before my world will be complete. -sc -- Sean Chittenden