Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TestMetafeedIndexes is flaky #299

Closed
decentral1se opened this issue Jan 8, 2023 · 4 comments · Fixed by #316
Closed

TestMetafeedIndexes is flaky #299

decentral1se opened this issue Jan 8, 2023 · 4 comments · Fixed by #316
Labels

Comments

@decentral1se
Copy link
Member

decentral1se commented Jan 8, 2023

#237

go test ./ -run TestNullFetched
2023/01/08 21:46:23 saved identity @zayuqnRUEFuRnrPQve7wweX4eY2zJPuCtb
ePS7kdLic=.ed25519 to testrun/TestNullFetched/ali/secret
2023/01/08 21:46:23 saved identity @HdQ6qmbZRmYr3NHNiBDPtt6IYbBhLH/OyQ
qnKCUNvW0=.ed25519 to testrun/TestNullFetched/bob/secret
t=246.559021ms msg="check we got all the messages"
level=debug t=257.486492ms unit=bob unit=gossip fr=<@HdQ6.ed25519> eve
nt=gossiptx n=30 starting=0
level=debug t=294.839186ms unit=ali plugin=gossip event=gossiprx fr=<@
HdQ6.ed25519> starting=0 received=30 took=44.662649ms
t=299.062931ms msg="get a fresh view (should be empty now)"
level=debug t=3.240032681s unit=bob event=update-replicate feed-want-c
ount=1 hops=0 took=370.757µs
level=debug t=3.296277131s unit=ali event=update-replicate feed-want-c
ount=1 hops=0 took=250.247µs
--- FAIL: TestNullFetched (10.38s)
    null_feed_test.go:290: synced feed
    null_feed_test.go:303:
                Error Trace:    /home/d/work/ssb/go-ssb/sbo
t/null_feed_test.go:303
                Error:          Not equal:
                                expected: -255
                                actual  : -1
                Test:           TestNullFetched
                Messages:       TODO: error log value deleted?!
    leakcheck.go:113: Leaked goroutine: goroutine 10 [select]:
        github.com/dgraph-io/ristretto/z.(*AllocatorPool).freeupAlloca
tors(0xc002208168)
                /home/d/go/pkg/mod/github.com/dgraph-io/ris
[email protected]/z/allocator.go:385 +0x150
        created by github.com/dgraph-io/ristretto/z.NewAllocatorPool
                /home/d/go/pkg/mod/github.com/dgraph-io/[email protected]/z/allocator.go:324 +0xc5
    leakcheck.go:113: Leaked goroutine: goroutine 103 [IO wait]:
        internal/poll.runtime_pollWait(0x7fdb501a3000, 0x72)
                /usr/local/go/src/runtime/netpoll.go:302 +0x89
        internal/poll.(*pollDesc).wait(0xc00007a700?, 0x68?, 0x0)
                /usr/local/go/src/internal/poll/fd_poll_runtime.go:83 +0x32
        internal/poll.(*pollDesc).waitRead(...)
                /usr/local/go/src/internal/poll/fd_poll_runtime.go:88
        internal/poll.(*FD).Accept(0xc00007a700)
                /usr/local/go/src/internal/poll/fd_unix.go:614 +0x22c
        net.(*netFD).accept(0xc00007a700)
                /usr/local/go/src/net/fd_unix.go:172 +0x35
        net.(*TCPListener).accept(0xc00014c2d0)
                /usr/local/go/src/net/tcpsock_posix.go:139 +0x28
        net.(*TCPListener).Accept(0xc00014c2d0)
                /usr/local/go/src/net/tcpsock.go:288 +0x3d
        github.com/ssbc/go-netwrap.(*listener).Accept(0xc00013c200)
                /home/d/go/pkg/mod/github.com/ssbc/[email protected]/listener.go:60 +0x3e
        github.com/ssbc/go-ssb/network.(*Node).Serve.func3()
                /home/d/work/ssb/go-ssb/network/new.go:414 +0xf1
        created by github.com/ssbc/go-ssb/network.(*Node).Serve
                /home/d/work/ssb/go-ssb/network/new.go:405 +0x52a
    leakcheck.go:113: Leaked goroutine: goroutine 11 [select]:
        github.com/dgraph-io/ristretto.(*defaultPolicy).processItems(0xc002202800)
                /home/d/go/pkg/mod/github.com/dgraph-io/[email protected]/policy.go:102 +0x91
        created by github.com/dgraph-io/ristretto.newDefaultPolicy
                /home/d/go/pkg/mod/github.com/dgraph-io/[email protected]/policy.go:86 +0x156
    leakcheck.go:113: Leaked goroutine: goroutine 114 [select]:
        github.com/dgraph-io/badger/v3.(*levelsController).runCompactor(0xc0022e43f0, 0x3, 0xc0023f5830)
                /home/d/go/pkg/mod/github.com/dgraph-io/badger/[email protected]/levels.go:508 +0x30d
        created by github.com/dgraph-io/badger/v3.(*levelsController).startCompact
                /home/d/go/pkg/mod/github.com/dgraph-io/badger/[email protected]/levels.go:354 +0x4e
    leakcheck.go:113: Leaked goroutine: goroutine 115 [chan receive]:
        github.com/dgraph-io/badger/v3.(*DB).flushMemtable(0xc00222b200, 0x0?)
                /home/d/go/pkg/mod/github.com/dgraph-io/badger/[email protected]/db.go:1078 +0xb2
        github.com/dgraph-io/badger/v3.Open.func5()
                /home/d/go/pkg/mod/github.com/dgraph-io/badger/[email protected]/db.go:357 +0x25
        created by github.com/dgraph-io/badger/v3.Open
                /home/d/go/pkg/mod/github.com/dgraph-io/badger/[email protected]/db.go:356 +0x107c
    leakcheck.go:113: Leaked goroutine: goroutine 116 [select]:
        github.com/dgraph-io/badger/v3.(*vlogThreshold).listenForValueThresholdUpdate(0xc002215900)
                /home/d/go/pkg/mod/github.com/dgraph-io/badger/[email protected]/value.go:1172 +0x11a
        created by github.com/dgraph-io/badger/v3.Open
                /home/d/go/pkg/mod/github.com/dgraph-io/badger/[email protected]/db.go:380 +0x16dc
    leakcheck.go:113: Leaked goroutine: goroutine 117 [select]:
        github.com/dgraph-io/badger/v3.(*DB).doWrites(0xc00222b200, 0xc0023f58f0)
                /home/d/go/pkg/mod/github.com/dgraph-io/badger/[email protected]/db.go:900 +0x236
        created by github.com/dgraph-io/badger/v3.Open
                /home/d/go/pkg/mod/github.com/dgraph-io/badger/[email protected]/db.go:387 +0x179c
    leakcheck.go:113: Leaked goroutine: goroutine 118 [chan receive]:
        github.com/dgraph-io/badger/v3.(*valueLog).waitOnGC(0xc00222b3f8, 0x0?)
                /home/d/go/pkg/mod/github.com/dgraph-io/badger/[email protected]/value.go:1079 +0x7d
        created by github.com/dgraph-io/badger/v3.Open
                /home/d/go/pkg/mod/github.com/dgraph-io/badger/[email protected]/db.go:391 +0x185b
    leakcheck.go:113: Leaked goroutine: goroutine 119 [select]:
        github.com/dgraph-io/badger/v3.(*publisher).listenForUpdates(0xc002212120, 0xc0023f5950)
                /home/d/go/pkg/mod/github.com/dgraph-io/badger/[email protected]/publisher.go:73 +0x150
        created by github.com/dgraph-io/badger/v3.Open
                /home/d/go/pkg/mod/github.com/dgraph-io/badger/[email protected]/db.go:395 +0x190a
    leakcheck.go:113: Leaked goroutine: goroutine 12 [select]:
        github.com/dgraph-io/ristretto.(*Cache).processItems(0xc00007a100)
                /home/d/go/pkg/mod/github.com/dgraph-io/[email protected]/cache.go:452 +0x15e
        created by github.com/dgraph-io/ristretto.NewCache
                /home/d/go/pkg/mod/github.com/dgraph-io/[email protected]/cache.go:207 +0x696
    leakcheck.go:113: Leaked goroutine: goroutine 120 [select]:
        github.com/ssbc/margaret/multilog/roaring.(*MultiLog).writeBatches(0xc000151450)
                /home/d/go/pkg/mod/github.com/ssbc/[email protected]/multilog/roaring/multilog.go:46 +0x8e
        created by github.com/ssbc/margaret/multilog/roaring.NewStore
                /home/d/go/pkg/mod/github.com/ssbc/[email protected]/multilog/roaring/multilog.go:40 +0x1b6
    leakcheck.go:113: Leaked goroutine: goroutine 121 [select]:
        github.com/ssbc/margaret/multilog/roaring.(*MultiLog).writeBatches(0xc0001514f0)
                /home/d/go/pkg/mod/github.com/ssbc/[email protected]/multilog/roaring/multilog.go:46 +0x8e
        created by github.com/ssbc/margaret/multilog/roaring.NewStore
                /home/d/go/pkg/mod/github.com/ssbc/[email protected]/multilog/roaring/multilog.go:40 +0x1b6
    leakcheck.go:113: Leaked goroutine: goroutine 122 [select]:
        github.com/ssbc/margaret/multilog/roaring.(*MultiLog).writeBatches(0xc000151590)
                /home/d/go/pkg/mod/github.com/ssbc/[email protected]/multilog/roaring/multilog.go:46 +0x8e
        created by github.com/ssbc/margaret/multilog/roaring.NewStore
                /home/d/go/pkg/mod/github.com/ssbc/[email protected]/multilog/roaring/multilog.go:40 +0x1b6
    leakcheck.go:113: Leaked goroutine: goroutine 123 [select]:
        github.com/ssbc/margaret/multilog/roaring.(*MultiLog).writeBatches(0xc000151630)
                /home/d/go/pkg/mod/github.com/ssbc/[email protected]/multilog/roaring/multilog.go:46 +0x8e
        created by github.com/ssbc/margaret/multilog/roaring.NewStore
                /home/d/go/pkg/mod/github.com/ssbc/[email protected]/multilog/roaring/multilog.go:40 +0x1b6
    leakcheck.go:113: Leaked goroutine: goroutine 124 [select]:
        github.com/ssbc/margaret/indexes/badger.(*index).writeBatches(0xc002221220)
                /home/d/go/pkg/mod/github.com/ssbc/[email protected]/indexes/badger/index.go:178 +0xa7
        created by github.com/ssbc/margaret/indexes/badger.newIndex
                /home/d/go/pkg/mod/github.com/ssbc/[email protected]/indexes/badger/index.go:102 +0x2a5
    leakcheck.go:113: Leaked goroutine: goroutine 125 [select]:
        github.com/ssbc/margaret/offset2.(*offsetQuery).Push(0xc002191260, {0xffc500, 0xc002375800}, {0x7fdb5017afb8?, 0xc00000f7e8?})
                /home/d/go/pkg/mod/github.com/ssbc/[email protected]/offset2/qry.go:202 +0xc9
        github.com/ssbc/go-luigi.Pump({0xffc500, 0xc002375800}, {0x7fdb5017afb8?, 0xc00000f7e8?}, {0xff5d20, 0xc002191260})
                /home/d/go/pkg/mod/github.com/ssbc/[email protected]/stream.go:56 +0x82
        github.com/ssbc/go-ssb/sbot.(*Sbot).serveIndexFrom.func1()
                /home/d/work/ssb/go-ssb/sbot/indexes.go:202 +0xa05
        golang.org/x/sync/errgroup.(*Group).Go.func1()
                /home/d/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:75 +0x64
        created by golang.org/x/sync/errgroup.(*Group).Go
                /home/d/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:72 +0xa5
    leakcheck.go:113: Leaked goroutine: goroutine 126 [select]:
        github.com/ssbc/margaret/indexes/badger.(*index).writeBatches(0xc002221400)
                /home/d/go/pkg/mod/github.com/ssbc/[email protected]/indexes/badger/index.go:178 +0xa7
        created by github.com/ssbc/margaret/indexes/badger.newIndex
                /home/d/go/pkg/mod/github.com/ssbc/[email protected]/indexes/badger/index.go:102 +0x2a5
    leakcheck.go:113: Leaked goroutine: goroutine 127 [select]:
        github.com/ssbc/margaret/multilog/roaring.(*MultiLog).writeBatches(0xc0001518b0)
                /home/d/go/pkg/mod/github.com/ssbc/[email protected]/multilog/roaring/multilog.go:46 +0x8e
        created by github.com/ssbc/margaret/multilog/roaring.NewStore
                /home/d/go/pkg/mod/github.com/ssbc/[email protected]/multilog/roaring/multilog.go:40 +0x1b6
    leakcheck.go:113: Leaked goroutine: goroutine 128 [select]:
        github.com/ssbc/margaret/offset2.(*offsetQuery).Push(0xc0021916e0, {0xffc500, 0xc002375800}, {0x7fdb5017b060?, 0xc002230240?})
                /home/d/go/pkg/mod/github.com/ssbc/[email protected]/offset2/qry.go:202 +0xc9
        github.com/ssbc/go-luigi.Pump({0xffc500, 0xc002375800}, {0x7fdb5017b060?, 0xc002230240?}, {0xff5d20, 0xc0021916e0})
                /home/d/go/pkg/mod/github.com/ssbc/[email protected]/stream.go:56 +0x82
        github.com/ssbc/go-ssb/sbot.(*Sbot).serveIndexFrom.func1()
                /home/d/work/ssb/go-ssb/sbot/indexes.go:202 +0xa05
        golang.org/x/sync/errgroup.(*Group).Go.func1()
                /home/d/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:75 +0x64
        created by golang.org/x/sync/errgroup.(*Group).Go
                /home/d/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:72 +0xa5
    leakcheck.go:113: Leaked goroutine: goroutine 129 [select]:
        github.com/ssbc/margaret/indexes/badger.(*index).writeBatches(0xc002221720)
                /home/d/go/pkg/mod/github.com/ssbc/[email protected]/indexes/badger/index.go:178 +0xa7
        created by github.com/ssbc/margaret/indexes/badger.newIndex
                /home/d/go/pkg/mod/github.com/ssbc/[email protected]/indexes/badger/index.go:102 +0x2a5
    leakcheck.go:113: Leaked goroutine: goroutine 13 [select]:
        github.com/dgraph-io/badger/v3.(*DB).monitorCache(0xc000035b00, 0xc002418a50)
                /home/d/go/pkg/mod/github.com/dgraph-io/badger/[email protected]/db.go:469 +0x18a
        created by github.com/dgraph-io/badger/v3.Open
                /home/d/go/pkg/mod/github.com/dgraph-io/badger/[email protected]/db.go:311 +0xc8b
    leakcheck.go:113: Leaked goroutine: goroutine 130 [select]:
        github.com/ssbc/margaret/multilog/roaring.(*query).livequery(0xc0001365d0, {0xffc500, 0xc002375800})
                /home/d/go/pkg/mod/github.com/ssbc/[email protected]/multilog/roaring/qry.go:158 +0xe7
        github.com/ssbc/margaret/multilog/roaring.(*query).Next(0xc0001365d0, {0xffc500, 0xc002375800})
                /home/d/go/pkg/mod/github.com/ssbc/[email protected]/multilog/roaring/qry.go:126 +0x328
        github.com/ssbc/go-luigi/mfr.(*srcMap).Next(0xc002198318, {0xffc500, 0xc002375800})
                /home/d/go/pkg/mod/github.com/ssbc/[email protected]/mfr/map.go:58 +0x33
        github.com/ssbc/go-luigi.Pump({0xffc500, 0xc002375800}, {0x7fdb5017afb8?, 0xc00000f8c0?}, {0xff5800, 0xc002198318})
                /home/d/go/pkg/mod/github.com/ssbc/[email protected]/stream.go:60 +0xac
        github.com/ssbc/go-ssb/sbot.(*Sbot).serveIndexFrom.func1()
                /home/d/work/ssb/go-ssb/sbot/indexes.go:202 +0xa05
        golang.org/x/sync/errgroup.(*Group).Go.func1()
                /home/d/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:75 +0x64
        created by golang.org/x/sync/errgroup.(*Group).Go
                /home/d/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:72 +0xa5
    leakcheck.go:113: Leaked goroutine: goroutine 131 [select]:
        github.com/ssbc/margaret/indexes/badger.(*index).writeBatches(0xc002221860)
                /home/d/go/pkg/mod/github.com/ssbc/[email protected]/indexes/badger/index.go:178 +0xa7
        created by github.com/ssbc/margaret/indexes/badger.newIndex
                /home/d/go/pkg/mod/github.com/ssbc/[email protected]/indexes/badger/index.go:102 +0x2a5
    leakcheck.go:113: Leaked goroutine: goroutine 132 [select]:
        github.com/ssbc/margaret/multilog/roaring.(*query).livequery(0xc0001366f0, {0xffc500, 0xc002375800})
                /home/d/go/pkg/mod/github.com/ssbc/[email protected]/multilog/roaring/qry.go:158 +0xe7
        github.com/ssbc/margaret/multilog/roaring.(*query).Next(0xc0001366f0, {0xffc500, 0xc002375800})
                /home/d/go/pkg/mod/github.com/ssbc/[email protected]/multilog/roaring/qry.go:126 +0x328
        github.com/ssbc/go-luigi/mfr.(*srcMap).Next(0xc0021983f0, {0xffc500, 0xc002375800})
                /home/d/go/pkg/mod/github.com/ssbc/[email protected]/mfr/map.go:58 +0x33
        github.com/ssbc/go-luigi.Pump({0xffc500, 0xc002375800}, {0x7fdb5017afb8?, 0xc00000f950?}, {0xff5800, 0xc0021983f0})
                /home/d/go/pkg/mod/github.com/ssbc/[email protected]/stream.go:60 +0xac
        github.com/ssbc/go-ssb/sbot.(*Sbot).serveIndexFrom.func1()
                /home/d/work/ssb/go-ssb/sbot/indexes.go:202 +0xa05
        golang.org/x/sync/errgroup.(*Group).Go.func1()
                /home/d/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:75 +0x64
        created by golang.org/x/sync/errgroup.(*Group).Go
                /home/d/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:72 +0xa5
    leakcheck.go:113: Leaked goroutine: goroutine 133 [select]:
        github.com/ssbc/margaret/indexes/badger.(*index).writeBatches(0xc002221a40)
                /home/d/go/pkg/mod/github.com/ssbc/[email protected]/indexes/badger/index.go:178 +0xa7
        created by github.com/ssbc/margaret/indexes/badger.newIndex
                /home/d/go/pkg/mod/github.com/ssbc/[email protected]/indexes/badger/index.go:102 +0x2a5
    leakcheck.go:113: Leaked goroutine: goroutine 134 [select]:
        github.com/ssbc/margaret/multilog/roaring.(*query).livequery(0xc000136810, {0xffc500, 0xc002375800})
                /home/d/go/pkg/mod/github.com/ssbc/[email protected]/multilog/roaring/qry.go:158 +0xe7
        github.com/ssbc/margaret/multilog/roaring.(*query).Next(0xc000136810, {0xffc500, 0xc002375800})
                /home/d/go/pkg/mod/github.com/ssbc/[email protected]/multilog/roaring/qry.go:126 +0x328
        github.com/ssbc/go-luigi/mfr.(*srcMap).Next(0xc0021984c8, {0xffc500, 0xc002375800})
                /home/d/go/pkg/mod/github.com/ssbc/[email protected]/mfr/map.go:58 +0x33
        github.com/ssbc/go-luigi.Pump({0xffc500, 0xc002375800}, {0x7fdb5017afb8?, 0xc00000fa10?}, {0xff5800, 0xc0021984c8})
                /home/d/go/pkg/mod/github.com/ssbc/[email protected]/stream.go:60 +0xac
        github.com/ssbc/go-ssb/sbot.(*Sbot).serveIndexFrom.func1()
                /home/d/work/ssb/go-ssb/sbot/indexes.go:202 +0xa05
        golang.org/x/sync/errgroup.(*Group).Go.func1()
                /home/d/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:75 +0x64
        created by golang.org/x/sync/errgroup.(*Group).Go
                /home/d/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:72 +0xa5
    leakcheck.go:113: Leaked goroutine: goroutine 135 [select]:
        github.com/ssbc/go-ssb/sbot.debounce({0xffc500, 0xc002375800}, 0xb2d05e00, {0xffa110, 0xc002215700}, 0xc002210ae0)
                /home/d/work/ssb/go-ssb/sbot/replicate.go:135 +0x16c
        created by github.com/ssbc/go-ssb/sbot.(*Sbot).newGraphReplicator
                /home/d/work/ssb/go-ssb/sbot/replicate.go:73 +0x3c5
    leakcheck.go:113: Leaked goroutine: goroutine 136 [select]:
        github.com/ssbc/margaret/offset2.(*offsetQuery).Push(0xc000135f80, {0xffc500, 0xc002375800}, {0xff94d0?, 0xc00219c170?})
                /home/d/go/pkg/mod/github.com/ssbc/[email protected]/offset2/qry.go:202 +0xc9
        github.com/ssbc/go-luigi.Pump({0xffc500, 0xc002375800}, {0xff94d0?, 0xc00219c170?}, {0xff5d20, 0xc000135f80})
                /home/d/go/pkg/mod/github.com/ssbc/[email protected]/stream.go:56 +0x82
        github.com/ssbc/go-ssb/plugins/gossip.(*FeedManager).serveLiveFeeds(0xc0022e4850)
                /home/d/work/ssb/go-ssb/plugins/gossip/feed_manager.go:107 +0x168
        created by github.com/ssbc/go-ssb/plugins/gossip.NewFeedManager
                /home/d/work/ssb/go-ssb/plugins/gossip/feed_manager.go:70 +0x1ea
    leakcheck.go:113: Leaked goroutine: goroutine 137 [select]:
        github.com/ssbc/go-ssb/network.(*Node).Serve(0xc0022266c0, {0xffc180?, 0xc002215b40}, {0x0, 0x0, 0x0})
                /home/d/work/ssb/go-ssb/network/new.go:431 +0x76d
        github.com/ssbc/go-ssb/sbot.botServer.Serve.func1()
                /home/d/work/ssb/go-ssb/sbot/util_test.go:28 +0x57
        golang.org/x/sync/errgroup.(*Group).Go.func1()
                /home/d/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:75 +0x64
        created by golang.org/x/sync/errgroup.(*Group).Go
                /home/d/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:72 +0xa5
    leakcheck.go:113: Leaked goroutine: goroutine 150 [IO wait]:
        internal/poll.runtime_pollWait(0x7fdb501a2f10, 0x72)
                /usr/local/go/src/runtime/netpoll.go:302 +0x89
        internal/poll.(*pollDesc).wait(0xc000154b00?, 0x6?, 0x0)
                /usr/local/go/src/internal/poll/fd_poll_runtime.go:83 +0x32
        internal/poll.(*pollDesc).waitRead(...)
                /usr/local/go/src/internal/poll/fd_poll_runtime.go:88
        internal/poll.(*FD).Accept(0xc000154b00)
                /usr/local/go/src/internal/poll/fd_unix.go:614 +0x22c
        net.(*netFD).accept(0xc000154b00)
                /usr/local/go/src/net/fd_unix.go:172 +0x35
        net.(*TCPListener).accept(0xc002198570)
                /usr/local/go/src/net/tcpsock_posix.go:139 +0x28
        net.(*TCPListener).Accept(0xc002198570)
                /usr/local/go/src/net/tcpsock.go:288 +0x3d
        github.com/ssbc/go-netwrap.(*listener).Accept(0xc002202a80)
                /home/d/go/pkg/mod/github.com/ssbc/[email protected]/listener.go:60 +0x3e
        github.com/ssbc/go-ssb/network.(*Node).Serve.func3()
                /home/d/work/ssb/go-ssb/network/new.go:414 +0xf1
        created by github.com/ssbc/go-ssb/network.(*Node).Serve
                /home/d/work/ssb/go-ssb/network/new.go:405 +0x52a
    leakcheck.go:113: Leaked goroutine: goroutine 52 [select]:
        github.com/ssbc/go-ssb/internal/ctxutils.WithError.func2()
                /home/d/work/ssb/go-ssb/internal/ctxutils/withErr.go:31 +0x92
        created by github.com/ssbc/go-ssb/internal/ctxutils.WithError
                /home/d/work/ssb/go-ssb/internal/ctxutils/withErr.go:30 +0x1df
    leakcheck.go:113: Leaked goroutine: goroutine 53 [chan receive]:
        github.com/ssbc/go-ssb/blobstore.(*WantManager).replicateLoop(0xc002221540)
                /home/d/work/ssb/go-ssb/blobstore/wants.go:94 +0x57
        created by github.com/ssbc/go-ssb/blobstore.NewWantManager
                /home/d/work/ssb/go-ssb/blobstore/wants.go:60 +0x30a
    leakcheck.go:113: Leaked goroutine: goroutine 54 [select]:
        github.com/ssbc/margaret/offset2.(*offsetQuery).Push(0xc00007e5a0, {0xffc500, 0xc0023742a0}, {0x7fdb5016ca98?, 0xc00221a3b0?})
                /home/d/go/pkg/mod/github.com/ssbc/[email protected]/offset2/qry.go:202 +0xc9
        github.com/ssbc/go-luigi.Pump({0xffc500, 0xc0023742a0}, {0x7fdb5016ca98?, 0xc00221a3b0?}, {0xff5d20, 0xc00007e5a0})
                /home/d/go/pkg/mod/github.com/ssbc/[email protected]/stream.go:56 +0x82
        github.com/ssbc/go-ssb/sbot.(*Sbot).serveIndexFrom.func1()
                /home/d/work/ssb/go-ssb/sbot/indexes.go:202 +0xa05
        golang.org/x/sync/errgroup.(*Group).Go.func1()
                /home/d/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:75 +0x64
        created by golang.org/x/sync/errgroup.(*Group).Go
                /home/d/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:72 +0xa5
    leakcheck.go:113: Leaked goroutine: goroutine 55 [select]:
        github.com/dgraph-io/badger/v3/y.(*WaterMark).process(0xc002374f90, 0xc002374f60)
                /home/d/go/pkg/mod/github.com/dgraph-io/badger/[email protected]/y/watermark.go:214 +0x285
        created by github.com/dgraph-io/badger/v3/y.(*WaterMark).Init
                /home/d/go/pkg/mod/github.com/dgraph-io/badger/[email protected]/y/watermark.go:72 +0xaa
    leakcheck.go:113: Leaked goroutine: goroutine 56 [select]:
        github.com/dgraph-io/badger/v3/y.(*WaterMark).process(0xc002374fc0, 0xc002374f60)
                /home/d/go/pkg/mod/github.com/dgraph-io/badger/[email protected]/y/watermark.go:214 +0x285
        created by github.com/dgraph-io/badger/v3/y.(*WaterMark).Init
                /home/d/go/pkg/mod/github.com/dgraph-io/badger/[email protected]/y/watermark.go:72 +0xaa
    leakcheck.go:113: Leaked goroutine: goroutine 57 [select]:
        github.com/dgraph-io/badger/v3.(*DB).updateSize(0xc000035b00, 0xc002375200)
                /home/d/go/pkg/mod/github.com/dgraph-io/badger/[email protected]/db.go:1171 +0x158
        created by github.com/dgraph-io/badger/v3.Open
                /home/d/go/pkg/mod/github.com/dgraph-io/badger/[email protected]/db.go:331 +0xe8c
    leakcheck.go:113: Leaked goroutine: goroutine 58 [select]:
        github.com/dgraph-io/badger/v3.(*levelsController).runCompactor(0xc000148000, 0x0, 0xc002374000)
                /home/d/go/pkg/mod/github.com/dgraph-io/badger/[email protected]/levels.go:508 +0x30d
        created by github.com/dgraph-io/badger/v3.(*levelsController).startCompact
                /home/d/go/pkg/mod/github.com/dgraph-io/badger/[email protected]/levels.go:354 +0x4e
    leakcheck.go:113: Leaked goroutine: goroutine 59 [select]:
        github.com/dgraph-io/badger/v3.(*levelsController).runCompactor(0xc000148000, 0x1, 0xc002374000)
                /home/d/go/pkg/mod/github.com/dgraph-io/badger/[email protected]/levels.go:508 +0x30d
        created by github.com/dgraph-io/badger/v3.(*levelsController).startCompact
                /home/d/go/pkg/mod/github.com/dgraph-io/badger/[email protected]/levels.go:354 +0x4e
    leakcheck.go:113: Leaked goroutine: goroutine 60 [select]:
        github.com/dgraph-io/badger/v3.(*levelsController).runCompactor(0xc000148000, 0x2, 0xc002374000)
                /home/d/go/pkg/mod/github.com/dgraph-io/badger/[email protected]/levels.go:508 +0x30d
        created by github.com/dgraph-io/badger/v3.(*levelsController).startCompact
                /home/d/go/pkg/mod/github.com/dgraph-io/badger/[email protected]/levels.go:354 +0x4e
    leakcheck.go:113: Leaked goroutine: goroutine 61 [select]:
        github.com/dgraph-io/badger/v3.(*levelsController).runCompactor(0xc000148000, 0x3, 0xc002374000)
                /home/d/go/pkg/mod/github.com/dgraph-io/badger/[email protected]/levels.go:508 +0x30d
        created by github.com/dgraph-io/badger/v3.(*levelsController).startCompact
                /home/d/go/pkg/mod/github.com/dgraph-io/badger/[email protected]/levels.go:354 +0x4e
    leakcheck.go:113: Leaked goroutine: goroutine 62 [chan receive]:
        github.com/dgraph-io/badger/v3.(*DB).flushMemtable(0xc000035b00, 0xc000058ef0?)
                /home/d/go/pkg/mod/github.com/dgraph-io/badger/[email protected]/db.go:1078 +0xb2
        github.com/dgraph-io/badger/v3.Open.func5()
                /home/d/go/pkg/mod/github.com/dgraph-io/badger/[email protected]/db.go:357 +0x25
        created by github.com/dgraph-io/badger/v3.Open
                /home/d/go/pkg/mod/github.com/dgraph-io/badger/[email protected]/db.go:356 +0x107c
    leakcheck.go:113: Leaked goroutine: goroutine 63 [select]:
        github.com/dgraph-io/badger/v3.(*vlogThreshold).listenForValueThresholdUpdate(0xc002202780)
                /home/d/go/pkg/mod/github.com/dgraph-io/badger/[email protected]/value.go:1172 +0x11a
        created by github.com/dgraph-io/badger/v3.Open
...
@KyleMaas
Copy link
Contributor

I figure I'll work on this one next.

@decentral1se Is there a way to allow me to self-assign issues? I've never had to deal with that kind of thing on a GitHub project before, so I don't know how fine-grained the permissions are.

@KyleMaas
Copy link
Contributor

@decentral1se Okay, so now I'm confused. This line, where this test failed, always has the value of 5 instead of 4:

r.EqualValues(4, idxmsg.Indexed.Sequence)

It seems to be 100% consistent, with or without waiting for indexes. Is it possible that it's actually supposed to be 5 at this point?

@KyleMaas
Copy link
Contributor

I think it's supposed to actually be 5 and 4 was only ever achieved due to a race condition. The reason is that there are five Publish() calls:

_, err = bot.MetaFeeds.Publish(mainFeedRef, refs.NewAboutName(mainFeedRef, "goophy"))

_, err = bot.MetaFeeds.Publish(mainFeedRef, refs.NewContactFollow(rando.ID()))

_, err = bot.MetaFeeds.Publish(mainFeedRef, refs.NewAboutName(mainFeedRef, "goofier"))

_, err = bot.MetaFeeds.Publish(mainFeedRef, refs.NewAboutName(mainFeedRef, "name that will not be named"))

lastContact, err := bot2.MetaFeeds.Publish(mainFeedRef, refs.NewContactFollow(rando.ID()))

As well as CreateSubFeed() and TombstoneIndex(), which both internally call Publish():

mainFeedRef, err := bot.MetaFeeds.CreateSubFeed(mfId, "main", refs.RefAlgoFeedSSB1)

msg, err := metaPublisher.Publish(addMsg)

err = bot.MetaFeeds.TombstoneIndex(mfId, mainFeedRef, "about")

_, err = metaPublisher.Publish(tombstoneMsg)

So...I could be wrong since I don't understand metafeeds fully, but I think the last index message having an index sequence of 5 is correct.

@decentral1se
Copy link
Member Author

@KyleMaas think you have to wait until The Algorithm adds you to the org via https://github.com/ssbc/.github/ and then you have control over issue triage stuff (amongst other magic powers such as commit bit!). I guess leaving a comment is enough for now for doing further coordination.

Nice digging on the test! I'd say go ahead on that change... it's unclear to me what the state of metafeeds is in go-ssb and they're still working on the specs and such in the JS stack, so I'm kinda just 🙈 on this one... seems reasonable to just try to make this pass and move on...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging a pull request may close this issue.

2 participants