Skip to content

Android app crash with nil pointer dereference in AccountantPromiseSettler #1952

Description

@anjmao

Testing master branch. App crashes.

2020-03-30 14:05:26.261 26266-26359/network.mysterium.vpn E/GoLog: 2020-03-30T11:05:26.000 INF ext-go/1/src/github.com/mysteriumnetwork/node/firewall/incoming_firewall_noop.go:53 > Allow URL https://api.ipify.org/?format=json access
2020-03-30 14:05:26.261 26266-26359/network.mysterium.vpn E/GoLog: 2020-03-30T11:05:26.000 INF ext-go/1/src/github.com/mysteriumnetwork/node/firewall/outgoing_firewall_noop.go:57 > Allow URL https://testnet-location.mysterium.network/api/v1/location access
2020-03-30 14:05:26.261 26266-26359/network.mysterium.vpn E/GoLog: 2020-03-30T11:05:26.000 INF ext-go/1/src/github.com/mysteriumnetwork/node/firewall/incoming_firewall_noop.go:53 > Allow URL https://testnet-location.mysterium.network/api/v1/location access
2020-03-30 14:05:26.261 26266-26359/network.mysterium.vpn E/GoLog: 2020-03-30T11:05:26.000 DBG ext-go/1/src/github.com/mysteriumnetwork/node/cmd/di.go:817 > Experimental NAT punching enabled, creating a pinger
2020-03-30 14:05:26.261 26266-26359/network.mysterium.vpn E/GoLog: 2020-03-30T11:05:26.000 DBG ext-go/1/src/github.com/mysteriumnetwork/node/config/config.go:185 > Returning default value access-policy.list:<nil>
2020-03-30 14:05:26.262 26266-26359/network.mysterium.vpn E/GoLog: 2020-03-30T11:05:26.000 DBG ext-go/1/src/github.com/mysteriumnetwork/node/config/config.go:185 > Returning default value access-policy.address:<nil>
2020-03-30 14:05:26.262 26266-26359/network.mysterium.vpn E/GoLog: 2020-03-30T11:05:26.000 DBG ext-go/1/src/github.com/mysteriumnetwork/node/config/config.go:185 > Returning default value access-policy.fetch:<nil>
2020-03-30 14:05:26.262 26266-26359/network.mysterium.vpn E/GoLog: 2020-03-30T11:05:26.000 DBG ext-go/1/src/github.com/mysteriumnetwork/node/config/config.go:185 > Returning default value shaper.enabled:<nil>
2020-03-30 14:05:26.262 26266-26359/network.mysterium.vpn E/GoLog: 2020-03-30T11:05:26.000 INF ext-go/1/src/github.com/mysteriumnetwork/node/firewall/outgoing_firewall_noop.go:57 > Allow URL https://quality.mysterium.network/api/v1 access
2020-03-30 14:05:26.262 26266-26359/network.mysterium.vpn E/GoLog: 2020-03-30T11:05:26.000 INF ext-go/1/src/github.com/mysteriumnetwork/node/firewall/incoming_firewall_noop.go:53 > Allow URL https://quality.mysterium.network/api/v1 access
2020-03-30 14:05:26.262 26266-26359/network.mysterium.vpn E/GoLog: 2020-03-30T11:05:26.000 INF ext-go/1/src/github.com/mysteriumnetwork/node/feedback/reporter.go:40 > Using feedback API at: https://feedback.mysterium.network
2020-03-30 14:05:26.266 26266-0/network.mysterium.vpn E/Go: panic: runtime error: invalid memory address or nil pointer dereference
2020-03-30 14:05:26.266 26266-0/network.mysterium.vpn E/Go: [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x77885d7d94]
2020-03-30 14:05:26.266 26266-0/network.mysterium.vpn E/Go: goroutine 17 [running, locked to thread]:
2020-03-30 14:05:26.266 26266-26359/network.mysterium.vpn E/GoLog: panic: runtime error: invalid memory address or nil pointer dereference
2020-03-30 14:05:26.266 26266-0/network.mysterium.vpn E/Go: github.com/mysteriumnetwork/node/session/pingpong.(*AccountantPromiseSettler).SettlementState(0x0, 0x4000170600, 0x2a, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
2020-03-30 14:05:26.266 26266-26359/network.mysterium.vpn E/GoLog: [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x77885d7d94]
2020-03-30 14:05:26.266 26266-0/network.mysterium.vpn E/Go: 	/ext-go/1/src/github.com/mysteriumnetwork/node/session/pingpong/accountant_promise_settler.go:289 +0x24
2020-03-30 14:05:26.266 26266-0/network.mysterium.vpn E/Go: github.com/mysteriumnetwork/node/core/state.(*Keeper).fetchIdentities(0x40001044b0, 0x400018c900, 0x7788fd7e60, 0x77890448a0)
2020-03-30 14:05:26.266 26266-0/network.mysterium.vpn E/Go: 	/ext-go/1/src/github.com/mysteriumnetwork/node/core/state/state.go:158 +0x148
2020-03-30 14:05:26.266 26266-0/network.mysterium.vpn E/Go: github.com/mysteriumnetwork/node/core/state.NewKeeper(0x778916de40, 0x400016c870, 0x77c9cb9198, 0x40004d4790, 0x7789161ae0, 0x0, 0x7789161e40, 0x0, 0x7789161940, 0x4000245ec0, ...)
2020-03-30 14:05:26.266 26266-0/network.mysterium.vpn E/Go: 	/ext-go/1/src/github.com/mysteriumnetwork/node/core/state/state.go:129 +0xac
2020-03-30 14:05:26.266 26266-0/network.mysterium.vpn E/Go: github.com/mysteriumnetwork/node/cmd.(*Dependencies).bootstrapStateKeeper(0x40001a2000, 0x400019c000, 0x31, 0x400019c080, 0x34, 0x400019c0c0, 0x3a, 0x0, 0x0, 0x400017e030, ...)
2020-03-30 14:05:26.266 26266-0/network.mysterium.vpn E/Go: 	/ext-go/1/src/github.com/mysteriumnetwork/node/cmd/di.go:283 +0x1c0
2020-03-30 14:05:26.266 26266-0/network.mysterium.vpn E/Go: github.com/mysteriumnetwork/node/cmd.(*Dependencies).bootstrapNodeComponents(0x40001a2000, 0x400019c000, 0x31, 0x400019c080, 0x34, 0x400019c0c0, 0x3a, 0x0, 0x0, 0x400017e030, ...)
2020-03-30 14:05:26.266 26266-0/network.mysterium.vpn E/Go: 	/ext-go/1/src/github.com/mysteriumnetwork/node/cmd/di.go:528 +0xa90
2020-03-30 14:05:26.266 26266-0/network.mysterium.vpn E/Go: github.com/mysteriumnetwork/node/cmd.(*Dependencies).Bootstrap(0x40001a2000, 0x400019c000, 0x31, 0x400019c080, 0x34, 0x400019c0c0, 0x3a, 0x0, 0x0, 0x400017e030, ...)
2020-03-30 14:05:26.266 26266-0/network.mysterium.vpn E/Go: 	/ext-go/1/src/github.com/mysteriumnetwork/node/cmd/di.go:232 +0x704
2020-03-30 14:05:26.266 26266-0/network.mysterium.vpn E/Go: github.com/mysteriumnetwork/node/mobile/mysterium.NewNode(0x400017e030, 0x26, 0x40002a0040, 0x26, 0x400009a058, 0x7787e7de58)
2020-03-30 14:05:26.266 26266-0/network.mysterium.vpn E/Go: 	/ext-go/1/src/github.com/mysteriumnetwork/node/mobile/mysterium/entrypoint.go:163 +0x41c
2020-03-30 14:05:26.266 26266-0/network.mysterium.vpn E/Go: main.proxymysterium__NewNode(0x780cecdfa0, 0x26, 0x40ffffffe8, 0x400009a058)
2020-03-30 14:05:26.266 26266-0/network.mysterium.vpn E/Go: 	/tmp/gomobile-work-134997598/src/gobind/go_mysteriummain.go:1819 +0x68
2020-03-30 14:05:26.266 26266-0/network.mysterium.vpn E/Go: main._cgoexpwrap_0679bc6c56c6_proxymysterium__NewNode(0x780cecdfa0, 0x26, 0xffffffe8, 0x781b83b9eb)
2020-03-30 14:05:26.266 26266-0/network.mysterium.vpn E/Go: 	_cgo_gotypes.go:2669 +0x30

The problem here is that AccountantPromiseSettler is registered only on di_desktop.go and skipped for di_mobile.go but is used for consumer side in state keeper.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions