12 Replies
      Latest reply on Mar 1, 2019 1:15 AM by eskimo
      hagen Level 1 Level 1 (0 points)

        It seems that logging get easily corrupted (at least with latest macOS 10.13.3). I think just reloading the logging kext is sufficient to only see crap anymore.

         

        For a short workaround: how can the unified logging "system" be reset? (Other than restarting the entire OS?)

         

        Thanks,

        Hagen.

        • Re: unified logging corrupted
          hagen Level 1 Level 1 (0 points)

          Issue persists up to today. Bug has been reported.

           

          To recap:

          The output of a kext using the unified logging via console or terminal is garbled after kextloading a rebuilt kext if another version was loaded before (macOS 10.12/10.13).

           

          Steps to Reproduce:

          build a kext with logging. kextload. rebuild it with slightly changed source. kextunload/kextload.

           

          Anyone cares?

          • Re: unified logging corrupted
            eskimo Apple Staff Apple Staff (11,025 points)

            Anyone cares?

            I, for one, care.  Alas, I don’t have any obvious suggestions for how to move forward here.  My recommendation is that you open a DTS tech support incident and I, or one of my colleagues, can take a proper look at this.

            Share and Enjoy

            Quinn “The Eskimo!”
            Apple Developer Relations, Developer Technical Support, Core OS/Hardware
            let myEmail = "eskimo" + "1" + "@apple.com"

              • Re: unified logging corrupted
                hagen Level 1 Level 1 (0 points)

                Thanks, opening an ADC incident was my first action. This resulted in requiring me opening a bug report: the place were eventually all issues get safely burried.

                  • Re: unified logging corrupted
                    eskimo Apple Staff Apple Staff (11,025 points)

                    This resulted in requiring me opening a bug report

                    What is that bug number?

                    Share and Enjoy

                    Quinn “The Eskimo!”
                    Apple Developer Relations, Developer Technical Support, Core OS/Hardware
                    let myEmail = "eskimo" + "1" + "@apple.com"

                      • Re: unified logging corrupted
                        hagen Level 1 Level 1 (0 points)

                        Thanks, Quinn,

                        Apple bugreporter problem ID is 43176244 (as mentioned above).

                        Cheers,

                        Hagen.

                          • Re: unified logging corrupted
                            eskimo Apple Staff Apple Staff (11,025 points)

                            Apple bugreporter problem ID is 43176244

                            Thanks.

                            It’s possible that this is tied to the UUID of your KEXT.  When you reproduce the problem, does the new KEXT have a different UUID from the original one?

                            You can dump the KEXT’s UUID using:

                            $ otool -l /path/to/My.kext/Contents/MacOS/My | grep -B 1 -A 2 UUID
                            Load command 5
                                 cmd LC_UUID
                             cmdsize 24
                                uuid CF13567F-D968-3D1A-A71F-AABD0544F584

                            Share and Enjoy

                            Quinn “The Eskimo!”
                            Apple Developer Relations, Developer Technical Support, Core OS/Hardware
                            let myEmail = "eskimo" + "1" + "@apple.com"

                              • Re: unified logging corrupted
                                hagen Level 1 Level 1 (0 points)

                                Thanks,

                                yes the UUID changes.

                                Cheers,

                                Hagen.

                                  • Re: unified logging corrupted
                                    eskimo Apple Staff Apple Staff (11,025 points)

                                    Thanks.  I updated your bug with that factoid (it’s in an internal area that you can’t see via Apple Bug Reporter).

                                    Is your KEXT driving hardware?  Or this is a software-only KEXT (VFS plug-in, NKE, virtual device, virus checker, and so on)?

                                    Share and Enjoy

                                    Quinn “The Eskimo!”
                                    Apple Developer Relations, Developer Technical Support, Core OS/Hardware
                                    let myEmail = "eskimo" + "1" + "@apple.com"

                                      • Re: unified logging corrupted
                                        hagen Level 1 Level 1 (0 points)

                                        Yes, there are various kexts driving different hardware. For test purpose I also have software-only kexts. If it matters I could check the software-only kext for that behaviour.

                                        Thanks,

                                        Hagen.

                                          • Re: unified logging corrupted
                                            eskimo Apple Staff Apple Staff (11,025 points)

                                            Yes, there are various kexts driving different hardware.

                                            OK, that rules out my other recommendation here )-:  I avoid problems like this by doing all of my KEXT work in a VM.  When I’m done with a particular debugging session, I simply revert the VM to a snapshot.

                                            Alas, this isn’t feasible if you’re developing with real hardware.

                                            Share and Enjoy

                                            Quinn “The Eskimo!”
                                            Apple Developer Relations, Developer Technical Support, Core OS/Hardware
                                            let myEmail = "eskimo" + "1" + "@apple.com"