lavalamp- / ipv666

Golang IPv6 address enumeration
BSD 2-Clause "Simplified" License
355 stars 50 forks source link

Concurrent map write exception #144

Open lavalamp- opened 5 years ago

lavalamp- commented 5 years ago

goroutine 623552856 [running]: runtime.throw(0xa8fe96, 0x26) /snap/go/3739/src/runtime/panic.go:617 +0x72 fp=0xc000058b78 sp=0xc000058b48 pc=0x42ecf2 runtime.mapiternext(0xc000058d60) /snap/go/3739/src/runtime/map.go:860 +0x597 fp=0xc000058c00 sp=0xc000058b78 pc=0x410727 github.com/lavalamp-/ipv666/internal/fanout.generate64NetworkHosts(0xc000076c60, 0xc000058f28, 0xc0069d40f0, 0x0, 0x10) /root/go/src/github.com/lavalamp-/ipv666/internal/fanout/fanout.go:263 +0x1a7 fp=0xc000058ef0 sp=0xc000058c00 pc=0x916667 github.com/lavalamp-/ipv666/internal/fanout.fanOut.func1(0xc00011e701, 0xc000076c60, 0x0, 0xc00011e700, 0xc0069d40f0) /root/go/src/github.com/lavalamp-/ipv666/internal/fanout/fanout.go:98 +0x297 fp=0xc000058fb8 sp=0xc000058ef0 pc=0x9178a7 runtime.goexit() /snap/go/3739/src/runtime/asm_amd64.s:1337 +0x1 fp=0xc000058fc0 sp=0xc000058fb8 pc=0x45af01 created by github.com/lavalamp-/ipv666/internal/fanout.fanOut /root/go/src/github.com/lavalamp-/ipv666/internal/fanout/fanout.go:79 +0x37f

goroutine 1 [select]: github.com/lavalamp-/ipv666/internal/fanout.fanOut(0x7ffc9f686785, 0x3, 0x1, 0x7ffc9f686785, 0x3, 0xc0176147ea, 0x1f4cd71cd4f3) /root/go/src/github.com/lavalamp-/ipv666/internal/fanout/fanout.go:149 +0x55b github.com/lavalamp-/ipv666/internal/fanout.Slash64s(...) /root/go/src/github.com/lavalamp-/ipv666/internal/fanout/fanout.go:23 github.com/lavalamp-/ipv666/internal/statemachine.fanOutSlash64s(0xbf3359ab976147ea, 0x1c587df9e331) /root/go/src/github.com/lavalamp-/ipv666/internal/statemachine/fanout.go:9 +0x63 github.com/lavalamp-/ipv666/internal/statemachine.RunStateMachine(0xbf333b3c60e74224, 0x5cbebb4f) /root/go/src/github.com/lavalamp-/ipv666/internal/statemachine/loop.go:170 +0x60d github.com/lavalamp-/ipv666/internal/app.RunDiscovery() /root/go/src/github.com/lavalamp-/ipv666/internal/app/discover.go:54 +0x2bb github.com/lavalamp-/ipv666/ipv666/cmd/scan.glob..func3(0x16dda20, 0xc000091d20, 0x0, 0x2) /root/go/src/github.com/lavalamp-/ipv666/ipv666/cmd/scan/discover.go:59 +0x20 github.com/spf13/cobra.(Command).execute(0x16dda20, 0xc000091c80, 0x2, 0x2, 0x16dda20, 0xc000091c80) /root/go/src/github.com/spf13/cobra/command.go:766 +0x2ae github.com/spf13/cobra.(Command).ExecuteC(0x16dcbe0, 0x0, 0x15a2aea20ca00f1d, 0xc0000881d8) /root/go/src/github.com/spf13/cobra/command.go:850 +0x2fc github.com/spf13/cobra.(*Command).Execute(...) /root/go/src/github.com/spf13/cobra/command.go:800 github.com/lavalamp-/ipv666/ipv666/cmd.Execute() /root/go/src/github.com/lavalamp-/ipv666/ipv666/cmd/root.go:140 +0x3a main.main() /root/go/src/github.com/lavalamp-/ipv666/ipv666/main.go:27 +0x10e

goroutine 22 [chan receive]: github.com/rcrowley/go-metrics.(*meterArbiter).tick(0x16e7040) /root/go/src/github.com/rcrowley/go-metrics/meter.go:239 +0x31 created by github.com/rcrowley/go-metrics.NewMeter /root/go/src/github.com/rcrowley/go-metrics/meter.go:46 +0x107

goroutine 622881022 [select]: net/http.(persistConn).writeLoop(0xc0001b4360) /snap/go/3739/src/net/http/transport.go:1958 +0x113 created by net/http.(Transport).dialConn /snap/go/3739/src/net/http/transport.go:1358 +0xb0d

goroutine 623552855 [runnable]: syscall.Syscall(0x1, 0x7, 0xc000084d00, 0x16, 0x16, 0x16, 0x0) /snap/go/3739/src/syscall/asm_linux_amd64.s:18 +0x5 syscall.write(0x7, 0xc000084d00, 0x16, 0x100, 0x0, 0x15, 0xc00a8e2360) /snap/go/3739/src/syscall/zsyscall_linux_amd64.go:1005 +0x5a syscall.Write(...) /snap/go/3739/src/syscall/syscall_unix.go:191 internal/poll.(FD).Write(0xc02d3d0d20, 0xc000084d00, 0x16, 0x100, 0x0, 0x0, 0x0) /snap/go/3739/src/internal/poll/fd_unix.go:268 +0x179 os.(File).write(...) /snap/go/3739/src/os/file_unix.go:280 os.(*File).Write(0xc000010070, 0xc000084d00, 0x16, 0x100, 0x1, 0x1, 0x40b1cb) /snap/go/3739/src/os/file.go:145 +0x76 fmt.Fprintf(0x129e800, 0xc000010070, 0xa60e09, 0x3, 0xc016691ea8, 0x1, 0x1, 0xc027e7a810, 0x0, 0x0) /snap/go/3739/src/fmt/print.go:200 +0xa5 github.com/lavalamp-/ipv666/internal/fanout.processReplies(0xc01fe181e0, 0xc0123df080, 0x23, 0xc0069d40f0, 0xc004929000) /root/go/src/github.com/lavalamp-/ipv666/internal/fanout/fanout.go:419 +0x3e4 created by github.com/lavalamp-/ipv666/internal/fanout.fanOut /root/go/src/github.com/lavalamp-/ipv666/internal/fanout/fanout.go:75 +0x30a

goroutine 622881021 [IO wait]: internal/poll.runtime_pollWait(0x7f2d132fbd68, 0x72, 0xffffffffffffffff) /snap/go/3739/src/runtime/netpoll.go:182 +0x56 internal/poll.(pollDesc).wait(0xc01bd6e998, 0x72, 0xe00, 0xe82, 0xffffffffffffffff) /snap/go/3739/src/internal/poll/fd_poll_runtime.go:87 +0x9b internal/poll.(pollDesc).waitRead(...) /snap/go/3739/src/internal/poll/fd_poll_runtime.go:92 internal/poll.(FD).Read(0xc01bd6e980, 0xc026552000, 0xe82, 0xe82, 0x0, 0x0, 0x0) /snap/go/3739/src/internal/poll/fd_unix.go:169 +0x19b net.(netFD).Read(0xc01bd6e980, 0xc026552000, 0xe82, 0xe82, 0x203001, 0x0, 0xc000000032) /snap/go/3739/src/net/fd_unix.go:202 +0x4f net.(conn).Read(0xc00b3b6008, 0xc026552000, 0xe82, 0xe82, 0x0, 0x0, 0x0) /snap/go/3739/src/net/net.go:177 +0x69 crypto/tls.(atLeastReader).Read(0xc00789a0c0, 0xc026552000, 0xe82, 0xe82, 0x16ede80, 0x7f2ce772e550, 0xc024202938) /snap/go/3739/src/crypto/tls/conn.go:761 +0x60 bytes.(Buffer).ReadFrom(0xc000079e58, 0x129dfc0, 0xc00789a0c0, 0x40b4d5, 0x9d2a00, 0xa43b60) /snap/go/3739/src/bytes/buffer.go:207 +0xbd crypto/tls.(Conn).readFromUntil(0xc000079c00, 0x129e560, 0xc00b3b6008, 0x5, 0xc00b3b6008, 0x203001) /snap/go/3739/src/crypto/tls/conn.go:783 +0xf8 crypto/tls.(Conn).readRecordOrCCS(0xc000079c00, 0x11f9600, 0xc000079d38, 0xc024202b88) /snap/go/3739/src/crypto/tls/conn.go:590 +0x125 crypto/tls.(Conn).readRecord(...) /snap/go/3739/src/crypto/tls/conn.go:558 crypto/tls.(Conn).Read(0xc000079c00, 0xc026553000, 0x1000, 0x1000, 0x0, 0x0, 0x0) /snap/go/3739/src/crypto/tls/conn.go:1236 +0x137 net/http.(persistConn).Read(0xc0001b4360, 0xc026553000, 0x1000, 0x1000, 0xc024202c88, 0x406935, 0xc0133ba420) /snap/go/3739/src/net/http/transport.go:1524 +0x7b bufio.(Reader).fill(0xc026542300) /snap/go/3739/src/bufio/bufio.go:100 +0x10f bufio.(Reader).Peek(0xc026542300, 0x1, 0x0, 0x0, 0x1, 0xc000076a00, 0x0) /snap/go/3739/src/bufio/bufio.go:138 +0x4f net/http.(persistConn).readLoop(0xc0001b4360) /snap/go/3739/src/net/http/transport.go:1677 +0x1a3 created by net/http.(Transport).dialConn /snap/go/3739/src/net/http/transport.go:1357 +0xae8

yjj-yjj-yjj commented 1 week ago

hello!If the process of ipv666 is stop unexpectedly,how to continue it?I found a lot of duplicate data if i restart it, how can I make it continue to execute at the position it stopped before?