Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panic in ibmmqotel #218

Open
theewarav opened this issue Jan 2, 2025 · 1 comment
Open

panic in ibmmqotel #218

theewarav opened this issue Jan 2, 2025 · 1 comment

Comments

@theewarav
Copy link

theewarav commented Jan 2, 2025

Hello,

My environment is MacOS arm 64. Go 1.23.0, mq-golang 5.6.1. My application works fine with 5.6.0. My application connects to many queue managers and concurrently get messages from queues. I enabled otel and got panic: concurrent map writes.

From the code https://github.com/ibm-messaging/mq-golang/blob/master/ibmmqotel/mqiotel.go line 513, otelGetTraceBefore function writes a new entry to objectOptionsMap defined as a global variable at line 68, without a lock.

Could you please give some advice?

Thank you,
Theewarav

@ibmmqmet
Copy link
Collaborator

ibmmqmet commented Jan 6, 2025

Thanks for finding that. It's too easy to forget that Go maps are not concurrent-safe (unlike some other languages' collection classes). There's no real workround without code changes. I'll add locking for the next update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants