We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Aspose Email - Issue with Blocked Threads

Hi Team,

We are using aspose Email 6.9.0 with jdk 16 classifier.
We are facing an issue with huge number of threads(around 3800+) going under BLOCKED state. By analysing the threads dump we could see the below stacktrace,

Thread 341: (state = BLOCKED)

  • java.lang.Object.wait(long) @bci=0 (Compiled frame; information may be imprecise)
  • java.lang.Object.wait() @bci=2, line=503 (Compiled frame)
  • com.aspose.email.system.threading.WaitHandle.waitOne(int, boolean) @bci=41 (Compiled frame)
  • com.aspose.email.system.threading.WaitHandle.waitOne() @bci=3 (Compiled frame)
  • com.aspose.email.avk.f() @bci=12, line=150 (Compiled frame)
  • com.aspose.email.avk.a(com.aspose.email.avk) @bci=1, line=34 (Interpreted frame)
  • com.aspose.email.avl.a() @bci=4, line=50 (Interpreted frame)
  • com.aspose.email.internal.ah.h.a() @bci=4 (Interpreted frame)
  • com.aspose.email.internal.ah.j.run() @bci=4 (Interpreted frame)
  • java.lang.Thread.run() @bci=11, line=722 (Interpreted frame)

Thread 27006: (state = BLOCKED)

  • java.lang.Object.wait(long) @bci=0 (Compiled frame; information may be imprecise)
  • com.aspose.email.system.threading.WaitHandle.waitOne(int, boolean) @bci=66 (Compiled frame)
  • com.aspose.email.system.threading.WaitHandle.waitOne(int) @bci=3 (Compiled frame)
  • com.aspose.email.yt.j() @bci=29, line=116 (Compiled frame)
  • com.aspose.email.cf.a() @bci=4, line=260 (Interpreted frame)
  • com.aspose.email.internal.ah.h.a() @bci=4 (Interpreted frame)
  • com.aspose.email.internal.ah.j.run() @bci=4 (Interpreted frame)
  • java.lang.Thread.run() @bci=11, line=722 (Interpreted frame)

Thread 26319: (state = BLOCKED)

  • java.lang.Object.wait(long) @bci=0 (Compiled frame; information may be imprecise)
  • com.aspose.email.system.threading.WaitHandle.waitOne(int, boolean) @bci=66 (Compiled frame)
  • com.aspose.email.yt.n() @bci=73, line=194 (Compiled frame)
  • com.aspose.email.cg.a() @bci=4, line=311 (Interpreted frame)
  • com.aspose.email.internal.ah.h.a() @bci=4 (Interpreted frame)
  • com.aspose.email.internal.ah.j.run() @bci=4 (Interpreted frame)
  • java.lang.Thread.run() @bci=11, line=722 (Interpreted frame)

Please provide necessary information for the below,

  1. What does the line “com.aspose.email.system.threading.WaitHandle.waitOne” in the above stacktraces refer to?
  2. When will an Aspose thread goes into BLOCKED state?
  3. When will an Aspose thread gets released, if it is BLOCKED?
  4. At any instance, while downloading the emails from email inbox, how many threads are spawned by Aspose API?

Also please share us any details which will help us to make any changes from our end if required, so that we will not encounter the same issue again as this is
impacting our system stability.

Thanks in Advance.

@pj1,

Thank you for contacting Aspose support team.

You may please try this code using latest library Aspose.Email for Java 17.9.0 and share the feedback. If issue is still there, please share some simplified code with us which can be compiled and executed here to re-produce the scenario. It will help us to observe the problem and provide assistance accordingly.