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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Server crash due to SIGBUS(Bus Error) when trying to access the memory created using dsm_create().
Дата
Msg-id 25838.1471010881@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Server crash due to SIGBUS(Bus Error) when trying to access the memory created using dsm_create().  (amul sul <sul_amul@yahoo.co.in>)
Ответы 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>)
Re: Server crash due to SIGBUS(Bus Error) when trying to access the memory created using dsm_create().  (Thomas Munro <thomas.munro@enterprisedb.com>)
Список pgsql-hackers
amul sul <sul_amul@yahoo.co.in> writes:
> When I am calling dsm_create on Linux using the POSIX DSM implementation can succeed, but result in SIGBUS when later
tryto access the memory.  This happens because of my system does not have enough shm space &  current allocation in
dsm_impl_posixdoes not allocate disk blocks[1]. I wonder can we use fallocate system call (i.e. Zero-fill the file) to
ensurethat all the file space has really been allocated, so that we don't later seg fault when accessing the memory
mapping.But here we will endup by loop calling ‘write’ squillions of times.
 

Wouldn't that just result in a segfault during dsm_create?

I think probably what you are describing here is kernel misbehavior
akin to memory overcommit.  Maybe it *is* memory overcommit and can
be turned off the same way.  If not, you have material for a kernel
bug fix/enhancement request.
        regards, tom lane



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

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: Add hint for function named "is"
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Add hint for function named "is"