Is it valid to query multiple sensors in parallel (from multiple worker coroutines)? In the IPMI v2.0 spec, I see a section about "Previous Sequence Number Tracking". I realize that's probably for handling multi-packet responses, but I was hoping I'd be able to send multiple requests in parallel, and that this library would automatically filter the response packets by their sequence number. But it's not working. Sometimes I get errors like read udp 10.20.170.132:41744->172.22.6.24:623: i/o timeout
, and once I got a big backtrace like this:
panic: crypto/cipher: input not full blocks
goroutine 38 [running]:
crypto/cipher.(*cbcEncrypter).CryptBlocks(0xc0002d0b40, 0xc0002b603d, 0x1c, 0x33, 0xc0002b603d, 0x1c, 0x33)
/usr/lib/go/src/crypto/cipher/cbc.go:59 +0x306
github.com/gebn/bmc/pkg/ipmi.(*AES128CBC).SerializeTo(0xc0002980c0, 0xa8ccd8, 0xc000290190, 0xc000070101, 0x0, 0x0)
/home/lyeager/go/pkg/mod/github.com/gebn/[email protected]/pkg/ipmi/aes_128_cbc.go:110 +0x27a
github.com/google/gopacket.SerializeLayers(0xa8ccd8, 0xc000290190, 0xc000290101, 0xc00007baf0, 0x5, 0x5, 0x0, 0x0)
/home/lyeager/go/pkg/mod/github.com/google/[email protected]/writer.go:210 +0xcd
github.com/gebn/bmc.(*V2Session).buildAndSend.func1(0xc00029cae0, 0xc00029cae0)
/home/lyeager/go/pkg/mod/github.com/gebn/[email protected]/v2session.go:173 +0x1e9
github.com/cenkalti/backoff/v4.RetryNotifyWithTimer(0xc00007bc88, 0xa82dc0, 0xc00029cae0, 0x0, 0xa86470, 0xc00028c2e8, 0x0, 0x0)
/home/lyeager/go/pkg/mod/github.com/cenkalti/backoff/[email protected]/retry.go:55 +0x102
github.com/cenkalti/backoff/v4.RetryNotify(...)
/home/lyeager/go/pkg/mod/github.com/cenkalti/backoff/[email protected]/retry.go:34
github.com/cenkalti/backoff/v4.Retry(...)
/home/lyeager/go/pkg/mod/github.com/cenkalti/backoff/[email protected]/retry.go:28
github.com/gebn/bmc.(*V2Session).buildAndSend(0xc0002bc000, 0xa88480, 0xc00028e1e0, 0xa88870, 0xc0002b4240, 0xc0002d2480, 0x96f980)
/home/lyeager/go/pkg/mod/github.com/gebn/[email protected]/v2session.go:211 +0x3d9
github.com/gebn/bmc.(*V2Session).SendCommand(0xc0002bc000, 0xa88480, 0xc00028e1e0, 0xa88870, 0xc0002b4240, 0xc0002b0d00, 0x0, 0x0)
/home/lyeager/go/pkg/mod/github.com/gebn/[email protected]/v2session.go:120 +0x1ee
github.com/gebn/bmc.(*linearSensorReader).Read(0xc0002b4240, 0xa88480, 0xc00028e1e0, 0xa8f780, 0xc0002bc000, 0x0, 0x0, 0x0)
/home/lyeager/go/pkg/mod/github.com/gebn/[email protected]/sensor_reader.go:80 +0x64
main.poll.func1.2()
/home/lyeager/code/cluster-monitoring/services/bmc-sensor-exporter/main.go:211 +0x2ee
created by main.poll.func1
/home/lyeager/code/cluster-monitoring/services/bmc-sensor-exporter/main.go:222 +0x633
exit status 2
Is this a limitation of your library, or of the IPMI spec? It looks to me like you simply assume that the next UDP packet is the response to your question, rather than parsing the sequence number and doing a "UDP sliding window" or something like that.
.