Re: futex lockup?

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: futex lockup?
Дата
Msg-id 20060208092817.GA1985@svana.org
обсуждение исходный текст
Ответ на futex lockup?  (Rob Newton <robn@mirrabooka.com>)
Список pgsql-general
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@svana.org>   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.

Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: Is there a way to limit CPU usage per user
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: alter superuser...