Re: Server crash due to SIGBUS(Bus Error) when trying to access the memory created using dsm_create(). - Mailing list pgsql-hackers

From Claudio Freire
Subject Re: Server crash due to SIGBUS(Bus Error) when trying to access the memory created using dsm_create().
Date
Msg-id CAGTBQpZoEX7bHLMFDVKHAnf7VKLmCCEb=C=Zv0omnc60r4uihg@mail.gmail.com
Whole thread Raw
In response to Re: Server crash due to SIGBUS(Bus Error) when trying to access the memory created using dsm_create().  (amul sul <sul_amul@yahoo.co.in>)
List pgsql-hackers
On Fri, Aug 12, 2016 at 1:55 PM, amul sul <sul_amul@yahoo.co.in> wrote:
> No segfault during dsm_create,  mmap returns  the memory address  which is
> inaccessible.
>
> Let me see how can I disable kernel overcommit behaviour, but  IMHO,  we
> should prevent ourselves from crashing,  shouldn't we?

Overcommit can be caught at dsm_create time with an mlock call (note,
that MAP_LOCKED isn't the same). Even a transient lock (mlock +
munlock) could prevent sigbus due to overcommit.



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Add hint for function named "is"
Next
From: Karan Sikka
Date:
Subject: Re: TODO item: Implement Boyer-Moore searching in LIKE queries