![]() Thread 1 has attained the lock of Object 1, and Thread 2 has attained the lock of Object 2. Even though Synchronization prevents issues on data inconsistency, there is an issue with synchronization.Īssume there are 2 threads, ‘Thread 1’ and ‘Thread 2’. At the same time, if another thread has already obtained the lock, then the first thread waits until thread 2 releases the lock. ![]() When a specific thread needs to execute a synchronized function, it first attempts to obtain the lock. For each object in Java, a lock will be there, and synchronization is a technique to lock a function or block of code to make sure that only 1 thread can access that function or block of code at a time. Truly enjoyed the open source community collaboration.As already discussed, the synchronized method can be used to lock a particular portion of the code. They started acting on it right away and issued a fix within 2 – 3 days. The Apache PDFBox development team was highly responsive. Here is the ticket that we filed, for your reference. Thus, we went ahead and filed a new ticket in the Apache bug database with the details. We couldn’t see this problem reported earlier. Once seeing this bug, we searched in the Apache PDFBox bug database to see whether this problem was already reported or not. Both of these objects are originating from the open source Apache PDFBox library. If you notice two objects which are causing Deadlock are ‘.TrueTypeFont’ and ‘.RAFDataStream’. Indeed, it’s a classic Deadlock condition. On the other hand, ‘APP_Thread_50_WorkerTask_pool-5-thread-5’ thread is trying to do the exact opposite, it acquired the lock ‘0x00000002d216fec8’ of ‘.TrueTypeFont’ object and waiting to acquire the lock ‘0x00000002d218ca28’ of the ‘.RAFDataStream’ object.‘APP_Thread_50_WorkerTask_pool-5-thread-6’ has acquired the lock ‘0x00000002d218ca28’ of the ‘.RAFDataStream’ object and waiting to acquire the lock ‘0x00000002d216fec8’ of the ‘.TrueTypeFont’ object.From the stacktrace you can observe following two things: You can see the ‘APP_Thread_50_WorkerTask_pool-5-thread-6’ thread is in Deadlock with ‘APP_Thread_50_WorkerTask_pool-5-thread-5’ thread. locked (a .TrueTypeFont)Īt .TrueTypeFont.getCmap(TrueTypeFont.java:262)Īt .TrueTypeFont.getUnicodeCmapImpl(TrueTypeFont.java:556)Īt .TrueTypeFont.getUnicodeCmapLookup(TrueTypeFont.java:541)Īt .TrueTypeFont.nameToGID(TrueTypeFont.java:629)Īt .TrueTypeFont.hasGlyph(TrueTypeFont.java:698)Īt .(PDType1Font.java:601)Īt .(PDType1Font.java:645)Īt .Type1Glyph2D.getPathForCharacterCode(Type1Glyph2D.java:59) waiting to lock (a .RAFDataStream)Īt .TrueTypeFont.getTable(TrueTypeFont.java:150) "APP_Thread_WorkerTask_APP-pool-5-thread-5" #1898 prio=5 os_prio=0 tid=0x00007f894c898900 nid=0x44d0 waiting for monitor entry Īt .TrueTypeFont.readTable(TrueTypeFont.java:356) locked (a .RAFDataStream)Īt .TrueTypeFont.getPath(TrueTypeFont.java:676)Īt .(PDType1Font.java:638)Īt .Type1Glyph2D.getPathForCharacterCode(Type1Glyph2D.java:83)Īt .PageDrawer.drawGlyph2D(PageDrawer.java:495)Īt .PageDrawer.showFontGlyph(PageDrawer.java:476)Īt .PDFStreamEngine.showGlyph(PDFStreamEngine.java:787)Īt .PDFStreamEngine.showGlyph(PDFStreamEngine.java:805)Īt .PDFStreamEngine.showText(PDFStreamEngine.java:743)Īt .PDFStreamEngine.showTextString(PDFStreamEngine.java:606)Īt .(ShowText.java:56)Īt .PDFStreamEngine.processOperator(PDFStreamEngine.java:933)Īt .PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:514)Īt .PDFStreamEngine.processStream(PDFStreamEngine.java:492)Īt .PDFStreamEngine.processPage(PDFStreamEngine.java:155)Īt .PageDrawer.drawPage(PageDrawer.java:277)Īt .PDFRenderer.renderImage(PDFRenderer.java:347)Īt .PDFRenderer.renderImage(PDFRenderer.java:268)Īt .PDFRenderer.renderImage(PDFRenderer.java:228)Īt .PDFSlideGeneratorServiceImpl$1.call(PDFSlideGeneratorServiceImpl.java:60)Īt .ParallelExecutorTask.doCall(ParallelExecutorTask.java:43)Īt .ParallelExecutor.executeTaskFromQueue(ParallelExecutor.java:154)Īt .ParallelExecutor.access$100(ParallelExecutor.java:26)Īt .ParallelExecutor$WorkerTask.doCall(ParallelExecutor.java:164)Īt .UserContextAwareCallable.call(UserContextAwareCallable.java:89)Īt .run(FutureTask.java:266)Īt .runWorker(ThreadPoolExecutor.java:1149)Īt $n(ThreadPoolExecutor.java:624) waiting to lock (a .TrueTypeFont)Īt .TrueTypeFont.getHorizontalMetrics(TrueTypeFont.java:229)Īt .GlyphTable.getGlyphData(GlyphTable.java:210)Īt .GlyphTable.getGlyph(GlyphTable.java:191) : BLOCKED (on object monitor)Īt .TrueTypeFont.getTable(TrueTypeFont.java:147)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |