Random crash "Zone cache element was used after free!" - Kernel Panic

martincpt

New member
Joined
Nov 3, 2020
Messages
6
My Ryzentosh gets random crashes like once in every few days. Crash is totally unexpected and happens on random processes, even on light tasks like writing an email.

The kernel panic message is always the some however the causing process is always different.

Ryzentosh runs on latest Catalina with Open Core 0.6.2 and everything seems working fine except sleep.

MOBO: Asrock X570M Pro4
GPU: RX580
MEM: Corsair VENGEANCE RGB Pro 16GB (2x8GB) DDR4 3200MHz
SSD: A-Data SX8200 1TB
PSU: Corsair TX550M

Here is three piece of kernel panic log i experience:

Log 1:

Code:
panic(cpu 10 caller 0xffffff801f774555): "Zone cache element was used after free! Element 0xffffff804bbebbe0 was corrupted at beginning; Expected 0xb692356f26e7be28 but found 0xffffff7fa1165bc8; canary 0x496dcaef6d5905c8; zone 0xffffff80200a46e0 (kalloc.80)"@/AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/xnu/xnu-6153.141.10/osfmk/kern/zcache.c:658
Backtrace (CPU 10), Frame : Return Address
0xffffff821650bc40 : 0xffffff801f71961d mach_kernel : _handle_debugger_trap + 0x49d
0xffffff821650bc90 : 0xffffff801f853ac5 mach_kernel : _kdp_i386_trap + 0x155
0xffffff821650bcd0 : 0xffffff801f84564e mach_kernel : _kernel_trap + 0x4ee
0xffffff821650bd20 : 0xffffff801f6bfa40 mach_kernel : _return_from_trap + 0xe0
0xffffff821650bd40 : 0xffffff801f718ce7 mach_kernel : _DebuggerTrapWithState + 0x17
0xffffff821650be40 : 0xffffff801f7190d7 mach_kernel : _panic_trap_to_debugger + 0x227
0xffffff821650be90 : 0xffffff801fec00bc mach_kernel : _panic + 0x54
0xffffff821650bf00 : 0xffffff801f774555 mach_kernel : _zcache_mag_drain + 0xd5
0xffffff821650bf30 : 0xffffff801f774450 mach_kernel : _zcache_drain_depot + 0x60
0xffffff821650bf60 : 0xffffff801f7736ac mach_kernel : _zone_gc + 0x20c
0xffffff821650bf80 : 0xffffff801f7d58c9 mach_kernel : _vm_pageout_garbage_collect + 0xb9
0xffffff821650bfa0 : 0xffffff801f6bf13e mach_kernel : _call_continuation + 0x2e

BSD process name corresponding to current thread: kernel_task
Boot args: keepsyms=1 debug=0x100 alcid=1 npci=0x2000 -hbfx-disable-patch-pc chunklist-security-epoch=0 -chunklist-no-rev2-dev

Mac OS version:
19H114

Kernel version:
Darwin Kernel Version 19.6.0: Tue Nov 10 00:10:30 PST 2020; root:xnu-6153.141.10~1/RELEASE_X86_64
Kernel UUID: A477D537-F87E-3978-8D7F-A84B7C02E62E
Kernel slide:     0x000000001f400000
Kernel text base: 0xffffff801f600000
__HIB  text base: 0xffffff801f500000
System model name: MacPro7,1 (Mac-27AD2F918AE68F61)
System shutdown begun: NO
Panic diags file available: YES (0x0)

System uptime in nanoseconds: 1706696251614

Log 2:

Code:
panic(cpu 6 caller 0xffffff8015574977): "Zone cache element was used after free! Element 0xffffff805b9e4f00 was corrupted at beginning; Expected 0xeec75ef8783b6cb4 but found 0xffffff805c2f9450; canary 0x1138a17823a523b4; zone 0xffffff8015ea46e0 (kalloc.80)"@/AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/xnu/xnu-6153.141.10/osfmk/kern/zcache.c:658
Backtrace (CPU 6), Frame : Return Address
0xffffff922b763070 : 0xffffff801551961d mach_kernel : _handle_debugger_trap + 0x49d
0xffffff922b7630c0 : 0xffffff8015653ac5 mach_kernel : _kdp_i386_trap + 0x155
0xffffff922b763100 : 0xffffff801564564e mach_kernel : _kernel_trap + 0x4ee
0xffffff922b763150 : 0xffffff80154bfa40 mach_kernel : _return_from_trap + 0xe0
0xffffff922b763170 : 0xffffff8015518ce7 mach_kernel : _DebuggerTrapWithState + 0x17
0xffffff922b763270 : 0xffffff80155190d7 mach_kernel : _panic_trap_to_debugger + 0x227
0xffffff922b7632c0 : 0xffffff8015cc00bc mach_kernel : _panic + 0x54
0xffffff922b763330 : 0xffffff8015574977 mach_kernel : _zcache_alloc_from_cpu_cache + 0x217
0xffffff922b763370 : 0xffffff8015570bdf mach_kernel : _zalloc_async + 0x23f
0xffffff922b7634a0 : 0xffffff8015526564 mach_kernel : _kalloc_canblock + 0xa4
0xffffff922b763510 : 0xffffff8015b96407 mach_kernel : __ZN6OSData16initWithCapacityEj + 0x97
0xffffff922b763550 : 0xffffff8015c3a6b5 mach_kernel : __ZN25IOGeneralMemoryDescriptor15initWithOptionsEPvjjP4taskjP8IOMapper + 0x3c5
0xffffff922b7635f0 : 0xffffff8015c4061d mach_kernel : __ZN18IOMemoryDescriptor11withOptionsEPvjjP4taskjP8IOMapper + 0x8d
0xffffff922b763640 : 0xffffff7f9628d262 com.apple.iokit.IOStorageFamily : __ZL11dkreadwritePv9dkrtype_t + 0x38a
0xffffff922b7636f0 : 0xffffff80157b8727 mach_kernel : _spec_strategy + 0x377
0xffffff922b763740 : 0xffffff801575774d mach_kernel : _buf_strategy + 0x17d
0xffffff922b763800 : 0xffffff8015761257 mach_kernel : _cluster_pageout_ext + 0xef7
0xffffff922b763930 : 0xffffff8015768725 mach_kernel : _cluster_read_ext + 0x24b5
0xffffff922b763ab0 : 0xffffff8015766bbf mach_kernel : _cluster_read_ext + 0x94f
0xffffff922b763d00 : 0xffffff7f990663d8 com.apple.filesystems.hfs.kext : _hfs_vnop_read + 0x250
0xffffff922b763d80 : 0xffffff801579d053 mach_kernel : _utf8_normalizestr + 0x573
0xffffff922b763e30 : 0xffffff8015a9f332 mach_kernel : _preparefileread + 0x282
0xffffff922b763ee0 : 0xffffff8015a9f4be mach_kernel : _pread_nocancel + 0x8e
0xffffff922b763f40 : 0xffffff8015b83237 mach_kernel : _unix_syscall64 + 0x287
0xffffff922b763fa0 : 0xffffff80154c0206 mach_kernel : _hndl_unix_scall64 + 0x16
      Kernel Extensions in backtrace:
         com.apple.iokit.IOStorageFamily(2.1)[CCEF9EAD-4759-3EC4-B71C-0DF7B927560A]@0xffffff7f96280000->0xffffff7f962a7fff
         com.apple.filesystems.hfs.kext(522.100.5)[87C3C850-D7CB-3289-8C3A-607DA94732B5]@0xffffff7f99048000->0xffffff7f990b2fff
            dependency: com.apple.filesystems.hfs.encodings.kext(1)[0A512972-CFC2-37D3-856C-AE9C8007A449]@0xffffff7f96dd7000

BSD process name corresponding to current thread: mdworker_shared
Boot args: -v keepsyms=1 debug=0x100 alcid=1 npci=0x2000 -hbfx-disable-patch-pc chunklist-security-epoch=0 -chunklist-no-rev2-dev

Mac OS version:
19H114

Kernel version:
Darwin Kernel Version 19.6.0: Tue Nov 10 00:10:30 PST 2020; root:xnu-6153.141.10~1/RELEASE_X86_64
Kernel UUID: A477D537-F87E-3978-8D7F-A84B7C02E62E
Kernel slide:     0x0000000015200000
Kernel text base: 0xffffff8015400000
__HIB  text base: 0xffffff8015300000
System model name: MacPro7,1 (Mac-27AD2F918AE68F61)
System shutdown begun: NO
Panic diags file available: YES (0x0)

System uptime in nanoseconds: 13128064674375

Log 3:

Code:
panic(cpu 8 caller 0xffffff8017974977): "Zone cache element was used after free! Element 0xffffff806c8e3d70 was corrupted at beginning; Expected 0xfda438b37233eb1e but found 0x1f500000001; canary 0x25bc7331ebdd66e; zone 0xffffff80182a46e0 (kalloc.80)"@/AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/xnu/xnu-6153.141.10/osfmk/kern/zcache.c:658
Backtrace (CPU 8), Frame : Return Address
0xffffff820084b530 : 0xffffff801791961d mach_kernel : _handle_debugger_trap + 0x49d
0xffffff820084b580 : 0xffffff8017a53ac5 mach_kernel : _kdp_i386_trap + 0x155
0xffffff820084b5c0 : 0xffffff8017a4564e mach_kernel : _kernel_trap + 0x4ee
0xffffff820084b610 : 0xffffff80178bfa40 mach_kernel : _return_from_trap + 0xe0
0xffffff820084b630 : 0xffffff8017918ce7 mach_kernel : _DebuggerTrapWithState + 0x17
0xffffff820084b730 : 0xffffff80179190d7 mach_kernel : _panic_trap_to_debugger + 0x227
0xffffff820084b780 : 0xffffff80180c00bc mach_kernel : _panic + 0x54
0xffffff820084b7f0 : 0xffffff8017974977 mach_kernel : _zcache_alloc_from_cpu_cache + 0x217
0xffffff820084b830 : 0xffffff8017970bdf mach_kernel : _zalloc_async + 0x23f
0xffffff820084b960 : 0xffffff8017926564 mach_kernel : _kalloc_canblock + 0xa4
0xffffff820084b9d0 : 0xffffff8017f93287 mach_kernel : __ZN8OSObjectnwEm + 0x27
0xffffff820084ba00 : 0xffffff8017fb44c4 mach_kernel : __ZN11OSSerialize12withCapacityEj + 0x14
0xffffff820084ba20 : 0xffffff8017fbc47a mach_kernel : __ZN11OSSerialize18binaryWithCapacityEjPFPK15OSMetaClassBasePvPS_P12OSCollectionPK8OSSymbolS2_ES3_ + 0x1a
0xffffff820084ba50 : 0xffffff7f99eba0dd com.apple.iokit.IOSurface : __ZN23IOSurfaceRootUserClient9get_valueEP18IOSurfaceValueArgsS1_jPj + 0xd7
0xffffff820084bab0 : 0xffffff7f99eb85c8 com.apple.iokit.IOSurface : __ZN23IOSurfaceRootUserClient11s_get_valueEPS_PvP25IOExternalMethodArguments + 0xf8
0xffffff820084bb10 : 0xffffff8018051fce mach_kernel : __ZN12IOUserClient14externalMethodEjP25IOExternalMethodArgumentsP24IOExternalMethodDispatchP8OSObjectPv + 0x1de
0xffffff820084bb60 : 0xffffff801805b1f3 mach_kernel : _is_io_connect_method + 0x223
0xffffff820084bca0 : 0xffffff8017a025c2 mach_kernel : _iokit_server_routine + 0x4e62
0xffffff820084bdb0 : 0xffffff801791f388 mach_kernel : _ipc_kobject_server + 0x238
0xffffff820084be10 : 0xffffff80178f5d35 mach_kernel : _ipc_kmsg_send + 0x135
0xffffff820084be70 : 0xffffff801790cae2 mach_kernel : _mach_msg_overwrite_trap + 0x2d2
0xffffff820084bf00 : 0xffffff8017a2b045 mach_kernel : _mach_call_munger64 + 0x205
0xffffff820084bfa0 : 0xffffff80178c0226 mach_kernel : _hndl_mach_scall64 + 0x16
      Kernel Extensions in backtrace:
         com.apple.iokit.IOSurface(269.11)[8F3433B2-7A63-38F2-9B09-585BA47F9BB6]@0xffffff7f99ea9000->0xffffff7f99ed7fff

BSD process name corresponding to current thread: WindowServer
Boot args: keepsyms=1 debug=0x100 alcid=1 npci=0x2000 -hbfx-disable-patch-pc -no-zp chunklist-security-epoch=0 -chunklist-no-rev2-dev

Mac OS version:
19H114

Kernel version:
Darwin Kernel Version 19.6.0: Tue Nov 10 00:10:30 PST 2020; root:xnu-6153.141.10~1/RELEASE_X86_64
Kernel UUID: A477D537-F87E-3978-8D7F-A84B7C02E62E
Kernel slide:     0x0000000017600000
Kernel text base: 0xffffff8017800000
__HIB  text base: 0xffffff8017700000
System model name: MacPro7,1 (Mac-27AD2F918AE68F61)
System shutdown begun: NO
Panic diags file available: YES (0x0)

System uptime in nanoseconds: 8642632171772

Does anyone has similar issue? Any help is appreciated!

Thanks!
 

Shaneee

The AMD Guy
Staff member
Administrator
Joined
Mar 13, 2020
Messages
1,429
Set the PCI version in your BIOS to Gen3 if possible. This tends to fix random crashes and stutters.
 

martincpt

New member
Joined
Nov 3, 2020
Messages
6
Set the PCI version in your BIOS to Gen3 if possible. This tends to fix random crashes and stutters.
Thank you! I've found two option in bios called 'PCI x16 interface' and 'PCI x8 interface' and I set them from 'Auto' to 'Gen3'. Will see if it solves the issue.
 

martincpt

New member
Joined
Nov 3, 2020
Messages
6
Set the PCI version in your BIOS to Gen3 if possible. This tends to fix random crashes and stutters.
Unfortunately this did not solved the problem completely. However my system did not crash for almost a week, but today I just experienced the same issue. Not sure if it was luck or setting the PCI gen was actually helped to decrase the number of problems.
 

Aluveitie

Donator
Donator
Joined
May 2, 2020
Messages
758
How is your RAM configured? MacOS can sometimes be more sensible than other OS regarding RAM timings/frequency.

But since two of your strack traces are IO related it might be an issue with your SSD, if you don't have it already you could try the NVMeFix kext. Maybe that helps.
 

martincpt

New member
Joined
Nov 3, 2020
Messages
6
How is your RAM configured? MacOS can sometimes be more sensible than other OS regarding RAM timings/frequency.

But since two of your strack traces are IO related it might be an issue with your SSD, if you don't have it already you could try the NVMeFix kext. Maybe that helps.

Thanks for answer!

My memory is enabled in BIOS to run on 3200Mhz. Should I turn that off?

I just disabled MacProMemoryNotificationDisabler.kext because I heard that can cause some issue, will see if that helps.

Yeah i thought about SSD issue too, but I use NVMeFix kext since first launch of this ryzentosh. Will update that soon to 1.0.5. cuz I have 1.0.4 currently.
 

Aluveitie

Donator
Donator
Joined
May 2, 2020
Messages
758
You could set it to 3000 for example to test if that improves things. The XMP profile is not guaranteed to work stable on every board.
 

Gigamaxx

Donator
Donator
Joined
Dec 4, 2020
Messages
106
You could set it to 3000 for example to test if that improves things. The XMP profile is not guaranteed to work stable on every board.
A lot of Intel boards also have issues with XMP profiles for memory. So unless you have 2 different memory timings or types maybe disable XMP.
 
Top Bottom