Closed changkun closed 2 years ago
And dlv as well:
$ dlv attach 9221 main ✖︎ [19:07:06]
Type 'help' for list of commands.
(dlv) grs
Goroutine 1 - User: :0 ??? (0x7f781bc3eaff) (thread 9221) [select 453593h6m33.232087779s]
Goroutine 2 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [force gc (idle) 453447h42m59.230165283s]
Goroutine 3 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC sweep wait]
Goroutine 4 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC scavenge wait]
Goroutine 5 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [finalizer wait]
Goroutine 7 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC worker (idle)]
Goroutine 8 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC worker (idle)]
Goroutine 9 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC worker (idle)]
Goroutine 10 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC worker (idle)]
Goroutine 11 - User: /home/changkun/goes/go1.17.1/src/runtime/sema.go:56 sync.runtime_Semacquire (0x468145) [semacquire 453593h6m33.232124397s]
Goroutine 12 - User: ./vendor/golang.design/x/hotkey/hotkey.go:105 golang.design/x/hotkey.newEventChan.func1 (0x72ffe9) [chan receive 453593h6m33.232129864s]
Goroutine 18 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC worker (idle)]
Goroutine 19 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC worker (idle)]
Goroutine 20 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC worker (idle)]
Goroutine 21 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC worker (idle)]
Goroutine 22 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC worker (idle)]
Goroutine 23 - User: ./api/daemon/serve.go:72 changkun.de/x/midgard/api/daemon.(*Daemon).Serve.func1 (0x8c2585) [chan receive 453593h6m33.232147893s]
Goroutine 24 - User: /home/changkun/goes/go1.17.1/src/runtime/sema.go:56 sync.runtime_Semacquire (0x468145) [semacquire 453593h6m33.153566747s]
Goroutine 25 - User: ./api/daemon/clipboard.go:66 changkun.de/x/midgard/api/daemon.(*Daemon).watchLocalClipboard (0x8bf437) [select 453522h9m13.220338207s]
Goroutine 26 - User: ./api/daemon/office.go:20 changkun.de/x/midgard/api/daemon.(*Daemon).watchOfficeStatus (0x8c103c) [select]
Goroutine 27 - User: /home/changkun/goes/go1.17.1/src/runtime/netpoll.go:229 internal/poll.runtime_pollWait (0x4666a9) [IO wait 453593h6m33.153577041s]
Goroutine 34 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC worker (idle)]
Goroutine 35 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC worker (idle)]
Goroutine 36 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC worker (idle)]
Goroutine 37 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC worker (idle)]
Goroutine 38 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC worker (idle)]
Goroutine 39 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC worker (idle)]
Goroutine 40 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC worker (idle)]
Goroutine 50 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [select 453593h6m33.232188451s]
Goroutine 51 - User: /home/changkun/goes/go1.17.1/src/runtime/sigqueue.go:169 os/signal.signal_recv (0x468918) (thread 9273)
Goroutine 52 - User: /home/changkun/goes/go1.17.1/src/runtime/netpoll.go:229 internal/poll.runtime_pollWait (0x4666a9) [IO wait 453458h7m12.229037825s]
Goroutine 53 - User: ./api/daemon/ws.go:121 changkun.de/x/midgard/api/daemon.(*Daemon).handleIO.func2 (0x8c38ff) [select 453458h7m12.229042359s]
Goroutine 66 - User: ./internal/hotkey/hotkey.go:33 changkun.de/x/midgard/internal/hotkey.Handle.func1 (0x7306d1) [select 453593h6m33.232203636s]
Goroutine 67 - User: :0 ??? (0x7f781bc3eaff) (thread 14980) [select 453521h47m4.230264857s]
Goroutine 68 - User: /home/changkun/goes/go1.17.1/src/runtime/sema.go:71 sync.runtime_SemacquireMutex (0x468265) [semacquire 453521h47m4.23026821s]
[35 goroutines]
(dlv) gr 25
Switched from 0 to 25 (thread 11804)
(dlv) bt
0 0x000000000043b796 in runtime.gopark
at /home/changkun/goes/go1.17.1/src/runtime/proc.go:367
1 0x000000000044b532 in runtime.selectgo
at /home/changkun/goes/go1.17.1/src/runtime/select.go:327
2 0x00000000008bf437 in changkun.de/x/midgard/api/daemon.(*Daemon).watchLocalClipboard
at ./api/daemon/clipboard.go:66
3 0x00000000008c21a5 in changkun.de/x/midgard/api/daemon.(*Daemon).Serve.func3
at ./api/daemon/serve.go:88
4 0x000000000046c281 in runtime.goexit
at /home/changkun/goes/go1.17.1/src/runtime/asm_amd64.s:1581
(dlv) frame 0
> runtime.gopark() /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 (PC: 0x43b796)
Warning: debugging optimized function
Frame 0: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 (PC: 43b796)
362: mp.waittraceev = traceEv
363: mp.waittraceskip = traceskip
364: releasem(mp)
365: // can't do anything that might move the G between Ms here.
366: mcall(park_m)
=> 367: }
368:
369: // Puts the current goroutine into a waiting state and unlocks the lock.
370: // The goroutine can be made runnable again by calling goready(gp).
371: func goparkunlock(lock *mutex, reason waitReason, traceEv byte, traceskip int) {
372: gopark(parkunlock_c, unsafe.Pointer(lock), reason, traceEv, traceskip)
(dlv) up
> runtime.gopark() /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 (PC: 0x43b796)
Warning: debugging optimized function
Frame 1: /home/changkun/goes/go1.17.1/src/runtime/select.go:327 (PC: 44b532)
322: // Signal to anyone trying to shrink our stack that we're about
323: // to park on a channel. The window between when this G's status
324: // changes and when we set gp.activeStackChans is not safe for
325: // stack shrinking.
326: atomic.Store8(&gp.parkingOnChan, 1)
=> 327: gopark(selparkcommit, nil, waitReasonSelect, traceEvGoBlockSelect, 1)
328: gp.activeStackChans = false
329:
330: sellock(scases, lockorder)
331:
332: gp.selectDone = 0
(dlv) up
> runtime.gopark() /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 (PC: 0x43b796)
Warning: debugging optimized function
Frame 2: ./api/daemon/clipboard.go:66 (PC: 8bf437)
61: })
62:
63: textCh := clipboard.Local.Watch(ctx, types.MIMEPlainText)
64: imagCh := clipboard.Local.Watch(ctx, types.MIMEImagePNG)
65: for {
=> 66: select {
67: case <-ctx.Done():
68: return
69: case text, ok := <-textCh:
70: if !ok {
71: return
(dlv) up
> runtime.gopark() /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 (PC: 0x43b796)
Warning: debugging optimized function
Frame 3: ./api/daemon/serve.go:88 (PC: 8c21a5)
83: }()
84: wg.Add(1)
85: go func() {
86: defer wg.Done()
87: defer log.Println("clipboard watcher is terminated.")
=> 88: m.watchLocalClipboard(ctx)
89: }()
90: wg.Add(1)
91: go func() {
92: defer wg.Done()
93: defer log.Println("office watcher is terminated.")
(dlv) grs
Goroutine 1 - User: :0 ??? (0x7f781bc3eaff) (thread 9221) [select 453593h7m42.009562092s]
Goroutine 2 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [force gc (idle) 453447h44m8.007668323s]
Goroutine 3 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC sweep wait]
Goroutine 4 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC scavenge wait]
Goroutine 5 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [finalizer wait]
Goroutine 7 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC worker (idle)]
Goroutine 8 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC worker (idle)]
Goroutine 9 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC worker (idle)]
Goroutine 10 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC worker (idle)]
Goroutine 11 - User: /home/changkun/goes/go1.17.1/src/runtime/sema.go:56 sync.runtime_Semacquire (0x468145) [semacquire 453593h7m42.009764191s]
Goroutine 12 - User: ./vendor/golang.design/x/hotkey/hotkey.go:105 golang.design/x/hotkey.newEventChan.func1 (0x72ffe9) [chan receive 453593h7m42.009786741s]
Goroutine 18 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC worker (idle)]
Goroutine 19 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC worker (idle)]
Goroutine 20 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC worker (idle)]
Goroutine 21 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC worker (idle)]
Goroutine 22 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC worker (idle)]
Goroutine 23 - User: ./api/daemon/serve.go:72 changkun.de/x/midgard/api/daemon.(*Daemon).Serve.func1 (0x8c2585) [chan receive 453593h7m42.009900234s]
Goroutine 24 - User: /home/changkun/goes/go1.17.1/src/runtime/sema.go:56 sync.runtime_Semacquire (0x468145) [semacquire 453593h7m41.93133666s]
* Goroutine 25 - User: ./api/daemon/clipboard.go:66 changkun.de/x/midgard/api/daemon.(*Daemon).watchLocalClipboard (0x8bf437) [select 453522h10m21.998126297s]
Goroutine 26 - User: ./api/daemon/office.go:20 changkun.de/x/midgard/api/daemon.(*Daemon).watchOfficeStatus (0x8c103c) [select]
Goroutine 27 - User: /home/changkun/goes/go1.17.1/src/runtime/netpoll.go:229 internal/poll.runtime_pollWait (0x4666a9) [IO wait 453593h7m41.931399647s]
Goroutine 34 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC worker (idle)]
Goroutine 35 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC worker (idle)]
Goroutine 36 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC worker (idle)]
Goroutine 37 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC worker (idle)]
Goroutine 38 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC worker (idle)]
Goroutine 39 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC worker (idle)]
Goroutine 40 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC worker (idle)]
Goroutine 50 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [select 453593h7m42.010139934s]
Goroutine 51 - User: /home/changkun/goes/go1.17.1/src/runtime/sigqueue.go:169 os/signal.signal_recv (0x468918) (thread 9273)
Goroutine 52 - User: /home/changkun/goes/go1.17.1/src/runtime/netpoll.go:229 internal/poll.runtime_pollWait (0x4666a9) [IO wait 453458h8m21.007019177s]
Goroutine 53 - User: ./api/daemon/ws.go:121 changkun.de/x/midgard/api/daemon.(*Daemon).handleIO.func2 (0x8c38ff) [select 453458h8m21.007036522s]
Goroutine 66 - User: ./internal/hotkey/hotkey.go:33 changkun.de/x/midgard/internal/hotkey.Handle.func1 (0x7306d1) [select 453593h7m42.01021583s]
Goroutine 67 - User: :0 ??? (0x7f781bc3eaff) (thread 14980) [select 453521h48m13.008295902s]
Goroutine 68 - User: /home/changkun/goes/go1.17.1/src/runtime/sema.go:71 sync.runtime_SemacquireMutex (0x468265) [semacquire 453521h48m13.008316166s]
[35 goroutines]
(dlv) /clipboard
Command failed: command not available
(dlv) gr 11
Switched from 25 to 11 (thread 11804)
(dlv) bt
0 0x000000000043b796 in runtime.gopark
at /home/changkun/goes/go1.17.1/src/runtime/proc.go:367
1 0x000000000044c62c in runtime.goparkunlock
at /home/changkun/goes/go1.17.1/src/runtime/proc.go:372
2 0x000000000044c62c in runtime.semacquire1
at /home/changkun/goes/go1.17.1/src/runtime/sema.go:144
3 0x0000000000468145 in sync.runtime_Semacquire
at /home/changkun/goes/go1.17.1/src/runtime/sema.go:56
4 0x0000000000476971 in sync.(*WaitGroup).Wait
at /home/changkun/goes/go1.17.1/src/sync/waitgroup.go:130
5 0x00000000008c1cdc in changkun.de/x/midgard/api/daemon.(*Daemon).Serve
at ./api/daemon/serve.go:102
6 0x0000000000c09151 in changkun.de/x/midgard/cmd.glob..func3
at ./cmd/daemon.go:58
7 0x00000000008eec78 in github.com/spf13/cobra.(*Command).execute
at ./vendor/github.com/spf13/cobra/command.go:860
8 0x00000000008ef37c in github.com/spf13/cobra.(*Command).ExecuteC
at ./vendor/github.com/spf13/cobra/command.go:974
9 0x0000000000c08789 in github.com/spf13/cobra.(*Command).Execute
at ./vendor/github.com/spf13/cobra/command.go:902
10 0x0000000000c08789 in changkun.de/x/midgard/cmd.Execute
at ./cmd/cmd.go:34
11 0x000000000072f7bb in golang.design/x/mainthread.Init.func1
at ./vendor/golang.design/x/mainthread/mainthread.go:96
12 0x000000000046c281 in runtime.goexit
at /home/changkun/goes/go1.17.1/src/runtime/asm_amd64.s:1581
(dlv) gr 12 bt
0 0x000000000043b796 in runtime.gopark
at /home/changkun/goes/go1.17.1/src/runtime/proc.go:367
1 0x0000000000409a2c in runtime.chanrecv
at /home/changkun/goes/go1.17.1/src/runtime/chan.go:576
2 0x0000000000409498 in runtime.chanrecv2
at /home/changkun/goes/go1.17.1/src/runtime/chan.go:444
3 0x000000000072ffe9 in golang.design/x/hotkey.newEventChan.func1
at ./vendor/golang.design/x/hotkey/hotkey.go:105
4 0x000000000046c281 in runtime.goexit
at /home/changkun/goes/go1.17.1/src/runtime/asm_amd64.s:1581
(dlv) gr 24 bt
0 0x000000000043b796 in runtime.gopark
at /home/changkun/goes/go1.17.1/src/runtime/proc.go:367
1 0x000000000044c62c in runtime.goparkunlock
at /home/changkun/goes/go1.17.1/src/runtime/proc.go:372
2 0x000000000044c62c in runtime.semacquire1
at /home/changkun/goes/go1.17.1/src/runtime/sema.go:144
3 0x0000000000468145 in sync.runtime_Semacquire
at /home/changkun/goes/go1.17.1/src/runtime/sema.go:56
4 0x0000000000476971 in sync.(*WaitGroup).Wait
at /home/changkun/goes/go1.17.1/src/sync/waitgroup.go:130
5 0x00000000008c37af in changkun.de/x/midgard/api/daemon.(*Daemon).handleIO
at ./api/daemon/ws.go:145
6 0x00000000008c239f in changkun.de/x/midgard/api/daemon.(*Daemon).Serve.func2
at ./api/daemon/serve.go:81
7 0x000000000046c281 in runtime.goexit
at /home/changkun/goes/go1.17.1/src/runtime/asm_amd64.s:1581
(dlv) gr 17 bt
0 0x000000000046c281 in runtime.goexit
at /home/changkun/goes/go1.17.1/src/runtime/asm_amd64.s:1582
(dlv) gr 27 bt
0 0x000000000043b796 in runtime.gopark
at /home/changkun/goes/go1.17.1/src/runtime/proc.go:367
1 0x000000000043409e in runtime.netpollblock
at /home/changkun/goes/go1.17.1/src/runtime/netpoll.go:445
2 0x00000000004666a9 in internal/poll.runtime_pollWait
at /home/changkun/goes/go1.17.1/src/runtime/netpoll.go:229
3 0x00000000004d35d2 in internal/poll.(*pollDesc).wait
at /home/changkun/goes/go1.17.1/src/internal/poll/fd_poll_runtime.go:84
4 0x00000000004d692c in internal/poll.(*pollDesc).waitRead
at /home/changkun/goes/go1.17.1/src/internal/poll/fd_poll_runtime.go:89
5 0x00000000004d692c in internal/poll.(*FD).Accept
at /home/changkun/goes/go1.17.1/src/internal/poll/fd_unix.go:402
6 0x00000000005b1bf5 in net.(*netFD).accept
at /home/changkun/goes/go1.17.1/src/net/fd_unix.go:173
7 0x00000000005cb348 in net.(*TCPListener).accept
at /home/changkun/goes/go1.17.1/src/net/tcpsock_posix.go:140
8 0x00000000005ca51d in net.(*TCPListener).Accept
at /home/changkun/goes/go1.17.1/src/net/tcpsock.go:262
9 0x0000000000890b42 in google.golang.org/grpc.(*Server).Serve
at ./vendor/google.golang.org/grpc/server.go:786
10 0x00000000008c2994 in changkun.de/x/midgard/api/daemon.(*Daemon).serveRPC
at ./api/daemon/serve.go:122
11 0x00000000008c1db8 in changkun.de/x/midgard/api/daemon.(*Daemon).Serve.func5
at ./api/daemon/serve.go:100
12 0x000000000046c281 in runtime.goexit
at /home/changkun/goes/go1.17.1/src/runtime/asm_amd64.s:1581
(dlv) grs
Goroutine 1 - User: :0 ??? (0x7f781bc3eaff) (thread 9221) [select 453593h10m17.821857986s]
Goroutine 2 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [force gc (idle) 453447h46m43.819963721s]
Goroutine 3 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC sweep wait]
Goroutine 4 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC scavenge wait]
Goroutine 5 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [finalizer wait]
Goroutine 7 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC worker (idle)]
Goroutine 8 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC worker (idle)]
Goroutine 9 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC worker (idle)]
Goroutine 10 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC worker (idle)]
* Goroutine 11 - User: /home/changkun/goes/go1.17.1/src/runtime/sema.go:56 sync.runtime_Semacquire (0x468145) [semacquire 453593h10m17.82204522s]
Goroutine 12 - User: ./vendor/golang.design/x/hotkey/hotkey.go:105 golang.design/x/hotkey.newEventChan.func1 (0x72ffe9) [chan receive 453593h10m17.822048879s]
Goroutine 18 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC worker (idle)]
Goroutine 19 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC worker (idle)]
Goroutine 20 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC worker (idle)]
Goroutine 21 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC worker (idle)]
Goroutine 22 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC worker (idle)]
Goroutine 23 - User: ./api/daemon/serve.go:72 changkun.de/x/midgard/api/daemon.(*Daemon).Serve.func1 (0x8c2585) [chan receive 453593h10m17.822069032s]
Goroutine 24 - User: /home/changkun/goes/go1.17.1/src/runtime/sema.go:56 sync.runtime_Semacquire (0x468145) [semacquire 453593h10m17.743488479s]
Goroutine 25 - User: ./api/daemon/clipboard.go:66 changkun.de/x/midgard/api/daemon.(*Daemon).watchLocalClipboard (0x8bf437) [select 453522h12m57.810260721s]
Goroutine 26 - User: ./api/daemon/office.go:20 changkun.de/x/midgard/api/daemon.(*Daemon).watchOfficeStatus (0x8c103c) [select]
Goroutine 27 - User: /home/changkun/goes/go1.17.1/src/runtime/netpoll.go:229 internal/poll.runtime_pollWait (0x4666a9) [IO wait 453593h10m17.743499041s]
Goroutine 34 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC worker (idle)]
Goroutine 35 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC worker (idle)]
Goroutine 36 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC worker (idle)]
Goroutine 37 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC worker (idle)]
Goroutine 38 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC worker (idle)]
Goroutine 39 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC worker (idle)]
Goroutine 40 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [GC worker (idle)]
Goroutine 50 - User: /home/changkun/goes/go1.17.1/src/runtime/proc.go:367 runtime.gopark (0x43b796) [select 453593h10m17.822147853s]
Goroutine 51 - User: /home/changkun/goes/go1.17.1/src/runtime/sigqueue.go:169 os/signal.signal_recv (0x468918) (thread 9273)
Goroutine 52 - User: /home/changkun/goes/go1.17.1/src/runtime/netpoll.go:229 internal/poll.runtime_pollWait (0x4666a9) [IO wait 453458h10m56.818995766s]
Goroutine 53 - User: ./api/daemon/ws.go:121 changkun.de/x/midgard/api/daemon.(*Daemon).handleIO.func2 (0x8c38ff) [select 453458h10m56.819016383s]
Goroutine 66 - User: ./internal/hotkey/hotkey.go:33 changkun.de/x/midgard/internal/hotkey.Handle.func1 (0x7306d1) [select 453593h10m17.822178275s]
Goroutine 67 - User: :0 ??? (0x7f781bc3eaff) (thread 14980) [select 453521h50m48.820239379s]
Goroutine 68 - User: /home/changkun/goes/go1.17.1/src/runtime/sema.go:71 sync.runtime_SemacquireMutex (0x468265) [semacquire 453521h50m48.820243082s]
[35 goroutines]
(dlv) gr 50 bt
0 0x000000000043b796 in runtime.gopark
at /home/changkun/goes/go1.17.1/src/runtime/proc.go:367
1 0x000000000044b532 in runtime.selectgo
at /home/changkun/goes/go1.17.1/src/runtime/select.go:327
2 0x0000000000465085 in runtime.ensureSigM.func1
at /home/changkun/goes/go1.17.1/src/runtime/signal_unix.go:890
3 0x000000000046c281 in runtime.goexit
at /home/changkun/goes/go1.17.1/src/runtime/asm_amd64.s:1581
(dlv) gr 50 51
Command failed: command not available
(dlv) gr 51 bt
0 0x000000000046e083 in runtime.futex
at /home/changkun/goes/go1.17.1/src/runtime/sys_linux_amd64.s:520
1 0x0000000000434c36 in runtime.futexsleep
at /home/changkun/goes/go1.17.1/src/runtime/os_linux.go:44
2 0x000000000040ee05 in runtime.notetsleep_internal
at /home/changkun/goes/go1.17.1/src/runtime/lock_futex.go:183
3 0x000000000040ef25 in runtime.notetsleepg
at /home/changkun/goes/go1.17.1/src/runtime/lock_futex.go:237
4 0x0000000000468918 in os/signal.signal_recv
at /home/changkun/goes/go1.17.1/src/runtime/sigqueue.go:169
5 0x00000000008b0e59 in os/signal.loop
at /home/changkun/goes/go1.17.1/src/os/signal/signal_unix.go:24
6 0x000000000046c281 in runtime.goexit
at /home/changkun/goes/go1.17.1/src/runtime/asm_amd64.s:1581
(dlv) gr 53 bt
0 0x000000000043b796 in runtime.gopark
at /home/changkun/goes/go1.17.1/src/runtime/proc.go:367
1 0x000000000044b532 in runtime.selectgo
at /home/changkun/goes/go1.17.1/src/runtime/select.go:327
2 0x00000000008c38ff in changkun.de/x/midgard/api/daemon.(*Daemon).handleIO.func2
at ./api/daemon/ws.go:121
3 0x000000000046c281 in runtime.goexit
at /home/changkun/goes/go1.17.1/src/runtime/asm_amd64.s:1581
(dlv) gr 66 bt
0 0x000000000043b796 in runtime.gopark
at /home/changkun/goes/go1.17.1/src/runtime/proc.go:367
1 0x000000000044b532 in runtime.selectgo
at /home/changkun/goes/go1.17.1/src/runtime/select.go:327
2 0x00000000007306d1 in changkun.de/x/midgard/internal/hotkey.Handle.func1
at ./internal/hotkey/hotkey.go:33
3 0x000000000046c281 in runtime.goexit
at /home/changkun/goes/go1.17.1/src/runtime/asm_amd64.s:1581
(dlv) gr 67 bt
0 0x00007f781bc3eaff in ???
at ?:-1
error: input/output error
What is the error: input/output error
???
Not reproducible. Close for now.
The problem can occur after a very very long time (probably a year?), not sure why, but here is a stack trace: