ipni / index-provider

📢 Index Provider

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Panic when announcing the same head more than once

gammazero opened this issue · comments

Impoer from car file. Then run provider announce more than once without importing any more cars.

2023/03/15 15:12:25 http: panic serving 127.0.0.1:55526: putting the same entry twice not supported
goroutine 310 [running]:
net/http.(*conn).serve.func1()
        /usr/local/go/src/net/http/server.go:1854 +0xb0
panic({0x103b38340, 0x103dc7da8})
        /usr/local/go/src/runtime/panic.go:890 +0x248
github.com/libp2p/go-libp2p-pubsub/timecache.FirstSeenCache.Add({0x14001c57860?, 0x14001c57890?, 0x20?, 0x140001e8120?}, {0x14000982660, 0x20})
        /Users/ajg/go/pkg/mod/github.com/libp2p/go-libp2p-pubsub@v0.9.0/timecache/first_seen_cache.go:32 +0x264
github.com/libp2p/go-libp2p-pubsub.(*PubSub).markSeen(0x140009026c0, {0x14000982660, 0x20})
        /Users/ajg/go/pkg/mod/github.com/libp2p/go-libp2p-pubsub@v0.9.0/pubsub.go:1002 +0x124
github.com/libp2p/go-libp2p-pubsub.(*validation).validate(0x14001c54a40, {0x0, 0x0, 0x102e8f7b0?}, {0x140000d64b0, 0x26}, 0x14001ccdac0, 0x1)
        /Users/ajg/go/pkg/mod/github.com/libp2p/go-libp2p-pubsub@v0.9.0/validation.go:288 +0xe8
github.com/libp2p/go-libp2p-pubsub.(*validation).PushLocal(0x14001c54a40, 0x14001ccdac0)
        /Users/ajg/go/pkg/mod/github.com/libp2p/go-libp2p-pubsub@v0.9.0/validation.go:225 +0x80
github.com/libp2p/go-libp2p-pubsub.(*Topic).Publish(0x14001c52900, {0x103dda450, 0x1400285b630}, {0x14000047840, 0x3f, 0x40}, {0x0, 0x0, 0x14000ff7601?})
        /Users/ajg/go/pkg/mod/github.com/libp2p/go-libp2p-pubsub@v0.9.0/topic.go:311 +0x53c
github.com/ipni/storetheindex/announce/p2psender.(*Sender).Send(0x1400036c000, {0x103dda450, 0x1400285b630}, {{{0x140009e0150, 0x25}}, {0x14001cc9410, 0x2, 0x2}, {0x0, 0x0, ...}, ...})
        /Users/ajg/go/pkg/mod/github.com/ipni/storetheindex@v0.5.10/announce/p2psender/sender.go:71 +0xd0
github.com/ipni/storetheindex/dagsync/dtsync.(*publisher).announce(0x14000346000, {0x103dda450, 0x1400285b630}, {{0x140009e0150?, 0xf?}}, {0x14001cc93e0, 0x2, 0x102f39744?})
        /Users/ajg/go/pkg/mod/github.com/ipni/storetheindex@v0.5.10/dagsync/dtsync/publisher.go:118 +0x244
github.com/ipni/storetheindex/dagsync/dtsync.(*publisher).UpdateRootWithAddrs(0x140001d3080?, {0x103dda450, 0x1400285b630}, {{0x140009e0150?, 0x14000b1e0d0?}}, {0x14001cc93e0, 0x2, 0x3})
        /Users/ajg/go/pkg/mod/github.com/ipni/storetheindex@v0.5.10/dagsync/dtsync/publisher.go:142 +0x74
github.com/ipni/storetheindex/dagsync/dtsync.(*publisher).UpdateRoot(0x14000346000, {0x103dda450, 0x1400285b630}, {{0x140009e0150?, 0x0?}})
        /Users/ajg/go/pkg/mod/github.com/ipni/storetheindex@v0.5.10/dagsync/dtsync/publisher.go:134 +0x68
github.com/ipni/index-provider/engine.(*Engine).PublishLatest(0x1400037e4d0, {0x103dda450, 0x1400285b630})
        /Users/ajg/protocollabs/ipni/index-provider/engine/engine.go:279 +0xd4
github.com/ipni/index-provider/server/admin/http.(*Server).announceHandler(0x14001c94240, {0x103dd8e50, 0x14000f00000}, 0x1400284e500)
        /Users/ajg/protocollabs/ipni/index-provider/server/admin/http/announce_handler.go:15 +0x84
net/http.HandlerFunc.ServeHTTP(0x14000783ad8?, {0x103dd8e50?, 0x14000f00000?}, 0x10?)
        /usr/local/go/src/net/http/server.go:2122 +0x38
net/http.(*ServeMux).ServeHTTP(0x0?, {0x103dd8e50, 0x14000f00000}, 0x1400284e500)
        /usr/local/go/src/net/http/server.go:2500 +0x13c
net/http.serverHandler.ServeHTTP({0x14001cc91a0?}, {0x103dd8e50, 0x14000f00000}, 0x1400284e500)
        /usr/local/go/src/net/http/server.go:2936 +0x2c0
net/http.(*conn).serve(0x1400283e090, {0x103dda4f8, 0x14001c57a40})
        /usr/local/go/src/net/http/server.go:1995 +0x518
created by net/http.(*Server).Serve
        /usr/local/go/src/net/http/server.go:3089 +0x4e8
Received interrupt signal, shutting down...