infinitered / cdq

Core Data Query for RubyMotion
MIT License
172 stars 35 forks source link

IO-related error #73

Closed buffpojken closed 9 years ago

buffpojken commented 9 years ago

I've started to see a lot of crashes which I think is cdq/Core Data-related. Seemingly at random, when accessing objects inheriting from CDQManagedObject, the application crashes with the log posted below.

Behaviour has not existed prior to updating RM to 3.3, therefor I'm hesitant to mark this as a definite bug in CDQ, but I've no idea how to proceed.

Log:

ASL is here to serve you

Jan 30 16:17:14 Daniel-Sundstroms-iPad syslog_relay[176] : syslog_relay found the ASL prompt. Starting... Jan 30 16:17:16 Daniel-Sundstroms-iPad locationd[64] : Gesture EnabledForTopCLient: 0, EnabledInDaemonSettings: 0 Jan 30 16:17:16 Daniel-Sundstroms-iPad backboardd[57] : CoreAnimation: updates deferred for too long Jan 30 16:17:17 Daniel-Sundstroms-iPad backboardd[57] : |GAXGeneral|info| Did verify event: [Substantial Transition did occur]. Outcome: [Success - Session App is Frontmost]. Jan 30 16:17:17 Daniel-Sundstroms-iPad SpringBoard[43] : BUG in libdispatch: 12B435 - 2946 - 0x57cb Jan 30 16:17:17 Daniel-Sundstroms-iPad com.apple.accessibility.AccessibilityUIServer[192] : assertion failed: 12B435: libxpc.dylib + 51955 [6D3E948A-39BD-3548-AA90-38575933BDEF]: 0x7d Jan 30 16:17:17 Daniel-Sundstroms-iPad Unknown[192] : Jan 30 16:17:17 Daniel-Sundstroms-iPad com.apple.accessibility.AccessibilityUIServer[192] : LaunchServices: no bundle found with identifier com.apple.accessibility.AccessibilityUIServer Jan 30 16:17:17 Daniel-Sundstroms-iPad com.apple.debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-320.2.89 [189] : debugserver's event read thread is exiting, detaching from the inferior process. Jan 30 16:17:17 Daniel-Sundstroms-iPad com.apple.debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-320.2.89 [189] : 1 +0.000000 sec [00bd/0907]: Disabling breakpoints and watchpoints, and detaching from 190. Jan 30 16:17:17 Daniel-Sundstroms-iPad com.apple.debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-320.2.89 [189] : 2 +0.002206 sec [00bd/0907]: error: ::ptrace (request = PT_THUPDATE, pid = 0x00be, tid = 0x2903, signal = -1) err = Invalid argument (0x00000016) Jan 30 16:17:17 Daniel-Sundstroms-iPad com.apple.debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-320.2.89 [189] : Exiting. Jan 30 16:17:24 Daniel-Sundstroms-iPad kernel[0] : 005982.085755 wlan0.A[11485] AppleBCMWLANCore::dumpWmeCounters(): per AC tx counters: 80466 33 0 194, rx counters: 281741 0 0 0 Jan 30 16:17:24 Daniel-Sundstroms-iPad kernel[0] : 005982.085834 wlan0.A[11486] AppleBCMWLANCore::dumpWmeCounters(): AWDL: Tx 0 0 0 0 Rx: 0 0 0 0 Jan 30 16:17:31 Daniel-Sundstroms-iPad iris debug[190] : Input/output error - write() failed (Errno::EIO) Jan 30 16:17:31 Daniel-Sundstroms-iPad iris debug[190] : * Terminating app due to uncaught exception 'Errno::EIO', reason: 'Input/output error - write() failed (Errno::EIO) ' * First throw call stack: (0x2a6995f7 0x38223c77 0xa3725d 0xa373a9 0x978d29 0x97603d 0x98d4db 0xa1d30b 0x9890a7 0x98b205 0xa1cec3 0x70981 0x1f842d 0xa1d30b 0x70981 0x50ae6d 0x50aeeb 0x2a13151b 0x2a65ff07 0x2a65fa89 0x2a65dcf3 0x2a5aab31 0x2a5aa943 0x31961051 0x2dba06f1 0x78a0d 0x387bfaaf) Jan 30 16:17:31 Daniel-Sundstroms-iPad ReportCrash[193] : task_set_exception_ports(B07, 400, D03, 0, 0) failed with error (4: (os/kern) invalid argument) Jan 30 16:17:31 Daniel-Sundstroms-iPad ReportCrash[193] : ReportCrash acting against PID 190 Jan 30 16:17:31 Daniel-Sundstroms-iPad ReportCrash[193] : Formulating crash report for process iris debug[190] Jan 30 16:17:31 Daniel-Sundstroms-iPad com.apple.xpc.launchd1 : Service exited due to signal: Abort trap: 6 Jan 30 16:17:32 Daniel-Sundstroms-iPad SpringBoard[43] : Application 'UIKitApplication:com.sykewarrior.iris[0x110b]' crashed. Jan 30 16:17:32 Daniel-Sundstroms-iPad assertiond[58] : pid_suspend failed for <BKNewProcess: 0x16d87020; com.sykewarrior.iris; pid: 190; hostpid: -1>: Unknown error: -1, Unknown error: -1 Jan 30 16:17:32 Daniel-Sundstroms-iPad assertiond[58] : Could not set priority of <BKNewProcess: 0x16d87020; com.sykewarrior.iris; pid: 190; hostpid: -1> to 2, priority: No such process Jan 30 16:17:32 Daniel-Sundstroms-iPad assertiond[58] : Could not set priority of <BKNewProcess: 0x16d87020; com.sykewarrior.iris; pid: 190; hostpid: -1> to 4096, priority: No such process Jan 30 16:17:32 Daniel-Sundstroms-iPad ReportCrash[193] : Saved report to /var/mobile/Library/Logs/CrashReporter/iris debug_2015-01-30-161731_Daniel-Sundstroms-iPad.ips Jan 30 16:17:33 Daniel-Sundstroms-iPad backboardd[57] : |GAXGeneral|info| Did verify event: [Substantial Transition did occur]. Outcome: [Error - Session app was nil]. Jan 30 16:17:37 Daniel-Sundstroms-iPad locationd[64] : Gesture EnabledForTopCLient: 0, EnabledInDaemonSettings: 0 Jan 30 16:17:38 Daniel-Sundstroms-iPad kernel[0] : flow_divert_token_set (0): Failed to get the key unit from the token: 22 Jan 30 16:17:38 Daniel-Sundstroms-iPad lockdownd[26] : Could not set socket option SO_OPPORTUNISTIC: Invalid argument Jan 30 16:17:38 Daniel-Sundstroms-iPad kernel[0] : flow_divert_token_set (0): Failed to get the key unit from the token: 22 Jan 30 16:17:38 Daniel-Sundstroms-iPad lockdownd[26] : Could not set socket option SO_OPPORTUNISTIC: Invalid argument

kemiller commented 9 years ago

I'm not seeing which part makes you suspect CDQ is involved...

buffpojken commented 9 years ago

Actually, I only suspect CDQ being involved because it's the only explicit IO being performed in non-Apple libraries. If you think this has nothing to do with CDQ, I'll happily close it and pass it on to Hipbyte.

fermion commented 9 years ago

I observed something similar, just filed an issue with Hipbyte about it. Mine was when accessing particular attributes of cdq models (it doesn't like "description" as a property name). My trace looked more like:

Mar 22 14:35:59 Robs-iPhone ReportCrash[6020] <Error>: task_set_exception_ports(B07, 400, D03, 0, 0) failed with error (4: (os/kern) invalid argument)
Mar 22 14:35:59 Robs-iPhone ReportCrash[6020] <Notice>: ReportCrash acting against PID 6019
Mar 22 14:35:59 Robs-iPhone ReportCrash[6020] <Notice>: Formulating crash report for process HealthAxioms[6019]
Mar 22 14:35:59 Robs-iPhone mediaserverd[22] <Notice>: '' com.rescuedcode.healthaxioms(pid = 6019) setting DiscoveryMode = DiscoveryMode_None, currentDiscoveryMode = DiscoveryMode_None
Mar 22 14:35:59 Robs-iPhone com.apple.xpc.launchd[1] (UIKitApplication:com.rescuedcode.healthaxioms[0xef91][6019]) <Notice>: Service exited due to signal: Segmentation fault: 11

If anything comes if this I'll update this issue.

fermion commented 9 years ago

Nevermind, here's my problem:

Compile ./resources/HealthAxioms.xcdatamodeld
/Users/rsterner/code/rcllc/HealthAxioms/resources/HealthAxioms.xcdatamodeld/0001 initial.xcdatamodel:HealthAxiom.description: warning: description conflicts with a method already on NSObject or NSManagedObject [4]

Missed this during the many times I've run the app during dev!