Re: pg_upgrade test failure

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: pg_upgrade test failure
Date: 2022-09-20 01:31:22
Message-ID: 20220920013122.GA31833@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Mon, Sep 19, 2022 at 02:32:17PM -0700, Andres Freund wrote:
> Hi,
>
> After my last rebase of the meson tree I encountered the following test
> failure:
>
> https://cirrus-ci.com/task/5532444261613568
>
> [20:23:04.171] ------------------------------------- 8< -------------------------------------
> [20:23:04.171] stderr:
> [20:23:04.171] # Failed test 'pg_upgrade_output.d/ not removed after pg_upgrade --check success'
> [20:23:04.171] # at C:/cirrus/src/bin/pg_upgrade/t/002_pg_upgrade.pl line 249.
> [20:23:04.171] # Failed test 'pg_upgrade_output.d/ removed after pg_upgrade success'
> [20:23:04.171] # at C:/cirrus/src/bin/pg_upgrade/t/002_pg_upgrade.pl line 261.
> [20:23:04.171] # Looks like you failed 2 tests of 13.
>
> regress_log:
> https://api.cirrus-ci.com/v1/artifact/task/5532444261613568/testrun/build/testrun/pg_upgrade/002_pg_upgrade/log/regress_log_002_pg_upgrade
>
> The pg_upgrade output contains these potentially relevant warnings:
>
> ...
> *Clusters are compatible*
> pg_upgrade: warning: could not remove file or directory "C:/cirrus/build/testrun/pg_upgrade/002_pg_upgrade/data/t_002_pg_upgrade_new_node_data/pgdata/pg_upgrade_output.d/20220919T201958.511/log": Directory not empty
> pg_upgrade: warning: could not remove file or directory "C:/cirrus/build/testrun/pg_upgrade/002_pg_upgrade/data/t_002_pg_upgrade_new_node_data/pgdata/pg_upgrade_output.d/20220919T201958.511": Directory not empty
> ...

It looks like it failed to remove a *.log file under windows, which
caused rmtree to fail.

src/bin/pg_upgrade/pg_upgrade.h-#define DB_DUMP_LOG_FILE_MASK "pg_upgrade_dump_%u.log"
src/bin/pg_upgrade/pg_upgrade.h-#define SERVER_LOG_FILE "pg_upgrade_server.log"
src/bin/pg_upgrade/pg_upgrade.h-#define UTILITY_LOG_FILE "pg_upgrade_utility.log"
src/bin/pg_upgrade/pg_upgrade.h:#define INTERNAL_LOG_FILE "pg_upgrade_internal.log"

ee5353abb only changed .txt files used for errors so can't be the cause,
but the original commit 38bfae3 might be related.

I suspect that rmtree() was looping in pgunlink(), and got ENOENT, so
didn't warn about the file itself, but then failed one moment later in
rmdir.

--
Justin

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Geoghegan 2022-09-20 02:20:02 pgsql: Harmonize parameter names in storage and AM code.
Previous Message Andres Freund 2022-09-20 01:28:11 pgsql: Don't hardcode tmp_check/ as test directory for tap tests

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2022-09-20 01:33:24 Re: pg_create_logical_replication_slot argument incongruency
Previous Message Michael Paquier 2022-09-20 01:25:41 Re: pg_upgrade test failure