Closed liurui-1 closed 3 years ago
Hi @ibmmqmet ,
In the following code, unless err == nil and cfh.Control == ibmmq.MQCFC_LAST , it will not return from the loop which can be deadlocked at some special scenarios. GatherQueues() in github.com/ibm-messaging/mq-golang/v5/mqmetric/queue.go and statusGetReply() in github.com/ibm-messaging/mq-golang/v5/mqmetric/status.go
We will upgrade to use new version SDK but we can see the above code logic is not updated.
should be fixed in current releases
We have a question about the Golang sdk for IBM MQ ( https://github.com/ibm-messaging/mq-golang/tree/79e82b431c9febfc4791fb8b2b37f1c33dab017f ). Our agent is blocked at
mqmetric.CollectQueueStatus()
for days. Following is stacktrace:There was no any error messages from ibmmq during this deadlock. So we suspect that there was some special scenario causing MQ to return 2033 (MQRC_NO_MSG_AVAILABLE) repeatedly when collecting queue status. Please review the code at
GatherQueues()
ingithub.com/ibm-messaging/mq-golang/v5/mqmetric/queue.go
andstatusGetReply()
ingithub.com/ibm-messaging/mq-golang/v5/mqmetric/status.go
Do you think it can be the root cause of the deadlock? Even with the latest code of MQ Golang SDK, this code logic is same.