Welcome Guest Search | Active Topics | Sign In | Register

Potential Deadlocks Options
LINQ IT
Posted: Thursday, September 27, 2018 11:10:31 AM
Rank: Advanced Member
Groups: Member

Joined: 11/8/2015
Posts: 42
We currently run a Windows Service and process our conversions from HTML to PDF via Hangfire (www.hangfire.io). It doesn't happen all the time; however, at times, our servers will stop processing all jobs and it'll just hang. No errors from Hangfire or EO.PDF.

We've done a number of memory dumps and have analyzed them, and each time appears to show a deadlock from EO.PDF. In review with Hangfire, the following question came up:

I see that most of the workers are performing background jobs as expected, executing EO.Internal methods. What I also see is that there are a lot of thread pool threads blocked on the EO.Internal.nt.a method, and this looks like a deadlock that may occur due to the specifics of the Parallel.For (and Parallel.ForEach) method's implementation. And since EO.WebEngine.Engine.Start method (that's called by the EO.Internal) is itself blocked by a wait handle, the probability of deadlock is very high.

What do you think? We can check this consideration by avoiding to use Parallel.For methods, and execute them sequentially instead or schedule each conversion to thread pool via Task.Factory.StartNew (and await its unwrapped result).

Can you provide any guidance here? This is not something that is easily reproducible in a test project.
eo_support
Posted: Friday, September 28, 2018 8:19:25 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,221
Hi,

What version are you running? We did fix a number of deadlock issues in the past. So you may want to make sure you are running the latest build first. If after the latest build it still happens, you can send us the stack trace and we will see if we can find anything. You can find our email address here:

https://www.essentialobjects.com/forum/test_project.aspx

Eventually we may still need a test project, but let's see what the stack trace tells us first.

Thanks!
LINQ IT
Posted: Friday, September 28, 2018 11:08:35 AM
Rank: Advanced Member
Groups: Member

Joined: 11/8/2015
Posts: 42
I've confirmed we are on the latest release. As I mentioned above, there are no errors thrown, we're just in a deadlock situation. I can send a link to download our 7GB memory dump if that will assist.
eo_support
Posted: Friday, September 28, 2018 2:01:10 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,221
Can you try to run remote debug monitor on your system so that we can examine it here? See here for more details:

https://www.essentialobjects.com/doc/common/remote_debug.aspx

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.