[
https://issues.apache.org/jira/browse/HDDS-17380?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated HDDS-17380:
----------------------------------
Labels: pull-request-available (was: )
> Scanner shutdown can deadlock during volume failure
> ---------------------------------------------------
>
> Key: HDDS-17380
> URL: https://issues.apache.org/jira/browse/HDDS-17380
> Project: Apache Ozone
> Issue Type: Bug
> Reporter: Ivan Andika
> Assignee: Ivan Andika
> Priority: Major
> Labels: pull-request-available
>
> *[P1] Scanner shutdown can deadlock during volume failure.*
> AbstractBackgroundContainerScanner.java holds the scanner monitor while
> joining its worker. Meanwhile, the worker calls a synchronized shutdown
> method when it detects a failed volume:
>
> {code:java}
> Shutdown thread Scanner worker
> Holds scanner monitor
> Detects failed volume
> Waits for worker via join()
> Waits for scanner monitor{code}
>
> Reproduced this using the actual scanner classes: the shutdown thread was
> {{WAITING}} in {{{}Thread.join(){}}}, and the worker was {{BLOCKED}} on its
> monitor.
> The remedy is to signal shutdown under synchronization, then release the
> monitor before joining. {*}The subclass’s synchronized shutdown methods must
> also be considered{*}; moving {{join()}} outside synchronization only in the
> base class is insufficient.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]