'Bad file descriptor: dup2( 1, 2 )' error on MacOS CI tasks - Mailing list pgsql-hackers
| From | Nazir Bilal Yavuz |
|---|---|
| Subject | 'Bad file descriptor: dup2( 1, 2 )' error on MacOS CI tasks |
| Date | |
| Msg-id | CAN55FZ3VOUSO2ZmBUE9wRNnL9fUQfGv5qWefk_1pWYqgJ1bRSQ@mail.gmail.com Whole thread Raw |
| Responses |
Re: 'Bad file descriptor: dup2( 1, 2 )' error on MacOS CI tasks
|
| List | pgsql-hackers |
Hi, psql/010_tab_completion, psql/030_pager and authentication/001_password tests started to fail on MacOS CI tasks [1]. Example failure log (error message is same on all of the failing tests): ``` # Checking port 27038 # Found port 27038 Name: main Version: 19devel Data directory: /Users/admin/pgsql/build/testrun/psql/030_pager/data/t_030_pager_main_data/pgdata Backup directory: /Users/admin/pgsql/build/testrun/psql/030_pager/data/t_030_pager_main_data/backup Archive directory: /Users/admin/pgsql/build/testrun/psql/030_pager/data/t_030_pager_main_data/archives Connection string: port=27038 host=/var/folders/hm/d7rr9ds96qx995ns72ry9g4m0000gn/T/rkP99U6zgp Log file: /Users/admin/pgsql/build/testrun/psql/030_pager/log/030_pager_main.log [11:23:15.358](0.026s) # initializing database system by copying initdb template # Running: cp -RPp /Users/admin/pgsql/build/tmp_install/initdb-template /Users/admin/pgsql/build/testrun/psql/030_pager/data/t_030_pager_main_data/pgdata # Running: /Users/admin/pgsql/build/src/test/regress/pg_regress --config-auth /Users/admin/pgsql/build/testrun/psql/030_pager/data/t_030_pager_main_data/pgdata ### Starting node "main" # Running: pg_ctl --wait --pgdata /Users/admin/pgsql/build/testrun/psql/030_pager/data/t_030_pager_main_data/pgdata --log /Users/admin/pgsql/build/testrun/psql/030_pager/log/030_pager_main.log --options --cluster-name=main start waiting for server to start.... done server started # Postmaster PID for node "main" is 8554 Bad file descriptor: dup2( 1, 2 ) at /Users/admin/pgsql/src/test/perl/PostgreSQL/Test/BackgroundPsql.pm line 114. at /Users/admin/pgsql/src/test/perl/PostgreSQL/Test/BackgroundPsql.pm line 114. # Postmaster PID for node "main" is 8554 ### Stopping node "main" using mode immediate # Running: pg_ctl --pgdata /Users/admin/pgsql/build/testrun/psql/030_pager/data/t_030_pager_main_data/pgdata --mode immediate stop waiting for server to shut down.... done server stopped # No postmaster PID for node "main" ``` My current hypothesis is that all of these three tests use 'IO::Pty'. On MacOS CI, we install this via MacPorts using the 'p5.34-io-tty' package [2], which was updated about 2.5 days ago. I am not sure if is relevant but it has a known issue on Darwin [3]: ``` Darwin 7.9.0 HPUX 10.20 & 11.00 EOF on the slave tty is not reported back to the master. ``` I attempted to verify this by downgrading 'p5.34-io-tty' to the previous version (1.20) and confirm that CI passes but I couldn't confirm it as I don't have a MacOS machine and for some reason Cirrus Terminal doesn't show up when I try to run CI with terminal access. Please note that this problem doesn't happen on CFBot or Postgres CI yet. I think there are two possible reasons: 1- We install packages by using MacPorts and then we save them as cache so we don't need to install them for each CI Run. Problems will start when this cache is invalidated or expired. 2- CFBot and Postgres CI use persistent workers. Cirrus CI might have updated the Sequoia macOS VM images but persistent workers aren't updated yet. Problems will start when they are updated. [1] https://cirrus-ci.com/task/6188397108133888 [2] https://ports.macports.org/port/p5.34-io-tty/ [3] https://metacpan.org/pod/IO::Tty#VERIFIED-SYSTEMS,-KNOWN-ISSUES -- Regards, Nazir Bilal Yavuz Microsoft
pgsql-hackers by date: