I'm still trying to narrow down if this is definitely Karabiner or something else, but I've noticed if my machine is under high CPU load that typed character often get "stuck" - pressing a key makes it repeat multiple times even though I'm not holding it down.
Has anyone else seen this?
Similar issue here. Not 100% sure if it's Karabiner either. But it's one more sample :)
Same issue here, I've had it happen twice now (once with left arrow, once with volume-down -- both while machine was cranking, fans spinning, etc).
Same thing here. It’s happening quite often for me on an older 2010 MacBook Air.
Same here and it's happening really often, even under light CPU usage.
When using Chrome and ctrl-tabbing to next tab, it seems that the ctrl-tab combination stays "pressed" for a while and it jumps five tabs ahead instead of one. I've also noticed when text editing, the space key gets "stuck" at times.
Only modification I've enabled is non_us_backslash to grave_accent_and_tilde.
Karabiner-Elements version: 0.90.79
Karabiner-Elements leaves the key repeat handling to macOS since v0.90.69.
So, if this issue is happen in the recent version, it's a macOS issue.
@tekezo I can’t test definitively whether it is Karabiner, because my keyboard still stops working entirely when I quit Karabiner, but I think it may be Karabiner rather than macOS because I don’t remember it starting to occur after a macOS update.
This might be related to https://github.com/tekezo/Karabiner-Elements/issues/510, https://github.com/tekezo/Karabiner-Elements/issues/466 and several other issues.
I'm experiencing this too, and I _think_ it started after either the most recent or the second most recent Karabiner update. I don't think I've installed any macOS updates recently.
I'm seeing the same. Using my 60% (GON NerD) standing on top of my MacBook keyboard. Using Karabiner to disable the internal MacBook keyboard. Under high load it seems like turning off the internal keyboard seems to cut out as some keypresses from the internal keyboard get registered and at some point I get the stuck key issue. Only restarting the MacBook solves the stuck key issue for me.
This happens to me frequently and turning off karabiner-elements makes the issue go away.
I'm having this issue and it is 100% due to karabiner-elements. I absolutely love being able to tweak keyboard to exactly what I want, but if it's going to put in a bunch of random letters at random times, I can't use it! Is there any work on a fix?
It's pretty bad - consistently seeing this behavior several times a day.
Turning off karabiner-elements fixes the issue.
I have this issue too, mbp 2015, on heavier load it becomes a real problem as pressing a key will result in random amount of repeats.
So... any updates on this? @tekezo? Anything we can do to help out?
Any chance we can get an update on this of some kind? It's getting really, really frustrating to have all my programs quit because karabiner keeps repeating key commands like "cmd-q"
I have the same issue on new Macbook 13" Early 2015. I'm suspecting Karabiner and since I've disabled it, issue is gone.
Karabiner version: 0.90.86
macOS: 10.12.3
Had this issue all time time since using Karabiner Elements. Began to use it very early when the only way to config was through editting config file.
Same as others. After I quit Karabiner issue is gone.
Currently Karabiner version: 0.90.86
macOS: 10.12.3
I've had this happen to me a few times now. Occasionally I get a lag when typing, and worst sometimes delete seems to get stuck and keeps deleting things until I hit the control key (for some reason). I been unable to identify any pattern behind this happening.
Does not happen when Karabiner Elements is not running.
Keyboard: CMStorm (no additional software installed)
Currently Karabiner version: 0.90.86
macOS: 10.12.3
I'm uninstalling, too, until this thread wraps up. I'm seeing this behavior roughly 2x week, most often after coming back from sleep (which might just be a type of high load condition). If there's logging I can enable to rule out Karabiner, I'll try it!
I love using my Caps key for vim escape. I'll miss this.
This SO overflow seems loosely related: https://apple.stackexchange.com/questions/13708/disabling-the-keep-pressed-function-of-os-x-sticky-keys
The issue is definitely related to CPU load—on a newer machine it rarely occurs but on an older 2010 MacBook Air it happens almost constantly when the CPU has a load and it makes Karabiner unusable.
@tekezo any update here? Anything we can do to help out? This has become completely unusable for me =/
Same here MBP 15" Mid '14
This is really becoming unusable. I'm completely reliant on having my Caps = Ctrl/Esc otherwise I would uninstall this. Currently, I just have come to expect 1-2 catastrophic key repeats every day now where a sticky key will do something like CMD-Q every single app I have open.
Any sort of update would be appreciated.
Is a full list of previous releases available somewhere? I was going to try reinstalling previous releases to try to narrow down the release that introduced this problem, in the hope that it would help make the fix more obvious for @tekezo, but I don’t see any way to get the previous releases easily unfortunately.
@jessejanderson You can remap Caps to Ctrl/Esc without Karabiner. This dialog opens up after clickin "Modifier Keys…"

I'm using Karabiner only to remap £ with ~ on my EU keyboard. Not a big deal, so I keep it uninstalled until it's fixed.
@daniula thanks but I actually need Karabiner to map Caps to Ctrl AND Esc.
Tapping the key = Esc, holding the key as a modifier = Ctrl.
Any news on this one? Having the same problem :/
Also having this problem.
I'd totally overlooked the Mac Keyboard menu shortcut, @daniula. That does everything I need: Caps->Esc. Thanks!
@tekezo Should this issue be merged with #739 ?
it might be useful to run sample karabiner-grabber 1 during the time when it is repeating, so we can figure out what karabiner is doing. Trying to find a way now to automate this
so I did that and got this stack, which looks interesting:
basically IOHIDDeviceSetValue is taking a long time to return, it looks like from here: https://github.com/tekezo/Karabiner-Elements/blob/master/src/share/human_interface_device.hpp#L637
which perhaps is blocking some other calls in Karabiner-Elements. @tekezo any ideas here?
Analysis of sampling karabiner_grabber (pid 49) every 1 millisecond
Process: karabiner_grabber [49]
Path: /Library/Application Support/org.pqrs/Karabiner-Elements/bin/karabiner_grabber
Load Address: 0x1036eb000
Identifier: karabiner_grabber
Version: 0
Code Type: X86-64
Parent Process: launchd [1]
Date/Time: 2017-06-20 13:18:16.636 -0700
Launch Time: 2017-06-15 12:00:28.503 -0700
OS Version: Mac OS X 10.12.5 (16F2073)
Report Version: 7
Analysis Tool: /usr/bin/sample
----
Call graph:
4610 Thread_767 DispatchQueue_1: com.apple.main-thread (serial)
+ 4610 start (in libdyld.dylib) + 1 [0x7fff93c15235]
+ 4610 main (in karabiner_grabber) + 774 [0x1036ec424]
+ 4610 CFRunLoopRun (in CoreFoundation) + 97 [0x7fff7e4acb91]
+ 4610 CFRunLoopRunSpecific (in CoreFoundation) + 420 [0x7fff7e46d114]
+ 3609 __CFRunLoopRun (in CoreFoundation) + 2205 [0x7fff7e46dc0d]
+ ! 3609 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ (in CoreFoundation) + 9 [0x7fff7e4acbc9]
+ ! 3609 _dispatch_main_queue_callback_4CF (in libdispatch.dylib) + 505 [0x7fff93bec908]
+ ! 3609 _dispatch_source_invoke (in libdispatch.dylib) + 1248 [0x7fff93be213b]
+ ! 3609 _dispatch_source_latch_and_call (in libdispatch.dylib) + 194 [0x7fff93beaa6c]
+ ! 3609 _dispatch_continuation_pop (in libdispatch.dylib) + 533 [0x7fff93bf4a16]
+ ! 3609 _dispatch_client_callout (in libdispatch.dylib) + 8 [0x7fff93bdf8fc]
+ ! 3609 krbn::device_grabber::update_caps_lock_led(bool) (in karabiner_grabber) + 49 [0x1037058ff]
+ ! 3609 krbn::human_interface_device::set_caps_lock_led_state(krbn::led_state) (in karabiner_grabber) + 228 [0x103705b44]
+ ! 3601 ___ZN4krbn22human_interface_device23set_caps_lock_led_stateENS_9led_stateE_block_invoke (in karabiner_grabber) + 162 [0x103705c7a]
+ ! : 3601 IOHIDDeviceSetValue (in IOKit) + 33 [0x7fff803fd5d6]
+ ! : 3601 IOHIDDeviceClass::setElementValue(__IOHIDElement*, __IOHIDValue*, unsigned int, void (*)(void*, int, void*, __IOHIDValue*), void*, unsigned int) (in IOHIDLib) + 249 [0x1038a24a7]
+ ! : 3601 IOConnectCallScalarMethod (in IOKit) + 111 [0x7fff803cc47d]
+ ! : 3601 io_connect_method (in IOKit) + 375 [0x7fff80446c91]
+ ! : 3601 mach_msg (in libsystem_kernel.dylib) + 55 [0x7fff93d3b797]
+ ! : 3601 mach_msg_trap (in libsystem_kernel.dylib) + 10 [0x7fff93d3c34a]
+ ! 8 ___ZN4krbn22human_interface_device23set_caps_lock_led_stateENS_9led_stateE_block_invoke (in karabiner_grabber) + 244 [0x103705ccc]
+ ! 7 void spdlog::logger::log<char [88], int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(spdlog::level::level_enum, char const*, char const (&) [88], int const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) (in karabiner_grabber) + 170 [0x10370651a]
+ ! | 6 spdlog::logger::flush() (in karabiner_grabber) + 29 [0x1036eceb1]
+ ! | + 6 fflush (in libsystem_c.dylib) + 40 [0x7fff93c87c83]
+ ! | + 6 __sflush (in libsystem_c.dylib) + 87 [0x7fff93c87d27]
+ ! | + 6 _swrite (in libsystem_c.dylib) + 87 [0x7fff93c8f201]
+ ! | + 6 __write_nocancel (in libsystem_kernel.dylib) + 10 [0x7fff93d4447e]
+ ! | 1 spdlog::logger::_sink_it(spdlog::details::log_msg&) (in karabiner_grabber) + 27 [0x1036ecedb]
+ ! | 1 spdlog::pattern_formatter::format(spdlog::details::log_msg&) (in karabiner_grabber) + 64 [0x1036ebd76]
+ ! | 1 localtime_r (in libsystem_c.dylib) + 41 [0x7fff93ca1844]
+ ! | 1 _st_tzset_basic (in libsystem_c.dylib) + 50 [0x7fff93c9ff0b]
+ ! | 1 getenv (in libsystem_c.dylib) + 29 [0x7fff93caa612]
+ ! | 1 os_unfair_lock_lock (in libsystem_platform.dylib) + 10 [0x7fff93e27342]
+ ! 1 void spdlog::logger::log<char [88], int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(spdlog::level::level_enum, char const*, char const (&) [88], int const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) (in karabiner_grabber) + 151 [0x103706507]
+ ! 1 fmt::BasicWriter<char>::write(fmt::BasicCStringRef<char>, fmt::ArgList) (in karabiner_grabber) + 0 [0x1036ef69e]
+ 1001 __CFRunLoopRun (in CoreFoundation) + 1361 [0x7fff7e46d8c1]
+ 1001 __CFRunLoopServiceMachPort (in CoreFoundation) + 212 [0x7fff7e46e434]
+ 1001 mach_msg (in libsystem_kernel.dylib) + 55 [0x7fff93d3b797]
+ 1001 mach_msg_trap (in libsystem_kernel.dylib) + 10 [0x7fff93d3c34a]
I started seeing this issue directly after updating to beta 0.91.8. Similar to @jessejanderson, I have caps acting as control while down, and esc if pressed and released. Maybe that contributes to the issue.
I'm frequently experimenting the issue as well on my MacBook Pro 15" (2015), Mac OS 10.12.6.
This can be quite scary to be honest, especially when typing in applications where mistyping something can be fatal (remote servers, etc...).
To the contributors and maintainers, don't hesitate to ask for help here :)
Happens to me too. Issue is gone as soon as I quit karabiner-elements.
It's also annoying when hitting CMD-Q which might seemingly cause a spike in CPU usage, causing Q to be repeated at least once.
Hardware: Macbook Pro 12,1; Sierra 10.12.6; MS Natural 4000 USB (I've got two and it affects both)
I've been having this too. I used Karabiner-Elements to remap Right Application key to Right Command key, for use with my MS Natural 4000. No other settings.
One thing I did try: I set Karabiner-Elements to only remap the USB keyboard - the Macbook Pro's onboard keyboard already has 2 command keys of course! - but I still had the problem.
P.S. I'm lost with my right-hand Command key, since I mouse left-handed, but I discovered you can use the new Sierra hidutil tool if all you want is to remap some keys. So I made an Automator app for myself, to replace my use of Karabiner-Elements: https://github.com/tom-seddon/RemapApplicationKey. Might be of interest as an example for anybody else that uses Karabiner-Elements for simple remappings.
This is still a problem. I am consistently seeing it on Mac OS X Sierra 10.12.6
Any update on the fix please?
I'm seeing same problem with 11.0.0 and MacOS 10.12.6. Started using Karabiner-Elements in May 2017 and it's happens one or twice a day. I no longer panic but know to expect last key typed to repeat 20-30 times and then it stops. I keep installing updates expecting it to go away but it hasn't in 4 months.
For me it doesn't appear to be linked to high CPU load though.
Thanks so much @tom-seddon for pointing out the Apple document. I created a remap script using the hditool, added a service that's run on login and was able to remove Karabiner-Elements completely.
The key repeat issue was too annoying to deal with any more. Just like @davfox, I've been constantly updating Karabiner-Elements with the hope that the new release finally fixes it.
Is there a way to map the EJECT/POWER key on a mac keyboard? missed doing CTRL+ EJECT to shutdown (CTRL+SHIFT+EJECT to sleep)
Thanks
Still seeing this issue as well. My mapping is CAPS => BS.
Experiencing this as well; under high CPU load, pressing Volume Up key once will turn up the volume by many notches
I hit this even when cpu load isn't high. Just every day usage. Oddly enough, I work around it by quitting KE. I don't restart KE. It seems to keep the VirtualHIDKeyboard around, so my key mappings mostly work. I'm a PC convert(converted about 10 years ago) so I have basic ctrl+c ctrl+v(plus a few others) and I remap fn to crtl. This all works with KE up, even on a USB macally keyboard. When I quit KE, I don't get the repeated keys, or the unregistered keystrokes(I type nothing prints to the screen, probably related), but my windows mappings still stick, and fn is still remapped to ctrl. Unfortunately, ctrl gets remapped to fn when I quit, and macally doesn't have a fn key, so ctrl doesn't work right on that keyboard. So it seems like the VirtualHIDKeyboard is doing things fine, and since the karabiner_grabber is still running(even though I quit KE), it seems to be doing ok.
I have the same problem, high CPU load and very lag.
I was getting unexpected key repeats daily as well on my external keyboard. No idea if that was during high load or not. But I ditched KE a month ago and it has not happened once since then.
Though I too would love to see this bug fixed (I have not yet upgraded from El Capitan because I find Karabiner that useful), "+1"-style posts send every subscriber a notification -- I (and I suspect many other subscribers) would greatly appreciate it if everyone instead gave the OP a thumbs up (by clicking the smiley face in its top right corner).
(For those who haven't ran into it: GitHub's issue tracker can sort issues by the numbers of reactions they've each garnered -- ideally, IMO, we'd have explicit issue voting with votes displayed next to the number of comments as in https://github.com/isaacs/github/issues/9, but unfortunately that doesn't look like it will happen in the near future.)
This seems to be happening even for automated keystrokes 😳 as done by packer for setting up virtual machines.
@tekezo Are you working on this issue maybe? I observe it too, only with Karabiner-Elements enabled.
Karabiner-Elements is great piece of software generally - thanks a lot for giving that away. Yet this issue renders it hardly usable for a long run :/
Happens here too
I wanted to chime in here again because I'm still seeing this issue after completely uninstalling Karabiner-Elements. It doesn't seem to happen as often, but it does happen. I'm wondering if it's related to using a Bluetooth keyboard (or just bluetooth interference causing issues), or possibly Keyboard Maestro, which I'm also using.
This seems to be a very common issue with Windows PCs: https://social.technet.microsoft.com/Forums/windows/en-US/a2c20718-643e-4d2a-8507-0930295c1d2d/keys-repeat-uncontrollably?forum=w7itprohardware
I'm not using bluetooth anything(it's actually turned off), nor keyboard maestro and I still get it.
Same here, it happens with and without bluetooth keyboards. No Keyword Maestro installed either.
On 29 Nov 2017, at 11:54, George notifications@github.com wrote:
I'm not using bluetooth anything(it's actually turned off), nor keyboard maestro and I still get it.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/tekezo/Karabiner-Elements/issues/545#issuecomment-347884340, or mute the thread https://github.com/notifications/unsubscribe-auth/AApcaLpgHcqE7U3Ob8ZhVkhVN-iWFzt5ks5s7XAXgaJpZM4LeTSf.
I see this several dozen times per day while I'm coding. I get all kinds of CPU spikes as my IDE does its thing, and those spikes cause KE to repeat keys like crazy. I've had to uninstall KE as it literally makes me unable to work in some cases. I hate not having it, though, as my fingers are now trained for the changes I made, and it's awful working without it.
Would love to see a resolution on this soon.
@tekezo it seems this is a pretty widespread problem. I wish I had the time/knowledge to jump in and help on this, but I do not.
However, I am wondering if there is something we, as users of your product, can do to incentivize a fix on this issue. Do you have some kind of bug bounty/donation system we could use to "pay" for this issue to be fixed? I'd certainly be willing to contribute financially toward getting this resolved.
Datapoint of one, but for me this is less of a problem with slow key repeat and a longer delay until key repeat (in System Preferences). Not sure which setting is fixing it but I haven't had this problem since making those changes yesterday. Further, I'm not sure what is more painful, slow key repeats or accidental key repeats.
Just wanted to add: I also have a fast keyrepeat rate, and was experiencing the same problems. I had installed Karabiner-Elements just a day or two before. After living with the key repeat issue for two weeks, I uninstalled Karabiner-Elements. No more random keys repeating!
Tired of the key repeat problem, I uninstalled Karabiner a while back. I also upgraded to High Sierra afterwards at some point. I missed various things about Karabiner though so reinstalled it again. Since then, i've had no problems at all. So i'm happy!
I took care to remove every little piece of Karabiner that I could find however. Every last .plist file etc. Ran a 'find' command to locate it all. There's probably a shell script to do this but couldn't easily find anything.
For me, the only way to stop it is to press the repeating key, which gets really annoying when it happens at my password screen because I can't see which key it is.
based on what @davfox posted, I tried completely uninstalling Karabiner-Elements and installing again. I read somewhere else that after upgrading to High Sierra, things carried over from the old filesystem tend to see more latency, and installing afresh with the new FS helps.
So far so good - no sticking keys anymore.
Sorry I spoke too soon ------------------------------------------------------ ( see? ) Was good for most of an hour after reinstalling Karabiner-Elements but it's back and as bad as before.
Restarting Karabiner-Elements doesn't help ( stopping it does BTW ), nor does a machine restart. It's definitely worst when CPU load is up.
has anyone found a workaround / different product to use for the following:
this wacky key repeat behavior is worth keeping for me if there is absolutely no other workaround, but i don't see any suggestions here in this thread other than just uninstalling.
weirdly, this issue has actually gone away for me. Currently on 11.4.0, gonna updated to 11.5.0 now.
I am seeing the same behavior with newer versions. I can confirm that v0.90.68 works fine. I rolled back there as Karabiner was unusable with this key-repeat issue. I uploaded the version I am using here w/ hyper key support.
I recently changed from a Macbook Pro to a Macbook and this issue is so bad that it makes Karabiner Elements completely unusable as I can't trust it to not do things like close every single tab when I tap CMD+W. Or I'll often get things like googggggggggggggle.com. This is on 11.4.0 and 11.6.0. I upgraded to try and alleviate it after finding this thread with no luck
In my particular case I averted this by going to Devices and making sure Manipulate LED is unchecked for all devices. In my case that's an Apple Extended Keyboard connected to an iMac through a Griffin iMate.
In the stack trace posted above by @mmmulani there are several calls to update_caps_lock_led(bool) which I would guess is the culprit. It would also explain why some of you fixed the issue by removing settings from ~/.config/karabiner or reinstalling since Manipulate LED is off be default for everything, I think.
I can confirm @jonowells's solution works! I used to run a custom build of v0.90.68. I upgraded to the newest version and turned off _Manipulate LED_ under _Devices_ and the key repeat issue has gone away. No random key repeat occurred in the last 8 days. There were multiple of this per hour before.
Confirmed as well. No more repeat after turning off LED manipulation. Sucks that my caps lock no longer shows the LED though.
Didn't work for me on a 2018 MacBook. It definitely helped, but it's still an issue. Possibly just a factor of machine speed?
@MarkKahn I DO sometimes have a hiccup but it is much more rare now, and possibly this happens when my machine is under heavy load, though I'm not sure.
For me personally it went from "my machine is stressed, I can't type 3 words without getting things like hellllllllllo" to it being an issue once every ~2-3 minutes when under load. Way better, but still completely unusable. I never noticed this issue on my previous machine (maxed out 2017 MBP Retina) which is why I'm guessing it's correlated to the machine speed.
if you have a way to repro it, please run the command I ran earlier: sample karabiner-grabber 1
it'll help us figure out what's causing the bug
Best sample possible -- the issue happening as I hit enter to sample!
btw I just stressed my CPU with a few infinite loops (while (1);)
➜ ~ sudo sample karabiner_grabber 1
Sampling process 55 for 1 second with 1 millisecond of run time between samples
Sampling completed, processing symbols...
Sample analysis of process 55 written to file /tmp/karabiner_grabber_2018-03-24_075330_pZTG.sample.txt
Analysis of sampling karabiner_grabber (pid 55) every 1 millisecond
Process: karabiner_grabber [55]
Path: /Library/Application Support/org.pqrs/Karabiner-Elements/bin/karabiner_grabber
Load Address: 0x1044b5000
Identifier: karabiner_grabber
Version: 0
Code Type: X86-64
Parent Process: launchd [1]
Date/Time: 2018-03-24 07:53:30.931 +0800
Launch Time: 2018-03-23 23:26:38.664 +0800
OS Version: Mac OS X 10.13.1 (17B1003)
Report Version: 7
Analysis Tool: /usr/bin/sample
----
Call graph:
945 Thread_486 DispatchQueue_1: com.apple.main-thread (serial)
+ 945 start (in libdyld.dylib) + 1 [0x7fff5952d145]
+ 945 main (in karabiner_grabber) + 3036 [0x1044b70ff]
+ 945 CFRunLoopRun (in CoreFoundation) + 99 [0x7fff31f87993]
+ 945 CFRunLoopRunSpecific (in CoreFoundation) + 483 [0x7fff31f48fa3]
+ 903 __CFRunLoopRun (in CoreFoundation) + 1783 [0x7fff31f49927]
+ ! 903 __CFRunLoopServiceMachPort (in CoreFoundation) + 341 [0x7fff31f4a5d5]
+ ! 903 mach_msg (in libsystem_kernel.dylib) + 60 [0x7fff59673390]
+ ! 903 mach_msg_trap (in libsystem_kernel.dylib) + 10 [0x7fff59673e76]
+ 42 __CFRunLoopRun (in CoreFoundation) + 2586 [0x7fff31f49c4a]
+ 42 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ (in CoreFoundation) + 9 [0x7fff31f879c9]
+ 42 _dispatch_main_queue_callback_4CF (in libdispatch.dylib) + 776 [0x7fff594ff2fd]
+ 42 _dispatch_source_invoke (in libdispatch.dylib) + 620 [0x7fff594f6154]
+ 42 _dispatch_continuation_pop (in libdispatch.dylib) + 472 [0x7fff59506fbc]
+ 42 _dispatch_client_callout (in libdispatch.dylib) + 8 [0x7fff594f3e88]
+ 41 krbn::device_grabber::update_caps_lock_led(bool) (in karabiner_grabber) + 191 [0x1044ea015]
+ : 41 krbn::core_configuration::profile::get_device_manipulate_caps_lock_led(krbn::device_identifiers const&) const (in karabiner_grabber) + 321 [0x1044f2353]
+ : 41 krbn::core_configuration::profile::device::device(nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> const&) (in karabiner_grabber) + 415 [0x1044e0b67]
+ : 41 krbn::core_configuration::profile::simple_modifications::simple_modifications(nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> const&) (in karabiner_grabber) + 28 [0x1044d4b56]
+ : 41 krbn::core_configuration::profile::simple_modifications::handle_json(nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> const&) (in karabiner_grabber) + 1021 [0x1044d4f6b]
+ : 41 krbn::core_configuration::profile::simple_modifications::erase_by_from_json_string(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) (in karabiner_grabber) + 104 [0x1044d5cfe]
+ : 41 nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer>::parse(nlohmann::detail::input_adapter, std::__1::function<bool (int, nlohmann::detail::parser<nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> >::parse_event_t, nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer>&)>, bool) (in karabiner_grabber) + 170 [0x1044d643c]
+ : 41 nlohmann::detail::parser<nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> >::parse(bool, nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer>&) (in karabiner_grabber) + 55 [0x1044d69b7]
+ : 41 nlohmann::detail::parser<nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> >::parse_internal(bool, nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer>&) (in karabiner_grabber) + 354 [0x1044d6d4c]
+ : 41 nlohmann::detail::lexer<nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> >::scan() (in karabiner_grabber) + 25 [0x1044d76dd]
+ : 41 nlohmann::detail::lexer<nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> >::get() (in karabiner_grabber) + 63 [0x1044d7897]
+ : 41 void std::__1::vector<char, std::__1::allocator<char> >::__push_back_slow_path<char>(char&&) (in karabiner_grabber) + 130,138 [0x1044d852c,0x1044d8534]
+ 1 invocation function for block in krbn::connection_manager::connection_manager(krbn::version_monitor&, krbn::device_grabber&) (in karabiner_grabber) + 24 [0x1044ce515]
+ 1 krbn::session::get_current_console_user_id() (in karabiner_grabber) + 21 [0x1044ce6e3]
+ 1 SCDynamicStoreCopyConsoleUser (in SystemConfiguration) + 86 [0x7fff3e226ff5]
+ 1 SCDynamicStoreKeyCreate (in SystemConfiguration) + 132 [0x7fff3e208f32]
+ 1 CFStringCreateWithFormatAndArguments (in CoreFoundation) + 96 [0x7fff31f1e2a0]
+ 1 __CFStringAppendFormatCore (in CoreFoundation) + 12286 [0x7fff31efabae]
+ 1 CFStringAppend (in CoreFoundation) + 431 [0x7fff31efcb2f]
+ 1 __CFStringChangeSizeMultiple (in CoreFoundation) + 1195 [0x7fff31edc26b]
+ 1 malloc_zone_malloc (in libsystem_malloc.dylib) + 99 [0x7fff596d51fd]
945 Thread_1908
+ 945 start_wqthread (in libsystem_pthread.dylib) + 13 [0x7fff597b6c4d]
+ 945 _pthread_wqthread (in libsystem_pthread.dylib) + 1035 [0x7fff597b706a]
+ 945 __workq_kernreturn (in libsystem_kernel.dylib) + 10 [0x7fff5967d6da]
945 Thread_3387
945 thread_start (in libsystem_pthread.dylib) + 13 [0x7fff597b6c5d]
945 _pthread_start (in libsystem_pthread.dylib) + 377 [0x7fff597b756d]
945 _pthread_body (in libsystem_pthread.dylib) + 340 [0x7fff597b76c1]
945 std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, krbn::receiver::receiver(krbn::device_grabber&)::'lambda'()> >(void*, void*) (in karabiner_grabber) + 45 [0x10452e023]
945 krbn::receiver::worker() (in karabiner_grabber) + 172 [0x10452e13c]
945 krbn::local_datagram_server::receive(boost::asio::mutable_buffer const&, boost::posix_time::time_duration, boost::system::error_code&) (in karabiner_grabber) + 156 [0x10452ec9c]
945 boost::asio::detail::scheduler::run_one(boost::system::error_code&) (in karabiner_grabber) + 220 [0x10452fc90]
945 boost::asio::detail::scheduler::do_run_one(boost::asio::detail::conditionally_enabled_mutex::scoped_lock&, boost::asio::detail::scheduler_thread_info&, boost::system::error_code const&) (in karabiner_grabber) + 294 [0x10452ff38]
945 boost::asio::detail::kqueue_reactor::run(long, boost::asio::detail::op_queue<boost::asio::detail::scheduler_operation>&) (in karabiner_grabber) + 313 [0x1045301bd]
945 kevent (in libsystem_kernel.dylib) + 10 [0x7fff5967e03a]
Total number in stack (recursive counted multiple, when >=5):
Sort by top of stack, same collapsed (when >= 5):
__workq_kernreturn (in libsystem_kernel.dylib) 945
kevent (in libsystem_kernel.dylib) 945
mach_msg_trap (in libsystem_kernel.dylib) 903
void std::__1::vector<char, std::__1::allocator<char> >::__push_back_slow_path<char>(char&&) (in karabiner_grabber) 41
Binary Images:
0x1044b5000 - 0x104570fff +karabiner_grabber (0) <B1AF0A4C-F586-3FF2-8D47-D4AA8078A104> /Library/Application Support/org.pqrs/Karabiner-Elements/bin/karabiner_grabber
0x10472a000 - 0x104737ff7 com.apple.iokit.IOHIDLib (2.0.0 - 2.0.0) <7580F129-6F2E-3335-B5C2-37B146C61107> /System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib
0x10f1dd000 - 0x10f22798f dyld (519.2.1) <CD85EFBA-B9D6-3FD5-B777-A23B2DDEF192> /usr/lib/dyld
0x7fff2e4ec000 - 0x7fff2e4ecfff com.apple.Accelerate (1.11 - Accelerate 1.11) <5AA750F5-D633-32BA-B7F3-4F651FB1761E> /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate
0x7fff2e504000 - 0x7fff2ea02fc3 com.apple.vImage (8.1 - ???) <310976EE-E12D-39D7-8F58-6EE924E08576> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage
0x7fff2ea03000 - 0x7fff2eb5dfcb libBLAS.dylib (1211.20.1) <B70FC2EE-0859-39DB-927E-0020AE96907F> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
0x7fff2eb5e000 - 0x7fff2eb8bfef libBNNS.dylib (32) <9CA15DC6-004A-32FD-BFCA-F5D488012C43> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBNNS.dylib
0x7fff2eb8c000 - 0x7fff2ef4cff7 libLAPACK.dylib (1211.20.1) <04B937A4-D0E7-33C8-A1C3-2724AD4FAB2F> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib
0x7fff2ef4d000 - 0x7fff2ef62ff7 libLinearAlgebra.dylib (1211.20.1) <355307DE-82A5-32A3-8AC6-603D90E99601> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLinearAlgebra.dylib
0x7fff2ef63000 - 0x7fff2ef68ff3 libQuadrature.dylib (3) <3D6BF66A-55B2-3692-BAC7-DEB0C676ED29> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libQuadrature.dylib
0x7fff2ef69000 - 0x7fff2efc7fff libSparse.dylib (79.1.1) <7AD0F8A8-FD36-36FE-B83D-58648EBD0027> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libSparse.dylib
0x7fff2efc8000 - 0x7fff2efdbfff libSparseBLAS.dylib (1211.20.1) <9C7AB67B-5BFD-3571-8D90-312D1DB10098> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libSparseBLAS.dylib
0x7fff2efdc000 - 0x7fff2f188fc3 libvDSP.dylib (622.20.8) <6FFCA52B-7D60-326A-ADF2-601F39A8685A> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib
0x7fff2f189000 - 0x7fff2f239fef libvMisc.dylib (622.20.8) <54F90047-879F-3260-8604-6E453149B49E> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib
0x7fff2f23a000 - 0x7fff2f23afff com.apple.Accelerate.vecLib (3.11 - vecLib 3.11) <8A96A8ED-7B88-3D17-8D17-41D224E0EC90> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib
0x7fff303d1000 - 0x7fff303d1fff com.apple.ApplicationServices (48 - 50) <3EB38526-9975-36C9-BADC-F9019A608267> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
0x7fff303d2000 - 0x7fff30438fff com.apple.ApplicationServices.ATS (377 - 445) <2303339C-5E2A-37DB-B2B0-E4E5DA9121E5> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS
0x7fff304d1000 - 0x7fff305f3ff7 libFontParser.dylib (222.1.1) <56C57A24-6A6A-3F32-8E40-5BFA4DA4B04D> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontParser.dylib
0x7fff305f4000 - 0x7fff3063eff7 libFontRegistry.dylib (221) <A22F82C0-B4FE-3DB5-B968-79B28257DF2F> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontRegistry.dylib
0x7fff30780000 - 0x7fff30784ff3 com.apple.ColorSyncLegacy (4.13.0 - 1) <7C8AD42D-5A89-3BA6-B55D-374D9267E939> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSyncLegacy.framework/Versions/A/ColorSyncLegacy
0x7fff30824000 - 0x7fff30876ff7 com.apple.HIServices (1.22 - 622) <2E83CD6F-ED98-3C29-BD0A-8525E38AB5DB> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices
0x7fff30877000 - 0x7fff30885fff com.apple.LangAnalysis (1.7.0 - 1.7.0) <71A9C815-AC55-3E36-A618-F6778F5119AD> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis
0x7fff30886000 - 0x7fff308d2fff com.apple.print.framework.PrintCore (13 - 503) <BC23C22A-7691-3BD4-8013-BAAE3A44763C> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore
0x7fff308d3000 - 0x7fff3090dfff com.apple.QD (3.12 - 403) <38D8106A-4FFA-3FE9-9999-714CADD7EE9C> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD
0x7fff3090e000 - 0x7fff3091afff com.apple.speech.synthesis.framework (7.0.14 - 7.0.14) <C8AACF93-9FF5-32FE-A448-E174702509FA> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis
0x7fff3091b000 - 0x7fff30ba3ff7 com.apple.audio.toolbox.AudioToolbox (1.14 - 1.14) <6894F95E-63B4-3484-A428-2963FB9BFEF9> /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox
0x7fff30ba5000 - 0x7fff30ba5fff com.apple.audio.units.AudioUnit (1.14 - 1.14) <FE0BC0EC-6353-34B5-8479-B33D6ED7EE5B> /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit
0x7fff30ebb000 - 0x7fff3121ffff com.apple.CFNetwork (889.9 - 889.9) <AD7E1066-F856-314B-A0E0-3CDA012F4AFF> /System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork
0x7fff31234000 - 0x7fff31234fff com.apple.Carbon (158 - 158) <C34E5FF0-4FDA-35F1-85C2-FDAC4EDE8331> /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
0x7fff31235000 - 0x7fff31238ffb com.apple.CommonPanels (1.2.6 - 98) <39C8EBA3-EEB2-335B-8A88-D6C64BAA112F> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPanels.framework/Versions/A/CommonPanels
0x7fff31239000 - 0x7fff3153dff7 com.apple.HIToolbox (2.1.1 - 909.1) <39EA833C-2FAD-33B9-BB99-7BDCBCE4B08A> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox
0x7fff3153e000 - 0x7fff31541ffb com.apple.help (1.3.8 - 64) <18D02016-119A-33E8-AEB0-E9466BA4AD56> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.framework/Versions/A/Help
0x7fff31542000 - 0x7fff31547fff com.apple.ImageCapture (9.0 - 9.0) <2DE590E5-DF0E-3962-A2BE-06EBC79B3D72> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCapture.framework/Versions/A/ImageCapture
0x7fff31548000 - 0x7fff315ddffb com.apple.ink.framework (10.9 - 220) <D8AECAE3-9FD2-32E3-B659-026F33650BB2> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framework/Versions/A/Ink
0x7fff315de000 - 0x7fff315f8ff7 com.apple.openscripting (1.7 - 174) <1CF64DD1-144D-3702-A728-1F476E1A00ED> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScripting.framework/Versions/A/OpenScripting
0x7fff31619000 - 0x7fff3161afff com.apple.print.framework.Print (12 - 267) <E4CBAAFC-9045-38AC-9F93-8C931DDED9D8> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.framework/Versions/A/Print
0x7fff3161b000 - 0x7fff3161dff7 com.apple.securityhi (9.0 - 55006) <E7668200-B4CB-3612-96B8-D57E94077787> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI.framework/Versions/A/SecurityHI
0x7fff3161e000 - 0x7fff31624fff com.apple.speech.recognition.framework (6.0.3 - 6.0.3) <1F10ED1F-12C7-39AC-88A0-43A1338F9316> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/Versions/A/SpeechRecognition
0x7fff3173e000 - 0x7fff317f7ff7 com.apple.ColorSync (4.13.0 - 544) <E959C37C-099B-3DD8-AB3B-67F0625939F7> /System/Library/Frameworks/ColorSync.framework/Versions/A/ColorSync
0x7fff31982000 - 0x7fff31a15ff7 com.apple.audio.CoreAudio (4.3.0 - 4.3.0) <505A5EFB-6BCD-3E94-936F-1722C67F608E> /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio
0x7fff31a7c000 - 0x7fff31aa5ffb com.apple.CoreBluetooth (1.0 - 1) <942F88A5-AD68-3359-90D5-6F1A3311C51A> /System/Library/Frameworks/CoreBluetooth.framework/Versions/A/CoreBluetooth
0x7fff31aa6000 - 0x7fff31df7feb com.apple.CoreData (120 - 847.1) <9B5E7B0B-1957-3D56-99CA-6422123D300C> /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData
0x7fff31df8000 - 0x7fff31ec3fff com.apple.CoreDisplay (1.0 - 79.8) <094FFB53-C609-3925-B933-CCF0AD2B695B> /System/Library/Frameworks/CoreDisplay.framework/Versions/A/CoreDisplay
0x7fff31ec4000 - 0x7fff32363fef com.apple.CoreFoundation (6.9 - 1445.12) <C01736CF-D425-316C-A984-C8AF46EAD8CD> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x7fff32365000 - 0x7fff32971fef com.apple.CoreGraphics (2.0 - 1125.3.4) <AF7EE79B-5FA8-3C8C-B537-B3F35D0904AA> /System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics
0x7fff32973000 - 0x7fff32c6bffb com.apple.CoreImage (13.0.0 - 579.1.3) <92A69430-A484-37F7-B9D1-D065137D34EF> /System/Library/Frameworks/CoreImage.framework/Versions/A/CoreImage
0x7fff33005000 - 0x7fff33005fff com.apple.CoreServices (822.9 - 822.9) <F56B0D43-BD84-3214-AB01-346BD33C9583> /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
0x7fff33006000 - 0x7fff3307aff7 com.apple.AE (733 - 733) <09481487-37C2-359E-9E9A-7393B7C8643B> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE
0x7fff3307b000 - 0x7fff33352ff7 com.apple.CoreServices.CarbonCore (1178.2 - 1178.2) <A1FE74F8-953B-371E-A8AC-E87B30FB79C6> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore
0x7fff33353000 - 0x7fff33387ff7 com.apple.DictionaryServices (1.2 - 284) <3FCEE280-8DD0-37C9-BFD4-7BA87AAFC8EF> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/DictionaryServices.framework/Versions/A/DictionaryServices
0x7fff33388000 - 0x7fff33390ff3 com.apple.CoreServices.FSEvents (1239 - 1239) <7BBC5CB7-DBC8-316B-99B0-781827159A2F> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/FSEvents.framework/Versions/A/FSEvents
0x7fff33391000 - 0x7fff33548fff com.apple.LaunchServices (822.9 - 822.9) <E181C2C2-7283-3653-8E19-DA69EBE529E7> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
0x7fff33549000 - 0x7fff335f8ff3 com.apple.Metadata (10.7.0 - 1191.1) <0BB6AAA9-4185-3DBF-A93C-1787353FEBC7> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata
0x7fff335f9000 - 0x7fff33656ff7 com.apple.CoreServices.OSServices (822.9 - 822.9) <C91ABD5F-1FE3-3108-AB5E-BF90D56D1F55> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices
0x7fff33657000 - 0x7fff336c5fff com.apple.SearchKit (1.4.0 - 1.4.0) <14053F88-2C76-35CA-9FC1-2A9BC0B63F88> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit
0x7fff336c6000 - 0x7fff336eaffb com.apple.coreservices.SharedFileList (71.2 - 71.2) <41713411-2729-39F9-951A-DE39A00495F0> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SharedFileList.framework/Versions/A/SharedFileList
0x7fff33984000 - 0x7fff33ad2ff3 com.apple.CoreText (352.0 - 578.7) <B47CD5A5-47E8-3B07-A37D-A82E389405C4> /System/Library/Frameworks/CoreText.framework/Versions/A/CoreText
0x7fff33ad3000 - 0x7fff33b0dfff com.apple.CoreVideo (1.8 - 278.0) <9C66B618-8582-3731-A0F1-36FDD730FB07> /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo
0x7fff33b0e000 - 0x7fff33b98ffb com.apple.framework.CoreWLAN (13.0 - 1335) <CC027E31-E925-3682-9E47-93DBBB4F8445> /System/Library/Frameworks/CoreWLAN.framework/Versions/A/CoreWLAN
0x7fff33e12000 - 0x7fff33e17fff com.apple.DiskArbitration (2.7 - 2.7) <44836CE9-A9ED-3017-972A-7A0A3D6B472B> /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration
0x7fff33fd8000 - 0x7fff3439bfff com.apple.Foundation (6.9 - 1443.14) <70D20A4F-74BC-34D6-8451-DF943C5AA42F> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
0x7fff3440b000 - 0x7fff3443bff7 com.apple.GSS (4.0 - 2.0) <EA4ADB9D-FB33-3D20-BE11-7F833988FDD9> /System/Library/Frameworks/GSS.framework/Versions/A/GSS
0x7fff3454c000 - 0x7fff3464fffb com.apple.Bluetooth (6.0.0 - 6.0.1f1) <7C3FBAE9-F2A8-319E-88D9-16250E0B36F9> /System/Library/Frameworks/IOBluetooth.framework/Versions/A/IOBluetooth
0x7fff346af000 - 0x7fff3474afff com.apple.framework.IOKit (2.0.2 - 1445.20.1) <3316799C-14BC-366E-8A58-67485E5CD69E> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
0x7fff3474c000 - 0x7fff34752ffb com.apple.IOSurface (209 - 209) <507843CC-3C5D-3548-B86D-4564123F3993> /System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface
0x7fff347a7000 - 0x7fff3491afe7 com.apple.ImageIO.framework (3.3.0 - 1694.5) <45F9DB28-AF9E-388A-AA8C-B1D384A5C46E> /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
0x7fff3491b000 - 0x7fff3491fffb libGIF.dylib (1694.5) <91E5099B-E916-31DC-B11B-BA0D097C6492> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib
0x7fff34920000 - 0x7fff34a07fef libJP2.dylib (1694.5) <149E77A9-FECC-3716-8CE2-7853D038EE62> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJP2.dylib
0x7fff34a08000 - 0x7fff34a2bff7 libJPEG.dylib (1694.5) <9DBAEA95-BED3-3D4B-9BFF-FE6D9F6238D6> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib
0x7fff34d07000 - 0x7fff34d2dfeb libPng.dylib (1694.5) <8F65CAA8-48FC-37BA-AF66-C3261900C60A> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib
0x7fff34d2e000 - 0x7fff34d30ffb libRadiance.dylib (1694.5) <7BF9D344-799F-3DFA-AB0C-666282CADA41> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib
0x7fff34d31000 - 0x7fff34d7efff libTIFF.dylib (1694.5) <0494DA5F-610E-3C8A-A5F1-C43AD585F403> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib
0x7fff35ab5000 - 0x7fff35aceff7 com.apple.Kerberos (3.0 - 1) <CAF075C0-4C24-3ACE-9AE6-77BEFDEA3622> /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos
0x7fff36413000 - 0x7fff36492ff7 com.apple.Metal (123.3.5 - 123.3.5) <C158CADB-0722-37D8-84CE-B6B4E80B9768> /System/Library/Frameworks/Metal.framework/Versions/A/Metal
0x7fff364ad000 - 0x7fff364c2fff com.apple.MetalPerformanceShaders.MPSCore (1.0 - 1) <D3685A4F-533C-39A6-80B6-7CCA49234329> /System/Library/Frameworks/MetalPerformanceShaders.framework/Frameworks/MPSCore.framework/Versions/A/MPSCore
0x7fff364c3000 - 0x7fff3652dfef com.apple.MetalPerformanceShaders.MPSImage (1.0 - 1) <50B454D2-5D46-394E-B089-AC3242FEA9A2> /System/Library/Frameworks/MetalPerformanceShaders.framework/Frameworks/MPSImage.framework/Versions/A/MPSImage
0x7fff3652e000 - 0x7fff3654dfff com.apple.MetalPerformanceShaders.MPSMatrix (1.0 - 1) <0D5F11B0-476D-34EB-8CD0-491BEDA5E4F2> /System/Library/Frameworks/MetalPerformanceShaders.framework/Frameworks/MPSMatrix.framework/Versions/A/MPSMatrix
0x7fff3654e000 - 0x7fff365c4ff7 com.apple.MetalPerformanceShaders.MPSNeuralNetwork (1.0 - 1) <A4E950B8-380B-3561-8EA4-5C07C3F43816> /System/Library/Frameworks/MetalPerformanceShaders.framework/Frameworks/MPSNeuralNetwork.framework/Versions/A/MPSNeuralNetwork
0x7fff365c5000 - 0x7fff365c5ff7 com.apple.MetalPerformanceShaders.MetalPerformanceShaders (1.0 - 1) <02E0B95E-1F7C-317A-AF09-149E01D2D641> /System/Library/Frameworks/MetalPerformanceShaders.framework/Versions/A/MetalPerformanceShaders
0x7fff375d0000 - 0x7fff375dcffb com.apple.NetFS (6.0 - 4.0) <81B22AE7-7094-30F2-BF41-84CA05EDB95B> /System/Library/Frameworks/NetFS.framework/Versions/A/NetFS
0x7fff3a43c000 - 0x7fff3a489ffb com.apple.opencl (2.8.11 - 2.8.11) <5C8205DF-43F1-3189-93DE-2E340C9A53B8> /System/Library/Frameworks/OpenCL.framework/Versions/A/OpenCL
0x7fff3a48a000 - 0x7fff3a4a6ffb com.apple.CFOpenDirectory (10.13 - 207) <5F9257DC-289B-3DF0-A11A-857985419A41> /System/Library/Frameworks/OpenDirectory.framework/Versions/A/Frameworks/CFOpenDirectory.framework/Versions/A/CFOpenDirectory
0x7fff3a4a7000 - 0x7fff3a4b2fff com.apple.OpenDirectory (10.13 - 207) <DEF8368B-5DF6-3399-A933-C4BD58418F35> /System/Library/Frameworks/OpenDirectory.framework/Versions/A/OpenDirectory
0x7fff3b631000 - 0x7fff3b633fff libCVMSPluginSupport.dylib (16.2.1) <1CFE33C5-137B-32EF-8507-5A5484115B55> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCVMSPluginSupport.dylib
0x7fff3b634000 - 0x7fff3b637ff7 libCoreFSCache.dylib (160.9) <FF64C4CC-F262-3176-B06A-632C47CD636B> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreFSCache.dylib
0x7fff3b638000 - 0x7fff3b63cfff libCoreVMClient.dylib (160.9) <390D5A60-55BB-3D7B-928B-52BFCA05FD07> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreVMClient.dylib
0x7fff3b63d000 - 0x7fff3b645fff libGFXShared.dylib (16.2.1) <8A527D8B-1111-3E1B-8083-D5BBB8D15AA5> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGFXShared.dylib
0x7fff3b646000 - 0x7fff3b651fff libGL.dylib (16.2.1) <1C64ADD9-1BF9-3ED9-A492-077D7A322917> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
0x7fff3b652000 - 0x7fff3b68dfe7 libGLImage.dylib (16.2.1) <81442ED9-FA9E-32EF-9597-B8EDC29564D1> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage.dylib
0x7fff3b7fb000 - 0x7fff3b839ffb libGLU.dylib (16.2.1) <D9E8DAE9-51E8-3237-BCD5-D554C823738B> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib
0x7fff3c1b1000 - 0x7fff3c1bfffb com.apple.opengl (16.2.1 - 16.2.1) <66266ABC-2655-337C-AC64-955A16A8FCBB> /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
0x7fff3d013000 - 0x7fff3d256fff com.apple.QuartzCore (1.11 - 574.10.7) <556DE20F-0F03-31C9-B5EC-CDE82D8879BA> /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore
0x7fff3da8b000 - 0x7fff3dda6ff7 com.apple.security (7.0 - 58286.20.16) <ED7F62C8-4E61-34E0-9F1B-59DE4B8BD334> /System/Library/Frameworks/Security.framework/Versions/A/Security
0x7fff3dda7000 - 0x7fff3de30ff7 com.apple.securityfoundation (6.0 - 55185.1.1) <4048FFF8-A5BE-37FE-AAA8-4E00E4C733BE> /System/Library/Frameworks/SecurityFoundation.framework/Versions/A/SecurityFoundation
0x7fff3de5f000 - 0x7fff3de62ffb com.apple.xpc.ServiceManagement (1.0 - 1) <480072A0-FCE2-3A90-86D9-BAA21EC33F3F> /System/Library/Frameworks/ServiceManagement.framework/Versions/A/ServiceManagement
0x7fff3e206000 - 0x7fff3e276ffb com.apple.SystemConfiguration (1.17 - 1.17) <77EB81C7-7017-3777-BCB7-8DD078ABE25D> /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration
0x7fff40e3b000 - 0x7fff40ec6feb com.apple.APFS (1.0 - 1) <38DC700C-4232-3EE1-B092-13800457678E> /System/Library/PrivateFrameworks/APFS.framework/Versions/A/APFS
0x7fff41aa7000 - 0x7fff41acffff com.apple.framework.Apple80211 (13.0 - 1335) <335EE09E-40E4-344C-AED9-5E59E309F8FE> /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Apple80211
0x7fff41c1a000 - 0x7fff41c62fff com.apple.AppleJPEG (1.0 - 1) <DCAB2588-8879-3A64-87EA-EAA770BA1ADB> /System/Library/PrivateFrameworks/AppleJPEG.framework/Versions/A/AppleJPEG
0x7fff41c9d000 - 0x7fff41cc5fff com.apple.applesauce (1.0 - ???) <32FF4851-2F68-35BA-835F-91856A20C323> /System/Library/PrivateFrameworks/AppleSauce.framework/Versions/A/AppleSauce
0x7fff42484000 - 0x7fff4248bff7 com.apple.coreservices.BackgroundTaskManagement (1.0 - 57.1) <7F54A7A8-3667-3071-9DE6-2D915C63F70C> /System/Library/PrivateFrameworks/BackgroundTaskManagement.framework/Versions/A/BackgroundTaskManagement
0x7fff43e6c000 - 0x7fff43e75ffb com.apple.CommonAuth (4.0 - 2.0) <F9A7C82E-197F-382E-B854-3DCE83FD6DA3> /System/Library/PrivateFrameworks/CommonAuth.framework/Versions/A/CommonAuth
0x7fff4487b000 - 0x7fff4488bff7 com.apple.CoreEmoji (1.0 - 69.2.4) <7FB592BF-FAA2-3290-8B04-28BCEA49F519> /System/Library/PrivateFrameworks/CoreEmoji.framework/Versions/A/CoreEmoji
0x7fff45aa6000 - 0x7fff45b37fff com.apple.CoreSymbolication (63075) <22359913-3FAE-3FE3-9F88-F3521169FB4E> /System/Library/PrivateFrameworks/CoreSymbolication.framework/Versions/A/CoreSymbolication
0x7fff45bba000 - 0x7fff45ceefd7 com.apple.coreui (2.1 - 489) <C4AA981A-A1DC-3F65-84DF-228F4007AE6B> /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI
0x7fff45cef000 - 0x7fff45de8ffb com.apple.CoreUtils (5.2 - 520.68) <7F80020B-0208-38A7-B333-EC1463FF1AA4> /System/Library/PrivateFrameworks/CoreUtils.framework/Versions/A/CoreUtils
0x7fff45e3d000 - 0x7fff45ea1fff com.apple.framework.CoreWiFi (13.0 - 1335) <4244427A-5662-3B38-BF08-C4510FCFBB12> /System/Library/PrivateFrameworks/CoreWiFi.framework/Versions/A/CoreWiFi
0x7fff45ea2000 - 0x7fff45eb1ff7 com.apple.CrashReporterSupport (10.13 - 1) <842680F4-0BFB-386A-A32D-E9ED39DCE790> /System/Library/PrivateFrameworks/CrashReporterSupport.framework/Versions/A/CrashReporterSupport
0x7fff45f40000 - 0x7fff45f44ffb com.apple.DSExternalDisplay (3.1 - 380) <BEC07C7C-F3AC-3CF3-B13E-3EBFD6224C0D> /System/Library/PrivateFrameworks/DSExternalDisplay.framework/Versions/A/DSExternalDisplay
0x7fff4608f000 - 0x7fff460cfff7 com.apple.DebugSymbols (141 - 141) <99562E28-0E56-3F6F-93A1-EF997A5E1F87> /System/Library/PrivateFrameworks/DebugSymbols.framework/Versions/A/DebugSymbols
0x7fff460d0000 - 0x7fff461f9fff com.apple.desktopservices (1.12.1 - 1.12.1) <E00E237A-CB67-3ABC-BAE2-41CE7AA5C4B8> /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/DesktopServicesPriv
0x7fff46f57000 - 0x7fff47385fff com.apple.vision.FaceCore (3.3.2 - 3.3.2) <80C97AD7-D5C2-311A-B268-4AA60CAD6CED> /System/Library/PrivateFrameworks/FaceCore.framework/Versions/A/FaceCore
0x7fff4b385000 - 0x7fff4b394fff com.apple.GraphVisualizer (1.0 - 5) <0A93C5DE-0D28-312E-8764-6B0FB805ED91> /System/Library/PrivateFrameworks/GraphVisualizer.framework/Versions/A/GraphVisualizer
0x7fff4b40c000 - 0x7fff4b480fff com.apple.Heimdal (4.0 - 2.0) <600A9BD5-3DD2-3F7C-B40E-8485026FE936> /System/Library/PrivateFrameworks/Heimdal.framework/Versions/A/Heimdal
0x7fff4bd21000 - 0x7fff4bd28ffb com.apple.IOAccelerator (374.1 - 374.1) <DD7ACD4F-F908-3ED8-A144-4091AA3C85BE> /System/Library/PrivateFrameworks/IOAccelerator.framework/Versions/A/IOAccelerator
0x7fff4bd2c000 - 0x7fff4bd42ff7 com.apple.IOPresentment (1.0 - 32.1) <23542804-9605-3458-9468-22B0DE738E21> /System/Library/PrivateFrameworks/IOPresentment.framework/Versions/A/IOPresentment
0x7fff4c101000 - 0x7fff4c126ffb com.apple.IconServices (97.3 - 97.3) <9FB00A91-C46B-3CF1-973A-FDDABCEA088D> /System/Library/PrivateFrameworks/IconServices.framework/Versions/A/IconServices
0x7fff4c3b8000 - 0x7fff4c4adfff com.apple.LanguageModeling (1.0 - 159.2.1) <CC4069FF-BF5C-30F5-98F5-D6F746C5AA04> /System/Library/PrivateFrameworks/LanguageModeling.framework/Versions/A/LanguageModeling
0x7fff4c4ae000 - 0x7fff4c4f0ff7 com.apple.Lexicon-framework (1.0 - 33.2) <5CC5E8EE-62A1-3EA5-B300-A39ABD0CF12D> /System/Library/PrivateFrameworks/Lexicon.framework/Versions/A/Lexicon
0x7fff4c4f4000 - 0x7fff4c4fbff7 com.apple.LinguisticData (1.0 - 238.2.2) <0C53E8E4-5BB6-377E-BD74-DDC3B548D699> /System/Library/PrivateFrameworks/LinguisticData.framework/Versions/A/LinguisticData
0x7fff4d0d6000 - 0x7fff4d13dff7 com.apple.gpusw.MetalTools (1.0 - 1) <A9C560B2-2830-3CC3-8069-128F8D7B8B85> /System/Library/PrivateFrameworks/MetalTools.framework/Versions/A/MetalTools
0x7fff4d355000 - 0x7fff4d37dff7 com.apple.MultitouchSupport.framework (1004.1 - 1004.1) <69BF94F5-9301-3755-98A1-A981DB03C395> /System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/A/MultitouchSupport
0x7fff4d5e1000 - 0x7fff4d5ecfff com.apple.NetAuth (6.2 - 6.2) <5C6F492A-28EF-3A0E-B573-6F3D60CFF0C7> /System/Library/PrivateFrameworks/NetAuth.framework/Versions/A/NetAuth
0x7fff4eddf000 - 0x7fff4ee1fffb com.apple.PerformanceAnalysis (1.183 - 183) <520FEF4A-4C60-31FA-8BA0-528294BC41ED> /System/Library/PrivateFrameworks/PerformanceAnalysis.framework/Versions/A/PerformanceAnalysis
0x7fff50be2000 - 0x7fff50c00fff com.apple.ProtocolBuffer (1 - 259) <D047A3FE-C7A8-3CAA-9891-6232BA88C247> /System/Library/PrivateFrameworks/ProtocolBuffer.framework/Versions/A/ProtocolBuffer
0x7fff526f9000 - 0x7fff527fdff7 com.apple.Sharing (933.2 - 933.2) <21CB05ED-E038-34E7-865E-9656DEC83763> /System/Library/PrivateFrameworks/Sharing.framework/Versions/A/Sharing
0x7fff52827000 - 0x7fff52828fff com.apple.performance.SignpostNotification (1.0 - 1) <5C953AF5-746A-3049-A2BC-901D6C7B583F> /System/Library/PrivateFrameworks/SignpostNotification.framework/Versions/A/SignpostNotification
0x7fff53521000 - 0x7fff537b9fff com.apple.SkyLight (1.600.0 - 312.11) <75F0EBAD-AF87-3125-B5D0-752278352FEC> /System/Library/PrivateFrameworks/SkyLight.framework/Versions/A/SkyLight
0x7fff53f66000 - 0x7fff53f73ff7 com.apple.SpeechRecognitionCore (4.0.13 - 4.0.13) <AC026FB9-78F8-31F9-BB80-619D5378DB70> /System/Library/PrivateFrameworks/SpeechRecognitionCore.framework/Versions/A/SpeechRecognitionCore
0x7fff54b00000 - 0x7fff54b84fe7 com.apple.Symbolication (9.0 - 63079.1) <177BC9CA-E6AE-3B40-806F-0080C0CDFF29> /System/Library/PrivateFrameworks/Symbolication.framework/Versions/A/Symbolication
0x7fff5506f000 - 0x7fff55076ff3 com.apple.TCC (1.0 - 1) <9E54D9D2-FCBE-39EF-BAD5-4C2C41DA0D36> /System/Library/PrivateFrameworks/TCC.framework/Versions/A/TCC
0x7fff5527d000 - 0x7fff5533eff7 com.apple.TextureIO (3.4 - 3.4) <7C93B388-7171-3B3D-BD23-0A8280059260> /System/Library/PrivateFrameworks/TextureIO.framework/Versions/A/TextureIO
0x7fff56cba000 - 0x7fff56cbcffb com.apple.loginsupport (1.0 - 1) <5E2C4AA7-066D-3FDB-B0E1-4CDAF287392C> /System/Library/PrivateFrameworks/login.framework/Versions/A/Frameworks/loginsupport.framework/Versions/A/loginsupport
0x7fff56e20000 - 0x7fff56e53fff libclosured.dylib (519.2.1) <31A6AC03-8F51-367E-9E00-FF0F1AD10F6F> /usr/lib/closure/libclosured.dylib
0x7fff56ef2000 - 0x7fff56f2bff7 libCRFSuite.dylib (41) <AB2DA745-F22C-30CF-81D4-35DD716463B8> /usr/lib/libCRFSuite.dylib
0x7fff56f2c000 - 0x7fff56f37fff libChineseTokenizer.dylib (28) <D30A7DB6-058F-3286-9583-60C9EEB77A6E> /usr/lib/libChineseTokenizer.dylib
0x7fff56fc9000 - 0x7fff56fcaff3 libDiagnosticMessagesClient.dylib (104) <9712E980-76EE-3A89-AEA6-DF4BAF5C0574> /usr/lib/libDiagnosticMessagesClient.dylib
0x7fff57001000 - 0x7fff571cbff3 libFosl_dynamic.dylib (17.7) <B2476843-7FA7-3E62-B79F-2B15FE557E63> /usr/lib/libFosl_dynamic.dylib
0x7fff57203000 - 0x7fff57203fff libOpenScriptingUtil.dylib (174) <203D2C39-61BB-3713-A502-2D17B04A42AC> /usr/lib/libOpenScriptingUtil.dylib
0x7fff57332000 - 0x7fff57333ff3 libSystem.B.dylib (1252) <C5473FF4-E5A9-31D3-83F9-094D8A76C31F> /usr/lib/libSystem.B.dylib
0x7fff573c6000 - 0x7fff573c6fff libapple_crypto.dylib (109.20.5) <71AE014E-4C98-3868-9EE8-2A3F23536B41> /usr/lib/libapple_crypto.dylib
0x7fff573c7000 - 0x7fff573ddff7 libapple_nghttp2.dylib (1.24) <01402BC4-4822-3676-9C80-50D83F816424> /usr/lib/libapple_nghttp2.dylib
0x7fff573de000 - 0x7fff57408ff3 libarchive.2.dylib (54) <8FC28DD8-E315-3C3E-95FE-D1D2CBE49888> /usr/lib/libarchive.2.dylib
0x7fff57409000 - 0x7fff5748afdf libate.dylib (1.13.1) <178ACDAD-DE7E-346C-A613-1CBF7929AC07> /usr/lib/libate.dylib
0x7fff5748e000 - 0x7fff5748eff3 libauto.dylib (187) <A05C7900-F8C7-3E75-8D3F-909B40C19717> /usr/lib/libauto.dylib
0x7fff5748f000 - 0x7fff57543ff7 libboringssl.dylib (109.20.5) <A1CC732C-B0AC-35FA-8DE0-03CF4BA67F5A> /usr/lib/libboringssl.dylib
0x7fff57544000 - 0x7fff57554ff3 libbsm.0.dylib (39) <770B341F-3BB7-3123-B53C-F2D58868A963> /usr/lib/libbsm.0.dylib
0x7fff57555000 - 0x7fff57562ffb libbz2.1.0.dylib (38) <0A5086BB-4724-3C14-979D-5AD4F26B5B45> /usr/lib/libbz2.1.0.dylib
0x7fff57563000 - 0x7fff575b9fff libc++.1.dylib (400.9) <FCF5E1F6-2B04-3545-8004-F3AB32FED172> /usr/lib/libc++.1.dylib
0x7fff575ba000 - 0x7fff575deff7 libc++abi.dylib (400.7) <217656D5-BC40-37FF-B322-91CB2AAD4F34> /usr/lib/libc++abi.dylib
0x7fff575e0000 - 0x7fff575f0fff libcmph.dylib (6) <A5509EE8-7E00-3224-8814-015B077A3CF5> /usr/lib/libcmph.dylib
0x7fff575f1000 - 0x7fff57607fff libcompression.dylib (47) <E64D4416-DFBF-314B-BBB9-BED23C3A251C> /usr/lib/libcompression.dylib
0x7fff578af000 - 0x7fff578c7ff7 libcoretls.dylib (155) <DFE2454F-2FE3-3B2B-A22B-422947C34C69> /usr/lib/libcoretls.dylib
0x7fff578c8000 - 0x7fff578c9ffb libcoretls_cfhelpers.dylib (155) <D3F4B882-40C1-3CD4-927B-0E0ED6031D0B> /usr/lib/libcoretls_cfhelpers.dylib
0x7fff57d99000 - 0x7fff57defff3 libcups.2.dylib (462.1) <4F4F85FD-D907-3D51-A3F0-2A239E165A07> /usr/lib/libcups.2.dylib
0x7fff57f2d000 - 0x7fff57f2dfff libenergytrace.dylib (16) <A92AB8B8-B986-3CE6-980D-D55090FEF387> /usr/lib/libenergytrace.dylib
0x7fff57f64000 - 0x7fff57f69ffb libheimdal-asn1.dylib (520) <D968FE68-7770-3AEA-BFEB-3F7F4CB10DDC> /usr/lib/libheimdal-asn1.dylib
0x7fff57f95000 - 0x7fff58086ff7 libiconv.2.dylib (51) <0772997F-4109-38A1-91ED-0F3F16AE99E5> /usr/lib/libiconv.2.dylib
0x7fff58087000 - 0x7fff582aeffb libicucore.A.dylib (59131.0.1) <3EA7567C-0A0C-3052-BC3C-DDB05A5679A7> /usr/lib/libicucore.A.dylib
0x7fff582fb000 - 0x7fff582fcfff liblangid.dylib (128) <39C39393-0D05-301D-93B2-F224FC4949AA> /usr/lib/liblangid.dylib
0x7fff582fd000 - 0x7fff58316ffb liblzma.5.dylib (10) <3D419A50-961F-37D2-8A01-3DC7AB7B8D18> /usr/lib/liblzma.5.dylib
0x7fff58317000 - 0x7fff5832dff7 libmarisa.dylib (9) <D6D2D55D-1D2E-3442-B152-B18803C0ABB4> /usr/lib/libmarisa.dylib
0x7fff583de000 - 0x7fff58606ff7 libmecabra.dylib (779.5.3) <1F81DB66-4EEE-3B14-BA15-4930546C94D4> /usr/lib/libmecabra.dylib
0x7fff587de000 - 0x7fff588b4ff7 libnetwork.dylib (1229.21.1) <9998359C-3A37-3ED0-8CFC-C095C99F2102> /usr/lib/libnetwork.dylib
0x7fff5892a000 - 0x7fff58d187e7 libobjc.A.dylib (723) <93A92316-DE1E-378C-8891-99720B50D075> /usr/lib/libobjc.A.dylib
0x7fff58d2b000 - 0x7fff58d2ffff libpam.2.dylib (22) <7B4D2CE2-1438-387A-9802-5CEEFBF26F86> /usr/lib/libpam.2.dylib
0x7fff58d32000 - 0x7fff58d66fff libpcap.A.dylib (79.20.1) <FA13918B-A247-3181-B256-9B852C7BA316> /usr/lib/libpcap.A.dylib
0x7fff58de6000 - 0x7fff58e02ffb libresolv.9.dylib (65) <E8F3415B-4472-3202-8901-41FD87981DB2> /usr/lib/libresolv.9.dylib
0x7fff58e52000 - 0x7fff58fe7fef libsqlite3.dylib (274.1) <075468C1-75CE-318F-9E9B-F62B6A88E1B3> /usr/lib/libsqlite3.dylib
0x7fff591b7000 - 0x7fff591f0ffb libusrtcp.dylib (1229.21.1) <ED5D440E-6BE6-3AF3-817B-4D0BA2E53EDE> /usr/lib/libusrtcp.dylib
0x7fff591f1000 - 0x7fff591f4ffb libutil.dylib (51.20.1) <216D18E5-0BAF-3EAF-A38E-F6AC37CBABD9> /usr/lib/libutil.dylib
0x7fff591f5000 - 0x7fff59202fff libxar.1.dylib (400) <0316128D-3B47-3052-995D-97B4FE5491DC> /usr/lib/libxar.1.dylib
0x7fff59206000 - 0x7fff592edfff libxml2.2.dylib (31.7) <49544596-BCF8-3765-8DC5-DB1A9A90EF92> /usr/lib/libxml2.2.dylib
0x7fff592ee000 - 0x7fff59316fff libxslt.1.dylib (15.10) <66682AF6-C2D5-374C-901F-25A3E72814DC> /usr/lib/libxslt.1.dylib
0x7fff59317000 - 0x7fff59329ffb libz.1.dylib (70) <48C67CFC-940D-3857-8DAD-857774605352> /usr/lib/libz.1.dylib
0x7fff593c6000 - 0x7fff593caff7 libcache.dylib (80) <354F3B7D-404E-3398-9EBF-65CA2CE65211> /usr/lib/system/libcache.dylib
0x7fff593cb000 - 0x7fff593d5ff3 libcommonCrypto.dylib (60118.1.1) <6C502A55-3B54-3B48-BA7B-FA39F56C0B1E> /usr/lib/system/libcommonCrypto.dylib
0x7fff593d6000 - 0x7fff593ddfff libcompiler_rt.dylib (62) <4487CFBA-A5D7-3282-9E6B-94CAD7BE507E> /usr/lib/system/libcompiler_rt.dylib
0x7fff593de000 - 0x7fff593e6fff libcopyfile.dylib (146) <7E4BD264-5617-339B-AC73-E8D07EF2C51D> /usr/lib/system/libcopyfile.dylib
0x7fff593e7000 - 0x7fff5946bff7 libcorecrypto.dylib (562) <7974762C-DEF7-3056-9856-9821C27846DB> /usr/lib/system/libcorecrypto.dylib
0x7fff594f2000 - 0x7fff5952bff7 libdispatch.dylib (913.20.5) <389EBBCD-3AA2-3340-AA48-4FBF621401BD> /usr/lib/system/libdispatch.dylib
0x7fff5952c000 - 0x7fff59549ff7 libdyld.dylib (519.2.1) <2597D818-42D2-3375-BD9D-451D5942A6BA> /usr/lib/system/libdyld.dylib
0x7fff5954a000 - 0x7fff5954affb libkeymgr.dylib (28) <6D84A96F-C65B-38EC-BDB5-21FD2C97E7B2> /usr/lib/system/libkeymgr.dylib
0x7fff5954b000 - 0x7fff59557ff3 libkxld.dylib (4570.20.62) <E82BC0F8-C51D-3BB2-A0EB-B7899CD6606C> /usr/lib/system/libkxld.dylib
0x7fff59558000 - 0x7fff59558ff7 liblaunch.dylib (1205.20.31) <0089D38D-868D-3748-A032-934AAE679F0D> /usr/lib/system/liblaunch.dylib
0x7fff59559000 - 0x7fff5955dffb libmacho.dylib (900.0.1) <756F2553-07B6-3B42-ACEA-2F0F1A5E8D0F> /usr/lib/system/libmacho.dylib
0x7fff5955e000 - 0x7fff59560ff3 libquarantine.dylib (86) <6AC8773F-3817-3D82-99C2-01BABB9C3CBB> /usr/lib/system/libquarantine.dylib
0x7fff59561000 - 0x7fff59562ff3 libremovefile.dylib (45) <912FA211-DD8C-3C92-8424-21B89F8B10FD> /usr/lib/system/libremovefile.dylib
0x7fff59563000 - 0x7fff5957afff libsystem_asl.dylib (356.1.1) <94972913-9DF0-3C78-847C-43E58919E3DA> /usr/lib/system/libsystem_asl.dylib
0x7fff5957b000 - 0x7fff5957bfff libsystem_blocks.dylib (67) <F2493BB5-B1C6-3C4D-9F1F-1B402E0F1DB7> /usr/lib/system/libsystem_blocks.dylib
0x7fff5957c000 - 0x7fff59605ff7 libsystem_c.dylib (1244.20.1) <E0A0A865-AFE5-3230-B535-772D3177D093> /usr/lib/system/libsystem_c.dylib
0x7fff59606000 - 0x7fff59609ffb libsystem_configuration.dylib (963) <D7EFEAE6-22A0-348E-BBBE-44FFD41934FA> /usr/lib/system/libsystem_configuration.dylib
0x7fff5960a000 - 0x7fff5960dffb libsystem_coreservices.dylib (51) <21A488D0-2D07-344E-8631-CC8B2A246F35> /usr/lib/system/libsystem_coreservices.dylib
0x7fff5960e000 - 0x7fff5960ffff libsystem_darwin.dylib (1244.20.1) <4E340966-7DE7-38C4-8408-3708E592C21D> /usr/lib/system/libsystem_darwin.dylib
0x7fff59610000 - 0x7fff59616ff7 libsystem_dnssd.dylib (878.20.3) <AB5B8E5E-75CD-3695-B89B-77DF73E3EDB1> /usr/lib/system/libsystem_dnssd.dylib
0x7fff59617000 - 0x7fff59660ff7 libsystem_info.dylib (517) <483BE95B-62EB-3663-ACB3-9915A40C70F5> /usr/lib/system/libsystem_info.dylib
0x7fff59661000 - 0x7fff59686ff7 libsystem_kernel.dylib (4570.20.62) <77865ABA-D9CA-31D5-B484-560660CAB07D> /usr/lib/system/libsystem_kernel.dylib
0x7fff59687000 - 0x7fff596d2fcb libsystem_m.dylib (3146) <ABB1B85F-9FFE-31B8-AD4F-E39A30794A93> /usr/lib/system/libsystem_m.dylib
0x7fff596d3000 - 0x7fff596f2fff libsystem_malloc.dylib (140.1.1) <9F0745FF-B92F-330D-8812-BB74001D1D33> /usr/lib/system/libsystem_malloc.dylib
0x7fff596f3000 - 0x7fff59796ff3 libsystem_network.dylib (1229.21.1) <ECB15E1D-5D02-3B79-9C64-64BAAC808278> /usr/lib/system/libsystem_network.dylib
0x7fff59797000 - 0x7fff597a1ffb libsystem_networkextension.dylib (767.20.1) <27F139B6-3250-345D-8495-7C22A00BC488> /usr/lib/system/libsystem_networkextension.dylib
0x7fff597a2000 - 0x7fff597abff3 libsystem_notify.dylib (172) <98EA3D62-7C86-30DE-8261-D020D2F1EFF3> /usr/lib/system/libsystem_notify.dylib
0x7fff597ac000 - 0x7fff597b3ff7 libsystem_platform.dylib (161.20.1) <9090E7AA-5F8F-31BA-8476-7B7122CC82BC> /usr/lib/system/libsystem_platform.dylib
0x7fff597b4000 - 0x7fff597bffff libsystem_pthread.dylib (301.20.1) <8AF70211-A670-3CC7-AE24-EFE9F1C2B1E5> /usr/lib/system/libsystem_pthread.dylib
0x7fff597c0000 - 0x7fff597c3ff3 libsystem_sandbox.dylib (765.21.1) <FAC0DA75-892E-3161-9D6A-2F999D8519B6> /usr/lib/system/libsystem_sandbox.dylib
0x7fff597c4000 - 0x7fff597c5ff3 libsystem_secinit.dylib (30) <F06ADB8F-9E94-34A7-B3C9-2C22FDD14BAD> /usr/lib/system/libsystem_secinit.dylib
0x7fff597c6000 - 0x7fff597cdff7 libsystem_symptoms.dylib (820.20.3) <4439B818-4C84-30E9-91B5-B7766FA74650> /usr/lib/system/libsystem_symptoms.dylib
0x7fff597ce000 - 0x7fff597e1ff7 libsystem_trace.dylib (829.20.1) <878582CE-0647-31DD-92C3-AFCD5C3A714D> /usr/lib/system/libsystem_trace.dylib
0x7fff597e3000 - 0x7fff597e8ff7 libunwind.dylib (35.3) <6D4FCD49-D2A9-3233-95C7-A7635CE265F2> /usr/lib/system/libunwind.dylib
0x7fff597e9000 - 0x7fff59815ff7 libxpc.dylib (1205.20.31) <58676E88-35FD-3CF3-99BB-2A82E09F8058> /usr/lib/system/libxpc.dylib
➜ ~
➜ ~
➜ ~
➜ ~
➜ ~
➜ ~
➜ ~
➜ ~
hmm doesn't seem to be anything conclusive in that sample. there might've been some delay between when sample ran and when the issue in karabiner-grabber was happening (or it could be something else completely). If possible, could you grab a few more samples and post them here?
any updates on this?
I've been using my computer, a MacBook Pro (Retina, 13-inch, Early 2015), recently under very heavy load (a load average that's consistently over 100 for hours), and I've been able to reproduce these issues very regularly. A lot of people seem to be fixated on krbn::device_grabber::update_caps_lock_led(bool), since it appears to have a large impact based on the samples collected, so I compiled a build with the body of the method commented out for good measure. Unfortunately, this doesn't seem to have completely mitigated the issue, so it seems like the underlying issue is that Karabiner in general is doing something extended on the main thread that it really shouldn't be doing, and that karabiner_grabber is hanging up the HID event loop or similar.
I can confirm that turning off the led manipulation not solve the problem, just minimize it
if this happens frequently for you, can you gather some samples (as shown earlier in this issue) and ensure that the issue is happening as the sample is being gathered. Then we can make more progress on this issue
Here's a sample I was able to pull:
Call graph:
952 Thread_15726702 DispatchQueue_1: com.apple.main-thread (serial)
+ 952 start (in libdyld.dylib) + 1 [0x7fff5a107015]
+ 952 main (in karabiner_grabber) + 3302 [0x10e253d56]
+ 952 CFRunLoopRun (in CoreFoundation) + 99 [0x7fff32342c33]
+ 952 CFRunLoopRunSpecific (in CoreFoundation) + 483 [0x7fff323041a3]
+ 919 __CFRunLoopRun (in CoreFoundation) + 2586 [0x7fff32304e4a]
+ ! 919 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ (in CoreFoundation) + 9 [0x7fff32342c69]
+ ! 720 _dispatch_main_queue_callback_4CF (in libdispatch.dylib) + 1148 [0x7fff5a0d9395]
+ ! : 720 _dispatch_client_callout (in libdispatch.dylib) + 8 [0x7fff5a0cddb8]
+ ! : 720 _dispatch_sync_thread_bound_invoke (in libdispatch.dylib) + 79 [0x7fff5a0e43fe]
+ ! : 720 _dispatch_client_callout (in libdispatch.dylib) + 8 [0x7fff5a0cddb8]
+ ! : 720 invocation function for block in krbn::device_grabber::post_frontmost_application_changed_event(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) (in karabiner_grabber) + 203 [0x10e2f0beb]
+ ! : 720 boost::signals2::detail::signal_impl<void (), boost::signals2::optional_last_value<void>, int, std::__1::less<int>, boost::function<void ()>, boost::function<void (boost::signals2::connection const&)>, boost::signals2::mutex>::operator()() (in karabiner_grabber) + 616 [0x10e29f478]
+ ! : 720 boost::signals2::detail::slot_call_iterator_t<boost::signals2::detail::variadic_slot_invoker<boost::signals2::detail::void_type>, std::__1::__list_iterator<boost::shared_ptr<boost::signals2::detail::connection_body<std::__1::pair<boost::signals2::detail::slot_meta_group, boost::optional<int> >, boost::signals2::slot<void (), boost::function<void ()> >, boost::signals2::mutex> >, void*>, boost::signals2::detail::connection_body<std::__1::pair<boost::signals2::detail::slot_meta_group, boost::optional<int> >, boost::signals2::slot<void (), boost::function<void ()> >, boost::signals2::mutex> >::dereference() const (in karabiner_grabber) + 60 [0x10e29ffdc]
+ ! : 720 krbn::device_grabber::manipulate(unsigned long long) (in karabiner_grabber) + 75 [0x10e2fda2b]
+ ! : 720 krbn::manipulator::manipulator_managers_connector::connection::manipulate(unsigned long long) (in karabiner_grabber) + 137 [0x10e2fdc39]
+ ! : 720 krbn::manipulator::manipulator_manager::manipulate(std::__1::shared_ptr<krbn::event_queue> const&, std::__1::shared_ptr<krbn::event_queue> const&, unsigned long long) (in karabiner_grabber) + 1208 [0x10e2fe1b8]
+ ! : 720 krbn::event_queue::emplace_back_event(krbn::device_id, krbn::event_queue::queued_event::event_time_stamp const&, krbn::event_queue::queued_event::event const&, krbn::event_type, krbn::event_queue::queued_event::event const&, bool) (in karabiner_grabber) + 558 [0x10e29968e]
+ ! : 720 krbn::manipulator_environment::save_to_file() const (in karabiner_grabber) + 239 [0x10e29c5ef]
+ ! : 719 krbn::json_utility::save_to_file(nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) (in karabiner_grabber) + 651 [0x10e26f14b]
+ ! : | 719 std::__1::basic_filebuf<char, std::__1::char_traits<char> >::~basic_filebuf() (in karabiner_grabber) + 52 [0x10e270794]
+ ! : | 719 fclose (in libsystem_c.dylib) + 92 [0x7fff5a1920e9]
+ ! : | 719 __close_nocancel (in libsystem_kernel.dylib) + 10 [0x7fff5a25706e]
+ ! : 1 krbn::json_utility::save_to_file(nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) (in karabiner_grabber) + 583 [0x10e26f107]
+ ! : 1 unlink (in libsystem_kernel.dylib) + 11 [0x7fff5a254d14]
+ ! : 1 __unlink (in libsystem_kernel.dylib) + 10 [0x7fff5a2581aa]
+ ! 199 _dispatch_main_queue_callback_4CF (in libdispatch.dylib) + 776 [0x7fff5a0d9221]
+ ! 199 _dispatch_source_invoke (in libdispatch.dylib) + 620 [0x7fff5a0d0081]
+ ! 199 _dispatch_continuation_pop (in libdispatch.dylib) + 472 [0x7fff5a0e0e81]
+ ! 199 _dispatch_client_callout (in libdispatch.dylib) + 8 [0x7fff5a0cddb8]
+ ! 199 invocation function for block in krbn::connection_manager::connection_manager(krbn::version_monitor&, krbn::device_grabber&) (in karabiner_grabber) + 35 [0x10e2772f3]
+ ! 199 SCDynamicStoreCopyConsoleUser (in SystemConfiguration) + 100 [0x7fff3e886faf]
+ ! 199 SCDynamicStoreCopyValue (in SystemConfiguration) + 158 [0x7fff3e868f7e]
+ ! 199 configget (in SystemConfiguration) + 170 [0x7fff3e869a5c]
+ ! 199 mach_msg (in libsystem_kernel.dylib) + 60 [0x7fff5a24d724]
+ ! 199 mach_msg_trap (in libsystem_kernel.dylib) + 10 [0x7fff5a24e20a]
+ 27 __CFRunLoopRun (in CoreFoundation) + 1783 [0x7fff32304b27]
+ ! 27 __CFRunLoopServiceMachPort (in CoreFoundation) + 341 [0x7fff323057d5]
+ ! 27 mach_msg (in libsystem_kernel.dylib) + 60 [0x7fff5a24d724]
+ ! 27 mach_msg_trap (in libsystem_kernel.dylib) + 10 [0x7fff5a24e20a]
+ 6 __CFRunLoopRun (in CoreFoundation) + 2848 [0x7fff32304f50]
+ 6 __CFRunLoopDoSource1 (in CoreFoundation) + 533 [0x7fff3230d395]
+ 6 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ (in CoreFoundation) + 41 [0x7fff3230d449]
+ 6 __CFMachPortPerform (in CoreFoundation) + 347 [0x7fff3230d5bb]
+ 6 __IOHIDQueueValueAvailableCallback (in IOKit) + 64 [0x7fff34aff1f1]
+ 6 CFDictionaryApplyFunction (in CoreFoundation) + 192 [0x7fff322bf4a0]
+ 6 CFBasicHashApply (in CoreFoundation) + 106 [0x7fff322bf55a]
+ 6 __CFDictionaryApplyFunction_block_invoke (in CoreFoundation) + 22 [0x7fff322bf596]
+ 6 krbn::human_interface_device::queue_value_available_callback() (in karabiner_grabber) + 2764 [0x10e3092cc]
+ 6 krbn::device_grabber::value_callback(krbn::human_interface_device&, krbn::event_queue&) (in karabiner_grabber) + 68 [0x10e3042d4]
+ 6 boost::signals2::detail::signal_impl<void (), boost::signals2::optional_last_value<void>, int, std::__1::less<int>, boost::function<void ()>, boost::function<void (boost::signals2::connection const&)>, boost::signals2::mutex>::operator()() (in karabiner_grabber) + 616 [0x10e29f478]
+ 6 boost::signals2::detail::slot_call_iterator_t<boost::signals2::detail::variadic_slot_invoker<boost::signals2::detail::void_type>, std::__1::__list_iterator<boost::shared_ptr<boost::signals2::detail::connection_body<std::__1::pair<boost::signals2::detail::slot_meta_group, boost::optional<int> >, boost::signals2::slot<void (), boost::function<void ()> >, boost::signals2::mutex> >, void*>, boost::signals2::detail::connection_body<std::__1::pair<boost::signals2::detail::slot_meta_group, boost::optional<int> >, boost::signals2::slot<void (), boost::function<void ()> >, boost::signals2::mutex> >::dereference() const (in karabiner_grabber) + 60 [0x10e29ffdc]
+ 6 krbn::device_grabber::manipulate(unsigned long long) (in karabiner_grabber) + 115 [0x10e2fda53]
+ 6 krbn::manipulator::details::post_event_to_virtual_devices::queue::post_events(krbn::virtual_hid_device_client&) (in karabiner_grabber) + 619 [0x10e2fe63b]
+ 6 krbn::virtual_hid_device_client::call_method(std::__1::function<int ()>) (in karabiner_grabber) + 56 [0x10e2e35e8]
+ 6 IOConnectCallStructMethod (in IOKit) + 38 [0x7fff34ac0de7]
+ 6 IOConnectCallMethod (in IOKit) + 186 [0x7fff34abfcb4]
+ 6 io_connect_method (in IOKit) + 369 [0x7fff34abfe87]
+ 6 mach_msg (in libsystem_kernel.dylib) + 60 [0x7fff5a24d724]
+ 6 mach_msg_trap (in libsystem_kernel.dylib) + 10 [0x7fff5a24e20a]
952 Thread_15726731
+ 952 start_wqthread (in libsystem_pthread.dylib) + 13 [0x7fff5a41ebe9]
+ 952 _pthread_wqthread (in libsystem_pthread.dylib) + 1035 [0x7fff5a41f009]
+ 952 __workq_kernreturn (in libsystem_kernel.dylib) + 10 [0x7fff5a258292]
952 Thread_15727428
952 thread_start (in libsystem_pthread.dylib) + 13 [0x7fff5a41ebf9]
952 _pthread_start (in libsystem_pthread.dylib) + 377 [0x7fff5a41f50d]
952 _pthread_body (in libsystem_pthread.dylib) + 340 [0x7fff5a41f661]
952 std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, krbn::receiver::receiver(krbn::device_grabber&)::'lambda'()> >(void*, void*) (in karabiner_grabber) + 45 [0x10e2ec64d]
724 krbn::receiver::worker() (in karabiner_grabber) + 1465 [0x10e2ecc79]
! 724 krbn::device_grabber::post_frontmost_application_changed_event(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) (in karabiner_grabber) + 117 [0x10e2ed9d5]
! 720 _dispatch_sync_wait (in libdispatch.dylib) + 510 [0x7fff5a0e41da]
! : 720 _dispatch_thread_event_wait_slow (in libdispatch.dylib) + 26 [0x7fff5a0ddaf0]
! : 720 _dispatch_ulock_wait (in libdispatch.dylib) + 40 [0x7fff5a0dd9ff]
! : 720 __ulock_wait (in libsystem_kernel.dylib) + 10 [0x7fff5a258162]
! 4 _dispatch_sync_wait (in libdispatch.dylib) + 462 [0x7fff5a0e41aa]
! 4 _dispatch_runloop_queue_poke (in libdispatch.dylib) + 251 [0x7fff5a0e1d65]
! 4 _dispatch_send_wakeup_runloop_thread (in libdispatch.dylib) + 65 [0x7fff5a0d4e7b]
! 4 mach_msg (in libsystem_kernel.dylib) + 60 [0x7fff5a24d724]
! 4 mach_msg_trap (in libsystem_kernel.dylib) + 10 [0x7fff5a24e20a]
228 krbn::receiver::worker() (in karabiner_grabber) + 322 [0x10e2ec802]
228 krbn::local_datagram_server::receive(boost::asio::mutable_buffer const&, boost::posix_time::time_duration, boost::system::error_code&) (in karabiner_grabber) + 312 [0x10e2ed4e8]
228 boost::asio::io_context::run_one() (in karabiner_grabber) + 160 [0x10e2edc80]
228 boost::asio::detail::scheduler::run_one(boost::system::error_code&) (in karabiner_grabber) + 293 [0x10e2eee75]
228 boost::asio::detail::scheduler::do_run_one(boost::asio::detail::conditionally_enabled_mutex::scoped_lock&, boost::asio::detail::scheduler_thread_info&, boost::system::error_code const&) (in karabiner_grabber) + 337 [0x10e2ef191]
228 boost::asio::detail::kqueue_reactor::run(long, boost::asio::detail::op_queue<boost::asio::detail::scheduler_operation>&) (in karabiner_grabber) + 273 [0x10e2ef5c1]
228 kevent (in libsystem_kernel.dylib) + 10 [0x7fff5a258bf2]
It appears that karabiner-grabber is hung up on…fclose(3)?! @tekezo, did you really put blocking disk I/O on the main thread? What were you thinking?
@saagarjha
Thank you for feedback!
It's surely my mistake. I'll separate the blocking I/O from main thread soon.
I appreciate the rapid response, as well as your initiative to get this issue resolved! To go into more detail about what needs to be done regarding blocking the main thread, I'd suggest writing your code with realtime constraints in mind. If you haven't done this before, I'd suggest doing some research on how this is done; often you can find some high-quality articles that focus on realtime audio but should apply here as well. In short, you should not be making any blocking calls on the main thread–so disk I/O, mutexes, etc. are certainly off the table. For audio things like allocating memory (e.g. malloc, new) or worst-case complexity (std::vector::push_back) must also be considered; I'm not sure if this is necessary for Karabiner yet. Certainly, nonessential blocking tasks like modifying the caps lock LED or writing out configuration should be delegated to a different thread at the very minimum.
I changed the I/O handling at v12.0.11.
Please confirm the latest beta version.

Unfortunately, it seems that this is still an issue. Here's a new sample:
Call graph:
9688 Thread_27005340 DispatchQueue_1: com.apple.main-thread (serial)
+ 9688 start (in libdyld.dylib) + 1 [0x7fff5a107015]
+ 9688 main (in karabiner_grabber) + 3531 [0x10dc9a58b]
+ 9688 CFRunLoopRun (in CoreFoundation) + 99 [0x7fff32342c33]
+ 9688 CFRunLoopRunSpecific (in CoreFoundation) + 483 [0x7fff323041a3]
+ 9688 __CFRunLoopRun (in CoreFoundation) + 2586 [0x7fff32304e4a]
+ 9688 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ (in CoreFoundation) + 9 [0x7fff32342c69]
+ 9688 _dispatch_main_queue_callback_4CF (in libdispatch.dylib) + 776 [0x7fff5a0d9221]
+ 9688 _dispatch_source_invoke (in libdispatch.dylib) + 620 [0x7fff5a0d0081]
+ 9688 _dispatch_continuation_pop (in libdispatch.dylib) + 472 [0x7fff5a0e0e81]
+ 9688 _dispatch_client_callout (in libdispatch.dylib) + 8 [0x7fff5a0cddb8]
+ 9688 invocation function for block in krbn::connection_manager::connection_manager(krbn::version_monitor&, krbn::device_grabber&) (in karabiner_grabber) + 35 [0x10dcbfcc3]
+ 9688 SCDynamicStoreCopyConsoleUser (in SystemConfiguration) + 100 [0x7fff3e886faf]
+ 9688 SCDynamicStoreCopyValue (in SystemConfiguration) + 158 [0x7fff3e868f7e]
+ 9688 configget (in SystemConfiguration) + 170 [0x7fff3e869a5c]
+ 9688 mach_msg (in libsystem_kernel.dylib) + 60 [0x7fff5a24d724]
+ 9688 mach_msg_trap (in libsystem_kernel.dylib) + 10 [0x7fff5a24e20a]
9688 Thread_27005342
+ 9688 thread_start (in libsystem_pthread.dylib) + 13 [0x7fff5a41ebf9]
+ 9688 _pthread_start (in libsystem_pthread.dylib) + 377 [0x7fff5a41f50d]
+ 9688 _pthread_body (in libsystem_pthread.dylib) + 340 [0x7fff5a41f661]
+ 9688 void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (spdlog::details::async_log_helper::*)(), spdlog::details::async_log_helper*> >(void*) (in karabiner_grabber) + 62 [0x10dcb4e9e]
+ 9688 spdlog::details::async_log_helper::worker_loop() (in karabiner_grabber) + 88 [0x10dcb4108]
+ 9688 spdlog::details::async_log_helper::process_next_msg() (in karabiner_grabber) + 102 [0x10dcb4556]
+ 9688 spdlog::details::mpmc_bounded_queue<spdlog::details::async_log_helper::async_msg>::dequeue_for(spdlog::details::async_log_helper::async_msg&, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000l> >) (in karabiner_grabber) + 446 [0x10dcb4c8e]
+ 9688 std::__1::cv_status std::__1::condition_variable::wait_until<std::__1::chrono::steady_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > >(std::__1::unique_lock<std::__1::mutex>&, std::__1::chrono::time_point<std::__1::chrono::steady_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > > const&) (in karabiner_grabber) + 117 [0x10dcb4d65]
+ 9688 std::__1::condition_variable::__do_timed_wait(std::__1::unique_lock<std::__1::mutex>&, std::__1::chrono::time_point<std::__1::chrono::system_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > >) (in libc++.1.dylib) + 93 [0x7fff5805cd43]
+ 9688 _pthread_cond_wait (in libsystem_pthread.dylib) + 732 [0x7fff5a420589]
+ 9688 __psynch_cvwait (in libsystem_kernel.dylib) + 10 [0x7fff5a257a1e]
9688 Thread_27005343
+ 9688 thread_start (in libsystem_pthread.dylib) + 13 [0x7fff5a41ebf9]
+ 9688 _pthread_start (in libsystem_pthread.dylib) + 377 [0x7fff5a41f50d]
+ 9688 _pthread_body (in libsystem_pthread.dylib) + 340 [0x7fff5a41f661]
+ 9688 void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (krbn::async_sequential_dispatcher<krbn::async_sequential_file_writer::entry>::*)(), krbn::async_sequential_dispatcher<krbn::async_sequential_file_writer::entry>*> >(void*) (in karabiner_grabber) + 62 [0x10dcb8a1e]
+ 9688 krbn::async_sequential_dispatcher<krbn::async_sequential_file_writer::entry>::loop() (in karabiner_grabber) + 107 [0x10dcb863b]
+ 9688 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) (in libc++.1.dylib) + 18 [0x7fff5805ccb0]
+ 9688 _pthread_cond_wait (in libsystem_pthread.dylib) + 732 [0x7fff5a420589]
+ 9688 __psynch_cvwait (in libsystem_kernel.dylib) + 10 [0x7fff5a257a1e]
9688 Thread_27005346
+ 9688 start_wqthread (in libsystem_pthread.dylib) + 13 [0x7fff5a41ebe9]
+ 9688 _pthread_wqthread (in libsystem_pthread.dylib) + 1035 [0x7fff5a41f009]
+ 9688 __workq_kernreturn (in libsystem_kernel.dylib) + 10 [0x7fff5a258292]
9688 Thread_27005502
9688 thread_start (in libsystem_pthread.dylib) + 13 [0x7fff5a41ebf9]
9688 _pthread_start (in libsystem_pthread.dylib) + 377 [0x7fff5a41f50d]
9688 _pthread_body (in libsystem_pthread.dylib) + 340 [0x7fff5a41f661]
9688 std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, krbn::receiver::receiver(krbn::device_grabber&)::'lambda'()> >(void*, void*) (in karabiner_grabber) + 45 [0x10dd3529d]
9688 krbn::receiver::worker() (in karabiner_grabber) + 322 [0x10dd35452]
9688 krbn::local_datagram_server::receive(boost::asio::mutable_buffer const&, boost::posix_time::time_duration, boost::system::error_code&) (in karabiner_grabber) + 296 [0x10dd36128]
9688 boost::asio::io_context::run_one() (in karabiner_grabber) + 156 [0x10dd368ac]
9688 boost::asio::detail::scheduler::run_one(boost::system::error_code&) (in karabiner_grabber) + 281 [0x10dd37a59]
9688 boost::asio::detail::scheduler::do_run_one(boost::asio::detail::conditionally_enabled_mutex::scoped_lock&, boost::asio::detail::scheduler_thread_info&, boost::system::error_code const&) (in karabiner_grabber) + 337 [0x10dd37d51]
9688 boost::asio::detail::kqueue_reactor::run(long, boost::asio::detail::op_queue<boost::asio::detail::scheduler_operation>&) (in karabiner_grabber) + 273 [0x10dd38181]
9688 kevent (in libsystem_kernel.dylib) + 10 [0x7fff5a258bf2]
Seems like SCDynamicStoreCopyConsoleUser is a blocking method? Here's what I did to reliably trigger and diagnose the issue, if you're curious:
$ echo "int main() { while (1) {} }" | clang -x c -o while -
$ sudo echo # So that the next sudo doesn't ask for a password
$ for i in `seq 1 100`; do ./while &disown ; done; sleep 5; sudo sample `pgrep karabiner_grabber` > sample.txt; killall while
Doing the above with Karabiner not running works as expected, with no key repeats.
I can confirm @saagarjha sampling method also triggers the issue in my machine.
Here's the stack.
OS Version: Mac OS X 10.13.1 (17B1003)
Report Version: 7
Analysis Tool: /usr/bin//sample
----
Call graph:
9742 Thread_46446930 DispatchQueue_1: com.apple.main-thread (serial)
+ 9742 start (in libdyld.dylib) + 1 [0x7fff54a67145]
+ 9742 main (in karabiner_grabber) + 3531 [0x106a7958b]
+ 9742 CFRunLoopRun (in CoreFoundation) + 99 [0x7fff2d4a9993]
+ 9742 CFRunLoopRunSpecific (in CoreFoundation) + 483 [0x7fff2d46afa3]
+ 6101 __CFRunLoopRun (in CoreFoundation) + 1783 [0x7fff2d46b927]
+ ! 6101 __CFRunLoopServiceMachPort (in CoreFoundation) + 341 [0x7fff2d46c5d5]
+ ! 6101 mach_msg (in libsystem_kernel.dylib) + 60 [0x7fff54bad390]
+ ! 6101 mach_msg_trap (in libsystem_kernel.dylib) + 10 [0x7fff54bade76]
+ 1911 __CFRunLoopRun (in CoreFoundation) + 2848 [0x7fff2d46bd50]
+ ! 1911 __CFRunLoopDoSource1 (in CoreFoundation) + 533 [0x7fff2d474165]
+ ! 1911 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ (in CoreFoundation) + 41 [0x7fff2d474219]
+ ! 1911 __CFMachPortPerform (in CoreFoundation) + 347 [0x7fff2d47438b]
+ ! 1911 __IOHIDQueueValueAvailableCallback (in IOKit) + 64 [0x7fff2fc143e4]
+ ! 1911 CFDictionaryApplyFunction (in CoreFoundation) + 192 [0x7fff2d426250]
+ ! 1911 CFBasicHashApply (in CoreFoundation) + 106 [0x7fff2d42630a]
+ ! 1911 __CFDictionaryApplyFunction_block_invoke (in CoreFoundation) + 22 [0x7fff2d426346]
+ ! 1449 krbn::human_interface_device::queue_value_available_callback() (in karabiner_grabber) + 2764 [0x106b30d4c]
+ ! : 1449 krbn::device_grabber::value_callback(krbn::human_interface_device&, krbn::event_queue&) (in karabiner_grabber) + 68 [0x106b2be54]
+ ! : 1329 boost::signals2::detail::signal_impl<void (), boost::signals2::optional_last_value<void>, int, std::__1::less<int>, boost::function<void ()>, boost::function<void (boost::signals2::connection const&)>, boost::signals2::mutex>::operator()() (in karabiner_grabber) + 616 [0x106ac6c38]
+ ! : | 1329 boost::signals2::detail::slot_call_iterator_t<boost::signals2::detail::variadic_slot_invoker<boost::signals2::detail::void_type>, std::__1::__list_iterator<boost::shared_ptr<boost::signals2::detail::connection_body<std::__1::pair<boost::signals2::detail::slot_meta_group, boost::optional<int> >, boost::signals2::slot<void (), boost::function<void ()> >, boost::signals2::mutex> >, void*>, boost::signals2::detail::connection_body<std::__1::pair<boost::signals2::detail::slot_meta_group, boost::optional<int> >, boost::signals2::slot<void (), boost::function<void ()> >, boost::signals2::mutex> >::dereference() const (in karabiner_grabber) + 60 [0x106ac779c]
+ ! : | 1093 krbn::device_grabber::manipulate(unsigned long long) (in karabiner_grabber) + 115 [0x106b255f3]
+ ! : | + 1093 krbn::manipulator::details::post_event_to_virtual_devices::queue::post_events(krbn::virtual_hid_device_client&) (in karabiner_grabber) + 619 [0x106b261db]
+ ! : | + 1029 krbn::virtual_hid_device_client::call_method(std::__1::function<int ()>) (in karabiner_grabber) + 56 [0x106b0b438]
+ ! : | + ! 565 IOConnectCallStructMethod (in IOKit) + 38 [0x7fff2fbd6227]
+ ! : | + ! : 565 IOConnectCallMethod (in IOKit) + 186 [0x7fff2fbd50f4]
+ ! : | + ! : 565 io_connect_method (in IOKit) + 369 [0x7fff2fbd52c7]
+ ! : | + ! : 565 mach_msg (in libsystem_kernel.dylib) + 60 [0x7fff54bad390]
+ ! : | + ! : 565 mach_msg_trap (in libsystem_kernel.dylib) + 10 [0x7fff54bade76]
+ ! : | + ! 464 IOConnectCallStructMethod (in IOKit) + 42 [0x7fff2fbd622b]
+ ! : | + 64 krbn::virtual_hid_device_client::call_method(std::__1::function<int ()>) (in karabiner_grabber) + 35 [0x106b0b423]
+ ! : | 233 krbn::device_grabber::manipulate(unsigned long long) (in karabiner_grabber) + 75 [0x106b255cb]
+ ! : | + 233 krbn::manipulator::manipulator_managers_connector::connection::manipulate(unsigned long long) (in karabiner_grabber) + 137 [0x106b257d9]
+ ! : | + 131 krbn::manipulator::manipulator_manager::manipulate(std::__1::shared_ptr<krbn::event_queue> const&, std::__1::shared_ptr<krbn::event_queue> const&, unsigned long long) (in karabiner_grabber) + 1399 [0x106b25e17]
+ ! : | + ! 131 krbn::manipulator::details::basic::manipulate(krbn::event_queue::queued_event&, krbn::event_queue const&, std::__1::shared_ptr<krbn::event_queue> const&, unsigned long long) (in karabiner_grabber) + 507 [0x106ad1e0b]
+ ! : | + ! 131 krbn::manipulator::details::basic::from_event_definition::test_event(krbn::event_queue::queued_event::event const&, krbn::manipulator::details::event_definition const&) (in karabiner_grabber) + 24 [0x106ada098]
+ ! : | + ! 131 krbn::event_queue::queued_event::event::get_key_code() const (in karabiner_grabber) + 59 [0x106ac15fb]
+ ! : | + ! 131 boost::detail::variant::invoke_visitor<boost::detail::variant::get_visitor<krbn::key_code const>, false>::result_type boost::detail::variant::visitation_impl<mpl_::int_<0>, boost::detail::variant::visitation_impl_step<boost::mpl::l_iter<boost::mpl::l_item<mpl_::long_<12l>, krbn::key_code, boost::mpl::l_item<mpl_::long_<11l>, krbn::consumer_key_code, boost::mpl::l_item<mpl_::long_<10l>, krbn::pointing_button, boost::mpl::l_item<mpl_::long_<9l>, krbn::pointing_motion, boost::mpl::l_item<mpl_::long_<8l>, long long, boost::mpl::l_item<mpl_::long_<7l>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, boost::mpl::l_item<mpl_::long_<6l>, std::__1::vector<krbn::input_source_selector, std::__1::allocator<krbn::input_source_selector> >, boost::mpl::l_item<mpl_::long_<5l>, std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, int>, boost::mpl::l_item<mpl_::long_<4l>, krbn::mouse_key, boost::mpl::l_item<mpl_::long_<3l>, krbn::manipulator_environment::frontmost_application, boost::mpl::l_item<mpl_::long_<2l>, krbn::input_source_identifiers, boost::mpl::l_item<mpl_::long_<1l>, boost::blank, boost::mpl::l_end> > > > > > > > > > > > >, boost::mpl::l_iter<boost::mpl::l_end> >, boost::detail::variant::invoke_visitor<boost::detail::variant::get_visitor<krbn::key_code const>, false>, void const*, boost::variant<krbn::key_code, krbn::consumer_key_code, krbn::pointing_button, krbn::pointing_motion, long long, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::vector<krbn::input_source_selector, std::__1::allocator<krbn::input_source_selector> >, std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, int>, krbn::mouse_key, krbn::manipulator_environment::frontmost_application, krbn::input_source_identifiers, boost::blank>::has_fallback_type_>(int, int, boost::detail::variant::invoke_visitor<boost::detail::variant::get_visitor<krbn::key_code const>, false>&, void const*, mpl_::bool_<false>, boost::variant<krbn::key_code, krbn::consumer_key_code, krbn::pointing_button, krbn::pointing_motion, long long, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::vector<krbn::input_source_selector, std::__1::allocator<krbn::input_source_selector> >, std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, int>, krbn::mouse_key, krbn::manipulator_environment::frontmost_application, krbn::input_source_identifiers, boost::blank>::has_fallback_type_, mpl_::int_<0>*, boost::detail::variant::visitation_impl_step<boost::mpl::l_iter<boost::mpl::l_item<mpl_::long_<12l>, krbn::key_code, boost::mpl::l_item<mpl_::long_<11l>, krbn::consumer_key_code, boost::mpl::l_item<mpl_::long_<10l>, krbn::pointing_button, boost::mpl::l_item<mpl_::long_<9l>, krbn::pointing_motion, boost::mpl::l_item<mpl_::long_<8l>, long long, boost::mpl::l_item<mpl_::long_<7l>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, boost::mpl::l_item<mpl_::long_<6l>, std::__1::vector<krbn::input_source_selector, std::__1::allocator<krbn::input_source_selector> >, boost::mpl::l_item<mpl_::long_<5l>, std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, int>, boost::mpl::l_item<mpl_::long_<4l>, krbn::mouse_key, boost::mpl::l_item<mpl_::long_<3l>, krbn::manipulator_environment::frontmost_application, boost::mpl::l_item<mpl_::long_<2l>, krbn::input_source_identifiers, boost::mpl::l_item<mpl_::long_<1l>, boost::blank, boost::mpl::l_end> > > > > > > > > > > > >, boost::mpl::l_iter<boost::mpl::l_end> >*) (in karabiner_grabber) + 0 [0x106ac3210]
+ ! : | + 101 krbn::manipulator::manipulator_manager::manipulate(std::__1::shared_ptr<krbn::event_queue> const&, std::__1::shared_ptr<krbn::event_queue> const&, unsigned long long) (in karabiner_grabber) + 1318 [0x106b25dc6]
+ ! : | + 1 krbn::manipulator::manipulator_manager::manipulate(std::__1::shared_ptr<krbn::event_queue> const&, std::__1::shared_ptr<krbn::event_queue> const&, unsigned long long) (in karabiner_grabber) + 1324 [0x106b25dcc]
+ ! : | + 1 krbn::manipulator::details::basic::already_manipulated(krbn::event_queue::queued_event const&) (in karabiner_grabber) + 83 [0x106ad1af3]
+ ! : | 3 krbn::device_grabber::manipulate(unsigned long long) (in karabiner_grabber) + 168 [0x106b25628]
+ ! : | 3 krbn::manipulator::manipulator_managers_connector::connection::make_input_event_time_stamp_with_input_delay() const (in karabiner_grabber) + 28 [0x106b295dc]
+ ! : | 3 std::__1::__shared_weak_count::lock() (in libc++.1.dylib) + 8 [0x7fff52ad6974]
+ ! : 120 boost::signals2::detail::signal_impl<void (), boost::signals2::optional_last_value<void>, int, std::__1::less<int>, boost::function<void ()>, boost::function<void (boost::signals2::connection const&)>, boost::signals2::mutex>::operator()() (in karabiner_grabber) + 642 [0x106ac6c52]
+ ! : 120 boost::signals2::detail::slot_call_iterator_t<boost::signals2::detail::variadic_slot_invoker<boost::signals2::detail::void_type>, std::__1::__list_iterator<boost::shared_ptr<boost::signals2::detail::connection_body<std::__1::pair<boost::signals2::detail::slot_meta_group, boost::optional<int> >, boost::signals2::slot<void (), boost::function<void ()> >, boost::signals2::mutex> >, void*>, boost::signals2::detail::connection_body<std::__1::pair<boost::signals2::detail::slot_meta_group, boost::optional<int> >, boost::signals2::slot<void (), boost::function<void ()> >, boost::signals2::mutex> >::lock_next_callable() const (in karabiner_grabber) + 119 [0x106ac8477]
+ ! : 120 pthread_mutex_lock (in libsystem_pthread.dylib) + 0 [0x7fff54cef3d5]
+ ! 193 krbn::human_interface_device::queue_value_available_callback() (in karabiner_grabber) + 76 [0x106b302cc]
+ ! : 193 IOHIDQueueCopyNextValueWithTimeout (in IOKit) + 45 [0x7fff2fc1444e]
+ ! : 103 IOHIDQueueClass::copyNextEventValue(__IOHIDValue**, unsigned int, unsigned int) (in IOHIDLib) + 322 [0x106c34512]
+ ! : | 103 IOHIDDeviceClass::getElement(unsigned int) (in IOHIDLib) + 82 [0x106c32146]
+ ! : | 103 IOHIDDeviceClass::createElement(__CFData const*, IOHIDElementStruct*, unsigned int, void const*, __CFDictionary*, bool*, unsigned int) (in IOHIDLib) + 114 [0x106c311ee]
+ ! : | 103 CFDictionaryGetValue (in CoreFoundation) + 131 [0x7fff2d3f1fa3]
+ ! : | 103 CFBasicHashFindBucket (in CoreFoundation) + 3328 [0x7fff2d3f2cf0]
+ ! : 90 IOHIDQueueClass::_copyNextEventValue(void*, __IOHIDValue**, unsigned int, unsigned int) (in IOHIDLib) + 15 [0x106c34657]
+ ! 146 krbn::human_interface_device::queue_value_available_callback() (in karabiner_grabber) + 231 [0x106b30367]
+ ! : 146 _CFRelease (in CoreFoundation) + 1056 [0x7fff2d544220]
+ ! : 146 free_tiny (in libsystem_malloc.dylib) + 296 [0x7fff54c27108]
+ ! 122 krbn::human_interface_device::queue_value_available_callback() (in karabiner_grabber) + 256 [0x106b30380]
+ ! : 122 krbn::event_queue::make_queued_events(std::__1::vector<krbn::hid_value, std::__1::allocator<krbn::hid_value> > const&, krbn::device_id) (in karabiner_grabber) + 2233 [0x106b316c9]
+ ! : 122 krbn::event_queue::make_queued_events(std::__1::vector<krbn::hid_value, std::__1::allocator<krbn::hid_value> > const&, krbn::device_id)::'lambda'()::operator()() const (in karabiner_grabber) + 649 [0x106b31ee9]
+ ! 1 krbn::human_interface_device::queue_value_available_callback() (in karabiner_grabber) + 2772 [0x106b30d54]
+ ! 1 krbn::event_queue::clear_events() (in karabiner_grabber) + 51 [0x106b256d3]
+ 1603 __CFRunLoopRun (in CoreFoundation) + 2586 [0x7fff2d46bc4a]
+ ! 1603 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ (in CoreFoundation) + 9 [0x7fff2d4a99c9]
+ ! 1603 _dispatch_main_queue_callback_4CF (in libdispatch.dylib) + 776 [0x7fff54a392fd]
+ ! 1603 _dispatch_source_invoke (in libdispatch.dylib) + 620 [0x7fff54a30154]
+ ! 1603 _dispatch_continuation_pop (in libdispatch.dylib) + 472 [0x7fff54a40fbc]
+ ! 1603 _dispatch_client_callout (in libdispatch.dylib) + 8 [0x7fff54a2de88]
+ ! 1223 invocation function for block in krbn::connection_manager::connection_manager(krbn::version_monitor&, krbn::device_grabber&) (in karabiner_grabber) + 35 [0x106a9ecc3]
+ ! : 1223 SCDynamicStoreCopyConsoleUser (in SystemConfiguration) + 100 [0x7fff39749003]
+ ! : 1223 SCDynamicStoreCopyValue (in SystemConfiguration) + 158 [0x7fff3972afee]
+ ! : 1223 configget (in SystemConfiguration) + 170 [0x7fff3972baec]
+ ! : 1223 mach_msg (in libsystem_kernel.dylib) + 60 [0x7fff54bad390]
+ ! : 1223 mach_msg_trap (in libsystem_kernel.dylib) + 10 [0x7fff54bade76]
+ ! 380 krbn::device_grabber::update_caps_lock_led(bool) (in karabiner_grabber) + 219 [0x106ac01fb]
+ ! 380 krbn::core_configuration::profile::get_device_manipulate_caps_lock_led(krbn::device_identifiers const&) const (in karabiner_grabber) + 322 [0x106ac9b22]
+ ! 251 krbn::core_configuration::profile::device::device(nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> const&) (in karabiner_grabber) + 393 [0x106ab4569]
+ ! | 126 krbn::core_configuration::profile::simple_modifications::handle_json(nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> const&) (in karabiner_grabber) + 1509 [0x106aa7f45]
+ ! | + 126 krbn::core_configuration::profile::simple_modifications::erase_by_from_json_string(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) (in karabiner_grabber) + 110 [0x106aa8cfe]
+ ! | + 126 nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer>::parse(nlohmann::detail::input_adapter, std::__1::function<bool (int, nlohmann::detail::parser<nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> >::parse_event_t, nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer>&)>, bool) (in karabiner_grabber) + 393 [0x106aa9599]
+ ! | + 126 nlohmann::detail::parser<nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> >::parse(bool, nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer>&) (in karabiner_grabber) + 36 [0x106aa9c04]
+ ! | + 126 nlohmann::detail::lexer<nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> >::scan() (in karabiner_grabber) + 40 [0x106aaa7f8]
+ ! | + 126 nlohmann::detail::lexer<nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> >::get() (in karabiner_grabber) + 155 [0x106aaabbb]
+ ! | + 126 operator new(unsigned long) (in libc++abi.dylib) + 40 [0x7fff52af5628]
+ ! | + 126 malloc (in libsystem_malloc.dylib) + 24 [0x7fff54c0e50b]
+ ! | + 126 malloc_zone_malloc (in libsystem_malloc.dylib) + 103 [0x7fff54c0f201]
+ ! | + 126 szone_malloc_should_clear (in libsystem_malloc.dylib) + 82 [0x7fff54c0f2af]
+ ! | 124 krbn::core_configuration::profile::simple_modifications::handle_json(nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> const&) (in karabiner_grabber) + 949 [0x106aa7d15]
+ ! | + 124 nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer>::dump(int, char, bool) const (in karabiner_grabber) + 349 [0x106a94d8d]
+ ! | + 124 operator new(unsigned long) (in libc++abi.dylib) + 40 [0x7fff52af5628]
+ ! | + 124 malloc (in libsystem_malloc.dylib) + 24 [0x7fff54c0e50b]
+ ! | + 124 malloc_zone_malloc (in libsystem_malloc.dylib) + 103 [0x7fff54c0f201]
+ ! | + 124 szone_malloc_should_clear (in libsystem_malloc.dylib) + 422 [0x7fff54c0f403]
+ ! | + 124 tiny_malloc_from_free_list (in libsystem_malloc.dylib) + 431 [0x7fff54c10384]
+ ! | + 124 set_tiny_meta_header_in_use (in libsystem_malloc.dylib) + 210 [0x7fff54c26f7a]
+ ! | 1 krbn::core_configuration::profile::simple_modifications::handle_json(nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> const&) (in karabiner_grabber) + 1099 [0x106aa7dab]
+ ! | 1 nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer>::dump(int, char, bool) const (in karabiner_grabber) + 496 [0x106a94e20]
+ ! | 1 free_tiny (in libsystem_malloc.dylib) + 628 [0x7fff54c27254]
+ ! | 1 tiny_free_no_lock (in libsystem_malloc.dylib) + 1450 [0x7fff54c26ac8]
+ ! | 1 tiny_free_list_remove_ptr (in libsystem_malloc.dylib) + 6 [0x7fff54c11647]
+ ! 129 krbn::core_configuration::profile::device::device(nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> const&) (in karabiner_grabber) + 406 [0x106ab4576]
+ ! 129 nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer>::json_value::destroy(nlohmann::detail::value_t) (in karabiner_grabber) + 113 [0x106a9bdf1]
+ ! 129 nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer>::json_value::destroy(nlohmann::detail::value_t) (in karabiner_grabber) + 44 [0x106a9bdac]
+ ! 129 std::__1::__tree<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> >, std::__1::__map_value_compare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> >, std::__1::less<void>, true>, std::__1::allocator<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> > > >::destroy(std::__1::__tree_node<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> >, void*>*) (in karabiner_grabber) + 54 [0x106a9bb26]
+ ! 129 nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer>::json_value::destroy(nlohmann::detail::value_t) (in karabiner_grabber) + 44 [0x106a9bdac]
+ ! 129 std::__1::__tree<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> >, std::__1::__map_value_compare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> >, std::__1::less<void>, true>, std::__1::allocator<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> > > >::destroy(std::__1::__tree_node<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> >, void*>*) (in karabiner_grabber) + 54 [0x106a9bb26]
+ ! 129 free_tiny (in libsystem_malloc.dylib) + 628 [0x7fff54c27254]
+ ! 129 tiny_free_no_lock (in libsystem_malloc.dylib) + 666 [0x7fff54c267b8]
+ 127 __CFRunLoopRun (in CoreFoundation) + 1293 [0x7fff2d46b73d]
+ 127 __CFRunLoopDoSources0 (in CoreFoundation) + 127 [0x7fff2d46c26f]
+ 127 CFSetApplyFunction (in CoreFoundation) + 192 [0x7fff2d439c70]
+ 127 CFBasicHashApply (in CoreFoundation) + 106 [0x7fff2d42630a]
+ 127 __CFSetApplyFunction_block_invoke (in CoreFoundation) + 18 [0x7fff2d439cd2]
+ 127 __CFRunLoopCollectSources0 (in CoreFoundation) + 21 [0x7fff2d46c3b5]
9742 Thread_46446935
+ 9742 thread_start (in libsystem_pthread.dylib) + 13 [0x7fff54cf0c5d]
+ 9742 _pthread_start (in libsystem_pthread.dylib) + 377 [0x7fff54cf156d]
+ 9742 _pthread_body (in libsystem_pthread.dylib) + 340 [0x7fff54cf16c1]
+ 9742 void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (spdlog::details::async_log_helper::*)(), spdlog::details::async_log_helper*> >(void*) (in karabiner_grabber) + 62 [0x106a93e9e]
+ 9742 spdlog::details::async_log_helper::worker_loop() (in karabiner_grabber) + 88 [0x106a93108]
+ 9742 spdlog::details::async_log_helper::process_next_msg() (in karabiner_grabber) + 102 [0x106a93556]
+ 9742 spdlog::details::mpmc_bounded_queue<spdlog::details::async_log_helper::async_msg>::dequeue_for(spdlog::details::async_log_helper::async_msg&, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000l> >) (in karabiner_grabber) + 446 [0x106a93c8e]
+ 9742 std::__1::cv_status std::__1::condition_variable::wait_until<std::__1::chrono::steady_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > >(std::__1::unique_lock<std::__1::mutex>&, std::__1::chrono::time_point<std::__1::chrono::steady_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > > const&) (in karabiner_grabber) + 117 [0x106a93d65]
+ 9742 std::__1::condition_variable::__do_timed_wait(std::__1::unique_lock<std::__1::mutex>&, std::__1::chrono::time_point<std::__1::chrono::system_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > >) (in libc++.1.dylib) + 93 [0x7fff52aa3d43]
+ 9742 _pthread_cond_wait (in libsystem_pthread.dylib) + 732 [0x7fff54cf2662]
+ 9597 __psynch_cvwait (in libsystem_kernel.dylib) + 10 [0x7fff54bb6e7e]
+ 145 cerror_nocancel (in libsystem_kernel.dylib) + 20 [0x7fff54bae780]
9742 Thread_46446936
+ 9742 thread_start (in libsystem_pthread.dylib) + 13 [0x7fff54cf0c5d]
+ 9742 _pthread_start (in libsystem_pthread.dylib) + 377 [0x7fff54cf156d]
+ 9742 _pthread_body (in libsystem_pthread.dylib) + 340 [0x7fff54cf16c1]
+ 9742 void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (krbn::async_sequential_dispatcher<krbn::async_sequential_file_writer::entry>::*)(), krbn::async_sequential_dispatcher<krbn::async_sequential_file_writer::entry>*> >(void*) (in karabiner_grabber) + 62 [0x106a97a1e]
+ 9742 krbn::async_sequential_dispatcher<krbn::async_sequential_file_writer::entry>::loop() (in karabiner_grabber) + 107 [0x106a9763b]
+ 9742 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) (in libc++.1.dylib) + 18 [0x7fff52aa3cb0]
+ 9742 _pthread_cond_wait (in libsystem_pthread.dylib) + 732 [0x7fff54cf2662]
+ 9742 __psynch_cvwait (in libsystem_kernel.dylib) + 10 [0x7fff54bb6e7e]
9742 Thread_46446938
+ 9742 start_wqthread (in libsystem_pthread.dylib) + 13 [0x7fff54cf0c4d]
+ 9673 _pthread_wqthread (in libsystem_pthread.dylib) + 1035 [0x7fff54cf106a]
+ ! 9673 __workq_kernreturn (in libsystem_kernel.dylib) + 10 [0x7fff54bb76da]
+ 69 _pthread_wqthread (in libsystem_pthread.dylib) + 842 [0x7fff54cf0fa9]
9742 Thread_46448362
9742 thread_start (in libsystem_pthread.dylib) + 13 [0x7fff54cf0c5d]
9742 _pthread_start (in libsystem_pthread.dylib) + 377 [0x7fff54cf156d]
9742 _pthread_body (in libsystem_pthread.dylib) + 340 [0x7fff54cf16c1]
9742 std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, krbn::receiver::receiver(krbn::device_grabber&)::'lambda'()> >(void*, void*) (in karabiner_grabber) + 45 [0x106b1429d]
9742 krbn::receiver::worker() (in karabiner_grabber) + 322 [0x106b14452]
9742 krbn::local_datagram_server::receive(boost::asio::mutable_buffer const&, boost::posix_time::time_duration, boost::system::error_code&) (in karabiner_grabber) + 296 [0x106b15128]
9742 boost::asio::io_context::run_one() (in karabiner_grabber) + 156 [0x106b158ac]
9742 boost::asio::detail::scheduler::run_one(boost::system::error_code&) (in karabiner_grabber) + 281 [0x106b16a59]
9742 boost::asio::detail::scheduler::do_run_one(boost::asio::detail::conditionally_enabled_mutex::scoped_lock&, boost::asio::detail::scheduler_thread_info&, boost::system::error_code const&) (in karabiner_grabber) + 337 [0x106b16d51]
9742 boost::asio::detail::kqueue_reactor::run(long, boost::asio::detail::op_queue<boost::asio::detail::scheduler_operation>&) (in karabiner_grabber) + 273 [0x106b17181]
9742 kevent (in libsystem_kernel.dylib) + 10 [0x7fff54bb803a]
Total number in stack (recursive counted multiple, when >=5):
Sort by top of stack, same collapsed (when >= 5):
__psynch_cvwait (in libsystem_kernel.dylib) 19339
kevent (in libsystem_kernel.dylib) 9742
__workq_kernreturn (in libsystem_kernel.dylib) 9673
mach_msg_trap (in libsystem_kernel.dylib) 7889
IOConnectCallStructMethod (in IOKit) 464
free_tiny (in libsystem_malloc.dylib) 146
cerror_nocancel (in libsystem_kernel.dylib) 145
Wow, that's a much more interesting sample!
operator new(unsigned long)
@tekezo, yeah, it looks like std::vector::emplace_back will have to be rethought as well. Really, everything that has significant weight from that trace needs to go.
Thank you for feedbacks!
I try to reproduce this issue by such stress testing.
Note:
If the issue happened by high CPU usage of multiple processes,
there are possibility of macOS limitation.
In such situation, generic processes are not assigned much processing time and
it causes a delay of key events arrival to karabiner_grabber.
I guess macOS is assigning extremely high priority to own event handling process (hidd) to avoid this problem.
I guess macOS is assigning extremely high priority to own event handling process (hidd) to avoid this problem.
You mean something like a higher nice value? I don't see anything out of the ordinary here for hidd, so is there some other mechanism that macOS might be using here?
If the issue happened by high CPU usage of multiple processes
I see this issue occur even when there aren't a whole lot of processes. I can try making a multithreaded test and seeing what happens…
EDIT: I created a multithreaded test case:
#include <pthread.h>
void *wait(void *foo) {
while (1) {
}
}
int main() {
pthread_t threads[100];
for (int i = 0; i < 100; ++i) {
pthread_create(&threads[i], NULL, wait, NULL);
}
pthread_join(*threads, NULL);
return 0;
}
This one causes a repeat to occur immediately (as in, the key event that comes from pressing enter to run the command gets held on to and repeated). Interestingly, the sample has very little of note:
Call graph:
9749 Thread_27453668 DispatchQueue_1: com.apple.main-thread (serial)
+ 9749 start (in libdyld.dylib) + 1 [0x7fff5a107015]
+ 9749 main (in karabiner_grabber) + 3531 [0x1045dd58b]
+ 9749 CFRunLoopRun (in CoreFoundation) + 99 [0x7fff32342c33]
+ 9749 CFRunLoopRunSpecific (in CoreFoundation) + 483 [0x7fff323041a3]
+ 9749 __CFRunLoopRun (in CoreFoundation) + 1783 [0x7fff32304b27]
+ 9749 __CFRunLoopServiceMachPort (in CoreFoundation) + 341 [0x7fff323057d5]
+ 9749 mach_msg (in libsystem_kernel.dylib) + 60 [0x7fff5a24d724]
+ 9749 mach_msg_trap (in libsystem_kernel.dylib) + 10 [0x7fff5a24e20a]
9749 Thread_27453669
+ 9749 thread_start (in libsystem_pthread.dylib) + 13 [0x7fff5a41ebf9]
+ 9749 _pthread_start (in libsystem_pthread.dylib) + 377 [0x7fff5a41f50d]
+ 9749 _pthread_body (in libsystem_pthread.dylib) + 340 [0x7fff5a41f661]
+ 9749 void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (spdlog::details::async_log_helper::*)(), spdlog::details::async_log_helper*> >(void*) (in karabiner_grabber) + 62 [0x1045f7e9e]
+ 9749 spdlog::details::async_log_helper::worker_loop() (in karabiner_grabber) + 88 [0x1045f7108]
+ 9749 spdlog::details::async_log_helper::process_next_msg() (in karabiner_grabber) + 102 [0x1045f7556]
+ 9749 spdlog::details::mpmc_bounded_queue<spdlog::details::async_log_helper::async_msg>::dequeue_for(spdlog::details::async_log_helper::async_msg&, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000l> >) (in karabiner_grabber) + 446 [0x1045f7c8e]
+ 9749 std::__1::cv_status std::__1::condition_variable::wait_until<std::__1::chrono::steady_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > >(std::__1::unique_lock<std::__1::mutex>&, std::__1::chrono::time_point<std::__1::chrono::steady_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > > const&) (in karabiner_grabber) + 117 [0x1045f7d65]
+ 9749 std::__1::condition_variable::__do_timed_wait(std::__1::unique_lock<std::__1::mutex>&, std::__1::chrono::time_point<std::__1::chrono::system_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > >) (in libc++.1.dylib) + 93 [0x7fff5805cd43]
+ 9749 _pthread_cond_wait (in libsystem_pthread.dylib) + 732 [0x7fff5a420589]
+ 9749 __psynch_cvwait (in libsystem_kernel.dylib) + 10 [0x7fff5a257a1e]
9749 Thread_27453670
+ 9749 thread_start (in libsystem_pthread.dylib) + 13 [0x7fff5a41ebf9]
+ 9749 _pthread_start (in libsystem_pthread.dylib) + 377 [0x7fff5a41f50d]
+ 9749 _pthread_body (in libsystem_pthread.dylib) + 340 [0x7fff5a41f661]
+ 9749 void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (krbn::async_sequential_dispatcher<krbn::async_sequential_file_writer::entry>::*)(), krbn::async_sequential_dispatcher<krbn::async_sequential_file_writer::entry>*> >(void*) (in karabiner_grabber) + 62 [0x1045fba1e]
+ 9749 krbn::async_sequential_dispatcher<krbn::async_sequential_file_writer::entry>::loop() (in karabiner_grabber) + 107 [0x1045fb63b]
+ 9749 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) (in libc++.1.dylib) + 18 [0x7fff5805ccb0]
+ 9749 _pthread_cond_wait (in libsystem_pthread.dylib) + 732 [0x7fff5a420589]
+ 9749 __psynch_cvwait (in libsystem_kernel.dylib) + 10 [0x7fff5a257a1e]
9749 Thread_27453701
+ 9749 thread_start (in libsystem_pthread.dylib) + 13 [0x7fff5a41ebf9]
+ 9749 _pthread_start (in libsystem_pthread.dylib) + 377 [0x7fff5a41f50d]
+ 9749 _pthread_body (in libsystem_pthread.dylib) + 340 [0x7fff5a41f661]
+ 9749 std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, krbn::receiver::receiver(krbn::device_grabber&)::'lambda'()> >(void*, void*) (in karabiner_grabber) + 45 [0x10467829d]
+ 9749 krbn::receiver::worker() (in karabiner_grabber) + 322 [0x104678452]
+ 9749 krbn::local_datagram_server::receive(boost::asio::mutable_buffer const&, boost::posix_time::time_duration, boost::system::error_code&) (in karabiner_grabber) + 296 [0x104679128]
+ 9749 boost::asio::io_context::run_one() (in karabiner_grabber) + 156 [0x1046798ac]
+ 9749 boost::asio::detail::scheduler::run_one(boost::system::error_code&) (in karabiner_grabber) + 281 [0x10467aa59]
+ 9749 boost::asio::detail::scheduler::do_run_one(boost::asio::detail::conditionally_enabled_mutex::scoped_lock&, boost::asio::detail::scheduler_thread_info&, boost::system::error_code const&) (in karabiner_grabber) + 337 [0x10467ad51]
+ 9749 boost::asio::detail::kqueue_reactor::run(long, boost::asio::detail::op_queue<boost::asio::detail::scheduler_operation>&) (in karabiner_grabber) + 273 [0x10467b181]
+ 9749 kevent (in libsystem_kernel.dylib) + 10 [0x7fff5a258bf2]
9749 Thread_27455000
9749 start_wqthread (in libsystem_pthread.dylib) + 13 [0x7fff5a41ebe9]
9749 _pthread_wqthread (in libsystem_pthread.dylib) + 1035 [0x7fff5a41f009]
9749 __workq_kernreturn (in libsystem_kernel.dylib) + 10 [0x7fff5a258292]
I changed the karabiner_grabber process priority at v12.0.12.
Please confirm the latest beta version.
(You might have to restart your Mac once to apply the change.)
The main change is adding ProcessType: Interactive into launchd.plist.
https://github.com/tekezo/Karabiner-Elements/commit/6d1e38e991bf56b117b062b452042a9fc3402718
This property assigns higher priority to karabiner_grabber.
I confirmed your issue with this code.
https://github.com/tekezo/Karabiner-Elements/blob/master/appendix/stress_testing/main.cpp
https://github.com/tekezo/Karabiner-Elements/blob/master/appendix/stress_testing/run.bash
I also confirmed the problem is reproduced without Karabiner-Elements at high concurrency. (e.g., 100 processes on my machine)
Thus, this issue with high CPU usage is a macOS architecture limitation.
However, we can increase the threshold as possible.
The above change is one of the way to do it.
WOOT! This seems to have fixed the issue, at least for me (And I was able to reproduce it VERY easily). I pegged my CPU to the point where typing is being delayed and I'm not getting any repeated characters, yay!!!
Yes, this seems to have fixed it! The fact that you needed to add set the daemon to Interactive might explain the odd sample I had above: launchd was just pausing karabiner_grabber, which is why it wasn't doing any meaningful work.
Anyways, I'll use this for a couple days and use it as I was previously; I'll let you know how it continues to perform. Great work!
This does seem to be entirely fixed (running v12.1). Thank you so much @tekezo 🙌
Haven't had an issue since the last patch!
On 31 May 2018, at 18:40, Ryan Tuck notifications@github.com wrote:
This does seem to be entirely fixed (running v12.1). Thank you so much @tekezo https://github.com/tekezo 🙌
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/tekezo/Karabiner-Elements/issues/545#issuecomment-393689532, or mute the thread https://github.com/notifications/unsubscribe-auth/AApcaC9PLgNN1qI7I7s5AG5JUlGxNqp-ks5t4GNcgaJpZM4LeTSf.
Ok, so after using this for a week the issue has mostly disappeared, except for one infrequent case involving the function keys (the brightness and volume keys are the easiest to see, because their results are immediately visible on the screen). Interestingly, in this case, the load is rather low until the key is pressed, when it spikes and causes the key to repeat. It's pretty rare and hard to reproduce, which has the upside that it's not really annoying, but the downside that it's hard to fix; let me know if you can figure out what's going on here.
I just ran into this issue again (under high multi-threaded cpu load) even though the grabber process has a high niceness level now. What was interesting was the fact that while the cpu load stayed relatively stable, the issue only appeared very regularly about every 5 seconds (either repeating or not reacting to input for about half a second). Without karabiner enabled input worked flawlessly.
Interesting however: if i put load on the cpu by spawning a bunch of yes > /dev/null processes, it does not trigger this issue at all. So I would say it is probably related to IO / Kernel activity of some sort that still triggers the issue.
Did some checking and it appears there are some apis to get real time behaviour for threads (Interactive only increases process priority with no guarantees)
Check out how chrome handles it for low latency audio (in SetPriorityRealtimeAudio, especially THREAD_TIME_CONSTRAINT_POLICY): https://github.com/chromium/chromium/blob/367a8a06efde403659f13a8f2ca6f16b6b5ecf92/base/threading/platform_thread_mac.mm
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.
I want to add that I've also a repeated key problem, but it's not because of Karabiner (I have it installed but it wasn't always running when it happened).
Also, it doesn't seem to be related with a specific keyboard (or at least the "external" key triggers), as I've tried both disabling the built in keyboard with karabiner and disconnecting my external keyboard and it doesn't fix it.
For me, the issue still shows and only applies to filtered devices. I have key remaps only for the internal MacBook keyboard, and only that one is affected. It's mostly happening when opening the laptop and filling the password field.
Most helpful comment
Any news on this one? Having the same problem :/