Re: Intermittent failure with t/003_logical_slots.pl test on windows

Поиск
Список
Период
Сортировка
От Kyotaro Horiguchi
Тема Re: Intermittent failure with t/003_logical_slots.pl test on windows
Дата
Msg-id 20231107.143514.1312530013364962475.horikyota.ntt@gmail.com
обсуждение исходный текст
Ответ на Re: Intermittent failure with t/003_logical_slots.pl test on windows  (Nisha Moond <nisha.moond412@gmail.com>)
Ответы Re: Intermittent failure with t/003_logical_slots.pl test on windows  (Shlok Kyal <shlok.kyal.oss@gmail.com>)
Список pgsql-hackers
At Mon, 6 Nov 2023 19:42:21 +0530, Nisha Moond <nisha.moond412@gmail.com> wrote in 
> > Appending '2>&1 test:
> > The command still results in NULL and ends up failing as no data is
> > returned. Which means even no error message is returned. The error log

Thanks for confirmation. So, at least the child process was launced
successfully in the cmd.exe's view.

Upon a quick check on my end with Windows' _popen, I have obseved the
following:

- Once a child process is started, it seems to go undetected as an
  error by _popen or subsequent fgets calls if the process ends
  abnormally, with a non-zero exit status or even with a SEGV.

- After the child process has flushed data to stdout, it is possible
  to read from the pipe even if the child process crashes or ends
  thereafter.

- Even if fgets is called before the program starts, it will correctly
  block until the program outputs something. Specifically, when I used
  popen("sleep 5 & target.exe") and immediately performed fgets on the
  pipe, I was able to read the output of target.exe as the first line.

Therefore, based on the information available, it is conceivable that
the child process was killed by something right after it started, or
the program terminated on its own without any error messages.

By the way, in the case of aforementioned SEGV, Application Errors
corresponding to it were identifiable in the Event
Viewer. Additionally, regarding the exit statuses, they can be
captured by using a wrapper batch file (.bat) that records
%ERRORLEVEL% after running the target program. This may yield
insights, aothough its effectiveness is not guaranteed.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Zhijie Hou (Fujitsu)"
Дата:
Сообщение: RE: [PoC] pg_upgrade: allow to upgrade publisher node
Следующее
От: Noah Misch
Дата:
Сообщение: Re: Popcount optimization using AVX512