[
https://issues.apache.org/jira/browse/IGNITE-9721?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16630278#comment-16630278
]
Oleg Ignatenko edited comment on IGNITE-9721 at 9/27/18 1:45 PM:
-----------------------------------------------------------------
Checking the code suggests that there is a data race (data in {{metastorage}}
is supposed to be non null). Most probable reason for a race is that accessing
data relies on synchronization performed using non-final field (declared as
{{private GridFutureAdapter<Void> activateFut = new GridFutureAdapter<>();}}).
Also, in preliminary discussion [~tledkov-gridgain] pointed that current code
carries a risk of leaking {{this}} in constructor and proposed changes to
prevent that.
For the sake of completeness I also checked source code that supplies
troublesome data in {{GridCacheDatabaseSharedManager}} and discussed it with
[~agoncharuk]. As far as I could tell it is okay and I found no reason to
change it.
was (Author: oignatenko):
Checking the code suggests that there is a data race (data in {{metastorage}}
is supposed to be non null). Most probable reason for a race is that accessing
data relies on synchronization performed using non-final field (declared as
{{private GridFutureAdapter<Void> activateFut = new GridFutureAdapter<>();}}).
For the sake of completeness I also checked source code that supplies
troublesome data in {{GridCacheDatabaseSharedManager}} and discussed it with
[~agoncharuk]. As far as I could tell it is okay and I found no reason to
change it.
> NPE in IgniteAuthenticationProcessor$RefreshUsersStorageWorker.body
> -------------------------------------------------------------------
>
> Key: IGNITE-9721
> URL: https://issues.apache.org/jira/browse/IGNITE-9721
> Project: Ignite
> Issue Type: Bug
> Affects Versions: 2.6
> Reporter: Oleg Ignatenko
> Assignee: Oleg Ignatenko
> Priority: Major
> Labels: MakeTeamcityGreenAgain
> Fix For: 2.7
>
>
> Tests at Teamcity sometimes fail with NPE in
> {{IgniteAuthenticationProcessor}}.
> Example of failure (in test
> {{AuthenticationProcessorNodeRestartTest.test1kUsersNodeRestartServer}}) is
> [here|https://ci.ignite.apache.org/viewLog.html?buildId=1945459&tab=buildResultsDiv&buildTypeId=IgniteTests24Java8_Cache7],
> and stacktrace looks as follows:
> {noformat}[2018-09-26
> 07:06:36,732][ERROR][auth-#6589%authentication.AuthenticationProcessorNodeRestartTest0%][IgniteAuthenticationProcessor]
> Runtime error caught during grid runnable execution: GridWorker
> [name=refresh-store,
> igniteInstanceName=authentication.AuthenticationProcessorNodeRestartTest0,
> finished=false, heartbeatTs=1537945595104, hashCode=733597684,
> interrupted=true,
> runner=auth-#6589%authentication.AuthenticationProcessorNodeRestartTest0%]
> java.lang.NullPointerException
> at
> org.apache.ignite.internal.processors.authentication.IgniteAuthenticationProcessor$RefreshUsersStorageWorker.body(IgniteAuthenticationProcessor.java:1346)
> at
> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:120)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at java.lang.Thread.run(Thread.java:748){noformat}
> This might be either coding error (missing null check) or data race.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)