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

Boost Slow in API Response Causing Lotus-miner Info Command Timeout #1193

Closed
6 of 11 tasks
William8Work opened this issue Feb 16, 2023 · 4 comments
Closed
6 of 11 tasks
Assignees
Labels

Comments

@William8Work
Copy link

William8Work commented Feb 16, 2023

Checklist

  • This is not a question or a support request. If you have any boost related questions, please ask in the discussion forum.
  • This is not a new feature or enhancement request. If it is, please open a new idea discussion instead. New feature and enhancement requests would be entertained by the boost team after a thorough discussion only.
  • I have searched on the issue tracker and the discussion forum, and there is no existing related issue or discussion.
  • I am running the Latest release, or the most recent RC(release canadiate) for the upcoming release or the dev branch(master), or have an issue updating to any of these.
  • I did not make any code changes to boost.

Boost component

  • boost daemon - storage providers
  • boost client
  • boost UI
  • boost data-transfer
  • boost index-provider
  • Other

Boost Version

boostd version 1.5.1-rc2+git.2c5604e
boost version 1.5.1-rc2+git.2c5604e

Describe the Bug

once a while, the lotus-miner info command errors out on getting information back from boost API.

Lotus-miner info command

Workers: Seal(10) WdPoSt(0) WinPoSt(0)
ERROR: %!s(PANIC=Error method: runtime error: invalid memory address or nil pointer dereference)

Logging Information

whenever that lotus-miner info command erroring out, there is a corresponding error entry in boost log:


Boost log:
2023-02-14T10:55:05.891-0800    ERROR   rpc     go-jsonrpc@v0.0.0-20221118154859-f3f8e9b1cb11/websocket.go:129  handle me:writev tcp4 10.1.18.168:8787->10.1.18.180:45346: writev: connection reset by peer


### Repo Steps

This happens frequently when both miner and boost are stopped, then restart miner, once it's up and running, start boostd. And then execute the command lotus-miner info.

This also happens once a while when both lotus-miner and boost are running fine, workload are light (no sealing activities). 
...
@namoo-cloud
Copy link

namoo-cloud commented Feb 22, 2023

lotus-miner info

2023-02-22T19:07:15.732+0900 WARN rpc go-jsonrpc@v0.2.1/websocket.go:763 websocket long time no response {"lastAction": "incoming(,3)", "time": 15.084658323}
Retrieval Deals (complete): 462700, 32.73 TiB

@dirkmc dirkmc self-assigned this Feb 24, 2023
@dirkmc
Copy link
Contributor

dirkmc commented Feb 27, 2023

ERROR: %!s(PANIC=Error method: runtime error: invalid memory address or nil pointer dereference)

The error message is printed out by lotus cli helper when an error is returned from a CLI Action:

fmt.Fprintf(os.Stderr, "ERROR: %s\n\n", err)

The format of the error message %!s(PANIC=...nil pointer indicates that fmt.Fprintf encountered a nil pointer when trying to call the Error() method on the golang error object that was passed to it. This is most likely because the error object wraps a nil error. An example golang Test that reproduces this behaviour:

type myerr struct {
	err error
}

func (e *myerr) Error() string {
	// if e.err is nil, this will panic
	return e.err.Error()
}

func TestPrintErr(t *testing.T) {
	fmt.Printf("%s\n", &myerr{})
}

=== RUN   TestPrintErr
%!s(PANIC=Error method: runtime error: invalid memory address or nil pointer dereference)
--- PASS: TestPrintErr (0.00s)

I would like to reassign this bug to go-jsonrpc because it looks like the underlying implementation of go-jsonrpc is returning an error object that wraps a nil error.

@dirkmc
Copy link
Contributor

dirkmc commented Feb 28, 2023

Added an issue to the lotus repo to Remove markets API calls from lotus-miner info

@dirkmc
Copy link
Contributor

dirkmc commented Mar 1, 2023

I opened filecoin-project/go-jsonrpc#96 to track the underlying go-jsonrpc issue.
filecoin-project/lotus#10364 takes care of this issue in lotus.

@dirkmc dirkmc closed this as completed Mar 1, 2023
@github-project-automation github-project-automation bot moved this to Done in Boost Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

No branches or pull requests

3 participants