NebulousLabs / Sia

Blockchain-based marketplace for file storage. Project has moved to GitLab: https://gitlab.com/NebulousLabs/Sia
https://sia.tech
MIT License
2.71k stars 440 forks source link

Sia-UI crashing for host - http: Accept error: accept tcp 127.0.0.1:9980: accept4: too many open files; #3141

Open EvilRedHorse opened 6 years ago

EvilRedHorse commented 6 years ago

BUG REPORT

Sia Daemon v1.3.3 Git Revision 910034d Loading... (0/6) Loading siad... (1/6) Loading gateway... (2/6) Loading consensus... (3/6) Loading transaction pool... (4/6) Loading wallet... (5/6) Loading host... (6/6) Loading renter... Finished loading in 6.328343323 seconds 2018/07/04 01:29:30 http: Accept error: accept tcp 127.0.0.1:9980: accept4: too many open files; retrying in 5ms 2018/07/04 01:29:30 http: Accept error: accept tcp 127.0.0.1:9980: accept4: too many open files; retrying in 5ms 2018/07/04 01:29:30 http: Accept error: accept tcp 127.0.0.1:9980: accept4: too many open files; retrying in 5ms 2018/07/04 01:29:30 http: Accept error: accept tcp 127.0.0.1:9980: accept4: too many open files; retrying in 5ms 2018/07/04 01:29:30 http: Accept error: accept tcp 127.0.0.1:9980: accept4: too many open files; retrying in 5ms 2018/07/04 01:29:30 http: Accept error: accept tcp 127.0.0.1:9980: accept4: too many open files; retrying in 10ms 2018/07/04 01:29:30 http: Accept error: accept tcp 127.0.0.1:9980: accept4: too many open files; retrying in 20ms 2018/07/04 01:29:31 http: Accept error: accept tcp 127.0.0.1:9980: accept4: too many open files; retrying in 40ms 2018/07/04 01:29:31 http: Accept error: accept tcp 127.0.0.1:9980: accept4: too many open files; retrying in 80ms 2018/07/04 01:29:31 http: Accept error: accept tcp 127.0.0.1:9980: accept4: too many open files; retrying in 160ms 2018/07/04 01:29:31 http: Accept error: accept tcp 127.0.0.1:9980: accept4: too many open files; retrying in 5ms 2018/07/04 01:29:31 http: Accept error: accept tcp 127.0.0.1:9980: accept4: too many open files; retrying in 5ms 2018/07/04 01:29:31 http: Accept error: accept tcp 127.0.0.1:9980: accept4: too many open files; retrying in 5ms 2018/07/04 01:29:31 http: Accept error: accept tcp 127.0.0.1:9980: accept4: too many open files; retrying in 5ms 2018/07/04 01:29:31 http: Accept error: accept tcp 127.0.0.1:9980: accept4: too many open files; retrying in 10ms 2018/07/04 01:29:31 http: Accept error: accept tcp 127.0.0.1:9980: accept4: too many open files; retrying in 5ms 2018/07/04 01:29:31 http: Accept error: accept tcp 127.0.0.1:9980: accept4: too many open files; retrying in 5ms 2018/07/04 01:29:31 http: Accept error: accept tcp 127.0.0.1:9980: accept4: too many open files; retrying in 10ms 2018/07/04 01:29:31 http: Accept error: accept tcp 127.0.0.1:9980: accept4: too many open files; retrying in 20ms 2018/07/04 01:29:31 http: Accept error: accept tcp 127.0.0.1:9980: accept4: too many open files; retrying in 40ms 2018/07/04 01:29:31 http: Accept error: accept tcp 127.0.0.1:9980: accept4: too many open files; retrying in 80ms goroutine 579959 [running]: runtime/debug.Stack(0x445df7, 0xc42ec2ecc8, 0xc42ec2ec90) /usr/local/go/src/runtime/debug/stack.go:24 +0xa7 runtime/debug.PrintStack() /usr/local/go/src/runtime/debug/stack.go:16 +0x22 github.com/NebulousLabs/Sia/build.Severe(0xc42ec2eec8, 0x2, 0x2) /home/luke/go/src/github.com/NebulousLabs/Sia/build/critical.go:32 +0x85 github.com/NebulousLabs/Sia/persist.(Logger).Severe(0xc4202b6860, 0xc42ec2eec8, 0x2, 0x2) /home/luke/go/src/github.com/NebulousLabs/Sia/persist/log.go:71 +0xcc github.com/NebulousLabs/Sia/modules/host/contractmanager.(writeAheadLog).commit.func2(0xc42b60d990, 0xc42030a4e8) /home/luke/go/src/github.com/NebulousLabs/Sia/modules/host/contractmanager/writeaheadlogsync.go:215 +0x261 created by github.com/NebulousLabs/Sia/modules/host/contractmanager.(writeAheadLog).commit /home/luke/go/src/github.com/NebulousLabs/Sia/modules/host/contractmanager/writeaheadlogsync.go:198 +0xca Severe error: ERROR: unable to create write-ahead-log: open /home/smc/.config/Sia-UI/sia/host/contractmanager/contractmanager.wal_temp: too many open files goroutine 579959 [running]: runtime/debug.Stack(0x445df7, 0xc42ec2ecc8, 0xc42ec2ec90) /usr/local/go/src/runtime/debug/stack.go:24 +0xa7 runtime/debug.PrintStack() /usr/local/go/src/runtime/debug/stack.go:16 +0x22 github.com/NebulousLabs/Sia/build.Severe(0xc42ec2eea8, 0x2, 0x2) /home/luke/go/src/github.com/NebulousLabs/Sia/build/critical.go:32 +0x85 github.com/NebulousLabs/Sia/persist.(Logger).Severe(0xc4202b6860, 0xc42ec2eea8, 0x2, 0x2) /home/luke/go/src/github.com/NebulousLabs/Sia/persist/log.go:71 +0xcc github.com/NebulousLabs/Sia/modules/host/contractmanager.(writeAheadLog).commit.func2(0xc42b60d990, 0xc42030a4e8) /home/luke/go/src/github.com/NebulousLabs/Sia/modules/host/contractmanager/writeaheadlogsync.go:220 +0x30d created by github.com/NebulousLabs/Sia/modules/host/contractmanager.(writeAheadLog).commit /home/luke/go/src/github.com/NebulousLabs/Sia/modules/host/contractmanager/writeaheadlogsync.go:198 +0xca Severe error: Unable to properly initialize WAL file, crashing to prevent corruption: unable to write WAL metadata: invalid argument goroutine 579959 [running]: runtime/debug.Stack(0x445df7, 0xc42ec2eb40, 0xc42ec2eb08) /usr/local/go/src/runtime/debug/stack.go:24 +0xa7 runtime/debug.PrintStack() /usr/local/go/src/runtime/debug/stack.go:16 +0x22 github.com/NebulousLabs/Sia/build.Severe(0xc42ec2ec48, 0x2, 0x2) /home/luke/go/src/github.com/NebulousLabs/Sia/build/critical.go:32 +0x85 github.com/NebulousLabs/Sia/persist.(Logger).Severe(0xc4202b6860, 0xc42ec2ec48, 0x2, 0x2) /home/luke/go/src/github.com/NebulousLabs/Sia/persist/log.go:71 +0xcc github.com/NebulousLabs/Sia/modules/host/contractmanager.(writeAheadLog).appendChange(0xc42030a4e8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...) /home/luke/go/src/github.com/NebulousLabs/Sia/modules/host/contractmanager/writeaheadlog.go:153 +0x294 github.com/NebulousLabs/Sia/modules/host/contractmanager.(writeAheadLog).commit.func2(0xc42b60d990, 0xc42030a4e8) /home/luke/go/src/github.com/NebulousLabs/Sia/modules/host/contractmanager/writeaheadlogsync.go:224 +0x3d9 created by github.com/NebulousLabs/Sia/modules/host/contractmanager.(writeAheadLog).commit /home/luke/go/src/github.com/NebulousLabs/Sia/modules/host/contractmanager/writeaheadlogsync.go:198 +0xca Severe error: Unable to write state change to WAL: invalid argument panic: unable to append a change to the WAL, crashing to prevent corruption

goroutine 579959 [running]: github.com/NebulousLabs/Sia/modules/host/contractmanager.(writeAheadLog).appendChange(0xc42030a4e8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...) /home/luke/go/src/github.com/NebulousLabs/Sia/modules/host/contractmanager/writeaheadlog.go:154 +0x2b0 github.com/NebulousLabs/Sia/modules/host/contractmanager.(writeAheadLog).commit.func2(0xc42b60d990, 0xc42030a4e8) /home/luke/go/src/github.com/NebulousLabs/Sia/modules/host/contractmanager/writeaheadlogsync.go:224 +0x3d9 created by github.com/NebulousLabs/Sia/modules/host/contractmanager.(*writeAheadLog).commit /home/luke/go/src/github.com/NebulousLabs/Sia/modules/host/contractmanager/writeaheadlogsync.go:198 +0xca

Stack Trace or error message

Expected Behavior to not open too many files and crash, after ulimit increase to nofile... still no change.

How to reproduce it (as minimally and precisely as possible) start host and in 1 to 24h either Sia-UI or likely siad is crashing.

Environment KDE

EvilRedHorse commented 6 years ago

This problem has become less intermittent, response from dev is I should not use for serious hosting, my host reported downtime has become inaccurate. There are 9 days added instead of several hours and now my hosting score is lower than a new host.

lukechampine commented 6 years ago

This is a duplicate of https://github.com/NebulousLabs/Sia/issues/2406. See this StackOverflow answer: https://stackoverflow.com/a/923369

EvilRedHorse commented 6 years ago

The downtime is still increasing even when host is available 24/7. Therefore not the same issue as increasing your hard/soft nofile limit with bug #2406 but likely related.