Uplaod Blob is stuck. RRS feed

  • Question


    I have worker role, wich contains several threads, each  thread  sometimes upload blob (max blob size ~ 1 - 2 MB) to the storage, with this simple code:

    CloudBlobContainer blobContainer = new CloudBlobContainer("address", blobClient);
    CloudBlockBlob blob  =   blobContainer.GetBlockBlobReference(blobAddress);

    This program  correctly work about 1 day, then most of threads begin stuck.

    In windbg i see this callstack on threads:

    Child SP         IP               Call Site
    000000002863d4c8 0000000077355b4a [HelperMethodFrame_1OBJ: 000000002863d4c8] System.Threading.WaitHandle.WaitOneNative(System.Runtime.InteropServices.SafeHandle, UInt32, Boolean, Boolean)
    000000002863d600 000007fef02fc234 System.Threading.WaitHandle.InternalWaitOne(System.Runtime.InteropServices.SafeHandle, Int64, Boolean, Boolean)
    000000002863d640 000007ff006a0aae Microsoft.WindowsAzure.StorageClient.Tasks.Task`1[[System.__Canon, mscorlib]].ExecuteAndWait()
    000000002863d6b0 000007ff006c5f5c Microsoft.WindowsAzure.StorageClient.CloudBlob.UploadFromStream(System.IO.Stream, Microsoft.WindowsAzure.StorageClient.BlobRequestOptions)

    osFamily: Windows Server 2008 R2
    osVersion: Windows Azure Guest OS 2.7 (Release 201107-01)
    SDK version: 1.5.20928.1904             

    Any ideas?

    Monday, November 28, 2011 1:47 PM


  • Hi,

    Either you’ve entered a dead lock or a lot of uploading are pending, the issue can be encountered. Can you reproduce this issue locally? If you can, please debug it. You can refer to http://www.codeproject.com/KB/dotnet/Deadlock_Detection.aspx for some guidelines about dead lock detecting. Also check if there’re a lot of pending network requests.

    If you’re unable to reproduce this issue locally, you can enable intellitrace. You can also use remote desktop to login to the server, and install a debugging tool.

    In addition, it is recommended to use TPL instead of working with threads manually. TPL will optimize the thread usage.


    Best Regards,

    Ming Xu.

    Please mark the replies as answers if they help or unmark if not.
    If you have any feedback about my replies, please contact msdnmg@microsoft.com.
    Microsoft One Code Framework
    Tuesday, November 29, 2011 1:12 PM