Mikhail Cherkasov created IGNITE-8845:
-----------------------------------------

             Summary: GridUnsafe.allocateMemory throws OutOfMemoryError which 
isn't handled
                 Key: IGNITE-8845
                 URL: https://issues.apache.org/jira/browse/IGNITE-8845
             Project: Ignite
          Issue Type: Bug
          Components: general
    Affects Versions: 2.5
            Reporter: Mikhail Cherkasov
             Fix For: 2.6
         Attachments: Main.java

If there's no more native memory then Unsafe.allocateMemor throws 
java.lang.OutOfMemoryError. Errors - is type of exception after which you can't 
restore application and you need to close it and restart. I think in this case 
we can handle it and throw IgniteOOM instead.
 
Reproducer is attached, it throws the following exception:
 
Exception in thread "main" java.lang.OutOfMemoryError
 at sun.misc.Unsafe.allocateMemory(Native Method)
 at 
org.apache.ignite.internal.util.GridUnsafe.allocateMemory(GridUnsafe.java:1068)
 at 
org.apache.ignite.internal.mem.unsafe.UnsafeMemoryProvider.nextRegion(UnsafeMemoryProvider.java:80)
 at 
org.apache.ignite.internal.pagemem.impl.PageMemoryNoStoreImpl.addSegment(PageMemoryNoStoreImpl.java:612)
 at 
org.apache.ignite.internal.pagemem.impl.PageMemoryNoStoreImpl.allocatePage(PageMemoryNoStoreImpl.java:287)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to