postgresql-devel "psql" and -current

Sean Chittenden sean at chittenden.org
Wed Jul 30 15:13:45 PDT 2003


> 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


More information about the freebsd-threads mailing list