[Pkg-sysvinit-devel] Bug#694379: initscripts: Symlinking /dev/shm to /run/shm makes Oracle Database XE unable to start. Bind mount makes it work.

Roger Leigh rleigh at codelibre.net
Thu Nov 29 22:14:51 UTC 2012


On Sun, Nov 25, 2012 at 11:45:48PM +0100, Jozsef Marton wrote:
> After the transition to /run/shm from its previous location at /dev/shm, a symlink was created for compatibility reasons:
> /dev/shm -> /run/shm
> 
> In this configuration Oracle Database 11g XE refuses to start with the following error message:
> ORA-00845: MEMORY_TARGET not supported on this system
> 
> Bind mounting /run/shm to /dev/shm does the trick: Oracle starts properly.

How is Oracle testing for the presence of /dev/shm?  Their check is
obviously broken, but it would be helpful to know what exactly they
are doing.  strace would be useful here.

The odd thing is, even when it's a symlink,

% test -d /dev/shm
% echo $?
0

a simple test for if it's a directory is fine.  A test for if it's
a tmpfs is fine.  So what exactly are Oracle's criteria for checking
if /dev/shm is to be used?

> Oracle Database XE is not in Debian, but there could be other packages I'm unaware of that also suffer from /dev/shm being a symlink.

I doubt this is the case.  Most software will use the standard
shm_open et. al. calls, and everything will just work.  /dev/shm
is an internal implementation detail of the POSIX shared memory
support in glibc.  No software should be directly looking at
/dev/shm (or /run/shm) at all.  Any software doing this is badly
broken.  SUS/POSIX does not mention /dev/shm.

> A quick patch to make /dev/shm be bind mount of /run/shm is attached. It would be inevitable better to allow users to configure this behavior, but I'm not sure if there is already a file where this configuration option could be added. If you could point me to the right place I would be happy to patch this to be configurable leaving the symlinking the default behavior.

This type of low-level implementation detail is not something anyone
should need to configure explicitly--it should just work.  The
existing configurable parameters are in /etc/default/tmpfs; see
tmpfs(5).  While it would be technically possible to add an
additional option, we'll need to know more about the problem first;
i.e. understand exactly why Oracle is failing here.

/run/shm has been the default for around 1½ years, and this is the
first issue reported with it.  Unfortunately, we're several months
into the wheezy code freeze.  It might be possible to fix this issue
once we understand the problem and have a tested patch for it, but
there are no guarantees this late into the freeze.


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux    http://people.debian.org/~rleigh/
 `. `'   schroot and sbuild  http://alioth.debian.org/projects/buildd-tools
   `-    GPG Public Key      F33D 281D 470A B443 6756 147C 07B3 C8BC 4083 E800



More information about the Pkg-sysvinit-devel mailing list