Java application will not start due to "Failed to reserve shared memory" error on Linux

Solution Verified - Updated -

Issue

  • I try the -XX:+UseLargePages parameter in JBoss run.conf but I get this error (sent to standard out) when trying to start JBoss:

        Java HotSpot(TM) 64-Bit Server VM warning: Failed to reserve shared memory (errno = 12)
    
  • A variation of this error:

        Java HotSpot(TM) 64-Bit Server VM warning: Failed to reserve shared memory (errno = 28)    
    
  • A fatal error log is not created, but what looks like the beginning of a the fatal error log is sent to standard out along with an error:

        #
        # An unexpected error has been detected by Java Runtime Environment:
        #
        #  SIGSEGV (0xb) at pc=0x00002af03f31aa27, pid=1856, tid=1350097216
        #
        # Java VM: Java HotSpot(TM) 64-Bit Server VM (10.0-b23 mixed mode linux-amd64)
        # Problematic frame:
        # V  [libjvm.so+0x5d8a27]
        #
    
        [error occurred during error reporting , id 0xb]
    

Environment

  • Sun JDK
  • OpenJDK
  • Linux

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content