-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
eventhub: the program crashes if producer not use with with
#8404
Comments
@davidt99 thanks for reporting the issue - our team will looking into this as well //cc: @yunhaoling |
Hi @davidt99, thanks for reporting the issue. |
@davidt99 were you trying with 5.0.0b4 or 5.0.0b5? We happened to release 5.0.0b5 last night around 9pm PST. So not sure you're talking about 5.0.0b4 or b5. Both are preview versions though. |
Not using the async, I was just doing a simple test. I was using 5.0.0b4. |
@davidt99 Then please call producer.close() just before you don't need the producer variable any more. |
@YijunXieMS, yes I understand. As I said, I'll wait for the program crash fix before implementing this in production. |
After investigation, that's a uamqp issue (azure-eventhub is not doing any crazy things), fix in progress: |
Hello @davidt99 , we've released the uamqp v1.2.5 including the fix: https://pypi.org/project/uamqp/1.2.5 |
Hello @davidt99 , is there any updates for this issue? |
Didn't have the time to test it, will report back next week.
…On Tue, 17 Dec 2019, 11:47 Adam Ling (MSFT), ***@***.***> wrote:
Hello @davidt99 <https://github.com/davidt99> , is there any updates for
this issue?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#8404?email_source=notifications&email_token=AB7JFPDQNCJYGCHDJO625NTQZA4VJA5CNFSM4JJDVZB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHA6MYI#issuecomment-566355553>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB7JFPA6BHHWNVP6KLB6VK3QZA4VJANCNFSM4JJDVZBQ>
.
|
thanks @davidt99 , looking forwarding to your reply! |
@yunhaoling, using 5.0.0b6, the crash no longer happens, although "Can't call on_state_changed during garbage collection, plase be sure to close or use a context manager" is shown but I guess it makes sense (besides the typo 😉). |
I take ownership for the typo :p Yes, I think this warning if fair. If the client is not closed properly, the message sender/receiver are garbage collected while still open, and because the callback system is define recursively on the class itself, calling a callback on a garbage collected object is not possible. |
I'm testing the new version of the SDK. If I'm not surrounding the producer with
with
statement, after the producer is clean up by the python interpreter, the program just crashes withdouble free or corruption (fasttop)
message.I do understand that the with statement is required, but this poses a couple of problems:
The text was updated successfully, but these errors were encountered: