On Wed, Feb 08, 2006 at 04:22:30PM +1000, Rob Newton wrote: > Hi, > > I wrote a program using pgsql's ESQL/C. Occasionally it blocks > forever on a system call futex(), and I'm wondering if pgsql's > libraries use this futex call?? (because my code doesn't use it). futexes are Fast Userspace mutexes. The kernel call is to arbitrate conflicts and handle blocking. About the only place they're going to be used is when doing threads. > Because the problem only occurs occasionally I can't really trace > it while it's running. But when I discover it's locked up, and > then do a trace, I get the following: > > Process 19893 attached - interrupt to quit > futex(0x238f20, FUTEX_WAIT, 2, NULL Is your program multithreaded? futexes require processes sharing an address space. If you want better info, you're better off trying to attach gdb to it and getting a backtrace (bt). > I'm using psql 8.0.3 on Linux FC4 (kernel 2.6.11-1). Have a nice day, -- Martijn van Oosterhout <kleptog@xxxxxxxxx> http://svana.org/kleptog/ > Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a > tool for doing 5% of the work and then sitting around waiting for someone > else to do the other 95% so you can sue them.
Attachment:
signature.asc
Description: Digital signature