stats collector is stuck on Windows

From: ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
To: pgsql-hackers(at)postgresql(dot)org
Subject: stats collector is stuck on Windows
Date: 2006-09-05 03:13:27
Message-ID: 20060905113341.5A96.ITAGAKI.TAKAHIRO@oss.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Hackers,

I saw stats information was not updated sometimes when I tested HEAD on
Windows. Once it happens, stats are not collected until server restarts.

The condition seems to happen on high-CPU load. I can reproduce it
in a few seconds using pgbench on the machine with one Pentium 4
with hyper-threading. But if I use an original "pgbench with sleep"
load, it won't occur.

Is this a bug or some environment-dependent problems?

[additional information]
I added elog calls for printf-debug.

PgstatCollectorMain() in pgstat.c
| elog(LOG, "pgstat select");
| if (select(pgStatSock + 1, &rfds, NULL, NULL, &sel_timeout) < 0)
| { ...

After stuck, select() always results in time-out. "LOG: pgstat select" is
repeated every 2 seconds (maybe PGSTAT_SELECT_TIMEOUT).

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2006-09-05 03:32:36 Re: Open items for 8.2
Previous Message Bruce Momjian 2006-09-05 03:10:23 Re: Sorry about the GIN docs :(