You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by "Bellenger, Dominique" <Do...@ipdynamics.de> on 2018/04/11 15:37:25 UTC

NullPointerException in GridCacheTtlManager.expire

Hey all,
I'm using Apache Ignite .NET ver. 2.4.0#20180305-sha1:aa342270, running multiple caches.
One of the caches holds entries which expire after a while.

At some point of operation I observed that two of my transactions raised exceptions when being commited by me.
Both transactions were used on different threads (18 and 27), and the work being done in the transaction was on different caches (one of them was the cache which holds expiring items).
This is the log output I got:

11.04 16:41:33,845 WARN  [ 18] pter.StatusEventProcessor : Exception while processing status event
Apache.Ignite.Core.Common.IgniteException: Java exception occurred [class=java.lang.NullPointerException, message=] ---> Apache.Ignite.Core.Common.JavaException: java.lang.NullPointerException
                at org.apache.ignite.internal.processors.cache.GridCacheTtlManager.expire(GridCacheTtlManager.java:197)
                at org.apache.ignite.internal.processors.cache.GridCacheUtils.unwindEvicts(GridCacheUtils.java:834)
                at org.apache.ignite.internal.processors.cache.GridCacheUtils.unwindEvicts(GridCacheUtils.java:844)
                at org.apache.ignite.internal.processors.cache.transactions.TransactionProxyImpl.leave(TransactionProxyImpl.java:136)
                at org.apache.ignite.internal.processors.cache.transactions.TransactionProxyImpl.close(TransactionProxyImpl.java:326)
                at org.apache.ignite.internal.processors.platform.transactions.PlatformTransactions.txClose(PlatformTransactions.java:136)
                at org.apache.ignite.internal.processors.platform.transactions.PlatformTransactions.processInLongOutLong(PlatformTransactions.java:178)
                at org.apache.ignite.internal.processors.platform.PlatformTargetProxyImpl.inLongOutLong(PlatformTargetProxyImpl.java:55)

   at Apache.Ignite.Core.Impl.Unmanaged.Jni.Env.ExceptionCheck()
   at Apache.Ignite.Core.Impl.Unmanaged.Jni.Env.CallLongMethod(GlobalRef obj, IntPtr methodId, Int64* argsPtr)
   at Apache.Ignite.Core.Impl.Unmanaged.UnmanagedUtils.TargetInLongOutLong(GlobalRef target, Int32 opType, Int64 memPtr)
   at Apache.Ignite.Core.Impl.PlatformJniTarget.InLongOutLong(Int32 type, Int64 val)
   --- End of inner exception stack trace ---
   at Apache.Ignite.Core.Impl.PlatformJniTarget.InLongOutLong(Int32 type, Int64 val)
   at Apache.Ignite.Core.Impl.Transactions.TransactionImpl.Close()
   at Apache.Ignite.Core.Impl.Transactions.TransactionImpl.Dispose()
   at MY CODE DOING THE TRANSACTION COMMIT
11.04 16:41:33,900 ERROR [ 27] ite.WorkHeapCacheListener : Apache.Ignite.Core.Common.IgniteException: Java exception occurred [class=java.lang.NullPointerException, message=] ---> Apache.Ignite.Core.Common.JavaException: java.lang.NullPointerException
                at org.apache.ignite.internal.processors.cache.GridCacheTtlManager.expire(GridCacheTtlManager.java:197)
                at org.apache.ignite.internal.processors.cache.GridCacheUtils.unwindEvicts(GridCacheUtils.java:834)
                at org.apache.ignite.internal.processors.cache.GridCacheUtils.unwindEvicts(GridCacheUtils.java:844)
                at org.apache.ignite.internal.processors.cache.transactions.TransactionProxyImpl.leave(TransactionProxyImpl.java:136)
                at org.apache.ignite.internal.processors.cache.transactions.TransactionProxyImpl.close(TransactionProxyImpl.java:326)
                at org.apache.ignite.internal.processors.platform.transactions.PlatformTransactions.txClose(PlatformTransactions.java:136)
                at org.apache.ignite.internal.processors.platform.transactions.PlatformTransactions.processInLongOutLong(PlatformTransactions.java:178)
                at org.apache.ignite.internal.processors.platform.PlatformTargetProxyImpl.inLongOutLong(PlatformTargetProxyImpl.java:55)

   at Apache.Ignite.Core.Impl.Unmanaged.Jni.Env.ExceptionCheck()
   at Apache.Ignite.Core.Impl.Unmanaged.Jni.Env.CallLongMethod(GlobalRef obj, IntPtr methodId, Int64* argsPtr)
   at Apache.Ignite.Core.Impl.Unmanaged.UnmanagedUtils.TargetInLongOutLong(GlobalRef target, Int32 opType, Int64 memPtr)
   at Apache.Ignite.Core.Impl.PlatformJniTarget.InLongOutLong(Int32 type, Int64 val)
   --- End of inner exception stack trace ---
   at Apache.Ignite.Core.Impl.PlatformJniTarget.InLongOutLong(Int32 type, Int64 val)
   at Apache.Ignite.Core.Impl.Transactions.TransactionImpl.Close()
   at Apache.Ignite.Core.Impl.Transactions.TransactionImpl.Dispose()
   at MY CODE DOING THE TRANSACTION COMMIT


The code in GridCacheTtlManager.java:197 is "boolean more = cctx.offheap().expire(dhtCtx, expireC, amount);" and my guess is, that offheap() returns null at that stage.

I'm using TransactionConcurrency.Optimistic, TransactionIsolation.Serializable as concurrency and isolation modes for the transaction.
For all caches I do not use a special off-heap configuration, everything is set to default. I only use a custom dataStorageConfiguration (using no persistence).


Would it be possible for me to circumvent the error by changing some configuration values?

Greets,
Dome


Re: NullPointerException in GridCacheTtlManager.expire

Posted by Andrey Mashenkov <an...@gmail.com>.
Hi,

GridCacheTtlManager.expire is called from different places and may lead to
cluster hanging.
It is impossible to understand from user code was the operation successful
or not when such NPE was thrown.

As this method is called (from gateway.leave() method) after operation has
been finished, so, your transaction has been commited successfully.


On Fri, Apr 13, 2018 at 8:31 AM, Bellenger, Dominique <
Dominique.Bellenger@ipdynamics.de> wrote:

> Thank you for the information! What are the worst consequences if I hit
> that bug? Entries not being evicted?
> Is my tx committed if the error is striking on commit or do I need to redo
> the work that was done in the tx?
>
>
> On 12. Apr 2018, at 14:30, Andrey Mashenkov <an...@gmail.com>
> wrote:
>
> Hi Dome,
>
> It is known issue and there is a ticket for this [1] you can track.
>
> It is hard to be reproduced due to a race.
> Seems, GridCacheUtils.unwindEvicts() should check if context has been
> started.
>
>
> [1] https://issues.apache.org/jira/browse/IGNITE-7972
>
>
> On Thu, Apr 12, 2018 at 2:39 PM, dkarachentsev <dkarachentsev@gridgain.com
> > wrote:
>
>> Hi Dome,
>>
>> Could you please attach full logs?
>>
>> Thanks!
>> -Dmitry
>>
>>
>>
>> --
>> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>>
>
>
>
> --
> Best regards,
> Andrey V. Mashenkov
>
>


-- 
Best regards,
Andrey V. Mashenkov

Re: NullPointerException in GridCacheTtlManager.expire

Posted by "Bellenger, Dominique" <Do...@ipdynamics.de>.
Thank you for the information! What are the worst consequences if I hit that bug? Entries not being evicted?
Is my tx committed if the error is striking on commit or do I need to redo the work that was done in the tx?

On 12. Apr 2018, at 14:30, Andrey Mashenkov <an...@gmail.com>> wrote:

Hi Dome,

It is known issue and there is a ticket for this [1] you can track.

It is hard to be reproduced due to a race.
Seems, GridCacheUtils.unwindEvicts() should check if context has been started.


[1] https://issues.apache.org/jira/browse/IGNITE-7972


On Thu, Apr 12, 2018 at 2:39 PM, dkarachentsev <dk...@gridgain.com>> wrote:
Hi Dome,

Could you please attach full logs?

Thanks!
-Dmitry



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/



--
Best regards,
Andrey V. Mashenkov

Re: NullPointerException in GridCacheTtlManager.expire

Posted by Andrey Mashenkov <an...@gmail.com>.
Hi Dome,

It is known issue and there is a ticket for this [1] you can track.

It is hard to be reproduced due to a race.
Seems, GridCacheUtils.unwindEvicts() should check if context has been
started.


[1] https://issues.apache.org/jira/browse/IGNITE-7972


On Thu, Apr 12, 2018 at 2:39 PM, dkarachentsev <dk...@gridgain.com>
wrote:

> Hi Dome,
>
> Could you please attach full logs?
>
> Thanks!
> -Dmitry
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>



-- 
Best regards,
Andrey V. Mashenkov

Re: NullPointerException in GridCacheTtlManager.expire

Posted by dkarachentsev <dk...@gridgain.com>.
Hi Dome,

Could you please attach full logs?

Thanks!
-Dmitry



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/