Earlier quoted context omitted.
I have no idea how I could find that, given that the system freezes completely. Maybe tracing the CPU instructions using LLDB might be possible, but the bug is most likely in the kernel code so this would not help much.
You can debug the kernel remotely over Ethernet: https://developer.apple.com/documentation/apple-silicon/debu... If that still fails, virtualization tools provide debugging interfaces you can use to step the execution of the virtualized CPU; e.g. VMware’s “debugStub” feature.
I think I found a Mac kernel bug (2018)
41–50 of 71 posts
Re: I think I found a Mac kernel bug (2018)
#42Past discussion of this bug: https://news.ycombinator.com/item?id=16082861
I think I found a Mac kernel bug? - https://news.ycombinator.com/item?id=16250677 - Jan 2018 (117 comments)
Re: I think I found a Mac kernel bug (2018)
#43Earlier quoted context omitted.
You can debug the kernel remotely over Ethernet: https://developer.apple.com/documentation/apple-silicon/debu... If that still fails, virtualization tools provide debugging interfaces you can use to step the execution of the virtualized CPU; e.g. VMware’s “debugStub” feature.
You can't with Apple Silicon. It's shameful in my opinion. You still can load a core dump or view the state after a NMI but you can't run the kernel under a debugger.
Re: I think I found a Mac kernel bug (2018)
#44Earlier quoted context omitted.
Might have been better to report it to the security people. This sort of thing can be exploitable.
They did report it to Apple, multiple times: > I found it while on Monterey and reported it 2 times through Feedback Assistant, but it still happens on Ventura.
Re: I think I found a Mac kernel bug (2018)
#45Not surprised. I wrote some kqueue code in C once that not only froze the Mac Kernel. It caused the entire computer to crash. I reported the issue to Apple, and never really heard back. They don't really care, as long as all the mac store apps work, in my experience. This was one call to kqueue with incorrect (but not particularly malicious, just normal C silliness) arguments, and boom!
In 2017, I wrote: Over the years, I have found numerous four different bugs in Apple's Calculator app. Here is today's wtf. Switch calculator to Scientific mode (⌘-2). Type: 1, 0, ^, 2, 0, enter, command-c (to copy), command-v (to paste) Expected result: an amount in $$$ I wouldn't mind having. Actual result: smallest number to appear 6 times in Pascal's triangle I reported all four and they never acknowledged any of…
Re: I think I found a Mac kernel bug (2018)
#46Earlier quoted context omitted.
They did report it to Apple, multiple times: > I found it while on Monterey and reported it 2 times through Feedback Assistant, but it still happens on Ventura.
"to the security people" means emailing the relevant email address, not Feedback Assistant.
Re: I think I found a Mac kernel bug (2018)
#47Re: I think I found a Mac kernel bug (2018)
#48Coincidentally, I also stumbled upon a way to make the kernel of Apple Silicon Macs panic and restart while developing the https://lowtechguys.com website. I distilled the problem in a repo so it can be reproduced with a single command: https://github.com/alin23/m1-panic I found it while on Monterey and reported it 2 times through Feedback Assistant, but it still happens on Ventura. NOTE: Don't try it without saving…
Re: I think I found a Mac kernel bug (2018)
#49Earlier quoted context omitted.
In 2017, I wrote: Over the years, I have found numerous four different bugs in Apple's Calculator app. Here is today's wtf. Switch calculator to Scientific mode (⌘-2). Type: 1, 0, ^, 2, 0, enter, command-c (to copy), command-v (to paste) Expected result: an amount in $$$ I wouldn't mind having. Actual result: smallest number to appear 6 times in Pascal's triangle I reported all four and they never acknowledged any of…
I just tested right now, ⌘C copies the string "1e20" and ⌘V pastes that same string. So yeah it looks like it was fixed.
The behavior is maybe a bit surprising, but I could also see it being defensible. You can't type "1e20" into the calculator, so why would you be able to paste it in?
Outside of plain text, I don't think clipboard operations are necessarily expected to be reversible.
Re: I think I found a Mac kernel bug (2018)
#50It's very easy to freeze a system as a non-root user; cause too many interrupts, consume too many resources, etc. Many kinds of infinite loop will lock a system hard. Hell, you can crash systems with too many packets . And it's very easy to cause ps to hang. Many different kernel syscalls hang / are blocking. Mostly you see this with kernel features dependent on a resource that doesn't resolve itself, like a stuck di…
While what you say is true, these are nonetheless kernel bugs. The kernel should never let any user process consume so many resources as to cause a system freeze. The kernel must not only be able to preempt any user process at any time, stopping it to consume all CPU time, but it must also prevent any user process to completely fill a SSD or HDD, because that can prevent many programs from starting.
Pretty much the only kernels that are totally preemptible are RTOS and they still don't stop you from shooting yourself in the foot.