Admiral-Piett / goaws

AWS (SQS/SNS) Clone for Development testing
MIT License
770 stars 145 forks source link

fatal error: concurrent map read and map write #245

Open jamiecuthill opened 1 year ago

jamiecuthill commented 1 year ago

We use goaws v0.3.1 within a testing framework that creates hundreds of topics and sqs subscriptions to replicate messaging infrastructure we use in production. Today I saw a failure of this setup with the error:

fatal error: concurrent map read and map write

Full output below - topic and queue names redacted goaws-panic.log

Admiral-Piett commented 10 months ago

Hey @jamiecuthill - I know it's been a while here, sorry about that. Is this still an issue for you? If so, can you pass on some information about how you're creating all these resources? Sounds like it's part of your "set up" flow in your testing framework - which is to say programmatically? About how many are you trying to make (estimates are fine)?

I'll have to look deeper but I'm guessing this is a race condition we'll have to sort our by locking the internal catalog of the resources. I'll see if I can recreate when I have time, but let me know about the above when you can. Thanks!

gerardgine commented 9 months ago

I've been seeing that too. In my case, I'm running tests where I might be creating up to 40 queues simultaneously, half of them having an associated dead letter queue (which makes the other half).

I've seen the same behavior in both pafortin/goaws:v0.3.1 and admiralpiett/goaws:v0.4.3 Docker images.