tsenart / vegeta

HTTP load testing tool and library. It's over 9000!
http://godoc.org/github.com/tsenart/vegeta/lib
MIT License
23.01k stars 1.34k forks source link

Panic in performance test #651

Closed rsevilla87 closed 9 months ago

rsevilla87 commented 9 months ago

Version and Runtime

[root@52112592a5cc /]# vegeta -version
Version: v12.11.0
Commit: e49c367a014978b5b7228d0e2d6bed6c0555e1e3
Runtime: go1.20.6 linux/amd64
Date: 2023-07-24T19:10:47Z+0000

Expected Behaviour

Vegeta working correctly

Actual Behaviour

While running a performance tests consisting of running vegeta from multiple client machines sometimes I ran into the following golang panic. The issues happens intermittently, as I'm running the command below in parallel in more servers.

$ echo GET ${endpoint} | vegeta attack -insecure -max-connections=400 -duration=2m -timeout=10s -keepalive=true -max-body=0 -rate=0 -workers=400 -max-workers=400 | vegeta report -type json
command terminated with exit code 1, stderr: panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x50 pc=0x61b4a4]

goroutine 1457 [running]:
crypto/tls.(*Conn).write(0xc00009f880, {0xc000b5c000?, 0x5?, 0x0?})
        /opt/hostedtoolcache/go/1.20.6/x64/src/crypto/tls/conn.go:923 +0x104
crypto/tls.(*Conn).writeRecordLocked(0xc00009f880, 0x16, {0xc000b5a780, 0x17d, 0x180})
        /opt/hostedtoolcache/go/1.20.6/x64/src/crypto/tls/conn.go:991 +0x354
crypto/tls.(*Conn).writeHandshakeRecord(0xc00009f880, {0xab66d0?, 0xc0005fcc00?}, {0x0, 0x0})
        /opt/hostedtoolcache/go/1.20.6/x64/src/crypto/tls/conn.go:1022 +0x156
crypto/tls.(*Conn).clientHandshake(0xc00009f880, {0xab8b28?, 0xc000b60870})
        /opt/hostedtoolcache/go/1.20.6/x64/src/crypto/tls/handshake_client.go:183 +0x225
crypto/tls.(*Conn).handshakeContext(0xc00009f880, {0xab8b98, 0xc000424090})
        /opt/hostedtoolcache/go/1.20.6/x64/src/crypto/tls/conn.go:1491 +0x32e
crypto/tls.(*Conn).HandshakeContext(...)
        /opt/hostedtoolcache/go/1.20.6/x64/src/crypto/tls/conn.go:1434
net/http.(*persistConn).addTLS.func2()
        /opt/hostedtoolcache/go/1.20.6/x64/src/net/http/transport.go:1544 +0x70
created by net/http.(*persistConn).addTLS
        /opt/hostedtoolcache/go/1.20.6/x64/src/net/http/transport.go:1540 +0x345
2023/10/03 11:59:10 encode: can't detect encoding of \"stdin\"

Steps to Reproduce

Additional Context

tsenart commented 9 months ago

Duplicate of https://github.com/tsenart/vegeta/issues/649 which has been fixed in the latest release.

rsevilla87 commented 9 months ago

Duplicate of #649 which has been fixed in the latest release.

wow!, thanks, didn't realize about it!