-
Notifications
You must be signed in to change notification settings - Fork 52
Panic after calling Send (after x hours of functioning properly) #149
Comments
Ok, so azure-service-bus-go/sender.go Line 151 in e1e88bc
That should only happen if the internal state of sender is in an unexpected state when Send was called.
I think what might be happening is that the sender is recovering or closing the connection at the same time as the Seems like Thoughts? |
I haven't dived fully into the SDK internals, but I was thinking the same :) |
@devigned I think when adding s.clientMu.RLock()
defer s.clientMu.RUnlock() to the I'm not sure if putting the lock only around Acquiring the lock in Is this something you could investigate further? |
Any timeline on when this will be fixed? |
@devigned could you give an update on the status of this issue? Currently several Azure customers are affected by this issue. |
I'm sorry for the delay. I definitely will if no one else is able to attend to the issue. However, I've been trying to transition this project to other folks as my role at MSFT has changed. @jhendrixMSFT do you know who would be the right person to handle this issue? |
@catalinaperalta and myself can take a look. To set expectations we're both new to this space and there's a lot to unpack here so it might take a while to roll out a fix. |
Happy to help if there are any questions, @jhendrixMSFT and @catalinaperalta. Basically, |
What shared state is |
It's really any action on the client during recovery or initial establishment of a connection. That is why it is |
Just wanted to give an update, our suggested fix for this is to put a read lock around: azure-service-bus-go/sender.go Lines 151 to 153 in e1e88bc
However, we found a performance regression due to a recent change and are looking into it before rolling this out. |
Hi @devigned After upgrade from v0.7.0 to v0.10.0, we also has the same error.
And, our consumer still has a panic when do reconnect.
Any plan to fix this issue ? Thanks |
The current maintainers here are @jhendrixMSFT and @catalinaperalta. I'll defer to them. If needed, I'm happy to advise or to put the PR together. |
Hi. |
* fix #149 add mutex RLock/RUnlock * Recover should close and rebuild link atomically. Return ErrConnectionClosed when attempting to send a message on a closed connection. * Take read lock when accessing s.sender Consolidate code for creating ErrConnectionClosed Co-authored-by: Joel Hendrix <[email protected]>
Fixed in v0.10.1. |
I'm not sure if this is a bug in the SDK (it looks similar to this issue: #141), or a implementation issue at my side that I'm not aware of, but after hours of functioning properly and publishing messages to the Azure Service Bus, my application panic-ed with the following trace:
As you can see in the trace, this is where the SDK gets called:
https://github.com/brocaar/lora-app-server/blob/v3.4.0/internal/integration/azureservicebus/azure_service_bus.go#L193
Before the panic,
Send
did publish a message to the Service Bus without error (e.g. there was no indication that there was a connection issue). This was in the logfiles before the panic:(https://github.com/brocaar/lora-app-server/blob/v3.4.0/internal/integration/azureservicebus/azure_service_bus.go#L199)
The text was updated successfully, but these errors were encountered: