doublethinkco / go-ethereum-cross

Docker files for cross-building the Ethereum go client (geth)
http://doublethink.co/
MIT License
1 stars 1 forks source link

Support Tizen #1

Open bobsummerwill opened 8 years ago

bobsummerwill commented 8 years ago

So we seem to be largely DONE here, barring testing the silent failure fix on a TM1, which only @anthony-cros can do.

anthony-cros commented 8 years ago

started building the binary:

$ ./xgo  --go=1.5-develop --deps=https://gmplib.org/download/gmp/gmp-6.1.0.tar.bz2 --targets=linux/arm github.com/ethereum/go-ethereum/cmd/geth
Checking docker installation...
bobsummerwill commented 8 years ago

Great! Thank you

anthony-cros commented 8 years ago

I had to remove the --targets=linux/arm part in the above command, as i was getting an error: buildmode= not supported; @karalabe, any thoughts on this? wrong name for ARM? i copy/pasted it from the xgo README file

It's currently running without it issue so far

anthony-cros commented 8 years ago

no... I got buildmode= not supported again...

bobsummerwill commented 8 years ago

You could try using this Dockerfile :-) That goes through the makefile targets. Or would you be missing parameterization for the go version that way?

Generally we're probably best using the makefile wrappers where possible and leaving xgo to be largely an internal detail

anthony-cros commented 8 years ago

sorry, which Dockerfile?

anthony-cros commented 8 years ago

full logs -> gist (./xgo --go=1.5-develop --deps=https://gmplib.org/download/gmp/gmp-6.1.0.tar.bz2 --targets=linux/arm github.com/ethereum/go-ethereum/cmd/geth)

anthony-cros commented 8 years ago

actually the README says -buildmode=mode: binary type to produce by the compiler and the code shows that "default" is the default value, but I get this error upon trying:

flag provided but not defined: -buildmode

EDIT: my current commit is e87eceb (latest AFAIKT)

karalabe commented 8 years ago

Please update xgo (go get -u github.com/karalabe/xgo) It's an error messag xgo side that it doesn't recognize the new flag. Also possibly delete the old xgo images from docker and pull fresh ones (again something i should really address inside xgo at a certain point :) ) Please check if it works that way :)

anthony-cros commented 8 years ago

Thanks Peter, I had run the "go get" command but was missing the "-u"! It worked this time.

Block synchronization has started on the tizen phone, fingers crossed...

sh-4.1$ ./geth-linux-arm 
I1128 12:08:54.676849   26842 flags.go:425] WARNING: No etherbase set and no accounts found as default
I1128 12:08:54.678192   26842 database.go:71] Alloted 16MB cache to /home/developer/.ethereum/chaindata
I1128 12:08:54.719360   26842 database.go:71] Alloted 16MB cache to /home/developer/.ethereum/dapp
I1128 12:08:54.755554   26842 backend.go:314] Protocol Versions: [63 62 61], Network Id: 1
I1128 12:08:54.756530   26842 backend.go:362] Blockchain DB Version: 3
I1128 12:09:01.596862   26842 blockchain.go:160] WARNING: Wrote default ethereum genesis block
I1128 12:09:01.598266   26842 blockchain.go:214] Last header: #0 [d4e56740…] TD=17179869184
I1128 12:09:01.598602   26842 blockchain.go:215] Last block: #0 [d4e56740…] TD=17179869184
I1128 12:09:01.598815   26842 blockchain.go:216] Fast block: #0 [d4e56740…] TD=17179869184
I1128 12:09:01.652069   26842 cmd.go:114] Starting Geth/v1.3.2/linux/go1.5.1
I1128 12:09:01.652954   26842 server.go:311] Starting Server
I1128 12:09:01.727020   26842 nat.go:111] mapped network port udp:30303 -> 30303 (ethereum discovery) using NAT-PMP(192.168.1.1)
I1128 12:09:01.736206   26842 udp.go:204] Listening, enode://e7d4f40e960e2b78f6f5bb81775623eb1daa50a94f3135d88ab16331d4318ecc74486bda66485efc33ed33274b5457d8fa0563c6eda4a6b23051ec8da3d63303@108.162.185.124:30303
I1128 12:09:01.737152   26842 backend.go:526] Server started
I1128 12:09:01.738342   26842 ipc.go:112] IPC service started (/home/developer/.ethereum/geth.ipc)
I1128 12:09:01.738952   26842 server.go:552] Listening on [::]:30303
I1128 12:09:01.751281   26842 nat.go:111] mapped network port tcp:30303 -> 30303 (ethereum p2p) using NAT-PMP(192.168.1.1)
I1128 12:09:11.957611   26842 downloader.go:288] Block synchronisation started
anthony-cros commented 8 years ago

The first attempt failed with the same silent error as before, but I hadn't deleted my old xgo images, so I'll it that way this time

anthony-cros commented 8 years ago

another silent failure :(

I1130 17:35:30.151458   18651 blockchain.go:1230] imported 256 block(s) (0 queued 0 ignored) including 101 txs in 43.749267578s. #149828 [3f054c67 / d4268b72]
I1130 17:38:43.501831   18651 blockchain.go:1230] imported 256 block(s) (0 queued 0 ignored) including 605 txs in 3m13.239501953s. #150084 [af5e4518 / f52b9e7c]
sh-4.1$ 
anthony-cros commented 8 years ago

also a couple of time, this happened:

I1130 16:30:13.521392   18651 blockchain.go:1230] imported 186 block(s) (0 queued 0 ignored) including 59 txs in 51.222473145s. #144085 [e7f6b4c7 / c4a80624]
I1130 16:30:13.522430   18651 downloader.go:267] Synchronisation failed: no peers to keep download active
I1130 16:55:23.802001   18651 blockchain.go:1230] imported 3 block(s) (0 queued 0 ignored) including 0 txs in 596.862792ms. #144088 [e00fa0c4 / 576188ce]

it just resumes later though

karalabe commented 8 years ago

Could you try running an instance with --verbosity=6 until it disappears so that we could have a log of what happened, and another separate one after that with GOGC=50 geth .... This last one sets the Go garbase collector to run more frequently. I have a hunch that this "just disappears" may be caused by the Linux kernel plain killing the process for using too much memory.

On Mon, Nov 30, 2015 at 3:51 PM, Anthony Cros notifications@github.com wrote:

also a couple of time, this happened:

I1130 16:30:13.521392 18651 blockchain.go:1230] imported 186 block(s) (0 queued 0 ignored) including 59 txs in 51.222473145s. #144085 [e7f6b4c7 / c4a80624] I1130 16:30:13.522430 18651 downloader.go:267] Synchronisation failed: no peers to keep download active I1130 16:55:23.802001 18651 blockchain.go:1230] imported 3 block(s) (0 queued 0 ignored) including 0 txs in 596.862792ms. #144088 [e00fa0c4 / 576188ce]

it just resumes later though

— Reply to this email directly or view it on GitHub https://github.com/doublethinkco/go-ethereum-cross/issues/1#issuecomment-160633277 .

bobsummerwill commented 8 years ago

Thanks for the suggestion, @karalabe!

@anthony-cros Why don't you try your latest armhf eth binary on the TM1 first, just in case there is some progress there, and then get the TM1 syncing from fresh again with the extra verbosity as requested?

Hopefully I will be able to get my RD-PQ into a workable state today, so I can try to progress Tizen eth there in parallel. And @martinbrook has an ancient RD-210 too!

anthony-cros commented 8 years ago

may be caused by the Linux kernel plain killing the process for using too much memory.

good point, it does look like it

anthony-cros commented 8 years ago

Why don't you try your latest armhf eth binary on the TM1 first

see my comment in the other issue

TL;DR: I get sh: ./eth: No such file or directory

anthony-cros commented 8 years ago

started a run with --verbosity=6, it may take a few hours to crash!

bobsummerwill commented 8 years ago

Right, right. Maybe you can do a readelf or whatever is the right command on some (any!) executable which is on that device already, to see what settings they have?

bobsummerwill commented 8 years ago

Carsten Munk told me today that Tizen has armel ABI, not armhf, so maybe that's where we are going wrong? That we need to switch with the armv5 binary, but just need different GLIBC versions or similar?

bobsummerwill commented 8 years ago

See https://github.com/doublethinkco/webthree-umbrella-cross/issues/20 for Tizen ETH support. This ticket is Tizen GETH support.

anthony-cros commented 8 years ago

started a run with --verbosity=6, it may take a few hours to crash!

post-mortem: https://gist.github.com/anthony-cros/a4c819aa3fc51aff3ab5

anthony-cros commented 8 years ago

Maybe you can do a readelf

$ readelf -A /tmp/ls
Attribute Section: aeabi
File Attributes
  Tag_CPU_name: "7-A"
  Tag_CPU_arch: v7
  Tag_CPU_arch_profile: Application
  Tag_ARM_ISA_use: Yes
  Tag_THUMB_ISA_use: Thumb-2
  Tag_FP_arch: VFPv3
  Tag_ABI_PCS_wchar_t: 4
  Tag_ABI_FP_rounding: Needed
  Tag_ABI_FP_denormal: Needed
  Tag_ABI_FP_exceptions: Needed
  Tag_ABI_FP_number_model: IEEE 754
  Tag_ABI_align_needed: 8-byte
  Tag_ABI_align_preserved: 8-byte, except leaf SP
  Tag_ABI_enum_size: int
  Tag_ABI_HardFP_use: SP and DP
  Tag_CPU_unaligned_access: v6
anthony-cros commented 8 years ago

That we need to switch with the armv5 binary

but the armv5 we've been building since @phonikg 's success on wandboard was armhf, wasn't it? shouldn't we go back to the default ct-ng build in that case (since default is armel)?

anthony-cros commented 8 years ago

This ticket is Tizen GETH support.

my bad! will refer back to here on the said issue

anthony-cros commented 8 years ago

I will now switch to the GOGC=50 geth ... version, @karalabe , we'll see if your hunch was right!

bobsummerwill commented 8 years ago

Clarification: I mistyped 'stick with' as 'switch with' above, but that was on a false assumption.

It turns out that Tizen IS armhf.

I'll continue in the eth bug.

anthony-cros commented 8 years ago

bad news:

sh-4.1$ GOGC=50 ./geth-linux-arm 
...
I1202 04:21:57.016174   30816 blockchain.go:1230] imported 256 block(s) (0 queued 0 ignored) including 176 txs in 54.609222412s. #238866 [ca5d9ce5 / 02534fdb]
I1202 04:23:04.296203   30816 blockchain.go:1230] imported 256 block(s) (0 queued 0 ignored) including 205 txs in 1m7.16671753s. #239122 [e0df505d / cc653bcf]
I1202 04:24:11.953216   30816 blockchain.go:1230] imported 256 block(s) (0 queued 0 ignored) including 199 txs in 1m7.476593018s. #239378 [deac2e99 / fb48e89f]
I1202 04:25:28.031311   30816 blockchain.go:1230] imported 256 block(s) (0 queued 0 ignored) including 232 txs in 1m14.999298096s. #239634 [b3cc8484 / b8a160db]
I1202 04:26:51.262084   30816 blockchain.go:1230] imported 256 block(s) (0 queued 0 ignored) including 417 txs in 1m23.105438232s. #239890 [7f16a9bf / 4b173b99]
sh-4.1$ 
anthony-cros commented 8 years ago

I was hoping to investigate /var/log/syslog and /var/log/dmesg, but I lack the privileges on tizen...