Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

how to avoid panic crash due to overflow of kernel variable os_refcnt

I am developing code that is highly CPU intensive and there is a crash consistently every 16 hours or so. The only programs used are the tcsh shell and gnu compilers, + the compiled code that I am running. I have no idea about what is causing this system counter variable to overflow, but would like to adjust my code to avoid it. I am running 12 threads in parallel on 12 separate processes. Have reset all of the shell variables at the end of using them and have placed 3 external fans to blow at the base of cylindrical MacPro stack, since a Google search suggested one thing kernel does is adjust program execution to avoid overheating. The shell writes code, compiles the code and runs the code over & over again on the order of 10^8-10^9 times on different data combinations and analyzes the output.



Top of crash report:

panic(cpu 8 caller 0xffffff801c4c357e): "os_refcnt: overflow (rc=0xffffff801c6c7f98)\n"@/AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/xnu/xnu-6153.101.6/libkern/os/refcnt.c:58


Backtrace (CPU 8), Frame : Return Address


0xffffff9246aab610 : 0xffffff801bd215cd


0xffffff9246aab660 : 0xffffff801be5a3c5


0xffffff9246aab6a0 : 0xffffff801be4bf7e


0xffffff9246aab6f0 : 0xffffff801bcc7a40


0xffffff9246aab710 : 0xffffff801bd20c97


0xffffff9246aab810 : 0xffffff801bd21087


0xffffff9246aab860 : 0xffffff801c4c2c7c


0xffffff9246aab8d0 : 0xffffff801c4c357e


0xffffff9246aab8e0 : 0xffffff801be418e9


0xffffff9246aab910 : 0xffffff801be24ab6


0xffffff9246aab940 : 0xffffff801bd4fb4c


0xffffff9246aab9b0 : 0xffffff801c271e6d


0xffffff9246aaba10 : 0xffffff801c260dac


0xffffff9246aabdd0 : 0xffffff801c268c4e


0xffffff9246aabe50 : 0xffffff801c269de2


0xffffff9246aabef0 : 0xffffff801c269a39


0xffffff9246aabf40 : 0xffffff801c3875f7


0xffffff9246aabfa0 : 0xffffff801bcc8206




BSD process name corresponding to current thread: tcsh




Mac OS version:


19E287




Kernel version:


Darwin Kernel Version 19.4.0: Wed Mar  4 22:28:40 PST 2020; root:xnu-6153.101.6~15/RELEASE_X86_64


Kernel UUID: AB0AA7EE-3D03-3C21-91AD-5719D79D7AF6


Kernel slide:     0x000000001ba00000


Kernel text base: 0xffffff801bc00000


__HIB  text base: 0xffffff801bb00000


System model name: MacPro6,1 (Mac-F60DEB81FF30ACF6)


System shutdown begun: NO


Panic diags file available: YES (0x0)




System uptime in nanoseconds: 66900862104912


last loaded kext at 12343172427: @fileutil      20.036.15 (addr 0xffffff7f9d17f000, size 114688)


last unloaded kext at 195349879019: >usb.!UHostPacketFilter     1.0 (addr 0xffffff7f9d361000, size 24576)

Mac Pro, macOS 10.15

Posted on Apr 28, 2020 9:40 PM

Reply

Similar questions

1 reply

May 3, 2020 9:57 AM in response to Oh Great Confused One

Update: I had run the program dozens to hundreds of times on different data, each time with the crash consistently after 16.2 h +/- 0.2 h. I bought 3 USB fans (plugged into another device) and after placing them symmetrically around and aiming them at the base of the MacPro's cylindrical stack, the crash time changed to 20 hours for 3 straight times. A downloaded app that displays CPU running temperature suggests that the sustained peak temperature is cooler by about 2-5 deg C after using the fans. Running the software on different data using the extra cooling, here is still a system panic crash, albeit delayed, so something else must still be causing the crash. The heating up of the CPU may have been a significant contributor.

how to avoid panic crash due to overflow of kernel variable os_refcnt

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.