{"id":114698,"date":"2022-09-14T07:00:00","date_gmt":"2022-09-14T04:00:00","guid":{"rendered":"https:\/\/www.javacodegeeks.com\/?p=114698"},"modified":"2022-09-12T14:19:59","modified_gmt":"2022-09-12T11:19:59","slug":"troubleshooting-deadlock-in-an-apache-opensource-library","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2022\/09\/troubleshooting-deadlock-in-an-apache-opensource-library.html","title":{"rendered":"Troubleshooting deadlock in an Apache opensource library"},"content":{"rendered":"<p><a href=\"https:\/\/pdfbox.apache.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">Apache PDFBox<\/a> is a popular open-source library that facilitates java applications to work with PDF documents. Recently we encountered a Deadlock that surfaced in this library. In this post we have shared how we troubleshooted and identified the root cause of the problem.<\/p>\n<h2 class=\"wp-block-heading\">What is Deadlock?<\/h2>\n<p>First let\u2019s try to understand what \u2018Deadlock\u2019 means. Several technical definitions aren\u2019t clear. \u2018Deadlock\u2019 definition is one among them :-). Deadlock\u2019s definition goes like this: <em>\u201cDeadlock is a situation where a set of processes are blocked because each process is holding a resource and waiting for another resource acquired by some other process.\u201d<\/em> It\u2019s always easier to learn something new through examples and pictures. Let\u2019s look at the below practical example, which may help you to understand Deadlock better.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/09\/1-1.jpg\"><img decoding=\"async\" width=\"737\" height=\"318\" src=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/09\/1-1.jpg\" alt=\"\" class=\"wp-image-114712\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/09\/1-1.jpg 737w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/09\/1-1-300x129.jpg 300w\" sizes=\"(max-width: 737px) 100vw, 737px\" \/><\/a><\/figure>\n<\/div>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/09\/2.jpg\"><img decoding=\"async\" width=\"739\" height=\"320\" src=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/09\/2.jpg\" alt=\"\" class=\"wp-image-114714\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/09\/2.jpg 739w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/09\/2-300x130.jpg 300w\" sizes=\"(max-width: 739px) 100vw, 739px\" \/><\/a><\/figure>\n<\/div>\n<p>Let\u2019s say there is only one train track, and this train track has six parts(part-1, part-2, part-3, part-4, part-5, part-6). Train-A starts at part-1 and Train-B starts at Part-6 on the same train track at the same time. Both trains travel at the same speed. Under this circumstance, Train-A and Train-B will reach a Deadlock state when they reach part-3 and part-4 of the train track. Because when Train-A is in part-3 of the train track, it will be stuck waiting for part-4 of the track, which Train-B holds. On the other hand, when Train-B is in part-4, it will be stuck waiting for part-3, which Train-A holds. Thus, both the trains can\u2019t move forward. This is a classic Deadlock situation. Similarly, once a Deadlock happens in the application, it cannot be recovered. The only way to recover from Deadlock is to restart the application. To learn more about Deadlock basics &amp; troubleshooting, you may refer to <a href=\"https:\/\/blog.ycrash.io\/2021\/03\/13\/chaos-engineering-deadlock\/\" target=\"_blank\" rel=\"noreferrer noopener\">this blog post<\/a>.<\/p>\n<h2 class=\"wp-block-heading\">Troubleshooting Deadlock<\/h2>\n<p>Now let\u2019s discuss about the Deadlock problem we faced in the application. From the above explanation you can understand that Deadlock is caused due to threads. Thus, to analyze Deadlock, you need to capture thread dump from the application. Thread dump is basically a snapshot of all threads that are running in your application. It contains information such as: stack trace, thread state, thread priority, \u2026 You can capture thread dump using one of the approaches <a href=\"https:\/\/blog.fastthread.io\/2016\/06\/06\/how-to-take-thread-dumps-7-options\/\" target=\"_blank\" rel=\"noreferrer noopener\">given here<\/a>.<\/p>\n<div>\n<pre class=\"brush:c\">Note: Most of the time, you will not know whether the actual problem in your application is deadlock or not. What you will notice is unresponsiveness from the application. Thus, it\u2019s safe to capture all the prominent artifacts that are essential for troubleshooting such as: Garbage Collection log, thread dump, heap dump, netstat, iostat,\u2026 you may use yCrash open source script, which would capture 360-degree data (GC log, 3 snapshots of thread dump, heap dump, netstat, iostat, vmstat, top, top -H,\u2026) from your application stack within a minute and generate a bundle zip file.<\/pre>\n<\/div>\n<p>We uploaded the captured thread dump to <a href=\"https:\/\/fastthread.io\/\" target=\"_blank\" rel=\"noreferrer noopener\">fastThread<\/a> \u2013 a thread dump analysis tool. Tool immediately pointed out that the two threads caused the deadlock. Below is the excerpt from the fastThread report.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/09\/3.jpg\"><img decoding=\"async\" width=\"748\" height=\"350\" src=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/09\/3.jpg\" alt=\"\" class=\"wp-image-114715\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/09\/3.jpg 748w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/09\/3-300x140.jpg 300w\" sizes=\"(max-width: 748px) 100vw, 748px\" \/><\/a><\/figure>\n<\/div>\n<p>Tool pointed out the stack trace of the two threads that were in deadlock. Below is the stack trace of those two threads:<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<div>\n<pre class=\"brush:c\">\"APP_Thread_50_WorkerTask_pool-5-thread-6\" #1899 prio=5 os_prio=0 tid=0x00007f894c405555 nid=0x44d1 waiting for monitor entry [0x00007f88e9c44000]\n   java.lang.Thread.State: BLOCKED (on object monitor)\n\tat org.apache.fontbox.ttf.TrueTypeFont.getTable(TrueTypeFont.java:147)\n\t- waiting to lock &lt;0x00000002d216fec8&gt; (a org.apache.fontbox.ttf.TrueTypeFont)\n\tat org.apache.fontbox.ttf.TrueTypeFont.getHorizontalMetrics(TrueTypeFont.java:229)\n\tat org.apache.fontbox.ttf.GlyphTable.getGlyphData(GlyphTable.java:210)\n\tat org.apache.fontbox.ttf.GlyphTable.getGlyph(GlyphTable.java:191)\n\t- locked &lt;0x00000002d218ca28&gt; (a org.apache.fontbox.ttf.RAFDataStream)\n\tat org.apache.fontbox.ttf.TrueTypeFont.getPath(TrueTypeFont.java:676)\n\tat org.apache.pdfbox.pdmodel.font.PDType1Font.getPath(PDType1Font.java:638)\n\tat org.apache.pdfbox.rendering.Type1Glyph2D.getPathForCharacterCode(Type1Glyph2D.java:83)\n\tat org.apache.pdfbox.rendering.PageDrawer.drawGlyph2D(PageDrawer.java:495)\n\tat org.apache.pdfbox.rendering.PageDrawer.showFontGlyph(PageDrawer.java:476)\n\tat org.apache.pdfbox.Contentstream.PDFStreamEngine.showGlyph(PDFStreamEngine.java:787)\n\tat org.apache.pdfbox.Contentstream.PDFStreamEngine.showGlyph(PDFStreamEngine.java:805)\n\tat org.apache.pdfbox.Contentstream.PDFStreamEngine.showText(PDFStreamEngine.java:743)\n\tat org.apache.pdfbox.Contentstream.PDFStreamEngine.showTextString(PDFStreamEngine.java:606)\n\tat org.apache.pdfbox.Contentstream.operator.text.ShowText.process(ShowText.java:56)\n\tat org.apache.pdfbox.Contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:933)\n\tat org.apache.pdfbox.Contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:514)\n\tat org.apache.pdfbox.Contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:492)\n\tat org.apache.pdfbox.Contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:155)\n\tat org.apache.pdfbox.rendering.PageDrawer.drawPage(PageDrawer.java:277)\n\tat org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:347)\n\tat org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:268)\n\tat org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:228)\n\tat xxxxxxx.export.service.thumbnail.PDFSlideGeneratorServiceImpl$1.call(PDFSlideGeneratorServiceImpl.java:60)\n\tat xxxxxxx.ops.executor.util.ParallelExecutorTask.doCall(ParallelExecutorTask.java:43)\n\tat xxxxxxx.ops.executor.util.ParallelExecutor.executeTaskFromQueue(ParallelExecutor.java:154)\n\tat xxxxxxx.ops.executor.util.ParallelExecutor.access$100(ParallelExecutor.java:26)\n\tat xxxxxxx.ops.executor.util.ParallelExecutor$WorkerTask.doCall(ParallelExecutor.java:164)\n\tat xxxxxxx.ops.executor.util.UserContextAwareCallable.call(UserContextAwareCallable.java:89)\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\n\tat java.lang.Thread.run(Thread.java:748)<\/pre>\n<\/div>\n<div>\n<pre class=\"brush:c\">\"APP_Thread_WorkerTask_APP-pool-5-thread-5\" #1898 prio=5 os_prio=0 tid=0x00007f894c898900 nid=0x44d0 waiting for monitor entry [0x00007f88e9d45000]\n   java.lang.Thread.State: BLOCKED (on object monitor)\n\tat org.apache.fontbox.ttf.TrueTypeFont.readTable(TrueTypeFont.java:356)\n\t- waiting to lock &lt;0x00000002d218ca28&gt; (a org.apache.fontbox.ttf.RAFDataStream)\n\tat org.apache.fontbox.ttf.TrueTypeFont.getTable(TrueTypeFont.java:150)\n\t- locked &lt;0x00000002d216fec8&gt; (a org.apache.fontbox.ttf.TrueTypeFont)\n\tat org.apache.fontbox.ttf.TrueTypeFont.getCmap(TrueTypeFont.java:262)\n\tat org.apache.fontbox.ttf.TrueTypeFont.getUnicodeCmapImpl(TrueTypeFont.java:556)\n\tat org.apache.fontbox.ttf.TrueTypeFont.getUnicodeCmapLookup(TrueTypeFont.java:541)\n\tat org.apache.fontbox.ttf.TrueTypeFont.nameToGID(TrueTypeFont.java:629)\n\tat org.apache.fontbox.ttf.TrueTypeFont.hasGlyph(TrueTypeFont.java:698)\n\tat org.apache.pdfbox.pdmodel.font.PDType1Font.getNameInFont(PDType1Font.java:601)\n\tat org.apache.pdfbox.pdmodel.font.PDType1Font.hasGlyph(PDType1Font.java:645)\n\tat org.apache.pdfbox.rendering.Type1Glyph2D.getPathForCharacterCode(Type1Glyph2D.java:59)\n\tat org.apache.pdfbox.rendering.PageDrawer.drawGlyph2D(PageDrawer.java:495)\n\tat org.apache.pdfbox.rendering.PageDrawer.showFontGlyph(PageDrawer.java:476)\n\tat org.apache.pdfbox.Contentstream.PDFStreamEngine.showGlyph(PDFStreamEngine.java:787)\n\tat org.apache.pdfbox.Contentstream.PDFStreamEngine.showGlyph(PDFStreamEngine.java:805)\n\tat org.apache.pdfbox.Contentstream.PDFStreamEngine.showText(PDFStreamEngine.java:743)\n\tat org.apache.pdfbox.Contentstream.PDFStreamEngine.showTextString(PDFStreamEngine.java:606)\n\tat org.apache.pdfbox.Contentstream.operator.text.ShowText.process(ShowText.java:56)\n\tat org.apache.pdfbox.Contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:933)\n\tat org.apache.pdfbox.Contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:514)\n\tat org.apache.pdfbox.Contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:492)\n\tat org.apache.pdfbox.Contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:155)\n\tat org.apache.pdfbox.rendering.PageDrawer.drawPage(PageDrawer.java:277)\n\tat org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:347)\n\tat org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:268)\n\tat org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:228)\n\tat xxxxxxx.export.service.thumbnail.PDFSlideGeneratorServiceImpl$1.call(PDFSlideGeneratorServiceImpl.java:60)\n\tat xxxxxxx.ops.executor.util.ParallelExecutorTask.doCall(ParallelExecutorTask.java:43)\n\tat xxxxxxx.ops.executor.util.ParallelExecutor.executeTaskFromQueue(ParallelExecutor.java:154)\n\tat xxxxxxx.ops.executor.util.ParallelExecutor.access$100(ParallelExecutor.java:26)\n\tat xxxxxxx.ops.executor.util.ParallelExecutor$WorkerTask.doCall(ParallelExecutor.java:164)\n\tat xxxxxxx.ops.executor.util.UserContextAwareCallable.call(UserContextAwareCallable.java:89)\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\n\tat java.lang.Thread.run(Thread.java:748)<\/pre>\n<\/div>\n<p>You can see the <em>\u2018APP_Thread_50_WorkerTask_pool-5-thread-6\u2019 <\/em>thread is in Deadlock with <em>\u2018APP_Thread_50_WorkerTask_pool-5-thread-5\u2019<\/em> thread. From the stacktrace you can observe following two things:<\/p>\n<ol class=\"wp-block-list\">\n<li><em>\u2018APP_Thread_50_WorkerTask_pool-5-thread-6\u2019<\/em> has acquired the lock <em>\u20180x00000002d218ca28\u2019<\/em> of the <em>\u2018org.apache.fontbox.ttf.RAFDataStream\u2019<\/em> object and waiting to acquire the lock <em>\u20180x00000002d216fec8\u2019<\/em> of the <em>\u2018org.apache.fontbox.ttf.TrueTypeFont\u2019<\/em> object.&nbsp;<\/li>\n<li>On the other hand, <em>\u2018APP_Thread_50_WorkerTask_pool-5-thread-5\u2019<\/em> thread is trying to do the exact opposite, it acquired the lock <em>\u20180x00000002d216fec8\u2019<\/em> of <em>\u2018org.apache.fontbox.ttf.TrueTypeFont\u2019<\/em> object and waiting to acquire the lock <em>\u20180x00000002d218ca28\u2019<\/em> of the <em>\u2018org.apache.fontbox.ttf.RAFDataStream\u2019<\/em> object.&nbsp;<\/li>\n<\/ol>\n<p>Indeed, it\u2019s a classic Deadlock condition.&nbsp;<\/p>\n<h2 class=\"wp-block-heading\">Deadlock in Apache PDFBox<\/h2>\n<p>If you notice two objects which are causing Deadlock are <em>\u2018org.apache.fontbox.ttf.TrueTypeFont\u2019<\/em> and <em>\u2018org.apache.fontbox.ttf.RAFDataStream\u2019<\/em>. Both of these objects are originating from the open source Apache PDFBox library.<\/p>\n<p>Once seeing this bug, we searched in the <a href=\"https:\/\/issues.apache.org\/jira\/projects\/PDFBOX\/summary\" target=\"_blank\" rel=\"noreferrer noopener\">Apache PDFBox bug database<\/a> to see whether this problem was already reported or not. We couldn\u2019t see this problem reported earlier. Thus, we went ahead and filed a new ticket in the Apache bug database with the details. <a href=\"https:\/\/issues.apache.org\/jira\/browse\/PDFBOX-5460\" target=\"_blank\" rel=\"noreferrer noopener\">Here is the ticket<\/a> that we filed, for your reference. The Apache PDFBox development team was highly responsive. They started acting on it right away and issued a fix within 2 \u2013 3 days. Great job from the PDFBox team. Truly enjoyed the open source community collaboration.<\/p>\n<h2 class=\"wp-block-heading\">Video<\/h2>\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-4-3 wp-has-aspect-ratio\">\n<div class=\"wp-block-embed__wrapper\">\n<iframe title=\"Troubleshooting deadlock in an Apache open source library\" width=\"500\" height=\"375\" src=\"https:\/\/www.youtube.com\/embed\/Jke2hzya4Do?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div>\n<\/figure>\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td>\n<p>Published on Java Code Geeks with permission by Ram Lakshmanan, partner at our <a href=\"\/\/www.javacodegeeks.com\/join-us\/jcg\/\" target=\"_blank\" rel=\"noopener\">JCG program<\/a>. See the original article here: <a href=\"https:\/\/blog.fastthread.io\/2022\/09\/06\/troubleshooting-deadlock-in-an-apache-opensource-library\/\" target=\"_blank\" rel=\"noopener\">Troubleshooting deadlock in an Apache opensource library<\/a><\/p>\n<p>Opinions expressed by Java Code Geeks contributors are their own.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Apache PDFBox is a popular open-source library that facilitates java applications to work with PDF documents. Recently we encountered a Deadlock that surfaced in this library. In this post we have shared how we troubleshooted and identified the root cause of the problem. What is Deadlock? First let\u2019s try to understand what \u2018Deadlock\u2019 means. Several &hellip;<\/p>\n","protected":false},"author":101536,"featured_media":112,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-114698","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Troubleshooting deadlock in an Apache opensource library - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"Interested to learn about deadlock? Check our article explaining how to troubleshoot deadlock in an Apache opensource library.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2022\/09\/troubleshooting-deadlock-in-an-apache-opensource-library.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Troubleshooting deadlock in an Apache opensource library - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"Interested to learn about deadlock? Check our article explaining how to troubleshoot deadlock in an Apache opensource library.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2022\/09\/troubleshooting-deadlock-in-an-apache-opensource-library.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/tier1app\" \/>\n<meta property=\"article:published_time\" content=\"2022-09-14T04:00:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Ram Lakshmanan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@tier1app\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ram Lakshmanan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2022\\\/09\\\/troubleshooting-deadlock-in-an-apache-opensource-library.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2022\\\/09\\\/troubleshooting-deadlock-in-an-apache-opensource-library.html\"},\"author\":{\"name\":\"Ram Lakshmanan\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/bedc034880c765925daf7fd3fd3fcee7\"},\"headline\":\"Troubleshooting deadlock in an Apache opensource library\",\"datePublished\":\"2022-09-14T04:00:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2022\\\/09\\\/troubleshooting-deadlock-in-an-apache-opensource-library.html\"},\"wordCount\":732,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2022\\\/09\\\/troubleshooting-deadlock-in-an-apache-opensource-library.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2022\\\/09\\\/troubleshooting-deadlock-in-an-apache-opensource-library.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2022\\\/09\\\/troubleshooting-deadlock-in-an-apache-opensource-library.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2022\\\/09\\\/troubleshooting-deadlock-in-an-apache-opensource-library.html\",\"name\":\"Troubleshooting deadlock in an Apache opensource library - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2022\\\/09\\\/troubleshooting-deadlock-in-an-apache-opensource-library.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2022\\\/09\\\/troubleshooting-deadlock-in-an-apache-opensource-library.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"datePublished\":\"2022-09-14T04:00:00+00:00\",\"description\":\"Interested to learn about deadlock? Check our article explaining how to troubleshoot deadlock in an Apache opensource library.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2022\\\/09\\\/troubleshooting-deadlock-in-an-apache-opensource-library.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2022\\\/09\\\/troubleshooting-deadlock-in-an-apache-opensource-library.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2022\\\/09\\\/troubleshooting-deadlock-in-an-apache-opensource-library.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"width\":150,\"height\":150,\"caption\":\"java-interview-questions-answers\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2022\\\/09\\\/troubleshooting-deadlock-in-an-apache-opensource-library.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/enterprise-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Troubleshooting deadlock in an Apache opensource library\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/bedc034880c765925daf7fd3fd3fcee7\",\"name\":\"Ram Lakshmanan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/12\\\/Ram-Lakshmanan-96x96.png\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/12\\\/Ram-Lakshmanan-96x96.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/12\\\/Ram-Lakshmanan-96x96.png\",\"caption\":\"Ram Lakshmanan\"},\"description\":\"Ram Lakshmanan developed world's finest DevOps tools: GCeasy.io, fastThread.io, HeapHero.io. Every single day, millions &amp; millions of people in North America\u2014bank, travel, and commerce\u2014use the applications that Ram Lakshmanan has architected. Ram is an acclaimed speaker in major conferences on scalability, availability, and performance topics. Recently, he has founded a startup, which specializes in troubleshooting performance problems.\",\"sameAs\":[\"https:\\\/\\\/blog.heaphero.io\",\"https:\\\/\\\/www.facebook.com\\\/tier1app\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/gceasy\",\"https:\\\/\\\/x.com\\\/tier1app\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/ram-lakshmanan\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Troubleshooting deadlock in an Apache opensource library - Java Code Geeks","description":"Interested to learn about deadlock? Check our article explaining how to troubleshoot deadlock in an Apache opensource library.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.javacodegeeks.com\/2022\/09\/troubleshooting-deadlock-in-an-apache-opensource-library.html","og_locale":"en_US","og_type":"article","og_title":"Troubleshooting deadlock in an Apache opensource library - Java Code Geeks","og_description":"Interested to learn about deadlock? Check our article explaining how to troubleshoot deadlock in an Apache opensource library.","og_url":"https:\/\/www.javacodegeeks.com\/2022\/09\/troubleshooting-deadlock-in-an-apache-opensource-library.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_author":"https:\/\/www.facebook.com\/tier1app","article_published_time":"2022-09-14T04:00:00+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","type":"image\/jpeg"}],"author":"Ram Lakshmanan","twitter_card":"summary_large_image","twitter_creator":"@tier1app","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Ram Lakshmanan","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2022\/09\/troubleshooting-deadlock-in-an-apache-opensource-library.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2022\/09\/troubleshooting-deadlock-in-an-apache-opensource-library.html"},"author":{"name":"Ram Lakshmanan","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/bedc034880c765925daf7fd3fd3fcee7"},"headline":"Troubleshooting deadlock in an Apache opensource library","datePublished":"2022-09-14T04:00:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2022\/09\/troubleshooting-deadlock-in-an-apache-opensource-library.html"},"wordCount":732,"commentCount":0,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2022\/09\/troubleshooting-deadlock-in-an-apache-opensource-library.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2022\/09\/troubleshooting-deadlock-in-an-apache-opensource-library.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2022\/09\/troubleshooting-deadlock-in-an-apache-opensource-library.html","url":"https:\/\/www.javacodegeeks.com\/2022\/09\/troubleshooting-deadlock-in-an-apache-opensource-library.html","name":"Troubleshooting deadlock in an Apache opensource library - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2022\/09\/troubleshooting-deadlock-in-an-apache-opensource-library.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2022\/09\/troubleshooting-deadlock-in-an-apache-opensource-library.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","datePublished":"2022-09-14T04:00:00+00:00","description":"Interested to learn about deadlock? Check our article explaining how to troubleshoot deadlock in an Apache opensource library.","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2022\/09\/troubleshooting-deadlock-in-an-apache-opensource-library.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2022\/09\/troubleshooting-deadlock-in-an-apache-opensource-library.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2022\/09\/troubleshooting-deadlock-in-an-apache-opensource-library.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","width":150,"height":150,"caption":"java-interview-questions-answers"},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2022\/09\/troubleshooting-deadlock-in-an-apache-opensource-library.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/enterprise-java"},{"@type":"ListItem","position":4,"name":"Troubleshooting deadlock in an Apache opensource library"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/bedc034880c765925daf7fd3fd3fcee7","name":"Ram Lakshmanan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/12\/Ram-Lakshmanan-96x96.png","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/12\/Ram-Lakshmanan-96x96.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/12\/Ram-Lakshmanan-96x96.png","caption":"Ram Lakshmanan"},"description":"Ram Lakshmanan developed world's finest DevOps tools: GCeasy.io, fastThread.io, HeapHero.io. Every single day, millions &amp; millions of people in North America\u2014bank, travel, and commerce\u2014use the applications that Ram Lakshmanan has architected. Ram is an acclaimed speaker in major conferences on scalability, availability, and performance topics. Recently, he has founded a startup, which specializes in troubleshooting performance problems.","sameAs":["https:\/\/blog.heaphero.io","https:\/\/www.facebook.com\/tier1app","https:\/\/www.linkedin.com\/company\/gceasy","https:\/\/x.com\/tier1app"],"url":"https:\/\/www.javacodegeeks.com\/author\/ram-lakshmanan"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/114698","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/101536"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=114698"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/114698\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/112"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=114698"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=114698"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=114698"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}