You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "farmmamba (Jira)" <ji...@apache.org> on 2024/01/10 08:02:00 UTC

[jira] [Commented] (HDFS-17334) FSEditLogAsync#enqueueEdit does not synchronized this before invoke wait method

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

farmmamba commented on HDFS-17334:
----------------------------------

[~hexiaoqiao] [~tomscut] [~zhangshuyan] [~haiyang Hu] Sir, could you please help me check this potential problem when you have free time? Thanks ahead.

> FSEditLogAsync#enqueueEdit does not synchronized this before invoke wait method
> -------------------------------------------------------------------------------
>
>                 Key: HDFS-17334
>                 URL: https://issues.apache.org/jira/browse/HDFS-17334
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: namenode
>    Affects Versions: 3.3.6
>            Reporter: farmmamba
>            Assignee: farmmamba
>            Priority: Major
>             Fix For: 3.5.0
>
>
> In method FSEditLogAsync#enqueueEdit , there exist the below codes:
> {code:java}
>         if (Thread.holdsLock(this)) {
>           // if queue is full, synchronized caller must immediately relinquish
>           // the monitor before re-offering to avoid deadlock with sync thread
>           // which needs the monitor to write transactions.
>           int permits = overflowMutex.drainPermits();
>           try {
>             do {
>               this.wait(1000); // will be notified by next logSync.
>             } while (!editPendingQ.offer(edit));
>           } finally {
>             overflowMutex.release(permits);
>           }
>         }  {code}
> It maybe invoke this.wait(1000) without having object this's monitor.
>  



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

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org