Microsoft Remote Desktop + Azure Virtual Desktop usage with a clipboard manager causes multiple process hangs on macOS

Joshua Z 1 Reputation point
2022-05-23T17:41:25.317+00:00

While using a clipboard manager (CopyQ or CopyLess) and copying from an Azure Virtual Desktop app into any other app it will cause both applications to hang and it's not possible to recover without force quitting Microsoft Remote Desktop.

Relevant thread samples (regarding pasteboard):

Call graph:
    2378 Thread_4652551   DispatchQueue_1: com.apple.main-thread  (serial)
    + 2378 start  (in dyld) + 520  [0x106f6d08c]
    +   2378 main  (in Microsoft Remote Desktop Beta) + 12  [0x102f62840]
    +     2378 NSApplicationMain  (in AppKit) + 1132  [0x1a9b2396c]
    +       2378 -[NSApplication run]  (in AppKit) + 596  [0x1a9b52250]
    +         2378 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:]  (in AppKit) + 1328  [0x1a9b60084]
    +           2378 _DPSNextEvent  (in AppKit) + 860  [0x1a9b6178c]
    +             2378 _BlockUntilNextEventMatchingListInModeWithFilter  (in HIToolbox) + 72  [0x1afc32e68]
    +               2378 ReceiveNextEventCommon  (in HIToolbox) + 564  [0x1afc330b4]
    +                 2378 RunCurrentEventLoopInMode  (in HIToolbox) + 292  [0x1afc33338]
    +                   2378 CFRunLoopRunSpecific  (in CoreFoundation) + 600  [0x1a6ffab24]
    +                     2378 __CFRunLoopRun  (in CoreFoundation) + 1720  [0x1a6ffb97c]
    +                       2378 __CFRunLoopDoBlocks  (in CoreFoundation) + 412  [0x1a6ffc96c]
    +                         2378 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__  (in CoreFoundation) + 28  [0x1a6ffcaf4]
    +                           2378 ___CFPasteboardHandleFulfillMessage_block_invoke_2  (in CoreFoundation) + 88  [0x1a70d18a4]
    +                             2378 -[_CFPasteboardEntry resolveLocalPromisedData]  (in CoreFoundation) + 96  [0x1a70cf5a8]
    +                               2378 __68-[NSPasteboard _setOwner:forTypes:atIndex:selector:usesPboardTypes:]_block_invoke  (in AppKit) + 356  [0x1aa200cd0]
    +                                 2378 @objc SessionPasteboardItemTextDataProvider.pasteboard(_:item:provideDataForType:)  (in Microsoft Remote Desktop Beta) + 96  [0x103076948]
    +                                   2378 specialized SessionPasteboardItemTextDataProvider.pasteboard(_:item:provideDataForType:)  (in Microsoft Remote Desktop Beta) + 392  [0x103077040]
    +                                     2378 Promise.block(timeout:)  (in Microsoft Remote Desktop Beta) + 736  [0x102f4f648]
    +                                       2378 OS_dispatch_semaphore.wait(wallTimeout:)  (in libswiftDispatch.dylib) + 24  [0x1b96d07a4]
    +                                         2378 _dispatch_semaphore_wait_slow  (in libdispatch.dylib) + 132  [0x1a6d6cdf8]
    +                                           2378 _dispatch_sema4_wait  (in libdispatch.dylib) + 28  [0x1a6d6c750]
    +                                             2378 semaphore_wait_trap  (in libsystem_kernel.dylib) + 8  [0x1a6ef28ec]

    2378 Thread_4679931   DispatchQueue_209: com.microsoft.rdc.pasteboard  (serial)
    + 2378 start_wqthread  (in libsystem_pthread.dylib) + 8  [0x1a6f2b080]
    +   2378 _pthread_wqthread  (in libsystem_pthread.dylib) + 288  [0x1a6f2c360]
    +     2378 _dispatch_workloop_worker_thread  (in libdispatch.dylib) + 648  [0x1a6d7ec98]
    +       2378 _dispatch_lane_invoke  (in libdispatch.dylib) + 392  [0x1a6d74404]
    +         2378 _dispatch_lane_serial_drain  (in libdispatch.dylib) + 668  [0x1a6d738a8]
    +           2378 _dispatch_client_callout  (in libdispatch.dylib) + 20  [0x1a6d6c1b4]
    +             2378 _dispatch_call_block_and_release  (in libdispatch.dylib) + 32  [0x1a6d6a5f0]
    +               2378 thunk for @escaping @callee_guaranteed () -> ()  (in Microsoft Remote Desktop Beta) + 20  [0x102c3f284]
    +                 2378 -[RDCClipboard getRemoteClipboardDataWithCompletion:]  (in Microsoft Remote Desktop Beta) + 216  [0x103e86fb8]
    +                   2378 RdCore::Clipboard::A3::A3ClientClipboardController::GetRemoteClipboardData(std::__1::weak_ptr<RdCore::Clipboard::IFormatDataCompletion>)  (in Microsoft Remote Desktop Beta) + 116  [0x104127aa8]
    +                     2378 RdCore::Clipboard::A3::RdpPlatformClipboard::GetSharedClipboardData(std::__1::weak_ptr<RdCore::Clipboard::IFormatDataCompletion>)  (in Microsoft Remote Desktop Beta) + 860  [0x10414b8b0]
    +                       2378 RdCore::Clipboard::A3::RdpFormatDataByteBufferCompletion::GetStatus()  (in Microsoft Remote Desktop Beta) + 80  [0x104126e2c]
    +                         2378 std::__1::__assoc_state<RdCore::Clipboard::FormatDataRetrievalStatus>::move()  (in Microsoft Remote Desktop Beta) + 56  [0x10406c44c]
    +                           2378 std::__1::__assoc_sub_state::__sub_wait(std::__1::unique_lock<std::__1::mutex>&)  (in libc++.1.dylib) + 56  [0x1a6e7fe5c]
    +                             2378 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&)  (in libc++.1.dylib) + 28  [0x1a6e7f284]
    +                               2378 _pthread_cond_wait  (in libsystem_pthread.dylib) + 1236  [0x1a6f3083c]
    +                                 2378 __psynch_cvwait  (in libsystem_kernel.dylib) + 8  [0x1a6ef6270]



Heaviest stack for the main thread of the target process:
  48  start + 520 (dyld + 20620) [0x106f6d08c]
  48  main + 12 (Microsoft Remote Desktop Beta + 3352640) [0x102f62840]
  48  NSApplicationMain + 1132 (AppKit + 14700) [0x1a9b2396c]
  48  -[NSApplication run] + 596 (AppKit + 205392) [0x1a9b52250]
  48  -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1328 (AppKit + 262276) [0x1a9b60084]
  48  _DPSNextEvent + 860 (AppKit + 268172) [0x1a9b6178c]
  48  _BlockUntilNextEventMatchingListInModeWithFilter + 72 (HIToolbox + 204392) [0x1afc32e68]
  48  ReceiveNextEventCommon + 564 (HIToolbox + 204980) [0x1afc330b4]
  48  RunCurrentEventLoopInMode + 292 (HIToolbox + 205624) [0x1afc33338]
  48  CFRunLoopRunSpecific + 600 (CoreFoundation + 535332) [0x1a6ffab24]
  48  __CFRunLoopRun + 1720 (CoreFoundation + 539004) [0x1a6ffb97c]
  48  __CFRunLoopDoBlocks + 412 (CoreFoundation + 543084) [0x1a6ffc96c]
  48  __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 28 (CoreFoundation + 543476) [0x1a6ffcaf4]
  48  ___CFPasteboardHandleFulfillMessage_block_invoke_2 + 88 (CoreFoundation + 1415332) [0x1a70d18a4]
  48  -[_CFPasteboardEntry resolveLocalPromisedData] + 96 (CoreFoundation + 1406376) [0x1a70cf5a8]
  48  __68-[NSPasteboard _setOwner:forTypes:atIndex:selector:usesPboardTypes:]_block_invoke + 356 (AppKit + 7212240) [0x1aa200cd0]
  48  @objc SessionPasteboardItemTextDataProvider.pasteboard(_:item:provideDataForType:) + 96 (Microsoft Remote Desktop Beta + 4483400) [0x103076948]
  48  specialized SessionPasteboardItemTextDataProvider.pasteboard(_:item:provideDataForType:) + 392 (Microsoft Remote Desktop Beta + 4485184) [0x103077040]
  48  Promise.block(timeout:) + 736 (Microsoft Remote Desktop Beta + 3274312) [0x102f4f648]
  48  OS_dispatch_semaphore.wait(wallTimeout:) + 24 (libswiftDispatch.dylib + 67492) [0x1b96d07a4]
  48  _dispatch_semaphore_wait_slow + 132 (libdispatch.dylib + 19960) [0x1a6d6cdf8]
  48  semaphore_wait_trap + 8 (libsystem_kernel.dylib + 6380) [0x1a6ef28ec]
 *48  ??? (kernel.release.t6000 + 610572) [0xfffffe000793d10c]

Also it occurs on both the Beta and current Microsoft Remote Desktop versions.

Azure Virtual Desktop
Azure Virtual Desktop
A Microsoft desktop and app virtualization service that runs on Azure. Previously known as Windows Virtual Desktop.
1,573 questions
Remote Desktop
Remote Desktop
A Microsoft app that connects remotely to computers and to virtual apps and desktops.
4,601 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.