コメントにある通り、一旦Appleにも同様の現象をお伝えしてみます。本件クローズさせていただきます。ありがとうございました。
Xamarin.Macから.NET8に移行したら、NASへの書き込みパフォーマンスが著しく低下しOSが落ちてしまう
01311019
0
評価のポイント
Xamarin.Macサポート終了に伴い.NET8にフレームワークを移行しました。現在動作確認をしているのですが、ローカルストレージからNASへのファイルコピー処理中に速度がどんどん低下し、最終的にはOSのUIが固まって落ちてしまいます。以下クラッシュレポートです。
panic(cpu 5 caller 0xfffffe002c10fa34): watchdog timeout: no checkins from watchdogd in 90 seconds (1009 total checkins since monitoring last enabled)
Debugger message: panic
Memory ID: 0x6
OS release type: User
OS version: 21F79
Kernel version: Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:29 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T8101
Fileset Kernelcache UUID: 6761FE24D814CDDD6BDA1ADB023146F8
Kernel UUID: B747B891-04EC-3617-95EC-05E037610520
iBoot version: iBoot-7459.121.3
secure boot?: YES
Paniclog version: 13
KernelCache slide: 0x0000000023e48000
KernelCache base: 0xfffffe002ae4c000
Kernel slide: 0x00000000245f0000
Kernel text base: 0xfffffe002b5f4000
Kernel text exec slide: 0x00000000246d8000
Kernel text exec base: 0xfffffe002b6dc000
mach_absolute_time: 0x38d67508b8
Epoch Time: sec usec
Boot : 0x664421cb 0x000ccef6
Sleep : 0x00000000 0x00000000
Wake : 0x00000000 0x00000000
Calendar: 0x66444981 0x000a1e43
Zone info:
Zone map: 0xfffffe102550c000 - 0xfffffe302550c000
. VM : 0xfffffe102550c000 - 0xfffffe14f21d8000
. RO : 0xfffffe14f21d8000 - 0xfffffe168bb70000
. GEN0 : 0xfffffe168bb70000 - 0xfffffe1b5883c000
. GEN1 : 0xfffffe1b5883c000 - 0xfffffe2025508000
. GEN2 : 0xfffffe2025508000 - 0xfffffe24f21d4000
. GEN3 : 0xfffffe24f21d4000 - 0xfffffe29beea0000
. DATA : 0xfffffe29beea0000 - 0xfffffe302550c000
Metadata: 0xfffffe4ae4cc8000 - 0xfffffe4aeccc8000
Bitmaps : 0xfffffe4aeccc8000 - 0xfffffe4af28cc000
CORE 0 recently retired instr at 0xfffffe002b872fb0
CORE 1 recently retired instr at 0xfffffe002b872fb0
CORE 2 recently retired instr at 0xfffffe002b872fb0
CORE 3 recently retired instr at 0xfffffe002b872fb0
CORE 4 recently retired instr at 0xfffffe002b872fb4
CORE 5 recently retired instr at 0xfffffe002b8719d4
CORE 6 recently retired instr at 0xfffffe002b872fb4
CORE 7 recently retired instr at 0xfffffe002b872fb4
CORE 0 PVH locks held: None
CORE 1 PVH locks held: None
CORE 2 PVH locks held: None
CORE 3 PVH locks held: None
CORE 4 PVH locks held: None
CORE 5 PVH locks held: None
CORE 6 PVH locks held: None
CORE 7 PVH locks held: None
CORE 0: PC=0xfffffe002b86e52c, LR=0xfffffe002b86e528, FP=0xfffffe302a52be90
CORE 1: PC=0xfffffe002b76a9dc, LR=0xfffffe002b76a9dc, FP=0xfffffe302ac13f00
CORE 2: PC=0xfffffe002b76a9dc, LR=0xfffffe002b76a9dc, FP=0xfffffe302aa33f00
CORE 3: PC=0xfffffe002b76a9dc, LR=0xfffffe002b76a9dc, FP=0xfffffe30257a3f00
CORE 4: PC=0xfffffe002b868628, LR=0xfffffe002b8687f4, FP=0xfffffe302759bea0
CORE 5 is the one that panicked. Check the full backtrace for details.
CORE 6: PC=0xfffffe002b76a9dc, LR=0xfffffe002b76a9dc, FP=0xfffffe30272c3f00
CORE 7: PC=0xfffffe002b76a9dc, LR=0xfffffe002b76a9dc, FP=0xfffffe302abe3f00
Compressor Info: 2% of compressed pages limit (OK) and 7% of segments limit (OK) with 2 swapfiles and OK swap space
Total cpu_usage: 76095163
Thread task pri cpu_usage
0xfffffe168bbec820 kernel_task 91 4900081
0xfffffe168c1cf1c0 kernel_task 91 1592856
0xfffffe168bef71c0 kernel_task 0 4978648
0xfffffe168c0a9860 kernel_task 0 5128038
0xfffffe168bed2180 kernel_task 0 4957355
Panicked task 0xfffffe24f21dc678: 0 pages, 481 threads: pid 0: kernel_task
Panicked thread: 0xfffffe168bbec820, backtrace: 0xfffffe3026577810, tid: 101
lr: 0xfffffe002b735100 fp: 0xfffffe3026577880
lr: 0xfffffe002b734dc8 fp: 0xfffffe30265778f0
lr: 0xfffffe002b8795c8 fp: 0xfffffe3026577910
lr: 0xfffffe002b86b878 fp: 0xfffffe3026577980
lr: 0xfffffe002b869524 fp: 0xfffffe3026577a40
lr: 0xfffffe002b6e37f8 fp: 0xfffffe3026577a50
lr: 0xfffffe002b734a50 fp: 0xfffffe3026577df0
lr: 0xfffffe002b734a50 fp: 0xfffffe3026577e60
lr: 0xfffffe002bf5a5d4 fp: 0xfffffe3026577e80
lr: 0xfffffe002c10fa34 fp: 0xfffffe3026577eb0
lr: 0xfffffe002c10ee1c fp: 0xfffffe3026577ef0
lr: 0xfffffe002c10c59c fp: 0xfffffe3026577f10
lr: 0xfffffe002c90e0d4 fp: 0xfffffe3026577fb0
lr: 0xfffffe002be96514 fp: 0xfffffe3026577fc0
lr: 0xfffffe002b86c4c4 fp: 0xfffffe3026577fe0
lr: 0xfffffe002b6e386c fp: 0xfffffe3026577ff0
lr: 0xfffffe002b80e724 fp: 0xfffffe302778bef0
lr: 0xfffffe002b810d30 fp: 0xfffffe302778bf20
lr: 0xfffffe002b6ece78 fp: 0x0000000000000000
Kernel Extensions in backtrace:
com.apple.driver.AppleInterruptController(1.0d1)[16FD62C3-CFDC-3146-ACE6-DEB93116FB39]@0xfffffe002c90b9c0->0xfffffe002c90f0db
dependency: com.apple.driver.AppleARMPlatform(1.0.2)[12D5CDCA-8B0E-3783-8FEC-D4761DA26B1E]@0xfffffe002c0c0db0->0xfffffe002c10b44b
com.apple.driver.AppleARMWatchdogTimer(1.0)[9E823012-9D79-3DE0-BF0B-8C290E00CA6D]@0xfffffe002c10b450->0xfffffe002c10ff33
dependency: com.apple.driver.AppleARMPlatform(1.0.2)[12D5CDCA-8B0E-3783-8FEC-D4761DA26B1E]@0xfffffe002c0c0db0->0xfffffe002c10b44b
last started kext at 151823838099: io.macfuse.filesystems.macfuse 2084.20 (addr 0xfffffe002acbd7c0, size 6272)
loaded kexts:
io.macfuse.filesystems.macfuse 2084.20
com.apple.filesystems.smbfs 4.0
com.apple.iokit.SCSITaskUserClient 456.121.3
com.apple.filesystems.autofs 3.0
com.apple.UVCService 1
com.apple.AppleEthernetAquantiaAqtionFirmware 1.0.36
com.apple.driver.AppleBiometricServices 1
com.apple.driver.CoreKDL 1
com.apple.driver.AppleAOPVoiceTrigger 140.1
com.apple.driver.BCMWLANFirmware4378.Hashstore 1
com.apple.driver.SEPHibernation 1
com.apple.driver.DiskImages.ReadWriteDiskImage 493.0.0
com.apple.driver.DiskImages.UDIFDiskImage 493.0.0
com.apple.driver.DiskImages.RAMBackingStore 493.0.0
com.apple.driver.DiskImages.FileBackingStore 493.0.0
com.apple.driver.AppleSmartBatteryManager 161.0.0
com.apple.driver.AppleUSBDeviceNCM 5.0.0
com.apple.driver.AppleThunderboltIP 4.0.3
com.apple.driver.AppleFileSystemDriver 3.0.1
com.apple.nke.l2tp 1.9
com.apple.filesystems.tmpfs 1
com.apple.filesystems.lifs 1
com.apple.filesystems.apfs 1934.121.2
com.apple.IOTextEncryptionFamily 1.0.0
com.apple.filesystems.hfs.kext 583.100.10
com.apple.security.BootPolicy 1
com.apple.BootCache 40
com.apple.AppleFSCompression.AppleFSCompressionTypeZlib 1.0.0
com.apple.AppleFSCompression.AppleFSCompressionTypeDataless 1.0.0d1
com.apple.driver.ApplePMP 1
com.apple.driver.ApplePMPFirmware 1
com.apple.AppleEmbeddedSimpleSPINORFlasher 1
com.apple.driver.AppleSmartIO2 1
com.apple.driver.AppleTAS5770LAmp 550.3
com.apple.driver.AppleSPMIPMU 1.0.1
com.apple.driver.AppleCS42L83Audio 550.3
com.apple.driver.AppleAVD 564
com.apple.driver.AppleSerialShim 1
com.apple.driver.AppleJPEGDriver 4.8.1
com.apple.driver.AppleMobileDispH13G-DCP 140.0
com.apple.driver.AppleT8020SOCTuner 1
com.apple.driver.AppleT8103CLPCv3 1
com.apple.driver.AppleSPIMC 1
com.apple.AGXG13G 190.20
com.apple.driver.AudioDMAController-T8103 150.1
com.apple.driver.AppleAVE2 550.16.0
com.apple.driver.usb.AppleSynopsysUSB40XHCI 1
com.apple.driver.AppleEventLogHandler 1
com.apple.driver.AppleS5L8960XNCO 1
com.apple.driver.AppleT8103PMGR 1
com.apple.driver.AppleS8000AES 1
com.apple.driver.AppleS5L8920XPWM 1.0.0d1
com.apple.driver.AppleS8000DWI 1.0.0d1
com.apple.driver.AppleInterruptController 1.0.0d1
com.apple.driver.AppleM68Buttons 1.0.0d1
com.apple.driver.AppleBluetoothModule 1
com.apple.driver.AppleSamsungSerial 1.0.0d1
com.apple.driver.AppleBCMWLANBusInterfacePCIe 1
com.apple.driver.AppleMCDP29XXUpdateSupport 1
com.apple.driver.AppleT8020DART 1
com.apple.driver.AppleS5L8940XI2C 1.0.0d2
com.apple.driver.AppleT8101 1
com.apple.iokit.IOUserEthernet 1.0.1
com.apple.driver.usb.AppleUSBUserHCI 1
com.apple.iokit.IOKitRegistryCompatibility 1
com.apple.iokit.EndpointSecurity 1
com.apple.driver.AppleDiskImages2 126.100.13
com.apple.AppleSystemPolicy 2.0.0
com.apple.nke.applicationfirewall 402
com.apple.kec.InvalidateHmac 1
com.apple.kec.AppleEncryptedArchive 1
com.apple.driver.driverkit.serial 6.0.0
com.apple.iokit.IOAVBFamily 1040.6
com.apple.plugin.IOgPTPPlugin 1040.3
com.apple.iokit.IOEthernetAVBController 1.1.0
com.apple.kext.triggers 1.0
com.apple.driver.AppleMesaSEPDriver 100.99
com.apple.iokit.IOBiometricFamily 1
com.apple.driver.usb.IOUSBHostHIDDevice 1.2
com.apple.driver.usb.cdc 5.0.0
com.apple.driver.AppleUSBAudio 416.2
com.apple.iokit.IOAudioFamily 340.2
com.apple.vecLib.kext 1.2.0
com.apple.driver.AppleAOPAudio 150.2
com.apple.driver.AppleSEPHDCPManager 1.0.1
com.apple.driver.AppleTrustedAccessory 1
com.apple.iokit.AppleSEPGenericTransfer 1
com.apple.driver.DiskImages.KernelBacked 493.0.0
com.apple.driver.AppleEthernetAquantiaAqtion 1.0.64
com.apple.driver.usb.AppleEmbeddedUSBXHCIPCI 1
com.apple.driver.usb.AppleUSBXHCIPCI 1.2
com.apple.driver.AppleEmbeddedUSB 1
com.apple.driver.AppleConvergedIPCOLYBTControl 1
com.apple.driver.AppleConvergedPCI 1
com.apple.driver.AppleBluetoothDebug 1
com.apple.driver.AppleXsanScheme 3
com.apple.driver.AppleBTM 1.0.1
com.apple.driver.usb.networking 5.0.0
com.apple.driver.AppleThunderboltUSBDownAdapter 1.0.4
com.apple.driver.AppleThunderboltDPInAdapter 8.5.1
com.apple.driver.AppleThunderboltDPAdapterFamily 8.5.1
com.apple.driver.AppleThunderboltPCIDownAdapter 4.1.1
com.apple.driver.AppleDCPDPTXProxy 1.0.0
com.apple.nke.ppp 1.9
com.apple.driver.DCPDPFamilyProxy 1
com.apple.driver.AppleBSDKextStarter 3
com.apple.filesystems.hfs.encodings.kext 1
com.apple.driver.AppleSPU 1
com.apple.driver.AppleDiagnosticDataAccessReadOnly 1.0.0
com.apple.AGXFirmwareKextG13GRTBuddy 190.20
com.apple.AGXFirmwareKextRTBuddy64 190.20
com.apple.iokit.IONVMeFamily 2.1.0
com.apple.driver.AppleNANDConfigAccess 1.0.0
com.apple.driver.AppleI2CEthernetAquantia 1.0.0
com.apple.driver.AppleStockholmControl 1.0.0
com.apple.driver.AppleDialogPMU 1.0.1
com.apple.driver.AppleCSEmbeddedAudio 550.3
com.apple.driver.AppleEmbeddedAudio 550.3
com.apple.iokit.AppleARMIISAudio 140.2
com.apple.driver.AppleHPM 3.4.4
com.apple.driver.AppleH11ANEInterface 5.65.2
com.apple.iokit.IOMobileGraphicsFamily-DCP 343.0.0
com.apple.iokit.IOMobileGraphicsFamily 343.0.0
com.apple.driver.DCPAVFamilyProxy 1
com.apple.driver.ApplePassthroughPPM 3.0
com.apple.driver.AppleSART 1
com.apple.driver.AppleDCP 1
com.apple.driver.AppleFirmwareKit 1
com.apple.iokit.IOGPUFamily 35.29
com.apple.driver.AppleSPMI 1.0.1
com.apple.driver.AppleUSBXDCIARM 1.0
com.apple.driver.AppleUSBXDCI 1.0
com.apple.iokit.IOUSBDeviceFamily 2.0.0
com.apple.driver.usb.AppleSynopsysUSBXHCI 1
com.apple.driver.usb.AppleUSBXHCI 1.2
com.apple.driver.AppleEmbeddedUSBHost 1
com.apple.driver.usb.AppleUSBHub 1.2
com.apple.driver.usb.AppleUSBHostCompositeDevice 1.2
com.apple.driver.AppleT8103TypeCPhy 1
com.apple.driver.AppleMCA2-T8103 640.5
com.apple.driver.AppleEmbeddedAudioLibs 140.1
com.apple.driver.AppleFirmwareUpdateKext 1
com.apple.driver.ApplePMGR 1
com.apple.driver.AppleARMWatchdogTimer 1
com.apple.driver.usb.AppleUSBHostPacketFilter 1.0
com.apple.driver.AppleDisplayCrossbar 1.0.0
com.apple.driver.AppleTypeCPhy 1
com.apple.driver.AppleThunderboltNHI 7.2.81
com.apple.driver.AppleT8103PCIeC 1
com.apple.iokit.IOThunderboltFamily 9.3.3
com.apple.driver.ApplePIODMA 1
com.apple.driver.AppleT8103PCIe 1
com.apple.driver.AppleMultiFunctionManager 1
com.apple.driver.AppleBluetoothDebugService 1
com.apple.driver.AppleBCMWLANCore 1.0.0
com.apple.iokit.IO80211Family 1200.12.2b2
com.apple.driver.IOImageLoader 1.0.0
com.apple.driver.AppleOLYHAL 1
com.apple.driver.corecapture 1.0.4
com.apple.driver.AppleEmbeddedPCIE 1
com.apple.iokit.IODisplayPortFamily 1.0.0
com.apple.driver.AppleGPIOICController 1.0.2
com.apple.driver.AppleFireStormErrorHandler 1
com.apple.driver.AppleMobileApNonce 1
com.apple.iokit.IOTimeSyncFamily 1040.3
com.apple.driver.DiskImages 493.0.0
com.apple.iokit.IOGraphicsFamily 597
com.apple.iokit.IOBluetoothSerialManager 9.0.0
com.apple.iokit.IOBluetoothHostControllerUSBTransport 9.0.0
com.apple.iokit.IOBluetoothHostControllerUARTTransport 9.0.0
com.apple.iokit.IOBluetoothHostControllerTransport 9.0.0
com.apple.driver.IOBluetoothHostControllerPCIeTransport 9.0.0
com.apple.iokit.IOBluetoothFamily 9.0.0
com.apple.driver.FairPlayIOKit 68.16.0
com.apple.iokit.CSRBluetoothHostControllerUSBTransport 9.0.0
com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport 9.0.0
com.apple.driver.AppleSSE 1.0
com.apple.driver.AppleSEPKeyStore 2
com.apple.driver.AppleUSBTDM 533.120.2
com.apple.iokit.IOUSBMassStorageDriver 210.120.3
com.apple.iokit.IOPCIFamily 2.9
com.apple.iokit.IOSCSIBlockCommandsDevice 456.121.3
com.apple.iokit.IOSCSIArchitectureModelFamily 456.121.3
com.apple.driver.AppleIPAppender 1.0
com.apple.driver.AppleFDEKeyStore 28.30
com.apple.driver.AppleEffaceableStorage 1.0
com.apple.driver.AppleCredentialManager 1.0
com.apple.driver.KernelRelayHost 1
com.apple.iokit.IOUSBHostFamily 1.2
com.apple.driver.AppleUSBHostMergeProperties 1.2
com.apple.driver.usb.AppleUSBCommon 1.0
com.apple.driver.AppleSMC 3.1.9
com.apple.driver.RTBuddy 1.0.0
com.apple.driver.AppleEmbeddedTempSensor 1.0.0
com.apple.driver.AppleARMPMU 1.0
com.apple.iokit.IOAccessoryManager 1.0.0
com.apple.driver.AppleOnboardSerial 1.0
com.apple.iokit.IOSkywalkFamily 1.0
com.apple.driver.mDNSOffloadUserClient 1.0.1b8
com.apple.iokit.IONetworkingFamily 3.4
com.apple.iokit.IOSerialFamily 11
com.apple.driver.AppleSEPManager 1.0.1
com.apple.driver.AppleA7IOP 1.0.2
com.apple.driver.IOSlaveProcessor 1
com.apple.driver.AppleBiometricSensor 2
com.apple.iokit.IOHIDFamily 2.0.0
com.apple.iokit.CoreAnalyticsFamily 1
com.apple.AUC 1.0
com.apple.iokit.IOAVFamily 1.0.0
com.apple.iokit.IOHDCPFamily 1.0.0
com.apple.iokit.IOCECFamily 1
com.apple.iokit.IOAudio2Family 1.0
com.apple.driver.AppleIISController 140.1
com.apple.driver.AppleAudioClockLibs 140.1
com.apple.driver.AppleM2ScalerCSCDriver 265.0.0
com.apple.iokit.IOSurface 302.14
com.apple.driver.IODARTFamily 1
com.apple.security.quarantine 4
com.apple.security.sandbox 300.0
com.apple.kext.AppleMatch 1.0.0d1
com.apple.driver.AppleMobileFileIntegrity 1.0.5
com.apple.security.AppleImage4 4.2.0
com.apple.kext.CoreTrust 1
com.apple.iokit.IOCryptoAcceleratorFamily 1.0.1
com.apple.driver.AppleARMPlatform 1.0.2
com.apple.iokit.IOStorageFamily 2.1
com.apple.iokit.IOSlowAdaptiveClockingFamily 1.0.0
com.apple.iokit.IOReportFamily 47
com.apple.kec.pthread 1
com.apple.kec.Libm 1
com.apple.kec.corecrypto 12.0
** Stackshot Succeeded ** Bytes Traced 320483 (Uncompressed 801440) **
ローカルからローカル、またはローカルから外付けのSSDへのファイルコピーであれば速度低下やUIがフリーズする現象は起きず、NASに対して実行した時のみ発生します。 書き込み量に関してはばらつきがあるのですが、概ね20GB以上をコピーしたあたりから速度低下が発生します。アクティビティモニターを確認していると「kernel_task」のCPU使用率が異常に高くなっている事が確認できています。調査を続けていくとおそらくファイルコピーの処理が良くないのではと考えているのですが原因が特定できずに困っております。ご教示いただけますと幸いです。
以下コピー処理のコードです。
public void CopyFile(FileInfo source, FileInfo destination, IProgress<CopyProgress> progress,
CancellationToken token)
{
var InputBufferSize = 1 << 20
if (source == null)
throw new ArgumentNullException(nameof(source), "Could not locate the source file.");
if (destination == null)
throw new ArgumentNullException(nameof(destination), "Could not locate the destination file.");
destination.Directory?.Create();
var bytesWrote = 0L;
using (var srcFs = File.OpenRead(source.FullName))
using (var dstFs = File.OpenWrite(destination.FullName))
{
var buffer = new byte[InputBufferSize];
var bytesRead = srcFs.Read(buffer, 0, buffer.Length);
while (bytesRead > 0)
{
dstFs.Write(buffer, 0, bytesRead);
bytesWrote += bytesRead;
progress?.Report(new CopyProgress
{
BytesProcessed = bytesWrote,
BytesTransferred = bytesRead
});
bytesRead = srcFs.Read(buffer, 0, buffer.Length);
token.ThrowIfCancellationRequested();
}
}
}
以下動作環境です。
- macOS 12.6.8
- Apple M1 Pro
- .NET 8.0.204
- Rider 2024.1