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

iGeth mach_msg_trap #2069

Closed
ghost opened this issue Dec 13, 2015 · 5 comments
Closed

iGeth mach_msg_trap #2069

ghost opened this issue Dec 13, 2015 · 5 comments

Comments

@ghost
Copy link

ghost commented Dec 13, 2015

Running in Xcode simulator
Geth not running > Click Start iGeth
Geth not syncing >

Then after a few seconds the debugger with mach_msg_trap

Stack trace (Thread 1)
#0 0x0000000104147386 in mach_msg_trap ()
#1 0x00000001041467c7 in mach_msg ()
#2 0x00000001014e6b64 in __CFRunLoopServiceMachPort ()
#3 0x00000001014e5fbf in __CFRunLoopRun ()
#4 0x00000001014e5828 in CFRunLoopRunSpecific ()
#5 0x0000000105bdaad2 in GSEventRunModal ()
#6 0x0000000101de1610 in UIApplicationMain ()
#7 0x0000000100006add in main at /Users/ben/Downloads/geth-sandbox-master/ios_sync/iGeth/AppDelegate.swift:12
#8 0x0000000103e0d92d in start ()
#9 0x0000000103e0d92d in start ()

*Debug output
I1213 16:49:05.012101 4449 flags.go:543] WARNING: No etherbase set and no accounts found as default
I1213 16:49:05.013760 4449 database.go:71] Alloted 16MB cache to /Users/ben/Library/Developer/CoreSimulator/Devices/06A880EA-B39E-4C68-96DA-0ECB3D283B35/data/Containers/Data/Application/165F2DC0-3424-4D13-A55E-1083ACF068EF/Library/Ethereum/chaindata
I1213 16:49:05.241224 4449 database.go:71] Alloted 16MB cache to /Users/ben/Library/Developer/CoreSimulator/Devices/06A880EA-B39E-4C68-96DA-0ECB3D283B35/data/Containers/Data/Application/165F2DC0-3424-4D13-A55E-1083ACF068EF/Library/Ethereum/dapp
I1213 16:49:05.247720 4449 backend.go:159] Protocol Versions: [63 62 61], Network Id: 1
I1213 16:49:05.248071 4449 backend.go:188] Blockchain DB Version: 3
I1213 16:49:05.337258 4449 blockchain.go:210] Last header: #57472 [d166c548…] TD=60295032452091455
I1213 16:49:05.337294 4449 blockchain.go:211] Last block: #0 [d4e56740…] TD=17179869184
I1213 16:49:05.337303 4449 blockchain.go:212] Fast block: #55169 [34a4682b…] TD=56463423189741277
I1213 16:49:05.340352 4449 server.go:311] Starting Server
I1213 16:49:07.146273 4449 nat.go:111] mapped network port udp:30303 -> 30303 (ethereum discovery) using UPNP IGDv2-IP1
I1213 16:49:07.210599 4449 udp.go:207] Listening, enode://ef35c243faeb5ec66833d016507840ed8b6518c1e3317c58cea36a28ab5c93ffaed763e79d97b7b4f9019a8a93e979fc373096a720c3d6d408662319700307c9@92.233.9.123:30303
I1213 16:49:07.210806 4449 server.go:552] Listening on [::]:30303
I1213 16:49:07.220686 4449 nat.go:111] mapped network port tcp:30303 -> 30303 (ethereum p2p) using UPNP IGDv2-IP1
I1213 16:49:17.212563 4449 downloader.go:288] Block synchronisation started

further

If I just continue then sometimes it crashes a few times more then finally works fine and goes on to process blocks then eventually crashes again (same stack trace):

I1213 17:22:42.110104 4449 blockchain.go:868] imported 0 header(s) (192 ignored) in 1.877285ms. #400641 [e8da42f1… / 1539fe9e…]

@karalabe
Copy link
Member

I'll try and swap out the Go runtime on the nightly build server from 1.5.2 to the latest develop branch. AFAIK the Go team is considering prepping an initial beta release, so it should be reasonable stable already and as most of the highlights of the 1.6 release will be mobile support, it could be a valuable experiment and maybe provide them too with some feedback on any issues found (e.g. golang/go#13599). I'll ping this issue when the switch happens to 1.6 and maybe you could try it again. I'll also try to reproduce it in the mean time on my local machine.

@karalabe
Copy link
Member

@JackWinters Could you try with a fresh build pushed out this morning? The previous one was using Go 1.5.2, whereas the new one is built with Go 1.6 develop. Not sure if it makes a difference, but a check couldn't hurt :)

geth-1.4.0-unstable-9c636d2-ios-7.0-framework.tar.bz2

@obscuren obscuren added the iOS label Jan 4, 2016
@Saemy1
Copy link

Saemy1 commented Feb 16, 2016

@karalabe I tried it with the newest nightly build (geth-1.4.0-unstable-4f28c5b-ios-7.0-framework.tar.bz2), still same message occures.
libsystem_kernel.dylib`mach_msg_trap:
0x1041a637c <+0>: movq %rcx, %r10
0x1041a637f <+3>: movl $0x100001f, %eax
0x1041a6384 <+8>: syscall
-> 0x1041a6386 <+10>: retq
0x1041a6387 <+11>: nop
I wanted to run it on a real device, but you can't run it because of missing bitcode

ld: '.../geth-sandbox/ios_wallet/Geth.framework/Geth(000000.o/)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64

Would it be a chance to change the nightly builds including bitcode?

@markspanbroek
Copy link

markspanbroek commented Jul 13, 2016

As a workaround, you can add the following code just before calling Geth.run:

signal (SIGPIPE, SIG_IGN)

And then use some breakpoint magic to ignore the SIGPIPE in the Xcode debugger:
http://stackoverflow.com/questions/10431579/permanently-configuring-lldb-in-xcode-4-3-2-not-to-stop-on-signals#10456557

@stale
Copy link

stale bot commented Mar 5, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the status:inactive label Mar 5, 2018
@stale stale bot closed this as completed Apr 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants