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

Vegeta not working with ipv6 hosts #649

Closed romain-neil closed 9 months ago

romain-neil commented 9 months ago

Version and Runtime

Version: v12.11.0
Commit: e49c367a014978b5b7228d0e2d6bed6c0555e1e3
Runtime: go1.20.6 linux/amd64
Date: 2023-07-24T19:10:47Z+0000

Expected Behaviour

I expect to test the loading test of a ipv6 only host

Actual Behaviour

Vegeta crash with the following output :

panic: runtime error: invalid memory address or nil pointer dereference
        panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x6f054a]

goroutine 10 [running]:
net/http.(*persistConn).closeLocked(0xc00008eea0, {0xab4680, 0xc000034c80})
        /opt/hostedtoolcache/go/1.20.6/x64/src/net/http/transport.go:2732 +0x12a
net/http.(*persistConn).close(0xc0000325f8?, {0xab4680?, 0xc000034c80?})
        /opt/hostedtoolcache/go/1.20.6/x64/src/net/http/transport.go:2717 +0xb0
net/http.(*persistConn).readLoop.func1()
        /opt/hostedtoolcache/go/1.20.6/x64/src/net/http/transport.go:2075 +0x2d
panic({0x941b20, 0xe28e80})
        /opt/hostedtoolcache/go/1.20.6/x64/src/runtime/panic.go:884 +0x213
net/http.(*persistConn).Read(0xc00008eea0, {0xc0000f8000?, 0x405c66?, 0x60?})
        /opt/hostedtoolcache/go/1.20.6/x64/src/net/http/transport.go:1943 +0x42
bufio.(*Reader).fill(0xc00006ade0)
        /opt/hostedtoolcache/go/1.20.6/x64/src/bufio/bufio.go:106 +0xff
bufio.(*Reader).Peek(0xc00006ade0, 0x1)
        /opt/hostedtoolcache/go/1.20.6/x64/src/bufio/bufio.go:144 +0x5d
net/http.(*persistConn).readLoop(0xc00008eea0)
        /opt/hostedtoolcache/go/1.20.6/x64/src/net/http/transport.go:2107 +0x1ac
created by net/http.(*Transport).dialConn
        /opt/hostedtoolcache/go/1.20.6/x64/src/net/http/transport.go:1765 +0x16ea

Steps to Reproduce

  1. Run the command : echo "GET http://[ipv6 host or ipv6 litteral]/" | ./vegeta attack -duration=20s -rate=60

Additional Context

The command run with the local ipv4 address of the host, to make a plot.

tsenart commented 9 months ago

Can you try the v12.9.0 release? I bet this was introduced in v12.10.0 with DNS caching.

romain-neil commented 9 months ago

Hello, thanks for the reply. Effectively, vegeta working as expected in v12.9

tsenart commented 9 months ago

New release should fix this: https://github.com/tsenart/vegeta/releases/tag/v12.11.1