Closed pfijalki closed 3 years ago
hey @pfijalki, thanks for reaching out.
I followed your steps and was able to reproduce the issue. This should be a bug triggered by the underlying uamqp library reading "inaccessible memory" on property of a message, I have created issue in the uamqp repo: https://github.com/Azure/azure-uamqp-python/issues/186.
I'll investigate on how to fix it and then include the fix in uamqp bug fix release.
hey @yunhaoling, thank you for the update and fast response Time. Do you mind sharing in brief description steps to debug/reproduce such issue ? I tried to do this by myself but couldn't asses which line was causing the error
hello @pfijalki ,
This one is a bit hard to reproduce as it turns out to be a bug in the cython layer. if you're interested in the detail, I already got a PR out to fix the issue: https://github.com/Azure/azure-uamqp-python/pull/187
the main issue here is trying to access the user_id
of an AMQP message in the "src/properties.pyx":
def user_id(self):
cdef c_amqpvalue.amqp_binary _binary
if c_amqp_definitions.properties_get_user_id(self._c_value, &_binary) == 0:
return <char*>_binary.bytes
return <char*>_binary.bytes
where _binary.bytes
could be a NULL C pointer, and in this case it shouldn't be returned directly which is the receiving messages sent by Java SDK case.
To fix it, we need to convert the C char* data to a python variable first by
bytes_value = <char*>_binary.bytes
then we could safely return bytes_value
hey @pfijalki , FYI: my fix PR gets merged, we'll do a uamqp release after we address some other uamqp issues.
hello @pfijalki , hope you're keeping well.
We have released uamqp v1.2.13 today which includes the fix.
Please upgrade to the latest uamqp version via pip install uamqp --upgrade
to see if it solves the problem.
I'm closing this issue now, but feel free to reopen if you still get trouble with the latest version.
Describe the bug Cannot receive message sent from Java (OpenJDK 1.8) Azure servicebus SDK
To Reproduce Steps to reproduce the behavior:
Expected behavior Possibility to process the message
Attempt on receiving message results in SIGSEGV and python crash