Re: BUG #1208: Invalid page header

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #1208: Invalid page header
Дата
Msg-id 16232.1092679944@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #1208: Invalid page header  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: BUG #1208: Invalid page header  ("Robert E. Bruccoleri" <bruc@stone.congenomics.com>)
Список pgsql-bugs
Peter Eisentraut <peter_e@gmx.net> writes:
> Tom Lane wrote:
>> But that code is gcc-only, and he's not using gcc.

> I think the icc compiler claims to be gcc-compatible in that area, so
> it's quite likely that the gcc assembler code would be used.

Oh, good point.

In that case it seems entirely possible that the assembly code
tightening-up patch that I made for 8.0 is relevant.  The point of that
patch was to prevent the compiler from making inappropriate
optimizations around a spinlock TAS.  We have not seen any indication
that existing gcc releases would actually do anything unwanted ... but
icc might have different/more aggressive optimizations.

[ looks at code... ]  But it looks like 7.4's IA64 code already had the
memory-clobber constraint, so there doesn't appear to be any significant
change there since 7.4.  I suppose it's worth trying the insignificant
change though:

    __asm__ __volatile__(
        "    xchg4     %0=%1,%2    \n"
:        "=r"(ret), "=m"(*lock)
:        "r"(1), "1"(*lock)
:        "memory");

to

    __asm__ __volatile__(
        "    xchg4     %0=%1,%2    \n"
:        "=r"(ret), "+m"(*lock)
:        "r"(1)
:        "memory");

at line 125ff of src/include/storage/s_lock.h.  Note "=m" becomes "+m"
to replace the separate "1" constraint.

Robert, have you tried backing off compiler optimization levels to see
if anything changes?

            regards, tom lane

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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: BUG #1208: Invalid page header
Следующее
От: "Robert E. Bruccoleri"
Дата:
Сообщение: Re: BUG #1208: Invalid page header