You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Ivan Andika (Jira)" <ji...@apache.org> on 2026/10/23 09:04:00 UTC

[jira] [Created] (HDDS-17380) Scanner shutdown can deadlock during volume failure

Ivan Andika created HDDS-17380:
----------------------------------

             Summary: 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


*[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:

{{Shutdown thread                    Scanner worker
Holds scanner monitor
                                   Detects failed volume
Waits for worker via join()
                                   Waits for scanner monitor}}

I 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: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org