Re: [HACKERS] src/test/subscription/t/002_types.pl hanging onparticular environment

Поиск
Список
Период
Сортировка
От Thomas Munro
Тема Re: [HACKERS] src/test/subscription/t/002_types.pl hanging onparticular environment
Дата
Msg-id CAEepm=2ZUsH48mzNvZ5w3skyGMcjM6ORN3Zkdiu9iM1eeBBHSA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] src/test/subscription/t/002_types.pl hanging onparticular environment  (Andres Freund <andres@anarazel.de>)
Ответы Re: [HACKERS] src/test/subscription/t/002_types.pl hanging on particular environment  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Mon, Sep 18, 2017 at 10:18 PM, Andres Freund <andres@anarazel.de> wrote:
> On 2017-09-18 21:57:04 +1200, Thomas Munro wrote:
>>     WARNING:  terminating connection because of crash of another server process
>>     DETAIL:  The postmaster has commanded this server process to roll
>> back the current transaction and exit, because another server process
>> exited abnormally and possibly corrupted shared memory.
>>     HINT:  In a moment you should be able to reconnect to the database
>> and repeat your command.
>>
>> As far as I know these are misleading, it's really just an immediate
>> shutdown.  There is no core file, so I don't believe anything actually
>> crashed.
>
> I was about to complain about these, for entirely unrelated reasons. I
> think it's a bad idea - and there's a couple complains on the lists too,
> to emit these warnings.  It's not entirely trivial to fix though :(

This type of violent shutdown seems to be associated with occasional
corruption of .gcda files (the files output by GCC coverage builds).
The symptoms are that if you use --enable-coverage and make
check-world you'll very occasionally get a spurious TAP test failure
like this:

#   Failed test 'pg_ctl start: no stderr'
#   at /home/travis/build/postgresql-cfbot/postgresql/src/bin/pg_ctl/../../../src/test/perl/TestLib.pm
line 301.
#          got:
'profiling:/home/travis/build/postgresql-cfbot/postgresql/src/backend/nodes/copyfuncs.gcda:Merge
mismatch for function 94
# '
#     expected: ''

I'm not sure of the exact mechanism though.  GCC supplies a function
__gcov_flush() that normally runs at exit or execve, so if you're
killed without reaching those you don't get any .gcda data.  Perhaps
we are in exit (or fork/exec) partway through writing out coverage
data in __gcov_flush(), and at that moment we are killed.  Then a
subsequent run of instrumented code will find the half-written file
and print the "Merge mismatch" message.

-- 
Thomas Munro
http://www.enterprisedb.com


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Show backtrace when tap tests fail
Следующее
От: Andreas Karlsson
Дата:
Сообщение: Re: [HACKERS] CREATE COLLATION does not sanitize ICU's BCP 47language tags. Should it?