SiaFoundation / hostd

The next-generation of Sia storage providing software. More performant. More stable. Support for larger nodes.
https://sia.tech/software/hostd
MIT License
39 stars 11 forks source link

hostd crashed with log on systemd #491

Closed kocoten1992 closed 1 hour ago

kocoten1992 commented 2 hours ago

Current Behavior

I got this error lately and hostd (systemd) just restart..

...skipping...
Oct 23 03:24:15 d1 hostd[11156]: os.OpenFile({0xc00358e108, 0x12}, 0x242, 0x180)
Oct 23 03:24:15 d1 hostd[11156]:         os/file.go:374 +0x3e fp=0xc00338f948 sp=0xc00338f918 pc=0x4ee87e
Oct 23 03:24:15 d1 hostd[11156]: go.sia.tech/siad/persist.SaveJSON.func4({0xc00358e108?, 0x12?}, {0xc0035de000, 0x8692, 0xa000})
Oct 23 03:24:15 d1 hostd[11156]:         go.sia.tech/siad@v1.5.10-0.20230228235644-3059c0b930ca/persist/json.go:323 +0x5e fp=0xc00338fa00 sp=0xc00338f948 pc=0x7f22be
Oct 23 03:24:15 d1 hostd[11156]: go.sia.tech/siad/persist.SaveJSON({{0xf4237c?, 0x1dc?}, {0xf3ad61?, 0xc00338fc08?}}, {0xe1d6a0, 0xc00358a180}, {0xc00358e108, 0x12})
Oct 23 03:24:15 d1 hostd[11156]:         go.sia.tech/siad@v1.5.10-0.20230228235644-3059c0b930ca/persist/json.go:341 +0x656 fp=0xc00338fbb8 sp=0xc00338fa00 pc=0x7f20d6
Oct 23 03:24:15 d1 hostd[11156]: go.sia.tech/siad/modules/gateway.(*Gateway).saveSyncNodes(0xc0000fc248)
Oct 23 03:24:15 d1 hostd[11156]:         go.sia.tech/siad@v1.5.10-0.20230228235644-3059c0b930ca/modules/gateway/persist.go:113 +0x1dd fp=0xc00338fcc8 sp=0xc00338fbb8 pc=0xbb073d
Oct 23 03:24:15 d1 hostd[11156]: go.sia.tech/siad/modules/gateway.(*Gateway).managedConnect(0xc0000fc248, {0xc0008077d0, 0x13})
Oct 23 03:24:15 d1 hostd[11156]:         go.sia.tech/siad@v1.5.10-0.20230228235644-3059c0b930ca/modules/gateway/peers.go:518 +0xaa9 fp=0xc00338feb8 sp=0xc00338fcc8 pc=0xbad7e9
Oct 23 03:24:15 d1 hostd[11156]: go.sia.tech/siad/modules/gateway.(*Gateway).managedPeerManagerConnect(0xc0000fc248, {0xc0008077d0, 0x13})
Oct 23 03:24:15 d1 hostd[11156]:         go.sia.tech/siad@v1.5.10-0.20230228235644-3059c0b930ca/modules/gateway/peersmanager.go:15 +0xa6 fp=0xc00338ff50 sp=0xc00338feb8 pc=0xbaece6
Oct 23 03:24:15 d1 hostd[11156]: go.sia.tech/siad/modules/gateway.(*Gateway).permanentPeerManager.func1({0xc0008077d0, 0x13})
Oct 23 03:24:15 d1 hostd[11156]:         go.sia.tech/siad@v1.5.10-0.20230228235644-3059c0b930ca/modules/gateway/peersmanager.go:150 +0xc9 fp=0xc00338ffc0 sp=0xc00338ff50 pc=0xbaf989
Oct 23 03:24:15 d1 hostd[11156]: go.sia.tech/siad/modules/gateway.(*Gateway).permanentPeerManager.gowrap3()
Oct 23 03:24:15 d1 hostd[11156]:         go.sia.tech/siad@v1.5.10-0.20230228235644-3059c0b930ca/modules/gateway/peersmanager.go:151 +0x28 fp=0xc00338ffe0 sp=0xc00338ffc0 pc=0xbaf888
Oct 23 03:24:15 d1 hostd[11156]: runtime.goexit({})
Oct 23 03:24:15 d1 hostd[11156]:         runtime/asm_amd64.s:1695 +0x1 fp=0xc00338ffe8 sp=0xc00338ffe0 pc=0x4766c1
Oct 23 03:24:15 d1 hostd[11156]: created by go.sia.tech/siad/modules/gateway.(*Gateway).permanentPeerManager in goroutine 14
Oct 23 03:24:15 d1 hostd[11156]:         go.sia.tech/siad@v1.5.10-0.20230228235644-3059c0b930ca/modules/gateway/peersmanager.go:138 +0x650
Oct 23 03:24:15 d1 systemd[1]: hostd.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Oct 23 03:24:15 d1 systemd[1]: hostd.service: Failed with result 'exit-code'.
Oct 23 03:24:30 d1 systemd[1]: hostd.service: Scheduled restart job, restart counter is at 94.
Oct 23 03:24:30 d1 systemd[1]: Stopped hostd.service - hostd: The Next-Gen Sia Host.
Oct 23 03:24:30 d1 systemd[1]: Started hostd.service - hostd: The Next-Gen Sia Host.

Expected Behavior

it should not crash

Steps to Reproduce

I do not have step to reproduce sadly, it just crashed and systemd restart it

Version

v1.1.2

What operating system did the problem occur on (e.g. Ubuntu 22.04, macOS 12.0, Windows 11)?

Debian 12

Anything else?

No response

kocoten1992 commented 1 hour ago

This is error when I try to stop hostd:

Oct 23 03:31:15 d1 hostd[11426]:         gitlab.com/NebulousLabs/monitor@v0.0.0-20191205095550-2b0fd3e1012a/connmonitor.go:59 +0x28 fp=0xc000ea95f0 sp=0xc000ea95c0 pc=0xb9ca28
Oct 23 03:31:15 d1 hostd[11426]: io.ReadAtLeast({0x7f61445f0130, 0xc000a042e8}, {0xc001f74000, 0x8, 0x10008}, 0x8)
Oct 23 03:31:15 d1 hostd[11426]:         io/io.go:335 +0x90 fp=0xc000ea9638 sp=0xc000ea95f0 pc=0x481830
Oct 23 03:31:15 d1 hostd[11426]: io.ReadFull(...)
Oct 23 03:31:15 d1 hostd[11426]:         io/io.go:354
Oct 23 03:31:15 d1 hostd[11426]: go.sia.tech/siad/internal/smux.(*Session).readFrame(0xc000900240, {0xc001f74000, 0x10008, 0x10008})
Oct 23 03:31:15 d1 hostd[11426]:         go.sia.tech/siad@v1.5.10-0.20230228235644-3059c0b930ca/internal/smux/session.go:212 +0x168 fp=0xc000ea9700 sp=0xc000ea9638 pc=0xb9fd68
Oct 23 03:31:15 d1 hostd[11426]: go.sia.tech/siad/internal/smux.(*Session).recvLoop(0xc000900240)
Oct 23 03:31:15 d1 hostd[11426]:         go.sia.tech/siad@v1.5.10-0.20230228235644-3059c0b930ca/internal/smux/session.go:241 +0x6a fp=0xc000ea97c8 sp=0xc000ea9700 pc=0xba028a
Oct 23 03:31:15 d1 hostd[11426]: go.sia.tech/siad/internal/smux.newSession.gowrap1()
Oct 23 03:31:15 d1 hostd[11426]:         go.sia.tech/siad@v1.5.10-0.20230228235644-3059c0b930ca/internal/smux/session.go:67 +0x25 fp=0xc000ea97e0 sp=0xc000ea97c8 pc=0xb9f165
Oct 23 03:31:15 d1 hostd[11426]: runtime.goexit({})
Oct 23 03:31:15 d1 hostd[11426]:         runtime/asm_amd64.s:1695 +0x1 fp=0xc000ea97e8 sp=0xc000ea97e0 pc=0x4766c1
Oct 23 03:31:15 d1 hostd[11426]: created by go.sia.tech/siad/internal/smux.newSession in goroutine 77
Oct 23 03:31:15 d1 hostd[11426]:         go.sia.tech/siad@v1.5.10-0.20230228235644-3059c0b930ca/internal/smux/session.go:67 +0x1b6
Oct 23 03:31:15 d1 hostd[11426]: goroutine 354 gp=0xc000da2000 m=nil [select]:
Oct 23 03:31:15 d1 hostd[11426]: runtime.gopark(0xc000d0a7b0?, 0x2?, 0x5b?, 0x8?, 0xc000d0a79c?)
Oct 23 03:31:15 d1 hostd[11426]:         runtime/proc.go:402 +0xce fp=0xc000d0a648 sp=0xc000d0a628 pc=0x43ebee
Oct 23 03:31:15 d1 hostd[11426]: runtime.selectgo(0xc000d0a7b0, 0xc000d0a798, 0x409112?, 0x0, 0x0?, 0x1)
Oct 23 03:31:15 d1 hostd[11426]:         runtime/select.go:327 +0x725 fp=0xc000d0a768 sp=0xc000d0a648 pc=0x450a25
Oct 23 03:31:15 d1 hostd[11426]: net.(*Dialer).DialContext.func1()
Oct 23 03:31:15 d1 hostd[11426]:         net/dial.go:472 +0x67 fp=0xc000d0a7e0 sp=0xc000d0a768 pc=0x517ae7
Oct 23 03:31:15 d1 hostd[11426]: runtime.goexit({})
Oct 23 03:31:15 d1 hostd[11426]:         runtime/asm_amd64.s:1695 +0x1 fp=0xc000d0a7e8 sp=0xc000d0a7e0 pc=0x4766c1
Oct 23 03:31:15 d1 hostd[11426]: created by net.(*Dialer).DialContext in goroutine 54
Oct 23 03:31:15 d1 hostd[11426]:         net/dial.go:471 +0x2ad
n8maninger commented 1 hour ago

You cut out some of the stack trace, but this looks like a permission or filesystem issue not a bug. If you need support, please use Discord.