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

Build Gvite Source error on ubuntu. #360

Open
niini3 opened this issue Jun 11, 2019 · 3 comments
Open

Build Gvite Source error on ubuntu. #360

niini3 opened this issue Jun 11, 2019 · 3 comments

Comments

@niini3
Copy link

niini3 commented Jun 11, 2019

Information
Hi Vite Team,
I've tried to build Gvite source on my andriod box but there are some error show up, please see log below.

/go/src/github.com/vitelabs/go-vite# make gvite
go build -i -o /root/go/src/github.com/vitelabs/go-vite/build/cmd/gvite/gvite /root/go/src/github.com/vitelabs/go-vite/cmd/gvite/main.go

fatal error: runtime: out of memory
runtime stack:
runtime.throw(0x21eaee, 0x16)
/usr/local/go/src/runtime/panic.go:608 +0x5c
runtime.sysMap(0xd800000, 0xc00000, 0x399208)
/usr/local/go/src/runtime/mem_linux.go:156 +0xac
runtime.(*linearAlloc).alloc(0x38d80c, 0xc00000, 0x400000, 0x399208, 0x540)
/usr/local/go/src/runtime/malloc.go:1230 +0x94
runtime.(*mheap).sysAlloc(0x38cd48, 0xc00000, 0xa7ad9a00, 0x327c4)
/usr/local/go/src/runtime/malloc.go:525 +0x54
runtime.(*mheap).grow(0x38cd48, 0x4ad, 0x0)
/usr/local/go/src/runtime/mheap.go:920 +0x2c
runtime.(*mheap).allocSpanLocked(0x38cd48, 0x4ad, 0x399218, 0x11778)
/usr/local/go/src/runtime/mheap.go:848 +0x320
runtime.(*mheap).alloc_m(0x38cd48, 0x4ad, 0x390101, 0x4853)
/usr/local/go/src/runtime/mheap.go:692 +0x118
runtime.(*mheap).alloc.func1()
/usr/local/go/src/runtime/mheap.go:759 +0x3c
runtime.(*mheap).alloc(0x38cd48, 0x4ad, 0x10101, 0x613dc)
/usr/local/go/src/runtime/mheap.go:758 +0x60
runtime.largeAlloc(0x95807a, 0x60101, 0xb6fba000)
/usr/local/go/src/runtime/malloc.go:1019 +0x74
runtime.mallocgc.func1()
/usr/local/go/src/runtime/malloc.go:914 +0x38
runtime.systemstack(0x430780)
/usr/local/go/src/runtime/asm_arm.s:354 +0x84
runtime.mstart()
/usr/local/go/src/runtime/proc.go:1229

goroutine 1 [running]:
runtime.systemstack_switch()
/usr/local/go/src/runtime/asm_arm.s:298 +0x4 fp=0x43d3e4 sp=0x43d3e0 pc=0x63918
runtime.mallocgc(0x95807a, 0x1ef580, 0xcbe1901, 0x488683)
/usr/local/go/src/runtime/malloc.go:913 +0x898 fp=0x43d448 sp=0x43d3e4 pc=0x1aac8
runtime.makeslice(0x1ef580, 0x95807a, 0x95807a, 0xcbe1978, 0x488683, 0x488688)
/usr/local/go/src/runtime/slice.go:70 +0x68 fp=0x43d45c sp=0x43d448 pc=0x50840
runtime.makeslice64(0x1ef580, 0x95807a, 0x0, 0x95807a, 0x0, 0x381488, 0x23978, 0x0)
/usr/local/go/src/runtime/slice.go:85 +0x44 fp=0x43d478 sp=0x43d45c pc=0x5090c
cmd/link/internal/sym.(*Symbol).Grow(0xa6b1a90, 0x4ac03c, 0x0)
/usr/local/go/src/cmd/link/internal/sym/symbol.go:82 +0xb0 fp=0x43d4b4 sp=0x43d478 pc=0xe7c94
cmd/link/internal/ld.(*Link).pclntab(0x468090)
/usr/local/go/src/cmd/link/internal/ld/pcln.go:298 +0x6a0 fp=0x43d674 sp=0x43d4b4 pc=0x1752c0
cmd/link/internal/ld.Main(0x381488, 0x4, 0x8, 0x1, 0xd, 0xe, 0x21ca49, 0x12, 0x21f436, 0x18, ...)
/usr/local/go/src/cmd/link/internal/ld/main.go:228 +0xa60 fp=0x43d738 sp=0x43d674 pc=0x172db8
main.main()
/usr/local/go/src/cmd/link/main.go:65 +0x130 fp=0x43dfc4 sp=0x43d738 pc=0x1c6818
runtime.main()
/usr/local/go/src/runtime/proc.go:201 +0x204 fp=0x43dfe4 sp=0x43dfc4 pc=0x3be64
runtime.goexit()
/usr/local/go/src/runtime/asm_arm.s:867 +0x4 fp=0x43dfe4 sp=0x43dfe4 pc=0x65660
Makefile:23: recipe for target 'gvite' failed
make: *** [gvite] Error 2

  • OS
    Linux 4.14.0+ Zhutiantao/crypto #1 SMP PREEMPT Wed Nov 15 21:41:32 UTC 2017 armv7l armv7l armv7l GNU/Linux

  • Hardware (CPU info and Memory size)
    Samsung Exynos5422 Cortex™-A15 2Ghz and Cortex™-A7 Octa core CPUs
    Mali-T628 MP6(OpenGL ES 3.1/2.0/1.1 and OpenCL 1.2 Full profile)
    2Gbyte LPDDR3 RAM PoP stacked

  • gvite version
    2.1.4

  • go version
    go1.11.1.linux-armv6l

@niini3
Copy link
Author

niini3 commented Jun 11, 2019

I solved the build source problem by adding 2 GB of swap memory, then it build success. But I faced the new problem when run gvite application, please see the log detail below.

t=2019-06-11T17:14:25.799+0700 lvl=info msg=NodeServer.DataDir:/root/.gvite/maindata module=gvite/node_manager
t=2019-06-11T17:14:25.799+0700 lvl=info msg=NodeServer.KeyStoreDir:/root/.gvite/maindata/wallet module=gvite/node_manager
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x12570]

goroutine 1 [running]:
runtime/internal/atomic.goLoad64(0x5bce094, 0x1, 0x1)
/usr/local/go/src/runtime/internal/atomic/atomic_arm.go:124 +0x1c
github.com/vitelabs/go-vite/common/db.(*MemDB).GetSeq(0x5bce090, 0x522f7c1, 0x230f9ec)
/root/go/src/github.com/vitelabs/go-vite/common/db/memdb.go:35 +0x24
github.com/vitelabs/go-vite/chain/db.(*Store).getSnapshotMemDb(0x2940cb0, 0x5e, 0x9, 0x9)
/root/go/src/github.com/vitelabs/go-vite/chain/db/store.go:173 +0x40
github.com/vitelabs/go-vite/chain/db.(*Store).NewIterator(0x2940cb0, 0x230fa2c, 0x522f7c0, 0x9)
/root/go/src/github.com/vitelabs/go-vite/chain/db/store.go:105 +0x1c
github.com/vitelabs/go-vite/chain/index.(*IndexDB).queryLatestAccountId(0x5bce0c0, 0x0, 0x0, 0x0, 0x0)
/root/go/src/github.com/vitelabs/go-vite/chain/index/account.go:88 +0xc0
github.com/vitelabs/go-vite/chain/index.(*IndexDB).InitAccountId(0x5bce0c0)
/root/go/src/github.com/vitelabs/go-vite/chain/index/index_db.go:63 +0x1c
github.com/vitelabs/go-vite/chain/index.NewIndexDB(0x2a49140, 0x1c, 0xf0d118, 0x18b4500, 0x0, 0x15cbf8, 0x1b76960)
/root/go/src/github.com/vitelabs/go-vite/chain/index/index_db.go:48 +0x1b0
github.com/vitelabs/go-vite/chain.(*chain).newDbAndRecover(0x18b4500, 0x8f4e7a, 0x12)
/root/go/src/github.com/vitelabs/go-vite/chain/chain.go:227 +0x38
github.com/vitelabs/go-vite/chain.(*chain).Init(0x18b4500, 0x15, 0x1b70d20)
/root/go/src/github.com/vitelabs/go-vite/chain/chain.go:109 +0xa0
github.com/vitelabs/go-vite/vite.New(0x1890060, 0x24e4d00, 0x2a4a8c0, 0x0, 0x0)
/root/go/src/github.com/vitelabs/go-vite/vite/vite.go:50 +0x64
github.com/vitelabs/go-vite/node.(*Node).Prepare(0x18e20b0, 0x0, 0x0)
/root/go/src/github.com/vitelabs/go-vite/node/node.go:198 +0x4e4
github.com/vitelabs/go-vite/cmd/nodemanager.StartNode(0x18e20b0, 0x0, 0x18e20b0)
/root/go/src/github.com/vitelabs/go-vite/cmd/nodemanager/assist.go:21 +0x84
github.com/vitelabs/go-vite/cmd/nodemanager.(*DefaultNodeManager).Start(0x2a46508, 0xf0cd78, 0x14fa1f0)
/root/go/src/github.com/vitelabs/go-vite/cmd/nodemanager/default_node_manager.go:26 +0x20
github.com/vitelabs/go-vite/cmd/gvite_plugins.action(0x1b9e000, 0x807d20, 0x1b721f0)
/root/go/src/github.com/vitelabs/go-vite/cmd/gvite_plugins/load_plugins.go:214 +0xb8
github.com/vitelabs/go-vite/vendor/gopkg.in/urfave/cli%2ev1.HandleAction(0x7f6060, 0xd75fcc, 0x1b9e000, 0x1b9e000, 0x1a31fa8)
/root/go/src/github.com/vitelabs/go-vite/vendor/gopkg.in/urfave/cli.v1/app.go:490 +0xac
github.com/vitelabs/go-vite/vendor/gopkg.in/urfave/cli%2ev1.(*App).Run(0x1b881c0, 0x180c030, 0x2, 0x2, 0x0, 0x0)
/root/go/src/github.com/vitelabs/go-vite/vendor/gopkg.in/urfave/cli.v1/app.go:264 +0x3f0
github.com/vitelabs/go-vite/cmd/gvite_plugins.Loading()
/root/go/src/github.com/vitelabs/go-vite/cmd/gvite_plugins/load_plugins.go:172 +0x44
main.main()
/root/go/src/github.com/vitelabs/go-vite/cmd/gvite/main.go:13 +0x18

@lyd00
Copy link
Contributor

lyd00 commented Jun 13, 2019

Try starting again

@niini3
Copy link
Author

niini3 commented Jun 21, 2019

I’ve tried start the program many times, but the error still be the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants