Re: 9.4 beta1 crash on Debian sid/i386

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: 9.4 beta1 crash on Debian sid/i386
Дата
Msg-id 20140519141221.GC5098@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: 9.4 beta1 crash on Debian sid/i386  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: 9.4 beta1 crash on Debian sid/i386
Список pgsql-hackers
On 2014-05-19 09:53:11 -0400, Tom Lane wrote:
> I think throwing an error out of a SIGBUS handler is right out.  There
> would be no way to know exactly what code we were interrupting.  It's
> the same reason we don't let, eg, the SIGALRM handler throw a timeout
> error directly (in most places anyway).

Agreed. I think if we really, really feel the need to do something about
this - which I don't - we could allocate a separate stack very early on
and use that.

> >> * PostgreSQL allocates lots of heap using brk() instead of mmap()
> 
> > It doesn't really do that, btw. It's the libc's mmap that makes those
> > decisions, not postgres.
> 
> It occurs to me that maybe this is a glibc bug, not a kernel bug?

You think malloc() should try to be careful when calling brk() and check
beforehand wether it'll conflict with stack_base + RLIMIT_STACK? That's
not a bad argument, but it still seems a really bad choice to leave that
little space for the heap. Especially when it's dependant on -pie being
used.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: 9.4 beta1 crash on Debian sid/i386
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: 9.4 release notes