Re: Sometimes the output to the stdout in Windows disappears
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alexander Lakhin <exclusion@gmail.com>
Cc: Victor Spirin <v.spirin@postgrespro.ru>,
pgsql-hackers@lists.postgresql.org
Date: 2020-10-18T18:24:06Z
Lists: pgsql-hackers
I wrote:
>> diff -w -U3
>> .../src/interfaces/ecpg/test/expected/thread-descriptor.stderr
>> .../src/interfaces/ecpg/test/results/thread-descriptor.stderr
>> --- .../src/interfaces/ecpg/test/expected/thread-descriptor.stderr
>> 2019-12-04 16:05:46 +0300
>> +++ .../src/interfaces/ecpg/test/results/thread-descriptor.stderr
>> 2020-10-18 20:20:27 +0300
>> @@ -0,0 +1 @@
>> +SQL error: descriptor "mydesc" not found on line 31
> does not look like the same kind of failure as what we've been dealing
> with up to now. So maybe what we've got is that we fixed the stdio
> loss problem, and now the error rate is down to the point where we can
> notice other, even-lower-probability issues.
Yeah, I think so. I grepped the buildfarm logs for similar failures and
found three occurrences:
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=bowerbird&dt=2019-02-03%2018%3A36%3A05
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=bowerbird&dt=2019-01-17%2014%3A30%3A07
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=drongo&dt=2020-01-02%2018%3A03%3A52
All of these are in the thread/descriptor test, failing at the deallocate
step in
for (i = 1; i <= REPEATS; ++i)
{
EXEC SQL ALLOCATE DESCRIPTOR mydesc;
EXEC SQL DEALLOCATE DESCRIPTOR mydesc;
}
where the test is running several of these in different threads.
I wonder whether there's some missing thread-locking in the ECPG
descriptor support. It is odd though that we have seen this only
on Windows members. Low-probability or not, you'd think we'd have
some similar reports from non-Windows critters if it were possible.
regards, tom lane
Commits
-
In libpq for Windows, call WSAStartup once and WSACleanup not at all.
- cdc7ace161d3 9.6.20 landed
- 883226441d67 11.10 landed
- 6acc31a201d8 9.5.24 landed
- 6670e91078b3 10.15 landed
- d2074daebe16 13.1 landed
- 407580aabb83 12.5 landed
- 7d00a6b2de8a 14.0 landed
-
Update the Winsock API version requested by libpq.
- d5a9a661fcd2 14.0 landed