Skip to main content

[archive] Wait In Locked Thread : Dead Thread

  • November 8, 2007
  • 2 replies
  • 0 views

[Migrated content. Thread originally posted on 07 November 2007]

This error indicates that you have executed a RECEIVE/WAIT verb in a thread that was previously locked.

I expect that you have not intentionally programmed a RECEIVE/WAIT into a thread that can go LOCKED. So I figure that the likely causes of this is either some rare condition allows a flow of your program that does not eventually unlock the thread. Or it is that you just recently have added new code in a shared module, used by both locked and unlocked threads and not taken into consideration that it might be locked.

A very classic cause of these things (not exclusive to COBOL, language independent) is for instance like this:

LOCK THREAD.
OPEN INPUT somefile.
IF somefileError
EXIT PARAGRAPH
END-IF
*DO stuff
CLOSE somefile
UNLOCK THREAD.
...


It can also be caused by hot key programs, exception/event procedures, you name it.

2 replies

[Migrated content. Thread originally posted on 07 November 2007]

This error indicates that you have executed a RECEIVE/WAIT verb in a thread that was previously locked.

I expect that you have not intentionally programmed a RECEIVE/WAIT into a thread that can go LOCKED. So I figure that the likely causes of this is either some rare condition allows a flow of your program that does not eventually unlock the thread. Or it is that you just recently have added new code in a shared module, used by both locked and unlocked threads and not taken into consideration that it might be locked.

A very classic cause of these things (not exclusive to COBOL, language independent) is for instance like this:

LOCK THREAD.
OPEN INPUT somefile.
IF somefileError
EXIT PARAGRAPH
END-IF
*DO stuff
CLOSE somefile
UNLOCK THREAD.
...


It can also be caused by hot key programs, exception/event procedures, you name it.
Has anyone received this message before. It happened on a thin client application and caused an exit condition where it exited the thin client session. We have been trying to duplicate it but unable to. I am trying to find out what my be the cause so the client doesn't have to see it again.

Thanks

[Migrated content. Thread originally posted on 07 November 2007]

This error indicates that you have executed a RECEIVE/WAIT verb in a thread that was previously locked.

I expect that you have not intentionally programmed a RECEIVE/WAIT into a thread that can go LOCKED. So I figure that the likely causes of this is either some rare condition allows a flow of your program that does not eventually unlock the thread. Or it is that you just recently have added new code in a shared module, used by both locked and unlocked threads and not taken into consideration that it might be locked.

A very classic cause of these things (not exclusive to COBOL, language independent) is for instance like this:

LOCK THREAD.
OPEN INPUT somefile.
IF somefileError
EXIT PARAGRAPH
END-IF
*DO stuff
CLOSE somefile
UNLOCK THREAD.
...


It can also be caused by hot key programs, exception/event procedures, you name it.
Has anyone received this message before. It happened on a thin client application and caused an exit condition where it exited the thin client session. We have been trying to duplicate it but unable to. I am trying to find out what my be the cause so the client doesn't have to see it again.

Thanks