Currency might be negative
jkawamoto opened this issue · 8 comments
We got this stack tract. I guess Currency gets negative in updateRevisionOutputs.
goroutine 1818429 [running]:
runtime/debug.Stack(0x450157, 0x0, 0xc001e348b0)
/usr/local/Cellar/go/1.14.4/libexec/src/runtime/debug/stack.go:24 +0x9d
runtime/debug.PrintStack()
/usr/local/Cellar/go/1.14.4/libexec/src/runtime/debug/stack.go:16 +0x22
gitlab.com/NebulousLabs/Sia/build.Critical(0xc001e34968, 0x1, 0x1)
/Users/junpei/pkg/mod/gitlab.com/!nebulous!labs/!sia@v1.4.8/build/critical.go:20 +0xd9
gitlab.com/NebulousLabs/Sia/types.Currency.Sub(0x100c800, 0xc001edbee8, 0x1, 0x1, 0xc001e6a900, 0xc00230be80, 0x1, 0x1, 0x8ae625be92af5a00, 0x0, ...)
/Users/junpei/pkg/mod/gitlab.com/!nebulous!labs/!sia@v1.4.8/types/currency.go:190 +0x14e
lukechampine.com/us/renter/proto.updateRevisionOutputs(0xc001e356a8, 0xc013533600, 0xc00230be80, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x1, ...)
/Users/junpei/pkg/mod/lukechampine.com/us@v0.16.1-0.20200622035559-d9bd75f51730/renter/proto/session.go:754 +0x1e6
lukechampine.com/us/renter/proto.(*Session).RenewAndClearContract(0xc001dc8c00, 0x13e8320, 0xc001ec7ad0, 0x13d4a20, 0xc001ec7ad0, 0xc0018cea00, 0xc002515000, 0x2, 0x7, 0x40e20, ...)
/Users/junpei/pkg/mod/lukechampine.com/us@v0.16.1-0.20200622035559-d9bd75f51730/renter/proto/renew.go:331 +0x155c
lukechampine.com/us/renter/proto.RenewContract(0x13e8320, 0xc001ec7ad0, 0x13d4a20, 0xc001ec7ad0, 0x789823fdbaaea4ea, 0x7105fea3fcb7ef0e, 0x8cf1488de1bb7ae0, 0x5661fc6f389adc5c, 0xc0018cea00, 0x40, ...)
/Users/junpei/pkg/mod/lukechampine.com/us@v0.16.1-0.20200622035559-d9bd75f51730/renter/proto/renew.go:31 +0x271
Hmm. It looks like the host requires a payment of BaseRPCPrice
to complete the RPC, but the renter doesn't have enough. This is probably a bug on both sides: if the contract doesn't have at least BaseRPCPrice
funds left, it should just go to zero.
Panic fixed in #76, but renews will still be rejected until https://gitlab.com/NebulousLabs/Sia/-/merge_requests/4630 is merged.
Found it in our logs again. Is this still a panic?
2020-06-27 01:00:49.323 | failed to renew the contract | RenewAndClearContract: ReadResponse: communication error: expected at least 100000000000000000 to be exchanged, but 25913353428817360 was exchanged: rejected for high paying renter valid output | hosts | 89513ab9-8c27-4a88-af61-3506b6405496 | - | -
-- | -- | -- | -- | -- | -- | --
| 2020-06-27 01:00:49.216 | - | - | - | - | - | goroutine 1851377 [running]:
| 2020-06-27 01:00:49.216 | - | - | - | - | - | runtime/debug.Stack(0x450157, 0x0, 0xc000c0c8b0)
| 2020-06-27 01:00:49.216 | - | - | - | - | - | /usr/local/Cellar/go/1.14.4/libexec/src/runtime/debug/stack.go:24 +0x9d
| 2020-06-27 01:00:49.216 | - | - | - | - | - | runtime/debug.PrintStack()
| 2020-06-27 01:00:49.216 | - | - | - | - | - | /usr/local/Cellar/go/1.14.4/libexec/src/runtime/debug/stack.go:16 +0x22
| 2020-06-27 01:00:49.216 | - | - | - | - | - | gitlab.com/NebulousLabs/Sia/build.Critical(0xc000c0c968, 0x1, 0x1)
| 2020-06-27 01:00:49.216 | - | - | - | - | - | /Users/junpei/pkg/mod/gitlab.com/!nebulous!labs/!sia@v1.4.8/build/critical.go:20 +0xd9
| 2020-06-27 01:00:49.216 | - | - | - | - | - | gitlab.com/NebulousLabs/Sia/types.Currency.Sub(0x100d900, 0xc000e0be58, 0x1, 0x1, 0xc001583200, 0xc000bda6e8, 0x1, 0x1, 0xada89d25750fd000, 0x0, ...)
| 2020-06-27 01:00:49.216 | - | - | - | - | - | /Users/junpei/pkg/mod/gitlab.com/!nebulous!labs/!sia@v1.4.8/types/currency.go:190 +0x14e
| 2020-06-27 01:00:49.216 | - | - | - | - | - | lukechampine.com/us/renter/proto.updateRevisionOutputs(0xc000c0d6a8, 0xc00158d400, 0xc000bda6e8, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x1, ...)
| 2020-06-27 01:00:49.216 | - | - | - | - | - | /Users/junpei/pkg/mod/lukechampine.com/us@v0.16.1-0.20200622035559-d9bd75f51730/renter/proto/session.go:754 +0x1e6
| 2020-06-27 01:00:49.216 | - | - | - | - | - | lukechampine.com/us/renter/proto.(*Session).RenewAndClearContract(0xc000c62b00, 0x13ebd40, 0xc00167ed10, 0x13d8440, 0xc00167ed10, 0xc00187eb00, 0xc0001154c0, 0x2, 0x7, 0x40f41, ...)
| 2020-06-27 01:00:49.216 | - | - | - | - | - | /Users/junpei/pkg/mod/lukechampine.com/us@v0.16.1-0.20200622035559-d9bd75f51730/renter/proto/renew.go:331 +0x155c
| 2020-06-27 01:00:49.216 | - | - | - | - | - | lukechampine.com/us/renter/proto.RenewContract(0x13ebd40, 0xc00167ed10, 0x13d8440, 0xc00167ed10, 0x85355b0202552b5a, 0x6b8ba7e1fd1002af, 0x73f65ad30f504d1f, 0xf6a4a4ea4a32eac4, 0xc00187eb40, 0x40, ...)
| 2020-06-27 01:00:49.216 | - | - | - | - | - | /Users/junpei/pkg/mod/lukechampine.com/us@v0.16.1-0.20200622035559-d9bd75f51730/renter/proto/renew.go:31 +0x271
| 2020-06-27 01:00:49.216 | - | - | - | - | - | github.com/storewise/s3-gateway/pkg/meta.(*SiadClient).RenewContract(0xc00167ed10, 0x13e7900, 0xc00149af00, 0xc00211c8a0, 0xc000183380, 0x0, 0xc0001154c0, 0x2, 0x7, 0x40f41, ...)
| 2020-06-27 01:00:49.216 | - | - | - | - | - | /Users/junpei/src/github.com/storewise/s3-gateway/pkg/meta/siad.go:126 +0x187
| 2020-06-27 01:00:49.216 | - | - | - | - | - | github.com/storewise/s3-gateway/pkg/server.(*contractManager).checkContract(0xc00226a1e0, 0x13e7900, 0xc00149af00, 0xc00211c8a0, 0x40f41, 0x3, 0x0, 0x0)
| 2020-06-27 01:00:49.216 | - | - | - | - | - | /Users/junpei/src/github.com/storewise/s3-gateway/pkg/server/contract.go:231 +0xe45
| 2020-06-27 01:00:49.216 | - | - | - | - | - | github.com/storewise/s3-gateway/pkg/server.(*contractManager).CheckContracts.func1.1(0x43d9d6, 0x114ead8)
| 2020-06-27 01:00:49.216 | - | - | - | - | - | /Users/junpei/src/github.com/storewise/s3-gateway/pkg/server/contract.go:138 +0x94
| 2020-06-27 01:00:49.216 | - | - | - | - | - | golang.org/x/sync/errgroup.(*Group).Go.func1(0xc000b30ff0, 0xc00149b2c0)
| 2020-06-27 01:00:49.216 | - | - | - | - | - | /Users/junpei/pkg/mod/golang.org/x/sync@v0.0.0-20200317015054-43a5402ce75a/errgroup/errgroup.go:57 +0x59
| 2020-06-27 01:00:49.216 | - | - | - | - | - | created by golang.org/x/sync/errgroup.(*Group).Go
| 2020-06-27 01:00:49.216 | - | - | - | - | - | /Users/junpei/pkg/mod/golang.org/x/sync@v0.0.0-20200317015054-43a5402ce75a/errgroup/errgroup.go:54 +0x66
| 2020-06-27 01:00:49.216 | - | - | - | - | - | Critical error: (Sia v1.4.8, Release: standard) negative currency not allowed
| 2020-06-27 01:00:49.216 | - | - | - | - | - | Please submit a bug report here: https://gitlab.com/NebulousLabs/Sia/issues
| 2020-06-27 01:00:49.216 | - | - | - | - | - | goroutine 1851377 [running]:
| 2020-06-27 01:00:49.216 | - | - | - | - | - | runtime/debug.Stack(0x450157, 0x0, 0xc000c0c8b0)
| 2020-06-27 01:00:49.216 | - | - | - | - | - | /usr/local/Cellar/go/1.14.4/libexec/src/runtime/debug/stack.go:24 +0x9d
| 2020-06-27 01:00:49.216 | - | - | - | - | - | runtime/debug.PrintStack()
| 2020-06-27 01:00:49.216 | - | - | - | - | - | /usr/local/Cellar/go/1.14.4/libexec/src/runtime/debug/stack.go:16 +0x22
| 2020-06-27 01:00:49.216 | - | - | - | - | - | gitlab.com/NebulousLabs/Sia/build.Critical(0xc000c0c968, 0x1, 0x1)
| 2020-06-27 01:00:49.216 | - | - | - | - | - | /Users/junpei/pkg/mod/gitlab.com/!nebulous!labs/!sia@v1.4.8/build/critical.go:20 +0xd9
| 2020-06-27 01:00:49.216 | - | - | - | - | - | gitlab.com/NebulousLabs/Sia/types.Currency.Sub(0xc000c0cb00, 0xc000e0be78, 0x1, 0x1, 0xc001583200, 0xc000bda6e8, 0x1, 0x1, 0xada89d25750fd000, 0x0, ...)
| 2020-06-27 01:00:49.216 | - | - | - | - | - | /Users/junpei/pkg/mod/gitlab.com/!nebulous!labs/!sia@v1.4.8/types/currency.go:190 +0x14e
| 2020-06-27 01:00:49.216 | - | - | - | - | - | lukechampine.com/us/renter/proto.updateRevisionOutputs(0xc000c0d6a8, 0xc00158d400, 0xc000bda6e8, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x1, ...)
| 2020-06-27 01:00:49.216 | - | - | - | - | - | /Users/junpei/pkg/mod/lukechampine.com/us@v0.16.1-0.20200622035559-d9bd75f51730/renter/proto/session.go:758 +0x3d4
| 2020-06-27 01:00:49.216 | - | - | - | - | - | lukechampine.com/us/renter/proto.(*Session).RenewAndClearContract(0xc000c62b00, 0x13ebd40, 0xc00167ed10, 0x13d8440, 0xc00167ed10, 0xc00187eb00, 0xc0001154c0, 0x2, 0x7, 0x40f41, ...)
| 2020-06-27 01:00:49.216 | - | - | - | - | - | /Users/junpei/pkg/mod/lukechampine.com/us@v0.16.1-0.20200622035559-d9bd75f51730/renter/proto/renew.go:331 +0x155c
| 2020-06-27 01:00:49.216 | - | - | - | - | - | lukechampine.com/us/renter/proto.RenewContract(0x13ebd40, 0xc00167ed10, 0x13d8440, 0xc00167ed10, 0x85355b0202552b5a, 0x6b8ba7e1fd1002af, 0x73f65ad30f504d1f, 0xf6a4a4ea4a32eac4, 0xc00187eb40, 0x40, ...)
| 2020-06-27 01:00:49.216 | - | - | - | - | - | /Users/junpei/pkg/mod/lukechampine.com/us@v0.16.1-0.20200622035559-d9bd75f51730/renter/proto/renew.go:31 +0x271
| 2020-06-27 01:00:49.216 | - | - | - | - | - | github.com/storewise/s3-gateway/pkg/meta.(*SiadClient).RenewContract(0xc00167ed10, 0x13e7900, 0xc00149af00, 0xc00211c8a0, 0xc000183380, 0x0, 0xc0001154c0, 0x2, 0x7, 0x40f41, ...)
| 2020-06-27 01:00:49.216 | - | - | - | - | - | /Users/junpei/src/github.com/storewise/s3-gateway/pkg/meta/siad.go:126 +0x187
| 2020-06-27 01:00:49.216 | - | - | - | - | - | github.com/storewise/s3-gateway/pkg/server.(*contractManager).checkContract(0xc00226a1e0, 0x13e7900, 0xc00149af00, 0xc00211c8a0, 0x40f41, 0x3, 0x0, 0x0)
| 2020-06-27 01:00:49.216 | - | - | - | - | - | /Users/junpei/src/github.com/storewise/s3-gateway/pkg/server/contract.go:231 +0xe45
| 2020-06-27 01:00:49.216 | - | - | - | - | - | github.com/storewise/s3-gateway/pkg/server.(*contractManager).CheckContracts.func1.1(0x43d9d6, 0x114ead8)
| 2020-06-27 01:00:49.216 | - | - | - | - | - | /Users/junpei/src/github.com/storewise/s3-gateway/pkg/server/contract.go:138 +0x94
| 2020-06-27 01:00:49.216 | - | - | - | - | - | golang.org/x/sync/errgroup.(*Group).Go.func1(0xc000b30ff0, 0xc00149b2c0)
| 2020-06-27 01:00:49.216 | - | - | - | - | - | /Users/junpei/pkg/mod/golang.org/x/sync@v0.0.0-20200317015054-43a5402ce75a/errgroup/errgroup.go:57 +0x59
| 2020-06-27 01:00:49.216 | - | - | - | - | - | created by golang.org/x/sync/errgroup.(*Group).Go
| 2020-06-27 01:00:49.216 | - | - | - | - | - | /Users/junpei/pkg/mod/golang.org/x/sync@v0.0.0-20200317015054-43a5402ce75a/errgroup/errgroup.go:54 +0x66
| 2020-06-27 01:00:49.216 | - | - | - | - | - | Critical error: (Sia v1.4.8, Release: standard) negative currency not allowed
| 2020-06-27 01:00:49.216 | - | - | - | - | - | Please submit a bug report here: https://gitlab.com/NebulousLabs/Sia/issues
Critical error: (Sia v1.4.8, Release: standard) negative currency not allowed
--> Maybe related to https://gitlab.com/NebulousLabs/Sia/-/issues/4128 as well
@MeijeSibbel That server looks like it still uses the old version: us@v0.16.1-0.20200622035559-d9bd75f51730
.
If this is confirmed to be fixed, let's close this.
I haven't found this in the logs anymore so i think we can close it. Will comment if it resurfaces.