Error when fstrim: mc-err: (0) csr_afir: EMEM decode error on PDE or PTE entry

Hi. I have a problem with my jetson nano with ssd.

When I run the command

sudo systemctl start fstrim

the following errors are written in the syslog:

Nov 22 09:49:17 jetson systemd[1]: Starting Discard unused blocks...
Nov 22 09:49:17 jetson kernel: [58317.362194] smmu_dump_pagetable(): fault_address=0x00000000ff5bb000 pa=0x0000000000000000 bytes=1000 #pte=205 in L2
Nov 22 09:49:17 jetson kernel: [58317.372697] mc-err: (0) csr_afir: EMEM decode error on PDE or PTE entry
Nov 22 09:49:17 jetson kernel: [58317.379333] mc-err:   status = 0x6000000e; addr = 0xff5bb000
Nov 22 09:49:17 jetson kernel: [58317.385011] mc-err:   secure: no, access-type: read, SMMU fault: nr-nw-s
Nov 22 09:49:17 jetson kernel: [58317.392589] smmu_dump_pagetable(): fault_address=0x00000000ff5bb000 pa=0x0000000000000000 bytes=1000 #pte=205 in L2
Nov 22 09:49:17 jetson kernel: [58317.403049] mc-err: (0) csr_afir: EMEM decode error on PDE or PTE entry
Nov 22 09:49:17 jetson kernel: [58317.409676] mc-err:   status = 0x6000000e; addr = 0xff5bb000
Nov 22 09:49:17 jetson kernel: [58317.415351] mc-err:   secure: no, access-type: read, SMMU fault: nr-nw-s
Nov 22 09:49:18 jetson fstrim[12871]: /mnt/ssd: 116.8 GiB (125426262016 bytes) trimmed
Nov 22 09:49:18 jetson fstrim[12871]: /: 2.3 GiB (2444632064 bytes) trimmed
Nov 22 09:49:18 jetson systemd[1]: Started Discard unused blocks.

Does anyone know how to fix it? Is that “dangerous” for the ssd?

Thanks!

Hi,
Please share more information about fstrim. We don’t have much experience about this service. And do you use latest Jetpack 4.6.2?

Hi,
thanks for the fast reply.

fstrim is a command which discards blocks that are no longer in use by a mounted file system. See this link for more.

I noticed it just because the error i posted before appeared some minutes after booting for the first time (in the syslog and in the terminal), I didn’t know that command before that.

It seems that this command is launched once a week from the system (by default). It shows from journalctl -u fstrim.timer output:

-- Logs begin at Mon 2022-11-21 17:37:21 CET, end at Tue 2022-11-22 09:44:11 CET. --
Nov 21 17:37:24 jetson systemd[1]: Started Discard unused blocks once a week.

Finally yes, I’m using jetpack 4.6.2.

Hi,
fstrim(8) - Linux manual page looks to be a command, not a service. Does it work if you directly execute the command?

Hi,

Yes, of course it is a command, but it seems that there is an homonym service which launch the command once a week. That’s why I noticed it, it’s executed automatically once a week.

I tried to run the command manually and it returns the same errors. But if I run it once again after a short time (seconds) everything works and no errors are returned.

Thanks!