GitHub user OopsOutOfMemory opened a pull request:

    https://github.com/apache/zeppelin/pull/1891

    [ZEPPELIN-1941] Fix cron job with release resource option dead lock

    ### What is this PR for?
    There is a deadlock in concurrent cron job execution with release resource 
option.
    `Scenario`:
    Two notebook run with cron job that release resource after job finished.
    
    In `Notebook.CronJob.execute()` method:
    
    `T1. note.runAll(); // locked paragraphs(lock) and wait to 
interpreterSettings(lock)`
    
    `T2. notebook.getInterpreterFactory().restart() 
//locked(interpreterSettings) and wait for paragraphs(lock) during jobAbort.`
    
    This will trigger a deadlock that cause zeppelin hang.
    
    ### What type of PR is it?
    [Bug Fix ]
    
    ### Todos
    * [x] - Fix this by avoid acquire lock in job abort method.
    
    ### What is the Jira issue?
    * Open an issue on Jira https://issues.apache.org/jira/browse/ZEPPELIN/
    * Put link here, and add [ZEPPELIN-*Jira number*] in PR title, eg. 
[ZEPPELIN-533]
    
    ### How should this be tested?
    Outline the steps to test the PR here.
    
    ### Screenshots (if appropriate)
    
    ### Questions:
    * Does the licenses files need update?
    * Is there breaking changes for older versions?
    * Does this needs documentation?


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/OopsOutOfMemory/zeppelin fix_dead_lock_cronjob

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/zeppelin/pull/1891.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1891
    
----
commit 44e604323e09f8b2854b4031e6c1125015d66914
Author: victor.sheng <victorsh...@qiniu.com>
Date:   2017-01-12T06:54:26Z

    fix cron job with release resource option dead lock

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to