pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: amul sul <sul_amul@yahoo.co.in>
To: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Server crash due to SIGBUS(Bus Error) when trying to access the memory created using dsm_create().
Date: Fri, 12 Aug 2016 13:23:43 +0000 (UTC)
Message-ID: <1002664500.12301802.1471008223422.JavaMail.yahoo@mail.yahoo.com> (raw)
References: <1002664500.12301802.1471008223422.JavaMail.yahoo.ref@mail.yahoo.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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

view thread (31+ messages)  latest in thread

Message-ID: <1002664500.12301802.1471008223422.JavaMail.yahoo@mail.yahoo.com>
Permalink:  ../1002664500.12301802.1471008223422.JavaMail.yahoo@mail.yahoo.com/
Also on:    postgresql.org/message-id/1002664500.12301802.1471008223422.JavaMail.yahoo@mail.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: sul_amul@yahoo.co.in
  Subject: Re: Server crash due to SIGBUS(Bus Error) when trying to access the memory created using dsm_create().
  In-Reply-To: <1002664500.12301802.1471008223422.JavaMail.yahoo@mail.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox