Azure / azure-sdk-for-python

This repository is for active development of the Azure SDK for Python. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/python/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-python.
MIT License
4.64k stars 2.84k forks source link

Segmentation fault in c_uamqp.platform_init of uamqp package #5317

Closed yunhaoling closed 4 years ago

yunhaoling commented 5 years ago

@wec2018 commented on Wed Oct 24 2018

[Problem] We got the error : 'Segmentation fault' when run recv.py (one of example from azure-event-hubs-python) on Azure VM. But this script works well on our local box. It is 100% reproducible with two VM instances, both of them are created based on 'Django Certified by Bitnami, ubuntu 16.04 LTS' image. This symptom was gone if I create another VM using “Ubuntu Server 18.04” image

[Troubleshooting] I find this : https://github.com/Azure/azure-event-hubs-python/issues/10 Seems it is a bug.

[Error message]

  1. Program terminated with signal SIGSEGV, Segmentation fault.
  2. Segmentation fault (core dumped)

[Ask] Could you please help to check this ? Thanks


@annatisch commented on Thu Oct 25 2018

Thanks for the report @wec2018!

A couple of questions:

Thanks again for the report! I'm sure we can track down the issue soon. The bug will likely be in uAMQP - so I once I establish some of the details and can reproduce it I will open an issue on the uAMQP repo and track progress there.


@wec2018 commented on Mon Nov 05 2018

• Which versions of the azure-eventhub and uamqp packages are you running?

uamqp==1.0.3

• Which version of Python are you running on? Answer: Python 3.6.4 • Would it be possible to get a debug level log output (with debug tracing turning on)? This will help ascertain the process that led up to the crash. Answer:Just 2 lines before segmentation fault while I set the debug flag to True - EventHubClient(ADDRESS, debug=True, username=USER, password=KEY) (venv) bitnami@ROGServicesTestServer:~/azure-event-hubs-python$ python recv_eh.py 2018-11-05 01:40:28,046 azure.eventhub.client INFO 'eventhub.pysdk-762ef24e': Created the Event Hub client 2018-11-05 01:40:28,139 azure.eventhub.client INFO 'eventhub.pysdk-762ef24e': Starting 1 clients Segmentation fault (core dumped)

• How consistent is the behavior? You state that it's 100% reproducible - does it always present in the same way, after the same period of time etc? Is the failure straight away or after the script has been receiving for some time? Answer: The failure is straight away, there is no received message. It seems like a consistent behavior, because of it can be reproduced in the same way within the same VM instances.


@annatisch commented on Tue Nov 06 2018

Thanks @wec2018 for the details - I have not seen this kind of crash on startup before. I will investigate :)


@annatisch commented on Tue Nov 13 2018

Hi @wec2018 - can you confirm whether you have debug tracing turned on? And whether this goes away if debug is set to False?

yunhaoling commented 4 years ago

Hi @wec2018 ,

We've released uamqp v1.2.5 which fix several issues related to segmentation fault. You can either upgrade the uamqp library to the latest version or try our recently released azure-eventhub 5.0.0 to see if the problem still exists.

Feel free to re-open the issue if problem still exists.