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

fatal error: concurrent map iteration and map write #522

Closed
RestartFU opened this issue Jun 1, 2022 · 2 comments
Closed

fatal error: concurrent map iteration and map write #522

RestartFU opened this issue Jun 1, 2022 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@RestartFU
Copy link
Contributor

RestartFU commented Jun 1, 2022

fatal error: concurrent map iteration and map write

goroutine 28 [running]:
runtime.throw({0x153111c?, 0x1?})
C:/Program Files/Go/src/runtime/panic.go:992 +0x76 fp=0xc0009e3d28 sp=0xc0009e3cf8 pc=0xf76196
runtime.mapiternext(0xc0009e3e18?)
C:/Program Files/Go/src/runtime/map.go:871 +0x4eb fp=0xc0009e3d98 sp=0xc0009e3d28 pc=0xf4fb0b
github.com/df-mc/dragonfly/server/world.weather.tickLightning({0xc000168000?})
C:/Program Files/Go/pkg/mod/github.com/df-mc/dragonfly@v0.6.3-0.20220530090453-45cae5a85b10/server/world/weather.go:161 +0x113 fp=0xc0009e3e88 sp=0xc0009e3d98 pc=0x11ca593
github.com/df-mc/dragonfly/server/world.ticker.tick({0xc0009e3f90?})
C:/Program Files/Go/pkg/mod/github.com/df-mc/dragonfly@v0.6.3-0.20220530090453-45cae5a85b10/server/world/tick.go:68 +0x206 fp=0xc0009e3f28 sp=0xc0009e3e88 pc=0x11c75c6
github.com/df-mc/dragonfly/server/world.ticker.tickLoop({0x0?})
C:/Program Files/Go/pkg/mod/github.com/df-mc/dragonfly@v0.6.3-0.20220530090453-45cae5a85b10/server/world/tick.go:26 +0xa5 fp=0xc0009e3fc8 sp=0xc0009e3f28 pc=0x11c72a5
github.com/df-mc/dragonfly/server/world.Config.New.func1()
C:/Program Files/Go/pkg/mod/github.com/df-mc/dragonfly@v0.6.3-0.20220530090453-45cae5a85b10/server/world/conf.go:86 +0x26 fp=0xc0009e3fe0 sp=0xc0009e3fc8 pc=0x11c4de6
runtime.goexit()
C:/Program Files/Go/src/runtime/asm_amd64.s:1571 +0x1 fp=0xc0009e3fe8 sp=0xc0009e3fe0 pc=0xfa2a41
created by github.com/df-mc/dragonfly/server/world.Config.New
C:/Program Files/Go/pkg/mod/github.com/df-mc/dragonfly@v0.6.3-0.20220530090453-45cae5a85b10/server/world/conf.go:86 +0x576

goroutine 1 [chan receive]:
github.com/df-mc/dragonfly/server.(*Server).Accept(0xc000e2a800, 0x155b818)
C:/Program Files/Go/pkg/mod/github.com/df-mc/dragonfly@v0.6.3-0.20220530090453-45cae5a85b10/server/server.go:156 +0x3f
github.com/restartfu/hct/hct.(*HCT).Start(0xc000debde8)
C:/Users/Administrator/Documents/HCT/hct/hct.go:34 +0xb1
main.main()
C:/Users/Administrator/Documents/HCT/main.go:20 +0x1d8

goroutine 9 [select]:
github.com/df-mc/goleveldb/leveldb/util.(*BufferPool).drain(0xc0008b5ea0)
C:/Program Files/Go/pkg/mod/github.com/df-mc/goleveldb@v1.1.9/leveldb/util/buffer_pool.go:206 +0xc7
created by github.com/df-mc/goleveldb/leveldb/util.NewBufferPool
C:/Program Files/Go/pkg/mod/github.com/df-mc/goleveldb@v1.1.9/leveldb/util/buffer_pool.go:237 +0x18c

goroutine 10 [select]:
github.com/df-mc/goleveldb/leveldb.(*session).refLoop(0xc001158000)
C:/Program Files/Go/pkg/mod/github.com/df-mc/goleveldb@v1.1.9/leveldb/session_util.go:189 +0x59b
created by github.com/df-mc/goleveldb/leveldb.newSession
C:/Program Files/Go/pkg/mod/github.com/df-mc/goleveldb@v1.1.9/leveldb/session.go:93 +0x2d9

goroutine 24 [select]:
github.com/df-mc/goleveldb/leveldb.(*DB).compactionError(0xc0005fa380)
C:/Program Files/Go/pkg/mod/github.com/df-mc/goleveldb@v1.1.9/leveldb/db_compaction.go:91 +0x158
created by github.com/df-mc/goleveldb/leveldb.openDB
C:/Program Files/Go/pkg/mod/github.com/df-mc/goleveldb@v1.1.9/leveldb/db.go:148 +0x4ea

goroutine 25 [select]:
github.com/df-mc/goleveldb/leveldb.(*DB).mpoolDrain(0xc0005fa380)
C:/Program Files/Go/pkg/mod/github.com/df-mc/goleveldb@v1.1.9/leveldb/db_state.go:101 +0xa8
created by github.com/df-mc/goleveldb/leveldb.openDB
C:/Program Files/Go/pkg/mod/github.com/df-mc/goleveldb@v1.1.9/leveldb/db.go:149 +0x52a

goroutine 26 [select]:
github.com/df-mc/goleveldb/leveldb.(*DB).tCompaction(0xc0005fa380)
C:/Program Files/Go/pkg/mod/github.com/df-mc/goleveldb@v1.1.9/leveldb/db_compaction.go:836 +0x657
created by github.com/df-mc/goleveldb/leveldb.openDB
C:/Program Files/Go/pkg/mod/github.com/df-mc/goleveldb@v1.1.9/leveldb/db.go:155 +0x598

goroutine 27 [select]:
github.com/df-mc/goleveldb/leveldb.(*DB).mCompaction(0xc0005fa380)
C:/Program Files/Go/pkg/mod/github.com/df-mc/goleveldb@v1.1.9/leveldb/db_compaction.go:773 +0x113
created by github.com/df-mc/goleveldb/leveldb.openDB
C:/Program Files/Go/pkg/mod/github.com/df-mc/goleveldb@v1.1.9/leveldb/db.go:156 +0x5d6

goroutine 29 [select]:
github.com/df-mc/dragonfly/server/world.(*World).chunkCacheJanitor(0xc000168000)
C:/Program Files/Go/pkg/mod/github.com/df-mc/dragonfly@v0.6.3-0.20220530090453-45cae5a85b10/server/world/world.go:1311 +0x16b
created by github.com/df-mc/dragonfly/server/world.Config.New
C:/Program Files/Go/pkg/mod/github.com/df-mc/dragonfly@v0.6.3-0.20220530090453-45cae5a85b10/server/world/conf.go:87 +0x5b6

goroutine 30 [select]:
github.com/df-mc/dragonfly/server/world.ticker.tickLoop({0x0?})
C:/Program Files/Go/pkg/mod/github.com/df-mc/dragonfly@v0.6.3-0.20220530090453-45cae5a85b10/server/world/tick.go:24 +0xed
created by github.com/df-mc/dragonfly/server/world.Config.New
C:/Program Files/Go/pkg/mod/github.com/df-mc/dragonfly@v0.6.3-0.20220530090453-45cae5a85b10/server/world/conf.go:86 +0x576

goroutine 31 [select]:
github.com/df-mc/dragonfly/server/world.(*World).chunkCacheJanitor(0xc000168160)
C:/Program Files/Go/pkg/mod/github.com/df-mc/dragonfly@v0.6.3-0.20220530090453-45cae5a85b10/server/world/world.go:1311 +0x16b
created by github.com/df-mc/dragonfly/server/world.Config.New
C:/Program Files/Go/pkg/mod/github.com/df-mc/dragonfly@v0.6.3-0.20220530090453-45cae5a85b10/server/world/conf.go:87 +0x5b6

goroutine 32 [select]:
github.com/df-mc/dragonfly/server/world.ticker.tickLoop({0x0?})
C:/Program Files/Go/pkg/mod/github.com/df-mc/dragonfly@v0.6.3-0.20220530090453-45cae5a85b10/server/world/tick.go:24 +0xed
created by github.com/df-mc/dragonfly/server/world.Config.New
C:/Program Files/Go/pkg/mod/github.com/df-mc/dragonfly@v0.6.3-0.20220530090453-45cae5a85b10/server/world/conf.go:86 +0x576

goroutine 33 [select]:
github.com/df-mc/dragonfly/server/world.(*World).chunkCacheJanitor(0xc0001682c0)
C:/Program Files/Go/pkg/mod/github.com/df-mc/dragonfly@v0.6.3-0.20220530090453-45cae5a85b10/server/world/world.go:1311 +0x16b
created by github.com/df-mc/dragonfly/server/world.Config.New
C:/Program Files/Go/pkg/mod/github.com/df-mc/dragonfly@v0.6.3-0.20220530090453-45cae5a85b10/server/world/conf.go:87 +0x5b6

goroutine 66 [IO wait]:
internal/poll.runtime_pollWait(0x2125eaf48a0, 0x72)
C:/Program Files/Go/src/runtime/netpoll.go:302 +0x89
internal/poll.(*pollDesc).wait(0x78327e71373680c6?, 0xf50dc5?, 0x0)
C:/Program Files/Go/src/internal/poll/fd_poll_runtime.go:83 +0x32
internal/poll.execIO(0xc00084ac98, 0x155c008)
C:/Program Files/Go/src/internal/poll/fd_windows.go:175 +0xe5
internal/poll.(*FD).ReadFromInet6(0xc00084ac80, {0xc0000cec00, 0xc0005e1980?, 0x0?}, 0xc0007c7e20)
C:/Program Files/Go/src/internal/poll/fd_windows.go:639 +0x13e
net.(*netFD).readFromInet6(0xc00084ac80, {0xc0000cec00?, 0x1?, 0xf539c5?}, 0xc000366930?)
C:/Program Files/Go/src/net/fd_posix.go:72 +0x29
net.(*UDPConn).readFrom(0xc000600400?, {0xc0000cec00?, 0x0?, 0xc0007c7ef8?}, 0xc000a1e810)
C:/Program Files/Go/src/net/udpsock_posix.go:59 +0x85
net.(*UDPConn).readFromUDP(0xc000006100, {0xc0000cec00?, 0xf4d467?, 0x28?}, 0x14a8b60?)
C:/Program Files/Go/src/net/udpsock.go:149 +0x31
net.(*UDPConn).ReadFrom(0xc0005e2280?, {0xc0000cec00, 0x5dc, 0x5dc})
C:/Program Files/Go/src/net/udpsock.go:158 +0x50
github.com/sandertv/go-raknet.(*Listener).listen(0xc0005e2280)
C:/Program Files/Go/pkg/mod/github.com/sandertv/go-raknet@v1.10.9/listener.go:140 +0xb3
created by github.com/sandertv/go-raknet.ListenConfig.Listen
C:/Program Files/Go/pkg/mod/github.com/sandertv/go-raknet@v1.10.9/listener.go:76 +0x296

goroutine 67 [chan receive]:
github.com/sandertv/go-raknet.(*Listener).Accept(0xc0005e8000?)
C:/Program Files/Go/pkg/mod/github.com/sandertv/go-raknet@v1.10.9/listener.go:94 +0x2f
github.com/sandertv/gophertunnel/minecraft.(*Listener).listen(0xc0005e8000)
C:/Program Files/Go/pkg/mod/github.com/sandertv/gophertunnel@v1.19.13/minecraft/listener.go:194 +0xc2
created by github.com/sandertv/gophertunnel/minecraft.ListenConfig.Listen
C:/Program Files/Go/pkg/mod/github.com/sandertv/gophertunnel@v1.19.13/minecraft/listener.go:111 +0x3e5

goroutine 68 [chan receive]:
github.com/sandertv/gophertunnel/minecraft.(*Listener).Accept(0xc0005e8000)
C:/Program Files/Go/pkg/mod/github.com/sandertv/gophertunnel@v1.19.13/minecraft/listener.go:131 +0x37
github.com/df-mc/dragonfly/server.listener.Accept({0x15fea50?})
C:/Program Files/Go/pkg/mod/github.com/df-mc/dragonfly@v0.6.3-0.20220530090453-45cae5a85b10/server/listener.go:29 +0x19
github.com/df-mc/dragonfly/server.(*Server).Listen.func1()
C:/Program Files/Go/pkg/mod/github.com/df-mc/dragonfly@v0.6.3-0.20220530090453-45cae5a85b10/server/server.go:361 +0x77
created by github.com/df-mc/dragonfly/server.(*Server).Listen
C:/Program Files/Go/pkg/mod/github.com/df-mc/dragonfly@v0.6.3-0.20220530090453-45cae5a85b10/server/server.go:358 +0x1ce

goroutine 51 [select]:
github.com/sandertv/gophertunnel/minecraft.(*Listener).listen.func1()
C:/Program Files/Go/pkg/mod/github.com/sandertv/gophertunnel@v1.19.13/minecraft/listener.go:180 +0xcc
created by github.com/sandertv/gophertunnel/minecraft.(*Listener).listen
C:/Program Files/Go/pkg/mod/github.com/sandertv/gophertunnel@v1.19.13/minecraft/listener.go:176 +0x70

goroutine 69 [semacquire]:
sync.runtime_Semacquire(0x0?)
C:/Program Files/Go/src/runtime/sema.go:56 +0x25
sync.(*WaitGroup).Wait(0x0?)
C:/Program Files/Go/src/sync/waitgroup.go:136 +0x52
github.com/df-mc/dragonfly/server.(*Server).wait(0xc000e2a800)
C:/Program Files/Go/pkg/mod/github.com/df-mc/dragonfly@v0.6.3-0.20220530090453-45cae5a85b10/server/server.go:450 +0x2a
created by github.com/df-mc/dragonfly/server.(*Server).Start
C:/Program Files/Go/pkg/mod/github.com/df-mc/dragonfly@v0.6.3-0.20220530090453-45cae5a85b10/server/server.go:203 +0xda

goroutine 70 [select]:
github.com/sandertv/go-raknet.(*Conn).startTicking(0xc000858000)
C:/Program Files/Go/pkg/mod/github.com/sandertv/go-raknet@v1.10.9/conn.go:118 +0x125
created by github.com/sandertv/go-raknet.newConn
C:/Program Files/Go/pkg/mod/github.com/sandertv/go-raknet@v1.10.9/conn.go:103 +0x54b

goroutine 52 [chan receive]:
github.com/sandertv/gophertunnel/minecraft.newConn.func1()
C:/Program Files/Go/pkg/mod/github.com/sandertv/gophertunnel@v1.19.13/minecraft/conn.go:155 +0x8a
created by github.com/sandertv/gophertunnel/minecraft.newConn
C:/Program Files/Go/pkg/mod/github.com/sandertv/gophertunnel@v1.19.13/minecraft/conn.go:152 +0x54d

goroutine 53 [select]:
github.com/sandertv/go-raknet.(*Conn).ReadPacket(0xc000858000)
C:/Program Files/Go/pkg/mod/github.com/sandertv/go-raknet@v1.10.9/conn.go:292 +0x85
github.com/sandertv/gophertunnel/minecraft/protocol/packet.(*Decoder).Decode(0xc000f93900)
C:/Program Files/Go/pkg/mod/github.com/sandertv/gophertunnel@v1.19.13/minecraft/protocol/packet/decoder.go:82 +0x44
github.com/sandertv/gophertunnel/minecraft.(*Listener).handleConn(0xc0005e8000, 0xc000141400)
C:/Program Files/Go/pkg/mod/github.com/sandertv/gophertunnel@v1.19.13/minecraft/listener.go:247 +0xa5
created by github.com/sandertv/gophertunnel/minecraft.(*Listener).createConn
C:/Program Files/Go/pkg/mod/github.com/sandertv/gophertunnel@v1.19.13/minecraft/listener.go:224 +0x1c5

goroutine 75 [select]:
github.com/sandertv/gophertunnel/minecraft.(*Conn).ReadPacket(0xc000141400)
C:/Program Files/Go/pkg/mod/github.com/sandertv/gophertunnel@v1.19.13/minecraft/conn.go:334 +0x128
github.com/df-mc/dragonfly/server/session.(*Session).handlePackets(0xc0000003c0)
C:/Program Files/Go/pkg/mod/github.com/df-mc/dragonfly@v0.6.3-0.20220530090453-45cae5a85b10/server/session/session.go:298 +0xd3
created by github.com/df-mc/dragonfly/server/session.(*Session).Start
C:/Program Files/Go/pkg/mod/github.com/df-mc/dragonfly@v0.6.3-0.20220530090453-45cae5a85b10/server/session/session.go:215 +0xa5

goroutine 73 [select]:
github.com/sandertv/go-raknet.(*Conn).startTicking(0xc000858100)
C:/Program Files/Go/pkg/mod/github.com/sandertv/go-raknet@v1.10.9/conn.go:118 +0x125
created by github.com/sandertv/go-raknet.newConn
C:/Program Files/Go/pkg/mod/github.com/sandertv/go-raknet@v1.10.9/conn.go:103 +0x54b

goroutine 37 [chan receive]:
github.com/sandertv/gophertunnel/minecraft.newConn.func1()
C:/Program Files/Go/pkg/mod/github.com/sandertv/gophertunnel@v1.19.13/minecraft/conn.go:155 +0x8a
created by github.com/sandertv/gophertunnel/minecraft.newConn
C:/Program Files/Go/pkg/mod/github.com/sandertv/gophertunnel@v1.19.13/minecraft/conn.go:152 +0x54d

goroutine 38 [select]:
github.com/sandertv/go-raknet.(*Conn).ReadPacket(0xc000858100)
C:/Program Files/Go/pkg/mod/github.com/sandertv/go-raknet@v1.10.9/conn.go:292 +0x85
github.com/sandertv/gophertunnel/minecraft/protocol/packet.(*Decoder).Decode(0xc000e2d4f0)
C:/Program Files/Go/pkg/mod/github.com/sandertv/gophertunnel@v1.19.13/minecraft/protocol/packet/decoder.go:82 +0x44
github.com/sandertv/gophertunnel/minecraft.(*Listener).handleConn(0xc0005e8000, 0xc0004e0000)
C:/Program Files/Go/pkg/mod/github.com/sandertv/gophertunnel@v1.19.13/minecraft/listener.go:247 +0xa5
created by github.com/sandertv/gophertunnel/minecraft.(*Listener).createConn
C:/Program Files/Go/pkg/mod/github.com/sandertv/gophertunnel@v1.19.13/minecraft/listener.go:224 +0x1c5

goroutine 55 [select]:
github.com/sandertv/gophertunnel/minecraft.(*Conn).ReadPacket(0xc0004e0000)
C:/Program Files/Go/pkg/mod/github.com/sandertv/gophertunnel@v1.19.13/minecraft/conn.go:334 +0x128
github.com/df-mc/dragonfly/server/session.(*Session).handlePackets(0xc0000001e0)
C:/Program Files/Go/pkg/mod/github.com/df-mc/dragonfly@v0.6.3-0.20220530090453-45cae5a85b10/server/session/session.go:298 +0xd3
created by github.com/df-mc/dragonfly/server/session.(*Session).Start
C:/Program Files/Go/pkg/mod/github.com/df-mc/dragonfly@v0.6.3-0.20220530090453-45cae5a85b10/server/session/session.go:215 +0xa5

goroutine 76 [runnable]:
github.com/df-mc/dragonfly/server/world/chunk.(*PalettedStorage).setPaletteIndex(...)
C:/Program Files/Go/pkg/mod/github.com/df-mc/dragonfly@v0.6.3-0.20220530090453-45cae5a85b10/server/world/chunk/paletted_storage.go:120
github.com/df-mc/dragonfly/server/world/chunk.(*PalettedStorage).resize(0xc000366ac0?, 0xec?)
C:/Program Files/Go/pkg/mod/github.com/df-mc/dragonfly@v0.6.3-0.20220530090453-45cae5a85b10/server/world/chunk/paletted_storage.go:136 +0x268
github.com/df-mc/dragonfly/server/world/chunk.(*PalettedStorage).addNew(0xc000a1ea50?, 0x1?)
C:/Program Files/Go/pkg/mod/github.com/df-mc/dragonfly@v0.6.3-0.20220530090453-45cae5a85b10/server/world/chunk/paletted_storage.go:88 +0xed
github.com/df-mc/dragonfly/server/world/chunk.(*PalettedStorage).Set(0xc000a1ea50, 0x0, 0x50, 0x0, 0xffc30000?)
C:/Program Files/Go/pkg/mod/github.com/df-mc/dragonfly@v0.6.3-0.20220530090453-45cae5a85b10/server/world/chunk/paletted_storage.go:79 +0x57
github.com/df-mc/dragonfly/server/world/chunk.(*Chunk).SetBiome(0xc0006338f0?, 0xf0?, 0x63?, 0xc0?, 0x1aeb?)
C:/Program Files/Go/pkg/mod/github.com/df-mc/dragonfly@v0.6.3-0.20220530090453-45cae5a85b10/server/world/chunk/chunk.go:87 +0x3f
github.com/df-mc/dragonfly/server/world/generator.Flat.GenerateChunk({0x1, {0xc000f7e1f0, 0x4, 0x4}, 0x4}, {0xfffffff9, 0x3}, 0xc0006338f0)
C:/Program Files/Go/pkg/mod/github.com/df-mc/dragonfly@v0.6.3-0.20220530090453-45cae5a85b10/server/world/generator/flat.go:45 +0xcc
github.com/df-mc/dragonfly/server/world.(*World).loadChunk(0xc0001686e0, {0xfffffff9, 0x3})
C:/Program Files/Go/pkg/mod/github.com/df-mc/dragonfly@v0.6.3-0.20220530090453-45cae5a85b10/server/world/world.go:1163 +0x414
github.com/df-mc/dragonfly/server/world.(*World).chunk(0xc0001686e0, {0xfffffff9, 0x3})
C:/Program Files/Go/pkg/mod/github.com/df-mc/dragonfly@v0.6.3-0.20220530090453-45cae5a85b10/server/world/world.go:1110 +0x137
github.com/df-mc/dragonfly/server/world.(*Loader).Load(0xc00013eee0, 0x4)
C:/Program Files/Go/pkg/mod/github.com/df-mc/dragonfly@v0.6.3-0.20220530090453-45cae5a85b10/server/world/loader.go:93 +0xf2
github.com/df-mc/dragonfly/server/session.(*Session).sendChunks(0xc0000003c0)
C:/Program Files/Go/pkg/mod/github.com/df-mc/dragonfly@v0.6.3-0.20220530090453-45cae5a85b10/server/session/session.go:376 +0xef
github.com/df-mc/dragonfly/server/session.(*Session).background(0xc0000003c0)
C:/Program Files/Go/pkg/mod/github.com/df-mc/dragonfly@v0.6.3-0.20220530090453-45cae5a85b10/server/session/session.go:342 +0x145
created by github.com/df-mc/dragonfly/server/session.(*Session).handlePackets
C:/Program Files/Go/pkg/mod/github.com/df-mc/dragonfly@v0.6.3-0.20220530090453-45cae5a85b10/server/session/session.go:285 +0x8a

goroutine 56 [select]:
github.com/df-mc/dragonfly/server/session.(*Session).background(0xc0000001e0)
C:/Program Files/Go/pkg/mod/github.com/df-mc/dragonfly@v0.6.3-0.20220530090453-45cae5a85b10/server/session/session.go:340 +0x125
created by github.com/df-mc/dragonfly/server/session.(*Session).handlePackets
C:/Program Files/Go/pkg/mod/github.com/df-mc/dragonfly@v0.6.3-0.20220530090453-45cae5a85b10/server/session/session.go:285 +0x8a
exit status 2

here is line 34
image
and here is line 20
image

@RestartFU
Copy link
Contributor Author

it seems to happen when I log on with my phone

@JustTalDevelops JustTalDevelops added the bug Something isn't working label Jun 2, 2022
@Sandertv
Copy link
Member

Sandertv commented Jun 2, 2022

Should be "fixed" in 481cca6.

@Sandertv Sandertv closed this as completed Jun 2, 2022
@Sandertv Sandertv added this to the v0.7.0 milestone Jun 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants