none
Azure C++ API download_to_stream() hangs (Debian Linux)

    Question

  • Hello,

    I am an Azure newbie who created a simple test program using the C++ SDK to upload and download block blobs. In particular, I am using the azure::storage::cloud_block_blob::download_to_stream(), upload_from_stream(), and metadata() calls.  Using a simple C++ test program, I was able to download, upload blobs, read its metadata etc..

    The C++ module I created has hooks to the benchmark program FIO. When I run my module from my simple test program, it works fine. However, when the module is being called by FIO, it hangs within the Azure function download_to_stream() or upload_from_stream().  The metadata() function seems to work when called by FIO or by my test program.  I know that it hangs inside download_to_stream() because I placed a printf() statement right after it and it was never hit.

    Using tcpdump I can see the http GET for the blob when called by my test program. However, when called by FIO, the http GET was never sent out.

    My question is this: what trace debugging can I turn on inside the Azure C++ SDK so I can further troubleshoot this problem?  Or if anybody knows what can cause download_to_stream() or upload_from_stream() to hang, that would be very useful, too.

    Thank you.

    -santo

    Tuesday, February 21, 2017 4:18 PM

All replies

  • You can refer the 'How to debug it' section in this blog to debug your issue further. Note that the Storage Client Library is no longer in preview and is generally available. Do ensure that you're using the recommended version of the library. Also, you may follow the general guide on using Blob Storage from C++.
    • Proposed as answer by Md Shihab Tuesday, February 28, 2017 9:27 AM
    Wednesday, February 22, 2017 7:55 AM
  • Thank you, Shihab. I will follow the pointers you gave (some of which I am  already familiar with). One other detail. The FIO program I mentioned above is a C program.  It loads my module.so during run time. Is there any problem calling the Azure C++ SDK from a C program?  Thanks again.
    Wednesday, February 22, 2017 2:36 PM
  • As long as you use the C++ compiler to compile the C program, and use the C++ options when linking the program together, it ought to work. You may want to give it a try.
    Tuesday, February 28, 2017 2:59 AM