The problem can occur after a very very long time (probably a year?), not sure why, but here is a stack trace:
thread #22, name = 'mg', stop reason = signal SIGSTOP
frame #0: 0x00007f781bc3eaff libc.so.6`__poll + 79
frame #1: 0x00007f781bb0ac1a libxcb.so.1`___lldb_unnamed_symbol7$$libxcb.so.1 + 154
frame #2: 0x00007f781bb0c90a libxcb.so.1`xcb_wait_for_event + 74
frame #3: 0x00007f781bd7cc08 libX11.so.6`_XReadEvents + 376
frame #4: 0x00007f781bd6b758 libX11.so.6`XNextEvent + 248
frame #5: 0x0000000000c0a6cf mg`clipboard_read(typ=<unavailable>, buf=0x000000c00026e028) at clipboard_linux.c:199:9
frame #6: 0x0000000000c0a0af mg`_cgo_bf56599c8496_Cfunc_clipboard_read(v=0x000000c0004c8da8) at cgo-gcc-prolog:53:11
frame #7: 0x000000000046bf70 mg`runtime.asmcgocall.abi0 at asm_amd64.s:765
frame #8: 0x000000000040eb09 mg`runtime.notewakeup at lock_futex.go:145
thread #23, name = 'mg', stop reason = signal SIGSTOP
frame #0: 0x000000000046e083 mg`runtime.futex.abi0 at sys_linux_amd64.s:520
frame #1: 0x0000000000434c36 mg`runtime.futexsleep at os_linux.go:44
frame #2: 0x000000000040ec07 mg`runtime.notesleep at lock_futex.go:160
frame #3: 0x000000000043e0ca mg`runtime.mPark at proc.go:1441
frame #4: 0x000000000043f618 mg`runtime.stopm at proc.go:2408
frame #5: 0x0000000000440ae5 mg`runtime.findrunnable at proc.go:2984
frame #6: 0x0000000000441a19 mg`runtime.schedule at proc.go:3367
frame #7: 0x0000000000441f6d mg`runtime.park_m at proc.go:3516
frame #8: 0x000000000046a043 mg`runtime.mcall at asm_amd64.s:307
thread #24, name = 'mg', stop reason = signal SIGSTOP
frame #0: 0x000000000046e083 mg`runtime.futex.abi0 at sys_linux_amd64.s:520
frame #1: 0x0000000000434c36 mg`runtime.futexsleep at os_linux.go:44
frame #2: 0x000000000040ec07 mg`runtime.notesleep at lock_futex.go:160
frame #3: 0x000000000043e0ca mg`runtime.mPark at proc.go:1441
frame #4: 0x000000000043f618 mg`runtime.stopm at proc.go:2408
frame #5: 0x0000000000440ae5 mg`runtime.findrunnable at proc.go:2984
frame #6: 0x0000000000441a19 mg`runtime.schedule at proc.go:3367
frame #7: 0x0000000000441f6d mg`runtime.park_m at proc.go:3516
frame #8: 0x000000000046a043 mg`runtime.mcall at asm_amd64.s:307
(lldb) thread select 22
* thread #22, name = 'mg', stop reason = signal SIGSTOP
frame #0: 0x00007f781bc3eaff libc.so.6`__poll + 79
libc.so.6`__poll:
-> 0x7f781bc3eaff <+79>: cmpq $-0x1000, %rax ; imm = 0xF000
0x7f781bc3eb05 <+85>: ja 0x7f781bc3eb32 ; <+130>
0x7f781bc3eb07 <+87>: movl %r8d, %edi
0x7f781bc3eb0a <+90>: movl %eax, 0x8(%rsp)
(lldb) up
frame #1: 0x00007f781bb0ac1a libxcb.so.1`___lldb_unnamed_symbol7$$libxcb.so.1 + 154
libxcb.so.1`___lldb_unnamed_symbol7$$libxcb.so.1:
-> 0x7f781bb0ac1a <+154>: movl %eax, %r12d
0x7f781bb0ac1d <+157>: testl %eax, %eax
0x7f781bb0ac1f <+159>: js 0x7f781bb0ae20 ; <+672>
0x7f781bb0ac25 <+165>: movswl 0xc(%rsp), %eax
(lldb) up
frame #2: 0x00007f781bb0c90a libxcb.so.1`xcb_wait_for_event + 74
libxcb.so.1`xcb_wait_for_event:
-> 0x7f781bb0c90a <+74>: testl %eax, %eax
0x7f781bb0c90c <+76>: je 0x7f781bb0c960 ; <+160>
0x7f781bb0c90e <+78>: movq 0x10b0(%rbp), %rdi
0x7f781bb0c915 <+85>: testq %rdi, %rdi
(lldb) up
frame #3: 0x00007f781bd7cc08 libX11.so.6`_XReadEvents + 376
libX11.so.6`_XReadEvents:
-> 0x7f781bd7cc08 <+376>: movq %rax, %r12
0x7f781bd7cc0b <+379>: movq 0x950(%rbp), %rax
0x7f781bd7cc12 <+386>: testq %rax, %rax
0x7f781bd7cc15 <+389>: je 0x7f781bd7cc25 ; <+405>
(lldb) up
frame #4: 0x00007f781bd6b758 libX11.so.6`XNextEvent + 248
libX11.so.6`XNextEvent:
-> 0x7f781bd6b758 <+248>: movq 0x78(%r12), %rdx
0x7f781bd6b75d <+253>: jmp 0x7f781bd6b695 ; <+53>
0x7f781bd6b762: nopw %cs:(%rax,%rax)
0x7f781bd6b76c: nopl (%rax)
(lldb) up
frame #5: 0x0000000000c0a6cf mg`clipboard_read(typ=<unavailable>, buf=0x000000c00026e028) at clipboard_linux.c:199:9
196 XConvertSelection(d, sel, target, prop, w, CurrentTime);
197 XEvent event;
198 for (;;) {
-> 199 XNextEvent(d, &event);
200 if (event.type != SelectionNotify) continue;
201 break;
202 }
(lldb) up
frame #6: 0x0000000000c0a0af mg`_cgo_bf56599c8496_Cfunc_clipboard_read(v=0x000000c0004c8da8) at cgo-gcc-prolog:53:11
(lldb) up
frame #7: 0x000000000046bf70 mg`runtime.asmcgocall.abi0 at asm_amd64.s:765
762 MOVQ DI, 40(SP) // save depth in stack (can't just save SP, as stack might be copied during a callback)
763 MOVQ BX, DI // DI = first argument in AMD64 ABI
764 MOVQ BX, CX // CX = first argument in Win64
-> 765 CALL AX
766
767 // Restore registers, g, stack pointer.
768 get_tls(CX)
(lldb) up
frame #8: 0x000000000040eb09 mg`runtime.notewakeup at lock_futex.go:145
142 print("notewakeup - double wakeup (", old, ")\n")
143 throw("notewakeup - double wakeup")
144 }
-> 145 futexwakeup(key32(&n.key), 1)
146 }
147
148 func notesleep(n *note) {