Re: psql tests hangs

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: psql tests hangs
Date: 2023-05-09 18:31:23
Message-ID: CAFj8pRC=FDLayS6NyqFRc++Ftg8Qtt2mBKx+rk9pTs+6kRJH5A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

út 9. 5. 2023 v 13:53 odesílatel Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
napsal:

>
>
> út 9. 5. 2023 v 11:07 odesílatel Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
> napsal:
>
>>
>>
>> út 9. 5. 2023 v 10:48 odesílatel Daniel Gustafsson <daniel(at)yesql(dot)se>
>> napsal:
>>
>>> > On 9 May 2023, at 08:52, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
>>> wrote:
>>> >
>>> > Hi
>>> >
>>> > I try run make check-world. Now I have problems with tests of psql
>>> >
>>> > I had to cancel tests
>>> >
>>> > log:
>>> >
>>> > [08:46:49.828](0.038s) ok 63 - no ON_ERROR_STOP, --single-transaction
>>> and multiple -c switches
>>> > [08:46:49.860](0.033s) ok 64 - client-side error commits transaction,
>>> no ON_ERROR_STOP and multiple -c switches
>>> > [08:46:49.928](0.067s) ok 65 - \copy from with DEFAULT: exit code 0
>>> > [08:46:49.929](0.001s) ok 66 - \copy from with DEFAULT: no stderr
>>> > [08:46:49.930](0.001s) ok 67 - \copy from with DEFAULT: matches
>>> > death by signal at
>>> /home/pavel/src/postgresql.master/src/bin/psql/../../../src/test/perl/PostgreSQL/Test/Cluster.pm
>>> line 3042.
>>> > # Postmaster PID for node "main" is 157863
>>> > ### Stopping node "main" using mode immediate
>>> > # Running: pg_ctl -D
>>> /home/pavel/src/postgresql.master/src/bin/psql/tmp_check/t_001_basic_main_data/pgdata
>>> -m immediate stop
>>> > waiting for server to shut down.... done
>>> > server stopped
>>> > # No postmaster PID for node "main"
>>> > [08:47:30.361](40.431s) # Tests were run but no plan was declared and
>>> done_testing() was not seen.
>>> > [08:47:30.362](0.001s) # Looks like your test exited with 4 just after
>>> 67.
>>> > Warning: unable to close filehandle $orig_stderr properly: Broken pipe
>>> during global destruction.
>>>
>>> I'm unable to reproduce, and this clearly works in the buildfarm and
>>> CI. Did
>>> you run out of disk on the volume during the test or something similar?
>>> Anything interesting in the serverlogs from the tmp_check install?
>>>
>>
>> I have enough free space on disc
>>
>> I don't see nothing interesting in log (it is another run)
>>
>> 2023-05-09 08:50:04.839 CEST [158930] 001_basic.pl LOG: statement: COPY
>> copy_default FROM STDIN with (format 'csv', default 'placeholder');
>> 2023-05-09 08:50:04.841 CEST [158930] 001_basic.pl LOG: statement:
>> SELECT * FROM copy_default
>> 2023-05-09 08:50:04.879 CEST [158932] 001_basic.pl LOG: statement:
>> SELECT 1.
>> 2023-05-09 08:50:04.888 CEST [158932] 001_basic.pl LOG: statement:
>> SELECT 1.
>> 2023-05-09 08:50:04.898 CEST [158932] 001_basic.pl LOG: statement:
>> SELECT 1.
>> 2023-05-09 08:50:28.375 CEST [158862] LOG: received immediate shutdown
>> request
>> 2023-05-09 08:50:28.385 CEST [158862] LOG: database system is shut down
>>
>> backtrace from perl
>>
>> Program received signal SIGINT, Interrupt.
>> 0x00007f387ecc1ade in select () from /lib64/libc.so.6
>> (gdb) bt
>> #0 0x00007f387ecc1ade in select () from /lib64/libc.so.6
>> #1 0x00007f387e97363b in Perl_pp_sselect () from /lib64/libperl.so.5.36
>> #2 0x00007f387e917958 in Perl_runops_standard () from
>> /lib64/libperl.so.5.36
>> #3 0x00007f387e88259d in perl_run () from /lib64/libperl.so.5.36
>> #4 0x00005588bceb234a in main ()
>>
>> Regards
>>
>
> I repeated another build with the same result.
>
> Tested REL_15_STABLE branch without any problems.
>

There is some dependence on locales

for commit 96c498d2f8ce5f0082c64793f94e2d0cfa7d7605

with my cs_CZ.utf8 locale

echo "# +++ tap check in src/bin/psql +++" && rm -rf
'/home/pavel/src/postgresql.master/src/bin/psql'/tmp_check &&
/usr/bin/mkdir -p
'/home/pavel/src/postgresql.master/src/bin/psql'/tmp_check && cd . &&
TESTLOGDIR='/home/pavel/src/postgresql.master/src/bin/psql/tmp_check/log'
TESTDATADIR='/home/pavel/src/postgresql.master/src/bin/psql/tmp_check'
PATH="/home/pavel/src/postgresql.master/tmp_install/usr/local/pgsql/bin:/home/pavel/src/postgresql.master/src/bin/psql:$PATH"
LD_LIBRARY_PATH="/home/pavel/src/postgresql.master/tmp_install/usr/local/pgsql/lib"
PGPORT='65432'
top_builddir='/home/pavel/src/postgresql.master/src/bin/psql/../../..'
PG_REGRESS='/home/pavel/src/postgresql.master/src/bin/psql/../../../src/test/regress/pg_regress'
/usr/bin/prove -I ../../../src/test/perl/ -I . t/*.pl
# +++ tap check in src/bin/psql +++
t/001_basic.pl ........... 15/?
# Failed test '\watch with 3 iterations: exit code 0'
# at t/001_basic.pl line 354.
# got: '3'
# expected: '0'

# Failed test '\watch with 3 iterations: no stderr'
# at t/001_basic.pl line 354.
# got: 'psql:<stdin>:1: error: \watch: incorrect interval value
"0.01"'
# expected: ''

# Failed test '\watch with 3 iterations: matches'
# at t/001_basic.pl line 354.
# ''
# doesn't match '(?^:1\n1\n1)'
# Looks like you failed 3 tests of 80.
t/001_basic.pl ........... Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/80 subtests
t/010_tab_completion.pl .. ok
t/020_cancel.pl .......... ok

Test Summary Report
-------------------
t/001_basic.pl (Wstat: 768 (exited 3) Tests: 80 Failed: 3)
Failed tests: 68-70
Non-zero exit status: 3
Files=3, Tests=170, 4 wallclock secs ( 0.09 usr 0.01 sys + 2.43 cusr
1.24 csys = 3.77 CPU)
Result: FAIL
make: *** [Makefile:87: check] Chyba 1

with C lokale it hangs

It is broken from

commit 00beecfe839c878abb366b68272426ed5296bc2b (HEAD)
Author: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Date: Thu Apr 6 13:18:14 2023 -0400

psql: add an optional execution-count limit to \watch.

\watch can now be told to stop after N executions of the query.

With the idea that we might want to add more options to \watch
in future, this patch generalizes the command's syntax to a list
of name=value options, with the interval allowed to omit the name
for backwards compatibility.

Andrey Borodin, reviewed by Kyotaro Horiguchi, Nathan Bossart,
Michael Paquier, Yugo Nagata, and myself

Discussion:
https://postgr.es/m/CAAhFRxiZ2-n_L1ErMm9AZjgmUK=qS6VHb+0SaMn8sqqbhF7How@mail.gmail.com

Discussion:
http://postgr.es/m/CAPmGK15FuPVGx3TGHKShsbPKKtF1y58-ZLcKoxfN-nqLj1dZ%3Dg%40mail.gmail.com
[pavel(at)localhost postgresql.master]$ uname -a
Linux localhost.localdomain 6.2.14-300.fc38.x86_64 #1 SMP PREEMPT_DYNAMIC
Mon May 1 00:55:28 UTC 2023 x86_64 GNU/Linux
[pavel(at)localhost postgresql.master]$ gcc --version
gcc (GCC) 13.1.1 20230426 (Red Hat 13.1.1-1)
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Probably the locale problem was fixed - because test on master hangs always
without dependency on locale

Regards

Pavel

> Regards
>
> Pavel
>
>
>
>
>>
>> Pavel
>>
>>
>>
>> 1.
>>
>>
>>
>>
>>
>>
>>>
>>> --
>>> Daniel Gustafsson
>>>
>>>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2023-05-09 19:02:47 walsender performance regression due to logical decoding on standby changes
Previous Message MARK CALLAGHAN 2023-05-09 17:36:09 Re: benchmark results comparing versions 15.2 and 16