Highlighted
Absent Member.
Absent Member.
1326 views

[archive] Receive/Wait in locked thread - deadlocked

[Migrated content. Thread originally posted on 22 October 2004]

We have been getting the "Receive/Wait in locked thread - deadlocked" error lately at random times in our programs. We use threading in all of our reports and most of the time we don't have a problem but occasionally we get these deadlock errors. We have lock and unlock thread statements in both threads of the report but I am pretty confident that once the thread gets to the "wait for last thread" statement, it has been unlocked. The funny thing is that it didn't happen for a long time and then has really started happening alot lately.

After investigating it a bit, it seems like something else is executing a lock thread outside of our own source code.

Is there a way to figure out where this lock thread that the receive/wait was complaining about came from or some way of viewing the lock thread stack so I can watch the lock threads get executed to try to debug this?

Thanks for any help you can give.

Dan Preece
Infotrax Systems
0 Likes
3 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] Receive/Wait in locked thread - deadlocked

Originally posted by danielp37
After investigating it a bit, it seems like something else is executing a lock thread outside of our own source code.


Note that ACUCOBOL-GT multithreading is proprietary to ACUCOBOL-GT. This means if something 'outside' should lock, it must be written in ACUCOBOL-GT too, is that the case?
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Receive/Wait in locked thread - deadlocked

That is what I mean. Is there something within the runtime that will lock a thread besides the lock thread statement? And more importantly, is there some way of turning on tracing or something so that I can see when threads are getting locked an unlocked?
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Receive/Wait in locked thread - deadlocked

There are situations were a thread will block unintentionally, f.ex if calling Windows API or using c$socket.

As for tracing, I am afraid we don't have any such mechanism.

Implementing a tracer for this on your own should however not be that difficult, it is just a matter of writing something to a file.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.