[smartmontools-support] smartd Segmentation fault: 11 with Apple Silicon based Mac
桃源老師
xanadu6291 at dream.jp
Sat Nov 23 17:43:22 CET 2024
Hello Christian - san,
Thank you for your replay...
The timing of my post and your post might be over-rapped...
And I apologize some lines in my post are duplicated...
> 2024/11/24 午前0:00、Christian Franke <Christian.Franke at t-online.de>のメール:
>
> 桃源老師 wrote:
>> Hello Christian - san,
>>
>> Thank you for your prompt reply...
>>
>> ...
>>
>>> Please test whether the segfault could be reproduced in smartd debug mode with a short check interval, for example:
>>>
>>> smartd -d -i 10
>>>
>>> (stop with SIGQUIT instead of SIGINT).
>> With -d option, smartd never stop. But removing -d option, i.e.
>>
>> smartd -i 30,
>>
>> smartd was killed by segfault after 30 seconds running.
>>
>> Also, using -d option, smartd outputs 'Cannot create state file "/usr/local/var/lib/smartmontools/smartd.APPLE_SSD_AP1024Z-0ba02062208d1420-n0.nvme.state"' to Terminal. ...
>
> This is as expected because /usr/local/var/lib/smartmontools/ is likely only writable by root.
OK.
>> ... So I realized that it might need to be add "sudo", i.e.
>>
>> sudo smartd -i 30,
>>
>> smartd does not killed by Operating System...
>>
>> It might be required to add "sudo", execute smartd command as super user, on Apple Silicon based Macs... Am I correct?
>
> Usually smartctl and smartd need to be run as root because transparent ATA/SCSI/NVMe pass-through functionality is used to directly access the physical devices. In some cases (macOS, Windows NVMe) the OS only provides a restricted API instead which only allows to read selected diagnostic data. The OS may allow access also from regular users then. I don't know whether macOS allows this.
A bit difficult, but try to understand...
> Even if run without root, smartd should not crash. I have no idea why this happens in your case (I don't use macOS).
I think that Apple Silicon based Mac is made as terribly robust, so the behavior might not be crash, just killed by macOS and leaved log say likely crash... Any way, I think that my usage was wrong and the crash(?) happens with this wrong usage, also I don't have deeper knowledge of macOS, so let's bring the curtain down here...
Best Regards,
Kimio Miyamura
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4329 bytes
Desc: not available
URL: <https://listi.jpberlin.de/pipermail/smartmontools-support/attachments/20241124/676a7db9/attachment.p7s>
More information about the Smartmontools-support
mailing list