[ 
https://issues.apache.org/jira/browse/ARTEMIS-5047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17885080#comment-17885080
 ] 

Juan commented on ARTEMIS-5047:
-------------------------------

Thanks for the pointers [~jbertram]. I did a bit of diving into the code myself 
and I have suspicion that the new triple check {{boolean hasBeenModified(byte 
state)}} method introduced in the 
{{org.apache.activemq.artemis.core.server.impl.FileLockNodeManager}} class in 
version 2.29.0 to compare the timestamps of the lock files could be the culprit 
here. On an SMB share, the call to {{File.lastModified()}} on the fresh server 
lock file might somehow always return a timestamp that is greater than the one 
that is stored in the {{serverLockLastModified}} property.

Came across this by diffing between the 2 versions I mentioned in this ticket's 
description: 
[https://github.com/apache/activemq-artemis/compare/2.23.1...2.33.0#diff-c66105943197c1c6cb45e5c43eef1037ef05f4415addf917a9e83475028bcfafR547]
 (caution: large diff, might freeze your browser for a minute)
More manageable diff between versions 2.28.0 and 2.29.0 over here: 
[https://github.com/apache/activemq-artemis/compare/2.28.0...2.29.0#diff-c66105943197c1c6cb45e5c43eef1037ef05f4415addf917a9e83475028bcfafR546]
 (when navigating to "Files changed" and going down to the 
{{FileLockNodeManager.java}} diff, you'll notice the point I marked on line 546 
where the lock is most likely lost, then starting from line 561 you can spot 
the new method I was talking about)

> Lost the lock according to the monitor, notifying listeners
> -----------------------------------------------------------
>
>                 Key: ARTEMIS-5047
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-5047
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 2.33.0, 2.37.0
>         Environment: * *Storage Type:* SMB share hosted on AWS FSxN
>  * *Current Version:* NetApp Release 9.14.1P5
>  * *Affected Version:* 2.33.0 / 2.37.0
>  * *Previous Version:* 2.23.1 (issue not observed)
>            Reporter: Juan
>            Priority: Major
>
> After upgrading from version 2.23.1 to 2.33.0 the system has started to fail 
> due to a lock loss. This issue was not present in the previous version and 
> has only surfaced after the upgrade.
> I have seen a similar issue. 
> {noformat}
> (AuditLogger_impl.java:2843) - AMQ601767: STOMP connection c3e5b678 for user 
> [email protected]:64628 created FINEST|6324/0|Service 
> com.docshifter.mq.DocShifterMQ|24-08-22 01:03:51|22 Aug 2024 01:03:51,813 
> WARN [Thread-0 (ActiveMQ-scheduled-threads)] (FileLockNodeManager.java:557) - 
> Lost the lock according to the monitor, notifying listeners 
> FINEST|6324/0|Service com.docshifter.mq.DocShifterMQ|24-08-22 01:03:51|22 Aug 
> 2024 01:03:51,813 ERROR [Thread-0 (ActiveMQ-scheduled-threads)] 
> (ActiveMQServerLogger_impl.java:805) - AMQ222010: Critical IO Error, shutting 
> down the server. file=Lost NodeManager lock, message=NULL 
> FINEST|6324/0|Service com.docshifter.mq.DocShifterMQ|24-08-22 
> 01:03:51|java.io.IOException: lost lock{noformat}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to