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

Junfan Zhang edited comment on OOZIE-3646 at 1/13/22, 2:52 AM:
---------------------------------------------------------------

Yep. [~dionusos], maybe you should remove the starting process of 
{{HCatalogServer}} in {{{}XHCatTestCase{}}}. In my mac, it also hang when no 
removing. Should be like as follows:
{code:java}
public abstract class XHCatTestCase extends XFsTestCase {

    private MiniHCatServer hcatServer;

    @Override
    protected void setUp() throws Exception {
        super.setUp();
//        super.setupHCatalogServer();
//        hcatServer = super.getHCatalogServer();
    }
{code}
Please check it. And to reproduce this bug, you could run this test case: 
[https://github.com/apache/oozie/pull/65]

 

Looking forward to your reply.


was (Author: zuston):
Yep. [~dionusos], maybe you should remove the starting process of 
{{HCatalogServer}} in {{XHCatTestCase}}. In my mac, it also hang when no 
removing. Should be like as follows:


{code:java}
public abstract class XHCatTestCase extends XFsTestCase {

    private MiniHCatServer hcatServer;

    @Override
    protected void setUp() throws Exception {
        super.setUp();
//        super.setupHCatalogServer();
//        hcatServer = super.getHCatalogServer();
    }
{code}

Please check it. And to reproduce this bug, you could run this test case: 
https://github.com/apache/oozie/pull/65

> Possible dead-lock in SignalXCommand
> ------------------------------------
>
>                 Key: OOZIE-3646
>                 URL: https://issues.apache.org/jira/browse/OOZIE-3646
>             Project: Oozie
>          Issue Type: Bug
>            Reporter: Junfan Zhang
>            Assignee: Junfan Zhang
>            Priority: Major
>         Attachments: OOZIE-3646.patch-1, a1.png
>
>
> The limited thread execution mechanism aims to solve the dead-lock when all 
> active threads are executing the SignalXCommand's invokeAll method.
> h2. Dead-lock when to happen
> Assuming that Oozie CallableQueue thread pool size is 120, when all threads 
> are executing the {{SignalXCommand.startForkedActions}} method, a deadlock 
> occurs.
> Because in {{SignalXCommand.startForkedActions}}, the code of 
> {code:java}
> List<Future<ActionExecutorContext>> futures = 
> Services.get().get(CallableQueueService.class)
>                     .invokeAll(tasks);
> {code}
>  will be sync executed, however now all callableQueue threads are busy.
> h2. Solution
> 1. Need to limit directly invokeAll call when the num of rest threads is less 
> than the tasks
> 2. To obtain correct active threads number in callableQueue, the 
> SignalXCommand.class lock is needed.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to