Failed test 'default log is not used' with new procps 3.3.16-1
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
postgresql-common (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
procps (Ubuntu) |
Invalid
|
Undecided
|
Steve Langasek |
Bug Description
Since the new procps upload
procps | 2:3.3.16-1ubuntu1 | focal-proposed | source, amd64, arm64, armhf, i386, ppc64el, s390x
the tests of postgresql-common fail.
The issues are:
autopkgtest [15:43:10]: test run-testsuite: - - - - - - - - - - results - - - - - - - - - -
run-testsuite FAIL non-zero exit status 2
autopkgtest [15:43:10]: test run-testsuite: - - - - - - - - - - stderr - - - - - - - - - -
# Failed test 'default log is not used'
# at ./t/020_
# Failed test 'default log is not used'
# at ./t/020_
# Looks like you failed 2 tests of 144.
It was retried a few times by different people now and reproduced so we can assume it is a real issues for now.
I was running two VMs to compare:
$ sudo ~/work/
(and the other one without --apt-pocket=
The issue reproduced locally in only the one with the new procps.
In Debian the latest similar run is
https:/
https:/
But that is pre-3.3.16 and I wasn't able to find their result with the same combination.
Lets mark this bug update-excuse and check if we can find anything in these VMs.
tags: | added: update-excuse |
Changed in procps (Ubuntu): | |
status: | New → Invalid |
The failing tests are part of 020_create_ sql_remove. t:
The checks are like:
ok -z $default_log, "default log is not used";
And $default_log points to /var/log/ postgresql/ postgresql- 12-main. log in both cases.
Entering interactive mode on fail:
$ sudo ./testsuite -f 20 -V -s
Eventually the whole cluster is cleaned, so the config and dirs are missing.
Changing the tests to find more details ...
The test sets a link: /12/main/ log -> /var/lib/ postgresql/ 12/main/ mylog postgresql/ 12/main /var/lib/ postgresql/ 12/main/ mylog
/etc/postgresql
And then the instance is correctly using that log:
$ pg_lsclusters -h
12 main 5432 online postgres /var/lib/
But the old log "still" exists in the bad case and that breaks it.
log: Config >> symlink >> default path
The check wants to see the "default path" to be not existing - or actually not used.
It tries to clean the log via:
is ((exec_as 'root', "pg_ctlcluster $v main stop"), 0, 'stopping cluster');
open L, ">$default_log"; close L; # empty default log file
The problem seems to be non synchronous stop or a log file clean issue - the log still contains stuff after being cleaned.
ok 11 - correct output of pg_lsclusters -h l/12/main/ log': No such file or directory postgresql/ postgresql- 12-main. log postgresql/ 12/main /var/log/ postgresql/ postgresql- 12-main. log pc-linux- gnu, compiled by gcc (Ubuntu 9.2.1-25ubuntu1) 9.2.1 20200123, 64-bit postgresql/ .s.PGSQL. 5432" pc-linux- gnu, compiled by gcc (Ubuntu 9.2.1-25ubuntu1) 9.2.1 20200123, 64-bit postgresql/ .s.PGSQL. 5432" pc-linux- gnu, compiled by gcc (Ubuntu 9.2.1-25ubuntu...
/usr/bin/ls: cannot access '/etc/postgresq
-rw-r----- 1 postgres adm 559 Feb 24 09:23 /var/log/
12 main 5432 online postgres /var/lib/
PRE STOP
2020-02-24 09:23:07.177 CET [16492] LOG: starting PostgreSQL 12.1 (Ubuntu 12.1-2build1) on x86_64-
2020-02-24 09:23:07.177 CET [16492] LOG: listening on IPv4 address "127.0.0.1", port 5432
2020-02-24 09:23:07.177 CET [16492] LOG: listening on Unix socket "/var/run/
2020-02-24 09:23:07.188 CET [16493] LOG: database system was shut down at 2020-02-24 09:23:06 CET
2020-02-24 09:23:07.192 CET [16492] LOG: database system is ready to accept connections
-- END --
ok 12 - stopping cluster
PRE CLEAN
2020-02-24 09:23:07.177 CET [16492] LOG: starting PostgreSQL 12.1 (Ubuntu 12.1-2build1) on x86_64-
2020-02-24 09:23:07.177 CET [16492] LOG: listening on IPv4 address "127.0.0.1", port 5432
2020-02-24 09:23:07.177 CET [16492] LOG: listening on Unix socket "/var/run/
2020-02-24 09:23:07.188 CET [16493] LOG: database system was shut down at 2020-02-24 09:23:06 CET
2020-02-24 09:23:07.192 CET [16492] LOG: database system is ready to accept connections
2020-02-24 09:23:09.669 CET [16492] LOG: received fast shutdown request
2020-02-24 09:23:09.669 CET [16492] LOG: aborting any active transactions
2020-02-24 09:23:09.671 CET [16492] LOG: background worker "logical replication launcher" (PID 16499) exited with exit code 1
2020-02-24 09:23:09.673 CET [16494] LOG: shutting down
2020-02-24 09:23:09.680 CET [16492] LOG: database system is shut down
-- END --
POST CLEAN
2020-02-24 09:23:07.177 CET [16492] LOG: starting PostgreSQL 12.1 (Ubuntu 12.1-2build1) on x86_64-