Race condition when starting and stopping test server in TestLib.pm?
От | Michael Paquier |
---|---|
Тема | Race condition when starting and stopping test server in TestLib.pm? |
Дата | |
Msg-id | CAB7nPqR_5Y=kHHR4RwCZaoqoe_bCnkLgtjX1VnY7WEBSv-JVVw@mail.gmail.com обсуждение исходный текст |
Список | pgsql-hackers |
Hi all, Within the last couple of days hamster has failed twice when running TAP tests because it was not able to start a test server with start_test_server: http://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=hamster&dt=2015-04-30%2019%3A07%3A31 http://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=hamster&dt=2015-04-22%2016%3A00%3A33 And here is the failure: pg_ctl: could not start server Examine the log output. Bailout called. Further testing stopped: pg_ctl failed cannot remove directory for /home/buildfarm/data/buildroot/HEAD/pgsql.build/src/bin/scripts/tmp_testrTRB/pgdata: Directory not empty at /usr/share/perl5/core_perl/File/Temp.pm line 784. cannot remove directory for /home/buildfarm/data/buildroot/HEAD/pgsql.build/src/bin/scripts/tmp_testrTRB: Directory not empty at /usr/share/perl5/core_perl/File/Temp.pm line 784. When connecting to the server this afternoon I noticed that indeed that an instance of Postgres was still running, and visibly it has been been able to stop because the temporary data directory has been removed before the server stop really completed. Note that I stopped it brutally for now to allow the next rounds of tests to work btw... hamster is now known to be legendary slow in the buildfarm, so I guess that it is good in catching up such race conditions, hence I am wondering if the failure is not caused by one even if switch -w is used when stopping the server in TestLib.pm. END { if ($test_server_datadir) { system 'pg_ctl', '-D', $test_server_datadir, '-s', '-w', '-m', 'immediate', 'stop'; } } Thoughts? -- Michael
В списке pgsql-hackers по дате отправления: