azure-sdk-for-python: Opening a service bus connection fails on macOS Big Sur with Python 3.8
- Package Name: azure-servicebus
- Package Version: 0.50.3 (same on 7.0.0)
- Operating System: macOS 11.0.1
- Python Version: 3.8.6
Describe the bug Opening a connection crashes the process with the following error:
2020-11-24 11:04:26.340 Python[68811:4815140] -[__NSCFConstantString objectForKey:]: unrecognized selector sent to instance 0x7fff80217af0
2020-11-24 11:04:26.342 Python[68811:4815140] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFConstantString objectForKey:]: unrecognized selector sent to instance 0x7fff80217af0'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff204b76af __exceptionPreprocess + 242
1 libobjc.A.dylib 0x00007fff201ef3c9 objc_exception_throw + 48
2 CoreFoundation 0x00007fff20539c85 -[NSObject(NSObject) __retain_OA] + 0
3 CoreFoundation 0x00007fff2041f06d ___forwarding___ + 1467
4 CoreFoundation 0x00007fff2041ea28 _CF_forwarding_prep_0 + 120
5 CFNetwork 0x00007fff247101ff CFURLRequestSetAllowsCellularAccess + 502
6 CFNetwork 0x00007fff24702195 _CFURLResponseGetSSLCertificateContext + 7757
7 CoreFoundation 0x00007fff20454ef0 CFReadStreamSetProperty + 87
8 c_uamqp.cpython-38-darwin.so 0x0000000106fcda11 tlsio_appleios_dowork + 337
9 c_uamqp.cpython-38-darwin.so 0x0000000106f01f9e __pyx_f_5uamqp_7c_uamqp_10Connection_do_work + 974
10 c_uamqp.cpython-38-darwin.so 0x0000000106f52469 __pyx_pf_5uamqp_7c_uamqp_10Connection_16do_work + 73
11 c_uamqp.cpython-38-darwin.so 0x0000000106f52404 __pyx_pw_5uamqp_7c_uamqp_10Connection_17do_work + 36
12 Python 0x00000001068dc9c8 method_vectorcall_NOARGS + 242
13 Python 0x0000000106975b6d call_function + 346
14 Python 0x000000010697272b _PyEval_EvalFrameDefault + 29833
15 Python 0x00000001068d57b2 function_code_fastcall + 106
16 Python 0x0000000106975b6d call_function + 346
17 Python 0x000000010697272b _PyEval_EvalFrameDefault + 29833
18 Python 0x00000001068d57b2 function_code_fastcall + 106
19 Python 0x0000000106975b6d call_function + 346
20 Python 0x000000010697272b _PyEval_EvalFrameDefault + 29833
21 Python 0x00000001068d57b2 function_code_fastcall + 106
22 Python 0x0000000106975b6d call_function + 346
23 Python 0x000000010697272b _PyEval_EvalFrameDefault + 29833
24 Python 0x00000001068d57b2 function_code_fastcall + 106
25 Python 0x00000001068d78e0 method_vectorcall + 256
26 Python 0x00000001068d51f9 PyVectorcall_Call + 108
27 Python 0x0000000106972ac4 _PyEval_EvalFrameDefault + 30754
28 Python 0x0000000106976687 _PyEval_EvalCodeWithName + 1947
29 Python 0x00000001068d5917 _PyFunction_Vectorcall + 227
30 Python 0x0000000106975b6d call_function + 346
31 Python 0x000000010697272b _PyEval_EvalFrameDefault + 29833
32 Python 0x00000001068d57b2 function_code_fastcall + 106
33 Python 0x0000000106975b6d call_function + 346
34 Python 0x000000010697272b _PyEval_EvalFrameDefault + 29833
35 Python 0x00000001068d57b2 function_code_fastcall + 106
36 Python 0x00000001068d78e0 method_vectorcall + 256
37 Python 0x00000001069721b0 _PyEval_EvalFrameDefault + 28430
38 Python 0x00000001068d57b2 function_code_fastcall + 106
39 Python 0x0000000106975b6d call_function + 346
40 Python 0x000000010697272b _PyEval_EvalFrameDefault + 29833
41 Python 0x0000000106976687 _PyEval_EvalCodeWithName + 1947
42 Python 0x00000001068d5917 _PyFunction_Vectorcall + 227
43 Python 0x0000000106975b6d call_function + 346
44 Python 0x0000000106972804 _PyEval_EvalFrameDefault + 30050
45 Python 0x00000001068d57b2 function_code_fastcall + 106
46 Python 0x0000000106975b6d call_function + 346
47 Python 0x0000000106972804 _PyEval_EvalFrameDefault + 30050
48 Python 0x0000000106976687 _PyEval_EvalCodeWithName + 1947
49 Python 0x000000010696b1ff PyEval_EvalCode + 51
50 Python 0x00000001069a448d run_eval_code_obj + 102
51 Python 0x00000001069a38dc run_mod + 82
52 Python 0x00000001069a27a8 PyRun_FileExFlags + 160
53 Python 0x00000001069a1e95 PyRun_SimpleFileExFlags + 271
54 Python 0x00000001069b9828 Py_RunMain + 1870
55 Python 0x00000001069b9b6f pymain_main + 306
56 Python 0x00000001069b9bbd Py_BytesMain + 42
57 libdyld.dylib 0x00007fff20360631 start + 1
58 ??? 0x0000000000000002 0x0 + 2
)
libc++abi.dylib: terminating with uncaught exception of type NSException
To Reproduce Steps to reproduce the behavior:
- Create a new virtual environment with Python 3
- Install azure-servicebus (0.50.3 or 7.0.0) as a dependency (which uses uamqp)
- The following script won’t work:
from azure.servicebus import ServiceBusClient
connection_string = '<connection-string>'
queue = '<queue-name>'
client: ServiceBusClient = ServiceBusClient.from_connection_string(connection_string)
client.get_queue_receiver(queue_name=queue).peek_messages(max_message_count=10)
Expected behavior The process should live.
NOTE: This is a duplicate of https://github.com/Azure/azure-uamqp-python/issues/185, though it might be related to both projects.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 3
- Comments: 15 (6 by maintainers)
sorry for keeping you waiting for a long time.
We have released uamqp v1.2.13 today which includes the fix for this issue. Please upgrade the uamqp in your env to the latest version (e.g. via
pip install uamqp --upgrade
).Let me know if you’re still getting trouble with the latest version.
patiently waiting on this one…
confirming the issue by building python from source code on BigSur with clang 12.0.0, that’s interesting. I’ll dig deeper to see how it is broken.
meanwhile, the official distribution for macos seems to work fine https://www.python.org/downloads/release/python-390/ – could you also verify it works on your machine?
--------- latest update ---------
found a relevant issue and the fix, will try it out
https://github.com/Azure/azure-iot-sdk-c/issues/1624 https://github.com/ayershinn/azure-c-shared-utility/pull/1/files
@kriwal-arkivverket according to this PR the fix in the underlying lib (
uamqp
) should be released at some point today. Afterwards we should theoretically be able to manually upgrade it with pip (becauseazure-servicebus
specifiesuamqp>=1.2.12
, which should be compatible with the to-be-released1.2.13
).Any news on when the release will be out? Thanks!
hey @cedrickring , FYI: my fix PR gets merged into the underlying C repo, we’ll do a uamqp release after we address some other uamqp issues.
@yunhaoling I can confirm, azure-servicebus seems to work when installing Python from this url https://www.python.org/downloads/release/python-390/. Though I prefer installing Python via homebrew which seems to be compiled with Clang 12.0.0…
I can verify that this is happening on my machine as well. Here are my system settings
pip 20.2.4 from /usr/local/lib/python3.9/site-packages/pip (python 3.9)
Python 3.9.0
Error: