pqrs-org / Seil

Seil (PCKeyboardHack) applies a patch to a keyboard driver. You can change CapsLock behavior, and activate dead keys on non-Apple keyboard.
https://pqrs.org/osx/karabiner/seil.html
The Unlicense
571 stars 29 forks source link

Computer Crashes #26

Closed keith closed 11 years ago

keith commented 11 years ago

I have been having incremental computer crashes on boot lately with my Macbook Pro (I know this isn't Apple support stick with me). The computer gets to grey screen with a spinner, then once it's about to load the mouse and the desktop it goes to sleep. I have to forcibly shut it down and try it again. It seems pretty random when it doesn't boot and when it wants to work again. I was going through the logs after I got it started today and noticed something strange related to PCKeyboardHack. I'm not going to say I'm an expert at reading extremely verbose kernel logs but I thought this might be interesting. These are the last logs shown before the computer entirely shutdown on 4 separate consecutive occasions.

8/8/13 7:11:25.000 PM kernel[0]: virtual bool IOHIDEventSystemUserClient::initWithTask(task_t, void *, UInt32): Client task not privileged to open IOHIDSystem for mapping memory (e00002c1)
8/8/13 7:11:26.000 PM kernel[0]: utun_ctl_connect: creating interface utun0
8/8/13 7:11:32.000 PM kernel[0]: PCKeyboardHack --Info-- init 10.8
8/8/13 7:11:32.000 PM kernel[0]: PCKeyboardHack --Info-- start
8/8/13 7:15:11.000 PM kernel[0]: virtual bool IOHIDEventSystemUserClient::initWithTask(task_t, void *, UInt32): Client task not privileged to open IOHIDSystem for mapping memory (e00002c1)
8/8/13 7:15:12.000 PM kernel[0]: utun_ctl_connect: creating interface utun0
8/8/13 7:15:13.000 PM kernel[0]: CODE SIGNING: cs_invalid_page(0x1000): p=176[GoogleSoftwareUp] clearing CS_VALID
8/8/13 7:15:19.000 PM kernel[0]: PCKeyboardHack --Info-- init 10.8
8/8/13 7:15:19.000 PM kernel[0]: PCKeyboardHack --Info-- start
8/8/13 7:15:24.000 PM kernel[0]: AirPort_Brcm43xx::powerChange: System Sleep 
8/8/13 7:16:16.000 PM kernel[0]: virtual bool IOHIDEventSystemUserClient::initWithTask(task_t, void *, UInt32): Client task not privileged to open IOHIDSystem for mapping memory (e00002c1)
8/8/13 7:16:19.000 PM kernel[0]: utun_ctl_connect: creating interface utun0
8/8/13 7:17:21.000 PM kernel[0]: virtual bool IOHIDEventSystemUserClient::initWithTask(task_t, void *, UInt32): Client task not privileged to open IOHIDSystem for mapping memory (e00002c1)
8/8/13 7:17:26.000 PM kernel[0]: utun_ctl_connect: creating interface utun0
8/8/13 7:17:29.000 PM kernel[0]: PCKeyboardHack --Info-- init 10.8
8/8/13 7:17:29.000 PM kernel[0]: PCKeyboardHack --Info-- start

As you can see in all four of these the common occurence was virtual bool IOHIDEventSystemUserClient::initWithTask(task_t, void *, UInt32): Client task not privileged to open IOHIDSystem for mapping memory just to make sure this was at least something PCKeyboardHack could be dealing with I glanced at the source code and saw:

screen shot 2013-08-08 at 9 39 55 pm

For contrast here's what the log shows on a successful boot

8/8/13 9:10:01.000 PM kernel[0]: PCKeyboardHack --Info-- init 10.8
8/8/13 9:10:01.000 PM kernel[0]: PCKeyboardHack --Info-- start
8/8/13 9:10:01.323 PM PCKeyboardHack[171]: checkForUpdates http://pqrs.org/macosx/keyremap4macbook/files/PCKeyboardHack-appcast.xml
8/8/13 9:10:01.505 PM PCKeyboardHack[171]: observer_IONotification

I'm not at all convinced that PCKeyboardHack has anything to do with this failed boots but I hoped that someone might have some insight on what I'm seeing here.

tekezo commented 11 years ago

8/8/13 7:11:25.000 PM kernel[0]: virtual bool IOHIDEventSystemUserClient::initWithTask(task_t, void *, UInt32): Client task not privileged to open IOHIDSystem for mapping memory (e00002c1)

These message is not related with PCKeyboardHack. PCKeyboardHack outputs log as a following format.

8/8/13 7:11:25.000 PM kernel[0]: PCKeyboardHack --Error-- virtual bool IOHIDEventSystemUserClient::initWithTask...

Details of the kernel panic is useful in order to examine a cause. http://support.apple.com/kb/TS3742 Could you show me this message?

keith commented 11 years ago

My thought here was it looks like OS X is rejecting PCKeyboardHack's attempt to run these methods. This is something similar to what you would see if you tried to access a blocked API with a sandboxed OS X application. Since there wasn't actually a kernel panic there weren't any related logs to what happened.

tekezo commented 11 years ago

On my machine, WindowServer, System Preferences and other processes output same message. Is there an error log of app above initWithTask message?

Aug  1 13:19:10 rapeseed.local System Preferences[11972]: Unable to open IOHIDSystem (e00002bd)
Aug  1 13:19:10 rapeseed kernel[0]: virtual bool IOHIDEventSystemUserClient::initWithTask(task_t, void *, UInt32): Client task not privileged to open IOHIDSystem for mapping memory (e00002c1)
Aug  6 11:09:32 rapeseed.local WindowServer[104]: Unable to open IOHIDSystem (e00002bd)
Aug  6 11:09:32 rapeseed.local WindowServer[104]: MPAccessSurfaceForDisplayDevice: Set up page flip mode on display 0x04273380 device: 0x10e0b6b90  isBackBuffered: 1 numComp: 3 numDisp
: 3
Aug  6 11:09:32 rapeseed kernel[0]: virtual bool IOHIDEventSystemUserClient::initWithTask(task_t, void *, UInt32): Client task not privileged to open IOHIDSystem for mapping memory (e0
0002c1)
keith commented 11 years ago

I don't see this with anything else, but I totally believe you that this isn't caused by PCKeyboardHack, just a thought, thanks for the time!