GitHub user prabhjyotsingh opened a pull request: https://github.com/apache/zeppelin/pull/2711
ZEPPELIN-3112: Markdown interpreter fails with NPE ### What is this PR for? Since pegdown-parser is not thread-safe while trying to run multiple MarkDown paragraphs at once, sometimes it fails to render HTML. Ref: https://github.com/sirthias/pegdown/blob/master/src/main/java/org/pegdown/PegDownProcessor.java#L32 ### What type of PR is it? [Improvement] ### Todos * [ ] - Task ### What is the Jira issue? * [ZEPPELIN-3112](https://issues.apache.org/jira/browse/ZEPPELIN-3112) ### How should this be tested? * This happens rarely, when you try to run all paragraph from UI which has more the 5-6 `%md` paragraph. This is hard to reproduce in 0.8.0, but can easily be done via 0.7.3. * Have added test case to verify. ### Questions: * Does the licenses files need update? N/A * Is there breaking changes for older versions? N/A * Does this needs documentation? N/A You can merge this pull request into a Git repository by running: $ git pull https://github.com/prabhjyotsingh/zeppelin ZEPPELIN-3112 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/zeppelin/pull/2711.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 #2711 ---- commit 89e64188a5631d6e20d665794277afdd7ff5739e Author: Prabhjyot Singh <prabhjyotsingh@...> Date: 2017-12-20T12:39:04Z ZEPPELIN-3112: call markdownToHtml in synchronized block ---- ---