evcc-io / evcc

Sonne tanken ☀️🚘
https://evcc.io
MIT License
3.58k stars 661 forks source link

Deadlock #9482

Closed andig closed 1 year ago

andig commented 1 year ago

debug/pprof/goroutine?debug=2:

goroutine 89587 [running]:
runtime/pprof.writeGoroutineStacks({0x2fe1460, 0xc0006aa0e0})
    runtime/pprof/pprof.go:703 +0x6a
runtime/pprof.writeGoroutine({0x2fe1460?, 0xc0006aa0e0?}, 0x45718f?)
    runtime/pprof/pprof.go:692 +0x25
runtime/pprof.(*Profile).WriteTo(0x24aa6a0?, {0x2fe1460?, 0xc0006aa0e0?}, 0xc?)
    runtime/pprof/pprof.go:329 +0x146
net/http/pprof.handler.ServeHTTP({0xc0012dc2b1, 0x9}, {0x30dc730, 0xc0006aa0e0}, 0x2fe01a0?)
    net/http/pprof/pprof.go:267 +0x4a8
net/http/pprof.Index({0x30dc730?, 0xc0006aa0e0}, 0xc0015b1e00?)
    net/http/pprof/pprof.go:384 +0xe5
net/http.HandlerFunc.ServeHTTP(0xc000d72000?, {0x30dc730?, 0xc0006aa0e0?}, 0x26562c0?)
    net/http/server.go:2136 +0x29
net/http.(*ServeMux).ServeHTTP(0xc0015b1c00?, {0x30dc730, 0xc0006aa0e0}, 0xc0015b1e00)
    net/http/server.go:2514 +0x142
github.com/gorilla/mux.(*Router).ServeHTTP(0xc000c1e180, {0x30dc730, 0xc0006aa0e0}, 0xc0015b1b00)
    github.com/gorilla/mux@v1.8.0/mux.go:210 +0x1c5
net/http.serverHandler.ServeHTTP({0xc0007c0540?}, {0x30dc730?, 0xc0006aa0e0?}, 0x6?)
    net/http/server.go:2938 +0x8e
net/http.(*conn).serve(0xc000dfa120, {0x30e3c40, 0xc000b99470})
    net/http/server.go:2009 +0x5f4
created by net/http.(*Server).Serve in goroutine 1
    net/http/server.go:3086 +0x5cb

goroutine 1 [IO wait]:
internal/poll.runtime_pollWait(0x7fb2fe124150, 0x72)
    runtime/netpoll.go:343 +0x85
internal/poll.(*pollDesc).wait(0xc0001ff480?, 0x4?, 0x0)
    internal/poll/fd_poll_runtime.go:84 +0x27
internal/poll.(*pollDesc).waitRead(...)
    internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Accept(0xc0001ff480)
    internal/poll/fd_unix.go:611 +0x2ac
net.(*netFD).accept(0xc0001ff480)
    net/fd_unix.go:172 +0x29
net.(*TCPListener).accept(0xc00073f6c0)
    net/tcpsock_posix.go:152 +0x1e
net.(*TCPListener).Accept(0xc00073f6c0)
    net/tcpsock.go:315 +0x30
net/http.(*Server).Serve(0xc000570000, {0x30dc460, 0xc00073f6c0})
    net/http/server.go:3056 +0x364
net/http.(*Server).ListenAndServe(0xc000570000)
    net/http/server.go:2985 +0x71
github.com/evcc-io/evcc/cmd.runRoot(0xc0000fed00?, {0x26ea49c?, 0x7?, 0x26ddb91?})
    github.com/evcc-io/evcc/cmd/root.go:307 +0x17d6
github.com/spf13/cobra.(*Command).execute(0x4d1f860, {0xc000050730, 0x2, 0x2})
    github.com/spf13/cobra@v1.7.0/command.go:944 +0x863
github.com/spf13/cobra.(*Command).ExecuteC(0x4d1f860)
    github.com/spf13/cobra@v1.7.0/command.go:1068 +0x3a5
github.com/spf13/cobra.(*Command).Execute(...)
    github.com/spf13/cobra@v1.7.0/command.go:992
github.com/evcc-io/evcc/cmd.Execute()
    github.com/evcc-io/evcc/cmd/root.go:110 +0x1a
main.main()
    github.com/evcc-io/evcc/main.go:45 +0x2d

goroutine 20 [chan receive, 516 minutes]:
github.com/evcc-io/evcc/util/pipe.(*Dropper).pipe(0xc0004af368, 0x0?, 0xc0004c8180?)
    github.com/evcc-io/evcc/util/pipe/limiter.go:116 +0x58
created by github.com/evcc-io/evcc/util/pipe.(*Dropper).Pipe in goroutine 1
    github.com/evcc-io/evcc/util/pipe/limiter.go:128 +0x90

goroutine 21 [chan receive, 516 minutes]:
github.com/evcc-io/evcc/util.(*Cache).Run(0x12c?, 0xe?)
    github.com/evcc-io/evcc/util/cache.go:35 +0x6a
created by github.com/evcc-io/evcc/cmd.runRoot in goroutine 1
    github.com/evcc-io/evcc/cmd/root.go:140 +0x43d

goroutine 25 [chan receive, 516 minutes]:
github.com/evcc-io/evcc/util/pipe.(*Dropper).pipe(0xc0004af5d8, 0x0?, 0xc0004c8d80?)
    github.com/evcc-io/evcc/util/pipe/limiter.go:116 +0x58
created by github.com/evcc-io/evcc/util/pipe.(*Dropper).Pipe in goroutine 1
    github.com/evcc-io/evcc/util/pipe/limiter.go:128 +0x90

goroutine 26 [select, 28 minutes]:
github.com/evcc-io/evcc/server.(*SocketHub).Run(0xc000c284b0, 0xc0004e17a0, 0x0?)
    github.com/evcc-io/evcc/server/socket.go:159 +0xb4
created by github.com/evcc-io/evcc/cmd.runRoot in goroutine 1
    github.com/evcc-io/evcc/cmd/root.go:157 +0x75f

goroutine 27 [chan receive, 516 minutes]:
github.com/evcc-io/evcc/util.(*Tee).Run(0xc00051e880, 0x0?)
    github.com/evcc-io/evcc/util/tee.go:37 +0x54
created by github.com/evcc-io/evcc/cmd.runRoot in goroutine 1
    github.com/evcc-io/evcc/cmd/root.go:161 +0x7d3

goroutine 28 [select, 747 minutes]:
google.golang.org/grpc/internal/grpcsync.(*CallbackSerializer).run(0xc00007f8c0, {0x30e3c78, 0xc000c2c730})
    google.golang.org/grpc@v1.56.0/internal/grpcsync/callback_serializer.go:83 +0x112
created by google.golang.org/grpc/internal/grpcsync.NewCallbackSerializer in goroutine 1
    google.golang.org/grpc@v1.56.0/internal/grpcsync/callback_serializer.go:55 +0x129

goroutine 29 [select, 747 minutes]:
google.golang.org/grpc/internal/grpcsync.(*CallbackSerializer).run(0xc00007f960, {0x30e3c78, 0xc000c2c780})
    google.golang.org/grpc@v1.56.0/internal/grpcsync/callback_serializer.go:83 +0x112
created by google.golang.org/grpc/internal/grpcsync.NewCallbackSerializer in goroutine 1
    google.golang.org/grpc@v1.56.0/internal/grpcsync/callback_serializer.go:55 +0x129

goroutine 165 [chan receive, 516 minutes]:
github.com/evcc-io/evcc/util/pipe.(*Dropper).pipe(0xc000b05830, 0x0?, 0x0?)
    github.com/evcc-io/evcc/util/pipe/limiter.go:116 +0x58
created by github.com/evcc-io/evcc/util/pipe.(*Dropper).Pipe in goroutine 1
    github.com/evcc-io/evcc/util/pipe/limiter.go:128 +0x90

goroutine 33 [select, 747 minutes]:
database/sql.(*DB).connectionOpener(0xc000d2ab60, {0x30e3c78, 0xc000fe7810})
    database/sql/sql.go:1218 +0x87
created by database/sql.OpenDB in goroutine 1
    database/sql/sql.go:791 +0x165

goroutine 34 [semacquire, 508 minutes]:
internal/poll.runtime_Semacquire(0xc00146f798?)
    runtime/sema.go:67 +0x25
internal/poll.(*fdMutex).rwlock(0xc000052180, 0x35?)
    internal/poll/fd_mutex.go:154 +0xc5
internal/poll.(*FD).writeLock(...)
    internal/poll/fd_mutex.go:239
internal/poll.(*FD).Write(0xc000052180, {0xc0004a2a80, 0x310, 0x380})
    internal/poll/fd_unix.go:367 +0x65
os.(*File).write(...)
    os/file_posix.go:46
os.(*File).Write(0xc000070048, {0xc0004a2a80?, 0x310, 0xc00146f938?})
    os/file.go:183 +0x51
github.com/evcc-io/evcc/util.(*Redactor).Write(0xc00086cf20, {0xc0004a2a80?, 0x23?, 0x40?})
    github.com/evcc-io/evcc/util/redactor.go:43 +0x1ae
io.(*multiWriter).Write(0xc0004e7980?, {0xc0004a2a80, 0x310, 0x380})
    io/multi.go:85 +0x6d
log.(*Logger).output(0xc000d262a0, 0x0, 0x0?, 0xc00146fbc8)
    log/log.go:245 +0x485
log.(*Logger).Println(0xc0004a2700?, {0xc00146fc28?, 0x7fb344cb55b8?, 0x18?})
    log/log.go:276 +0x4b
github.com/evcc-io/evcc/server/db.(*Logger).Trace(0xc000070c28, {0x21c9060?, 0xc0018c6330?}, {0x0?, 0x22bb160?, 0xc00091eb40?}, 0x10?, {0x0?, 0x0})
    github.com/evcc-io/evcc/server/db/log.go:33 +0xc5
gorm.io/gorm.(*processor).Execute(0xc000fe7630, 0x271b745?)
    gorm.io/gorm@v1.25.1/callbacks.go:134 +0x438
gorm.io/gorm.(*DB).Save(0xc000725b80?, {0x21c9060?, 0xc0018c6330})
    gorm.io/gorm@v1.25.1/finisher_api.go:89 +0x2f5
github.com/evcc-io/evcc/server/db/settings.Persist()
    github.com/evcc-io/evcc/server/db/settings/setting.go:41 +0x5f
github.com/evcc-io/evcc/cmd.configureDatabase.func1()
    github.com/evcc-io/evcc/cmd/setup.go:407 +0x13
github.com/evcc-io/evcc/cmd.configureDatabase.func2()
    github.com/evcc-io/evcc/cmd/setup.go:418 +0x58
created by github.com/evcc-io/evcc/cmd.configureDatabase in goroutine 1
    github.com/evcc-io/evcc/cmd/setup.go:416 +0x6b

goroutine 39 [select]:
github.com/eclipse/paho%2emqtt%2egolang.keepalive(0xc000d3c000, {0x2fe0ac0, 0xc000070f70})
    github.com/eclipse/paho.mqtt.golang@v1.4.2/ping.go:48 +0x1d8
created by github.com/eclipse/paho%2emqtt%2egolang.(*client).startCommsWorkers in goroutine 35
    github.com/eclipse/paho.mqtt.golang@v1.4.2/client.go:593 +0x33b

goroutine 40 [select, 747 minutes]:
github.com/eclipse/paho%2emqtt%2egolang.(*router).matchAndDispatch.func1()
    github.com/eclipse/paho.mqtt.golang@v1.4.2/router.go:153 +0xbf
created by github.com/eclipse/paho%2emqtt%2egolang.(*router).matchAndDispatch in goroutine 35
    github.com/eclipse/paho.mqtt.golang@v1.4.2/router.go:151 +0x12e

goroutine 41 [chan receive, 747 minutes]:
github.com/eclipse/paho%2emqtt%2egolang.(*router).matchAndDispatch.func2()
    github.com/eclipse/paho.mqtt.golang@v1.4.2/router.go:174 +0xb2
created by github.com/eclipse/paho%2emqtt%2egolang.(*router).matchAndDispatch in goroutine 35
    github.com/eclipse/paho.mqtt.golang@v1.4.2/router.go:173 +0x21c

goroutine 65 [sync.Mutex.Lock, 514 minutes]:
sync.runtime_SemacquireMutex(0x41bdeb?, 0x68?, 0x4d521c0?)
    runtime/sema.go:77 +0x25
sync.(*Mutex).lockSlow(0xc000940a00)
    sync/mutex.go:171 +0x15d
sync.(*Mutex).Lock(...)
    sync/mutex.go:90
github.com/evcc-io/evcc/provider.(*cached[...]).Get(0x30e8e80)
    github.com/evcc-io/evcc/provider/cache.go:70 +0x89
github.com/evcc-io/evcc/charger.(*OpenWBPro).heartbeat(0xc001426540, 0xc000ad86c0)
    github.com/evcc-io/evcc/charger/openwb-pro.go:69 +0xca
created by github.com/evcc-io/evcc/charger.NewOpenWBPro in goroutine 51
    github.com/evcc-io/evcc/charger/openwb-pro.go:62 +0x357

goroutine 43 [select, 516 minutes]:
github.com/eclipse/paho%2emqtt%2egolang.(*client).startCommsWorkers.func1()
    github.com/eclipse/paho.mqtt.golang@v1.4.2/client.go:628 +0x178
created by github.com/eclipse/paho%2emqtt%2egolang.(*client).startCommsWorkers in goroutine 35
    github.com/eclipse/paho.mqtt.golang@v1.4.2/client.go:625 +0x6c5

goroutine 44 [IO wait]:
internal/poll.runtime_pollWait(0x7fb2fe124cf0, 0x72)
    runtime/netpoll.go:343 +0x85
internal/poll.(*pollDesc).wait(0xc00085c100?, 0xc0018c0ed1?, 0x0)
    internal/poll/fd_poll_runtime.go:84 +0x27
internal/poll.(*pollDesc).waitRead(...)
    internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Read(0xc00085c100, {0xc0018c0ed1, 0x1, 0x1})
    internal/poll/fd_unix.go:164 +0x27a
net.(*netFD).Read(0xc00085c100, {0xc0018c0ed1?, 0x23c81c0?, 0x7fb344cb55b8?})
    net/fd_posix.go:55 +0x25
net.(*conn).Read(0xc000070f70, {0xc0018c0ed1?, 0xc0012fffb0?, 0x7fb344cb55b8?})
    net/net.go:179 +0x45
io.ReadAtLeast({0x2fe09e0, 0xc000070f70}, {0xc0018c0ed1, 0x1, 0x1}, 0x1)
    io/io.go:335 +0x90
io.ReadFull(...)
    io/io.go:354
github.com/eclipse/paho.mqtt.golang/packets.ReadPacket({0x2fe09e0, 0xc000070f70})
    github.com/eclipse/paho.mqtt.golang@v1.4.2/packets/packets.go:131 +0x59
github.com/eclipse/paho%2emqtt%2egolang.startIncoming.func1()
    github.com/eclipse/paho.mqtt.golang@v1.4.2/net.go:124 +0xdf
created by github.com/eclipse/paho%2emqtt%2egolang.startIncoming in goroutine 35
    github.com/eclipse/paho.mqtt.golang@v1.4.2/net.go:122 +0x147

goroutine 45 [select]:
github.com/eclipse/paho%2emqtt%2egolang.startIncomingComms.func1()
    github.com/eclipse/paho.mqtt.golang@v1.4.2/net.go:175 +0x185
created by github.com/eclipse/paho%2emqtt%2egolang.startIncomingComms in goroutine 35
    github.com/eclipse/paho.mqtt.golang@v1.4.2/net.go:164 +0x1b0

goroutine 46 [select, 516 minutes]:
github.com/eclipse/paho%2emqtt%2egolang.startOutgoingComms.func1()
    github.com/eclipse/paho.mqtt.golang@v1.4.2/net.go:277 +0x1d7
created by github.com/eclipse/paho%2emqtt%2egolang.startOutgoingComms in goroutine 35
    github.com/eclipse/paho.mqtt.golang@v1.4.2/net.go:264 +0x245

goroutine 47 [chan receive, 747 minutes]:
github.com/eclipse/paho%2emqtt%2egolang.startComms.func1()
    github.com/eclipse/paho.mqtt.golang@v1.4.2/net.go:407 +0x65
created by github.com/eclipse/paho%2emqtt%2egolang.startComms in goroutine 35
    github.com/eclipse/paho.mqtt.golang@v1.4.2/net.go:406 +0x1fd

goroutine 48 [chan receive, 747 minutes]:
github.com/eclipse/paho%2emqtt%2egolang.startComms.func2()
    github.com/eclipse/paho.mqtt.golang@v1.4.2/net.go:430 +0x69
created by github.com/eclipse/paho%2emqtt%2egolang.startComms in goroutine 35
    github.com/eclipse/paho.mqtt.golang@v1.4.2/net.go:429 +0x265

goroutine 49 [semacquire, 747 minutes]:
sync.runtime_Semacquire(0x0?)
    runtime/sema.go:62 +0x25
sync.(*WaitGroup).Wait(0xc000880000?)
    sync/waitgroup.go:116 +0x48
github.com/eclipse/paho%2emqtt%2egolang.startComms.func3()
    github.com/eclipse/paho.mqtt.golang@v1.4.2/net.go:438 +0x25
created by github.com/eclipse/paho%2emqtt%2egolang.startComms in goroutine 35
    github.com/eclipse/paho.mqtt.golang@v1.4.2/net.go:437 +0x2b9

goroutine 50 [select, 747 minutes]:
github.com/eclipse/paho%2emqtt%2egolang.(*client).startCommsWorkers.func2()
    github.com/eclipse/paho.mqtt.golang@v1.4.2/client.go:663 +0xed
created by github.com/eclipse/paho%2emqtt%2egolang.(*client).startCommsWorkers in goroutine 35
    github.com/eclipse/paho.mqtt.golang@v1.4.2/client.go:658 +0x83e

goroutine 183 [semacquire, 508 minutes]:
internal/poll.runtime_Semacquire(0x33003000000000f0?)
    runtime/sema.go:67 +0x25
internal/poll.(*fdMutex).rwlock(0xc000052180, 0x8f?)
    internal/poll/fd_mutex.go:154 +0xc5
internal/poll.(*FD).writeLock(...)
    internal/poll/fd_mutex.go:239
internal/poll.(*FD).Write(0xc000052180, {0xc000949f20, 0x5c, 0x60})
    internal/poll/fd_unix.go:367 +0x65
os.(*File).write(...)
    os/file_posix.go:46
os.(*File).Write(0xc000070048, {0xc000949f20?, 0x5c, 0x5c?})
    os/file.go:183 +0x51
github.com/evcc-io/evcc/util.(*Redactor).Write(0xc000a25ee0, {0xc000b22180?, 0x26df9de?, 0x5?})
    github.com/evcc-io/evcc/util/redactor.go:43 +0x1ae
io.(*multiWriter).Write(0xc000869080?, {0xc000b22180, 0x5e, 0x80})
    io/multi.go:85 +0x6d
log.(*Logger).output(0xc000fcfc20, 0x0, 0x412f05?, 0xc0000835e8)
    log/log.go:245 +0x485
log.(*Logger).Printf(...)
    log/log.go:268
github.com/evcc-io/evcc/util/request.(*roundTripper).RoundTrip(0xc0012db938, 0xc0018a5a00)
    github.com/evcc-io/evcc/util/request/roundtrip.go:93 +0x15a
net/http.send(0xc0018a5900, {0x2fe0200, 0xc0012db938}, {0x1?, 0x49e0b4?, 0x4d521c0?})
    net/http/client.go:260 +0x606
net/http.(*Client).send(0xc000fcfe90, 0xc0018a5900, {0xf8?, 0x265d200?, 0x4d521c0?})
    net/http/client.go:181 +0x98
net/http.(*Client).do(0xc000fcfe90, 0xc0018a5900)
    net/http/client.go:724 +0x912
net/http.(*Client).Do(...)
    net/http/client.go:590
github.com/evcc-io/evcc/util/request.(*Helper).DoJSON(0xc0012fce08, 0x47?, {0x21c2980, 0xc000f5f7f0})
    github.com/evcc-io/evcc/util/request/helper.go:68 +0x94
github.com/evcc-io/evcc/util/request.(*Helper).GetJSON(0xc0012fcbd8?, {0xc000e34e40, 0x36}, {0x2187700, 0xc000c1e480})
    github.com/evcc-io/evcc/util/request/helper.go:81 +0xe5
github.com/evcc-io/evcc/tariff.(*GrünStromIndex).run.func1()
    github.com/evcc-io/evcc/tariff/gruenstromindex.go:100 +0x2a
github.com/cenkalti/backoff/v4.RetryNotifyWithTimer.Operation.withEmptyData.func1()
    github.com/cenkalti/backoff/v4@v4.2.1/retry.go:18 +0x13
github.com/cenkalti/backoff/v4.doRetryNotify[...](0xc000083d38?, {0x2feed20, 0xc000e085a0}, 0x0, {0x0, 0x0?})
    github.com/cenkalti/backoff/v4@v4.2.1/retry.go:88 +0x13c
github.com/cenkalti/backoff/v4.RetryNotifyWithTimer(0x34630b8a000?, {0x2feed20?, 0xc000e085a0?}, 0x1?, {0x0?, 0x0?})
    github.com/cenkalti/backoff/v4@v4.2.1/retry.go:61 +0x5c
github.com/cenkalti/backoff/v4.RetryNotify(...)
    github.com/cenkalti/backoff/v4@v4.2.1/retry.go:49
github.com/cenkalti/backoff/v4.Retry(...)
    github.com/cenkalti/backoff/v4@v4.2.1/retry.go:38
github.com/evcc-io/evcc/tariff.(*GrünStromIndex).run(0xc000fe6d70, 0xc0011d4120)
    github.com/evcc-io/evcc/tariff/gruenstromindex.go:99 +0x356
created by github.com/evcc-io/evcc/tariff.NewGrünStromIndexFromConfig in goroutine 1
    github.com/evcc-io/evcc/tariff/gruenstromindex.go:84 +0x15d

goroutine 197 [chan receive, 747 minutes]:
github.com/evcc-io/evcc/server.(*Influx).Run.func1()
    github.com/evcc-io/evcc/server/influxdb.go:141 +0x4e
created by github.com/evcc-io/evcc/server.(*Influx).Run in goroutine 167
    github.com/evcc-io/evcc/server/influxdb.go:140 +0xce

goroutine 195 [select]:
github.com/influxdata/influxdb-client-go/v2/api.(*WriteAPIImpl).bufferProc(0xc0001fe900)
    github.com/influxdata/influxdb-client-go/v2@v2.12.3/api/write.go:147 +0x11c
created by github.com/influxdata/influxdb-client-go/v2/api.NewWriteAPI in goroutine 167
    github.com/influxdata/influxdb-client-go/v2@v2.12.3/api/write.go:91 +0x2ea

goroutine 266 [chan receive, 518 minutes]:
github.com/evcc-io/evcc/push.(*Hub).Run(0xc000c73830, 0x14?, 0x22203d20736b6e61?)
    github.com/evcc-io/evcc/push/hub.go:78 +0x78
created by github.com/evcc-io/evcc/cmd.configureMessengers in goroutine 1
    github.com/evcc-io/evcc/cmd/setup.go:541 +0x2ff

goroutine 265 [chan receive, 747 minutes]:
github.com/evcc-io/evcc/push.(*Telegram).trackChats(0xc0007be600)
    github.com/evcc-io/evcc/push/telegram.go:67 +0xa7
created by github.com/evcc-io/evcc/push.NewTelegramFromConfig in goroutine 1
    github.com/evcc-io/evcc/push/telegram.go:57 +0x325

goroutine 166 [chan receive, 516 minutes]:
github.com/evcc-io/evcc/util/pipe.(*Deduplicator).pipe(0xc000c72fc0, 0x0?, 0x0?)
    github.com/evcc-io/evcc/util/pipe/limiter.go:46 +0x5e
created by github.com/evcc-io/evcc/util/pipe.(*Deduplicator).Pipe in goroutine 1
    github.com/evcc-io/evcc/util/pipe/limiter.go:63 +0x90

goroutine 169 [chan receive, 516 minutes]:
github.com/evcc-io/evcc/server.(*MQTT).Run(0xc000a1b2c0, {0x31078a0?, 0xc000249800}, 0x74536e6f69746167?)
    github.com/evcc-io/evcc/server/mqtt.go:285 +0xda5
created by github.com/evcc-io/evcc/cmd.runRoot in goroutine 1
    github.com/evcc-io/evcc/cmd/root.go:202 +0xe69

goroutine 168 [chan receive, 516 minutes]:
github.com/evcc-io/evcc/util/pipe.(*Dropper).pipe(0xc000b05a70, 0x63656a626f206e6f?, 0x6975716572207374?)
    github.com/evcc-io/evcc/util/pipe/limiter.go:116 +0x58
created by github.com/evcc-io/evcc/util/pipe.(*Dropper).Pipe in goroutine 1
    github.com/evcc-io/evcc/util/pipe/limiter.go:128 +0x90

goroutine 167 [chan receive, 516 minutes]:
github.com/evcc-io/evcc/server.(*Influx).Run(0xc000702e60, {0x31078a0, 0xc000249800}, 0x65736a2c30206469?)
    github.com/evcc-io/evcc/server/influxdb.go:148 +0x153
created by github.com/evcc-io/evcc/cmd.configureInflux in goroutine 1
    github.com/evcc-io/evcc/cmd/setup.go:440 +0x33b

goroutine 196 [select, 516 minutes]:
github.com/influxdata/influxdb-client-go/v2/api.(*WriteAPIImpl).writeProc(0xc0001fe900)
    github.com/influxdata/influxdb-client-go/v2@v2.12.3/api/write.go:190 +0xc6
created by github.com/influxdata/influxdb-client-go/v2/api.NewWriteAPI in goroutine 167
    github.com/influxdata/influxdb-client-go/v2@v2.12.3/api/write.go:92 +0x326

goroutine 89595 [IO wait]:
internal/poll.runtime_pollWait(0x7fb2fdd407d0, 0x72)
    runtime/netpoll.go:343 +0x85
internal/poll.(*pollDesc).wait(0xc000586500?, 0xc0007c0551?, 0x0)
    internal/poll/fd_poll_runtime.go:84 +0x27
internal/poll.(*pollDesc).waitRead(...)
    internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Read(0xc000586500, {0xc0007c0551, 0x1, 0x1})
    internal/poll/fd_unix.go:164 +0x27a
net.(*netFD).Read(0xc000586500, {0xc0007c0551?, 0xc0013fd740?, 0x0?})
    net/fd_posix.go:55 +0x25
net.(*conn).Read(0xc00080c358, {0xc0007c0551?, 0x409700?, 0x100000001?})
    net/net.go:179 +0x45
net/http.(*connReader).backgroundRead(0xc0007c0540)
    net/http/server.go:683 +0x37
created by net/http.(*connReader).startBackgroundRead in goroutine 89587
    net/http/server.go:679 +0xba

goroutine 89551 [select, 2 minutes]:
net/http.(*http2clientStream).writeRequest(0xc0004e8780, 0xc0015b0300)
    net/http/h2_bundle.go:8486 +0xac7
net/http.(*http2clientStream).doRequest(0xc0018acfc0?, 0xc001400fa0?)
    net/http/h2_bundle.go:8348 +0x18
created by net/http.(*http2ClientConn).RoundTrip in goroutine 276
    net/http/h2_bundle.go:8254 +0x308

goroutine 318 [IO wait]:
internal/poll.runtime_pollWait(0x7fb2fdd406d8, 0x72)
    runtime/netpoll.go:343 +0x85
internal/poll.(*pollDesc).wait(0xc0009b8a80?, 0x20?, 0x0)
    internal/poll/fd_poll_runtime.go:84 +0x27
internal/poll.(*pollDesc).waitRead(...)
    internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Accept(0xc0009b8a80)
    internal/poll/fd_unix.go:611 +0x2ac
net.(*netFD).accept(0xc0009b8a80)
    net/fd_unix.go:172 +0x29
net.(*UnixListener).accept(0xc00151be78?)
    net/unixsock_posix.go:172 +0x16
net.(*UnixListener).Accept(0xc000976120)
    net/unixsock.go:260 +0x30
net/http.(*Server).Serve(0xc0005702d0, {0x30dc490, 0xc000976120})
    net/http/server.go:3056 +0x364
github.com/evcc-io/evcc/server.HealthListener.func1()
    github.com/evcc-io/evcc/server/uds.go:39 +0x1f
created by github.com/evcc-io/evcc/server.HealthListener in goroutine 332
    github.com/evcc-io/evcc/server/uds.go:39 +0x1e5

goroutine 422 [IO wait]:
internal/poll.runtime_pollWait(0x7fb2fe124058, 0x72)
    runtime/netpoll.go:343 +0x85
internal/poll.(*pollDesc).wait(0xc0009b9700?, 0xc0015dd000?, 0x0)
    internal/poll/fd_poll_runtime.go:84 +0x27
internal/poll.(*pollDesc).waitRead(...)
    internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Read(0xc0009b9700, {0xc0015dd000, 0x1000, 0x1000})
    internal/poll/fd_unix.go:164 +0x27a
net.(*netFD).Read(0xc0009b9700, {0xc0015dd000?, 0x4f8ae5?, 0x7fb2fe124148?})
    net/fd_posix.go:55 +0x25
net.(*conn).Read(0xc000071cb0, {0xc0015dd000?, 0x0?, 0xc00137a0c8?})
    net/net.go:179 +0x45
net/http.(*connReader).Read(0xc00137a0c0, {0xc0015dd000, 0x1000, 0x1000})
    net/http/server.go:791 +0x14b
bufio.(*Reader).fill(0xc0015c19e0)
    bufio/bufio.go:113 +0x103
bufio.(*Reader).Peek(0xc0015c19e0, 0x4)
    bufio/bufio.go:151 +0x53
net/http.(*conn).serve(0xc00143f3b0, {0x30e3c40, 0xc000b99470})
    net/http/server.go:2044 +0x75c
created by net/http.(*Server).Serve in goroutine 1
    net/http/server.go:3086 +0x5cb

goroutine 276 [select, 2 minutes]:
net/http.(*http2ClientConn).RoundTrip(0xc000e54600, 0xc0015b0300)
    net/http/h2_bundle.go:8318 +0x44f
net/http.(*http2Transport).RoundTripOpt(0xc000c71320, 0xc0015b0300, {0xa0?})
    net/http/h2_bundle.go:7586 +0x1b1
net/http.(*http2Transport).RoundTrip(...)
    net/http/h2_bundle.go:7535
net/http.http2noDialH2RoundTripper.RoundTrip({0x4d19880?}, 0xc0015b0300?)
    net/http/h2_bundle.go:10140 +0x16
net/http.(*Transport).roundTrip(0x4d19880, 0xc0015b0000)
    net/http/transport.go:549 +0x39e
net/http.(*Transport).RoundTrip(0xc000b354a8?, 0x2fe01e0?)
    net/http/roundtrip.go:17 +0x13
net/http.send(0xc0015b0000, {0x2fe01e0, 0x4d19880}, {0x101?, 0xc000b356e0?, 0x0?})
    net/http/client.go:260 +0x606
net/http.(*Client).send(0xc000c73920, 0xc0015b0000, {0x4d823e8?, 0x427de5?, 0x0?})
    net/http/client.go:181 +0x98
net/http.(*Client).do(0xc000c73920, 0xc0015b0000)
    net/http/client.go:724 +0x912
net/http.(*Client).Do(0x24aa6a0?, 0xc00091e120?)
    net/http/client.go:590 +0x13
github.com/go-telegram-bot-api/telegram-bot-api/v5.(*BotAPI).MakeRequest(0xc000327360, {0x26f4954, 0xa}, 0xc00091e090)
    github.com/go-telegram-bot-api/telegram-bot-api/v5@v5.5.1/bot.go:110 +0x451
github.com/go-telegram-bot-api/telegram-bot-api/v5.(*BotAPI).Request(0x2529c60?, {0x2ff1688, 0xc00091e000})
    github.com/go-telegram-bot-api/telegram-bot-api/v5@v5.5.1/bot.go:336 +0xcf
github.com/go-telegram-bot-api/telegram-bot-api/v5.(*BotAPI).GetUpdates(0xc0013a6f88?, {0x0, 0x0, 0x3e8, {0x0, 0x0, 0x0}})
    github.com/go-telegram-bot-api/telegram-bot-api/v5@v5.5.1/bot.go:405 +0x5d
github.com/go-telegram-bot-api/telegram-bot-api/v5.(*BotAPI).GetUpdatesChan.func1()
    github.com/go-telegram-bot-api/telegram-bot-api/v5@v5.5.1/bot.go:443 +0x78
created by github.com/go-telegram-bot-api/telegram-bot-api/v5.(*BotAPI).GetUpdatesChan in goroutine 265
    github.com/go-telegram-bot-api/telegram-bot-api/v5@v5.5.1/bot.go:434 +0x105

goroutine 263 [IO wait, 2 minutes]:
internal/poll.runtime_pollWait(0x7fb2fe124248, 0x72)
    runtime/netpoll.go:343 +0x85
internal/poll.(*pollDesc).wait(0xc000328000?, 0xc00133c000?, 0x0)
    internal/poll/fd_poll_runtime.go:84 +0x27
internal/poll.(*pollDesc).waitRead(...)
    internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Read(0xc000328000, {0xc00133c000, 0x1800, 0x1800})
    internal/poll/fd_unix.go:164 +0x27a
net.(*netFD).Read(0xc000328000, {0xc00133c000?, 0xc00133c005?, 0x1e?})
    net/fd_posix.go:55 +0x25
net.(*conn).Read(0xc0011e68c8, {0xc00133c000?, 0x0?, 0xc0004a8c38?})
    net/net.go:179 +0x45
crypto/tls.(*atLeastReader).Read(0xc001588e70, {0xc00133c000?, 0xc001588e70?, 0x0?})
    crypto/tls/conn.go:805 +0x3b
bytes.(*Buffer).ReadFrom(0xc0004a8d28, {0x2fe4700, 0xc001588e70})
    bytes/buffer.go:211 +0x98
crypto/tls.(*Conn).readFromUntil(0xc0004a8a80, {0x2fe09e0?, 0xc0011e68c8}, 0x1800?)
    crypto/tls/conn.go:827 +0xde
crypto/tls.(*Conn).readRecordOrCCS(0xc0004a8a80, 0x0)
    crypto/tls/conn.go:625 +0x250
crypto/tls.(*Conn).readRecord(...)
    crypto/tls/conn.go:587
crypto/tls.(*Conn).Read(0xc0004a8a80, {0xc00118d000, 0x1000, 0x400000801?})
    crypto/tls/conn.go:1369 +0x158
bufio.(*Reader).Read(0xc001141980, {0xc00079ae40, 0x9, 0x0?})
    bufio/bufio.go:244 +0x197
io.ReadAtLeast({0x2fe08c0, 0xc001141980}, {0xc00079ae40, 0x9, 0x9}, 0x9)
    io/io.go:335 +0x90
io.ReadFull(...)
    io/io.go:354
net/http.http2readFrameHeader({0xc00079ae40, 0x9, 0x47fbb3?}, {0x2fe08c0?, 0xc001141980?})
    net/http/h2_bundle.go:1635 +0x65
net/http.(*http2Framer).ReadFrame(0xc00079ae00)
    net/http/h2_bundle.go:1899 +0x85
net/http.(*http2clientConnReadLoop).run(0xc0013adf98)
    net/http/h2_bundle.go:9276 +0x11f
net/http.(*http2ClientConn).readLoop(0xc000e54600)
    net/http/h2_bundle.go:9171 +0x65
created by net/http.(*http2Transport).newClientConn in goroutine 262
    net/http/h2_bundle.go:7843 +0xcbe

goroutine 279 [syscall, 747 minutes]:
os/signal.signal_recv()
    runtime/sigqueue.go:152 +0x29
os/signal.loop()
    os/signal/signal_unix.go:23 +0x13
created by os/signal.Notify.func1.1 in goroutine 267
    os/signal/signal.go:151 +0x1f

goroutine 268 [chan receive, 747 minutes]:
github.com/evcc-io/evcc/cmd.runRoot.func2()
    github.com/evcc-io/evcc/cmd/root.go:236 +0x26
created by github.com/evcc-io/evcc/cmd.runRoot in goroutine 1
    github.com/evcc-io/evcc/cmd/root.go:235 +0x10d7

goroutine 267 [chan receive, 747 minutes]:
github.com/evcc-io/evcc/cmd.runRoot.func1()
    github.com/evcc-io/evcc/cmd/root.go:230 +0x94
created by github.com/evcc-io/evcc/cmd.runRoot in goroutine 1
    github.com/evcc-io/evcc/cmd/root.go:226 +0x107d

goroutine 269 [select, 516 minutes]:
github.com/evcc-io/evcc/core.(*Site).Prepare.func1(0x0)
    github.com/evcc-io/evcc/core/site.go:812 +0xfc
created by github.com/evcc-io/evcc/core.(*Site).Prepare in goroutine 1
    github.com/evcc-io/evcc/core/site.go:810 +0xb8

goroutine 312 [semacquire, 387 minutes]:
internal/poll.runtime_Semacquire(0x7fb2fde764e8?)
    runtime/sema.go:67 +0x25
internal/poll.(*fdMutex).rwlock(0xc000052180, 0x70?)
    internal/poll/fd_mutex.go:154 +0xc5
internal/poll.(*FD).writeLock(...)
    internal/poll/fd_mutex.go:239
internal/poll.(*FD).Write(0xc000052180, {0xc000b22200, 0x61, 0x80})
    internal/poll/fd_unix.go:367 +0x65
os.(*File).write(...)
    os/file_posix.go:46
os.(*File).Write(0xc000070048, {0xc000b22200?, 0x61, 0x262f040?})
    os/file.go:183 +0x51
github.com/evcc-io/evcc/util.(*Redactor).Write(0xc0006f6ae0, {0xc000b22200?, 0x649446?, 0xc000dd74a0?})
    github.com/evcc-io/evcc/util/redactor.go:43 +0x1ae
log.(*Logger).output(0xc000c281b0, 0x0, 0x412f05?, 0xc000dd7770)
    log/log.go:245 +0x485
log.(*Logger).Printf(...)
    log/log.go:268
github.com/evcc-io/evcc/util/request.(*roundTripper).RoundTrip(0xc0012e2a98, 0xc0018a4200)
    github.com/evcc-io/evcc/util/request/roundtrip.go:93 +0x15a
net/http.send(0xc0018a4100, {0x2fe0200, 0xc0012e2a98}, {0x1?, 0x49e0b4?, 0x4d521c0?})
    net/http/client.go:260 +0x606
net/http.(*Client).send(0xc0004bf620, 0xc0018a4100, {0xc001300aa8?, 0x427f1c?, 0x4d521c0?})
    net/http/client.go:181 +0x98
net/http.(*Client).do(0xc0004bf620, 0xc0018a4100)
    net/http/client.go:724 +0x912
net/http.(*Client).Do(...)
    net/http/client.go:590
github.com/google/go-github/v32/github.(*Client).Do(0xc0013d0420, {0x30e3ce8, 0xc000606150}, 0xc0018a4000, {0x25da020, 0xc0007ac000})
    github.com/google/go-github/v32@v32.1.0/github/github.go:537 +0x271
github.com/google/go-github/v32/github.(*RepositoriesService).getSingleRelease(0xc0013d04a8, {0x30e3ce8, 0xc000606150}, {0xc0004d00c0?, 0x2?})
    github.com/google/go-github/v32@v32.1.0/github/repos_releases.go:123 +0x89
github.com/google/go-github/v32/github.(*RepositoriesService).GetLatestRelease(0x30e3690?, {0x30e3ce8, 0xc000606150}, {0x26ea96c?, 0x157cd566465391?}, {0x26ddb85, 0x4})
    github.com/google/go-github/v32@v32.1.0/github/repos_releases.go:105 +0xbf
github.com/evcc-io/evcc/server/updater.(*Repo).GetLatestRelease(0xc0004bf800)
    github.com/evcc-io/evcc/server/updater/github.go:59 +0x8f
github.com/evcc-io/evcc/server/updater.(*watch).findReleaseUpdate(0xc0012e2ab0, {0x2fd7700, 0x8})
    github.com/evcc-io/evcc/server/updater/watch.go:47 +0x2d
github.com/evcc-io/evcc/server/updater.(*watch).watchReleases(0xc0012e2ab0, {0x2fd7700, 0x8}, 0x0?)
    github.com/evcc-io/evcc/server/updater/watch.go:32 +0x6f
created by github.com/evcc-io/evcc/server/updater.Run in goroutine 311
    github.com/evcc-io/evcc/server/updater/run.go:20 +0x152

goroutine 334 [chan send, 516 minutes]:
github.com/evcc-io/evcc/core.(*Site).loopLoadpoints(0xc000249800, 0x0?)
    github.com/evcc-io/evcc/core/site.go:831 +0x5b
created by github.com/evcc-io/evcc/core.(*Site).Run in goroutine 331
    github.com/evcc-io/evcc/core/site.go:846 +0x1c5

goroutine 331 [syscall, 516 minutes]:
syscall.Syscall(0xc001000000?, 0xc001ad4520?, 0x80000000000?, 0x7ffff80000000000?)
    syscall/syscall_linux.go:69 +0x25
syscall.write(0xc000052180?, {0xc00062f600?, 0xc001ad4520?, 0xc000209d40?})
    syscall/zsyscall_linux_amd64.go:949 +0x3b
syscall.Write(...)
    syscall/syscall_unix.go:209
internal/poll.ignoringEINTRIO(...)
    internal/poll/fd_unix.go:736
internal/poll.(*FD).Write(0xc000052180, {0xc00062f600, 0x1a6, 0xd80})
    internal/poll/fd_unix.go:380 +0x35f
os.(*File).write(...)
    os/file_posix.go:46
os.(*File).Write(0xc000070048, {0xc00062f600?, 0x1a6, 0xc001ad4760?})
    os/file.go:183 +0x51
github.com/evcc-io/evcc/util.(*Redactor).Write(0xc0008e6160, {0xc00062f600?, 0x23?, 0xd80?})
    github.com/evcc-io/evcc/util/redactor.go:43 +0x1ae
io.(*multiWriter).Write(0xc00062f600?, {0xc00062f600, 0x1a6, 0xd80})
    io/multi.go:85 +0x6d
log.(*Logger).output(0xc0014262a0, 0x0, 0x0?, 0xc001ad49f0)
    log/log.go:245 +0x485
log.(*Logger).Println(0xc000209d40?, {0xc001ad4b58?, 0xc001ad4b68?, 0xc001ad4ba8?})
    log/log.go:276 +0x4b
github.com/evcc-io/evcc/util/request.(*roundTripper).RoundTrip(0xc0009662d0, 0xc001693700)
    github.com/evcc-io/evcc/util/request/roundtrip.go:140 +0xa85
net/http.send(0xc001693600, {0x2fe0200, 0xc0009662d0}, {0x1?, 0x49e0b4?, 0x4d521c0?})
    net/http/client.go:260 +0x606
net/http.(*Client).send(0xc001426510, 0xc001693600, {0xf8?, 0x265d200?, 0x4d521c0?})
    net/http/client.go:181 +0x98
net/http.(*Client).do(0xc001426510, 0xc001693600)
    net/http/client.go:724 +0x912
net/http.(*Client).Do(...)
    net/http/client.go:590
github.com/evcc-io/evcc/util/request.(*Helper).DoJSON(0xc0011e6030, 0xc001ad5178?, {0x21c2980, 0xc0010f2860})
    github.com/evcc-io/evcc/util/request/helper.go:68 +0x94
github.com/evcc-io/evcc/util/request.(*Helper).GetJSON(0x26dfa4c?, {0xc0008aa460, 0x20}, {0x219dd00, 0xc001bbd2b0})
    github.com/evcc-io/evcc/util/request/helper.go:81 +0xe5
github.com/evcc-io/evcc/charger.NewOpenWBPro.func1()
    github.com/evcc-io/evcc/charger/openwb-pro.go:58 +0xdf
github.com/evcc-io/evcc/provider.(*cached[...]).Get(0x0)
    github.com/evcc-io/evcc/provider/cache.go:74 +0x126
github.com/evcc-io/evcc/charger.(*OpenWBPro).CurrentPower(0x1?)
    github.com/evcc-io/evcc/charger/openwb-pro.go:140 +0x62
github.com/evcc-io/evcc/core.(*Loadpoint).UpdateChargePower.func1()
    github.com/evcc-io/evcc/core/loadpoint.go:1213 +0x37
github.com/avast/retry-go/v4.Do(0xc001ad5c78, {0x4d4cce0, 0x2, 0xc001ad5b98?})
    github.com/avast/retry-go/v4@v4.3.4/retry.go:135 +0x5a3
github.com/evcc-io/evcc/core.(*Loadpoint).UpdateChargePower(0xc00081ec00)
    github.com/evcc-io/evcc/core/loadpoint.go:1212 +0x50
github.com/evcc-io/evcc/core.(*Site).update(0xc000249800, {0x311c1b8?, 0xc00081ec00})
    github.com/evcc-io/evcc/core/site.go:723 +0x108
github.com/evcc-io/evcc/core.(*Site).Run(0xc000249800, 0xc0004e04e0, 0x2540be400)
    github.com/evcc-io/evcc/core/site.go:854 +0x2e5
github.com/evcc-io/evcc/cmd.runRoot.func4()
    github.com/evcc-io/evcc/cmd/root.go:282 +0x25
created by github.com/evcc-io/evcc/cmd.runRoot in goroutine 1
    github.com/evcc-io/evcc/cmd/root.go:281 +0x1a13

goroutine 311 [chan receive, 747 minutes]:
github.com/evcc-io/evcc/server/updater.Run(0xc000a75010, {0x0?, 0x0?}, 0xc0004e1800)
    github.com/evcc-io/evcc/server/updater/run.go:22 +0x1d4
created by github.com/evcc-io/evcc/cmd.runRoot in goroutine 1
    github.com/evcc-io/evcc/cmd/root.go:265 +0x1373

/cc @naltatis

andig commented 1 year ago

Problem here is apparently that os.Stdout has been closed. This seems to be a bug in Docker for Synology that I've observed multiple times. Don't think there's much to work around here.

andig commented 1 year ago

Refs https://github.com/golang/go/issues/62199