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

From: amul sul <sul_amul(at)yahoo(dot)co(dot)in>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Server crash due to SIGBUS(Bus Error) when trying to access the memory created using dsm_create().
Date: 2016-08-12 13:23:43
Message-ID: 1002664500.12301802.1471008223422.JavaMail.yahoo@mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi All,
When I am calling dsm_create on Linux using the POSIX DSM implementation can succeed, but result in SIGBUS when later try to access the memory.  This happens because of my system does not have enough shm space &  current allocation in dsm_impl_posix does not allocate disk blocks[1]. I wonder can we use fallocate system call (i.e. Zero-fill the file) to ensure that 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.
Thoughts/Suggestions ?
Similar post:  [1] http://uk.comp.os.linux.narkive.com/Ve44sO4i/shared-memory-problem-no-space-at-dev-shm-causes-sigbus 

Regards,Amul Sul

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Vik Fearing 2016-08-12 13:27:07 Re: new autovacuum criterion for visible pages
Previous Message Peter Eisentraut 2016-08-12 13:15:48 Re: new autovacuum criterion for visible pages