IOUnserialize error and fix?

René J.V. Bertin rjvbertin at gmail.com
Mon Feb 15 12:54:25 PST 2016


Hi,

I just had one of these episodes where my system.log receives heavy pollution like this:

Feb 15 21:14:09 Portia.local kdevelop.bin[32590]: FIXME: IOUnserialize has detected a string that is not valid UTF-8, "+_»".
Feb 15 21:14:39 --- last message repeated 341 times ---
Feb 15 21:14:39 Portia.local kdevelop.bin[32590]: FIXME: IOUnserialize has detected a string that is not valid UTF-8, "+_»".
Feb 15 21:15:09 --- last message repeated 341 times ---
Feb 15 21:15:10 Portia.local kdevelop.bin[32590]: FIXME: IOUnserialize has detected a string that is not valid UTF-8, "+_»".
Feb 15 21:15:10 Portia.local kdevelop.bin[32590]: FIXME: IOUnserialize has detected a string that is not valid UTF-8, "+_»".
Feb 15 21:15:40 --- last message repeated 340 times ---
Feb 15 21:15:40 Portia.local kdevelop.bin[32590]: FIXME: IOUnserialize has detected a string that is not valid UTF-8, "+_»".
Feb 15 21:15:44 --- last message repeated 113 times ---
Feb 15 21:20:57 Portia.local Finder[284]: FIXME: IOUnserialize has detected a string that is not valid UTF-8, "+_»".
Feb 15 21:21:00 --- last message repeated 5 times ---


That's an old acquaintance that I thought related to the WiFi subsystem, but I also get it when using wired internet and WiFi  off.

So I finally went ahead and traced the source of the message to the buildString function in IOKit's IOCFUnserialize.tab.c (IOKitUser source for I think IOKit.framework available from opensource.apple.com).

A breakpoint on that function revealed the following backtrace running KDevelop :

(lldb) bt
* thread #1: tid = 0x4b1fc0, 0x00007fff8fa9b754 IOKit`buildString, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
  * frame #0: 0x00007fff8fa9b754 IOKit`buildString
    frame #1: 0x00007fff8fa9b1bc IOKit`IOCFUnserializeparse + 3048
    frame #2: 0x00007fff8fa9b880 IOKit`IOCFUnserialize + 161
    frame #3: 0x00007fff8fa9dae9 IOKit`IORegistryEntryCreateCFProperty + 199
    frame #4: 0x00007fff8af3ff8d MultitouchSupport`MTDeviceCreateFromService + 330
    frame #5: 0x00007fff8af40698 MultitouchSupport`mt_DeviceCreateFromDeviceID + 275
    frame #6: 0x00007fff8af4c046 MultitouchSupport`_mthid_copyDeviceInfo + 14
    frame #7: 0x00007fff8e8f0bde AppKit`-[NSEvent _initTouches] + 428
    frame #8: 0x00007fff8e8870ea AppKit`-[NSEvent _initWithCGSEvent:eventRef:] + 2604
    frame #9: 0x00007fff8e6e499a AppKit`-[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 377
    frame #10: 0x00007fff8e6d899c AppKit`-[NSApplication run] + 553
    frame #11: 0x000000010cae6aad libqcocoa.dylib`QCocoaEventDispatcher::processEvents(this=0x000000010b669cb0, flags=<unavailable>) + 2189 at qcocoaeventdispatcher.mm:418
    frame #12: 0x000000010351f9dd QtCore`QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) [inlined] QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 381 at qeventloop.cpp:128
    frame #13: 0x000000010351f9c4 QtCore`QEventLoop::exec(this=0x00007fff5fbfe010, flags=<unavailable>) + 356 at qeventloop.cpp:204
    frame #14: 0x0000000103522855 QtCore`QCoreApplication::exec() + 325 at qcoreapplication.cpp:1234
    frame #15: 0x00000001000186db kdevelop.bin`main(argc=2, argv=<unavailable>) + 51611 at main.cpp:753
    frame #16: 0x00007fff8fd755fd libdyld.dylib`start + 1

The breakpoint is triggered when I do a 2-finger scroll (make that "was": is no longer the case now) on my Magic TouchPad and on my MBP's internal touchpad.

Disregarding why this happens, is there anything I can do about avoiding the error message and its overhead?
In former times I'd simply add a well-aimed nullbyte (^@) in IOKit's binary but I fear that will lead to all kinds of worlds of trouble these days.
I could of course build my own IOKit.framework copy with the syslog call disabled (once I figure out how; I never managed to get my head around Xcode > 3.2.6 :-/). But is there somewhere I can put the result so that it will be loaded by dyld instead of the system library, or otherwise at least by my own apps after relinking them (/Library/Frameworks would be ideal)?

This is mostly an annoyance, but one sufficiently mysterious (googling it gave no answers) that one might be tempted to provide a IOKit port ;)

Thanks,
R.


More information about the macports-users mailing list