# Xdelta3: target window checksum mismatch: XD3\_INVALID\_INPUT

**URL:** <https://hub.mender.io/t/xdelta3-target-window-checksum-mismatch-xd3-invalid-input/5816>\
**Category:** General Discussions\
**Tags:** deltaupdate\
**Created:** [May 5, 2023, 2:42pm UTC](https://hub.mender.io/t/xdelta3-target-window-checksum-mismatch-xd3-invalid-input/5816 "2023-05-05T14:42:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![penlect](https://avatars.discourse-cdn.com/v4/letter/p/b4bc9f/32.png) [@penlect](https://hub.mender.io/u/penlect)\
**Post date:** [May 5, 2023, 2:42pm UTC](https://hub.mender.io/t/xdelta3-target-window-checksum-mismatch-xd3-invalid-input/5816/1 "2023-05-05T14:42:42Z")

</div>

I managed to resolve the issue before posting here, but I’m sharing my experience in case it helps someone else.

- Our system is running on Ubuntu.
- We utilize delta updates.
- We use a package called `overlayroot` to achieve a read-only root file system, which is necessary for delta updates.

However, we encountered difficulties with delta updates and received the `xdelta3: target window checksum mismatch: XD3_INVALID_INPUT` error message. Surprisingly, an unidentified process had altered the data on the root file system’s block device, even though the file system was mounted as read-only.

We eventually realized that we had overlooked the `util-linux` service `fstrim.service`.

> fstrim is used on a mounted filesystem to discard (or “trim”) blocks that are not in use by the filesystem.

This means that those blocks would be zeroed out, resulting in the checksum mismatch.

Adding to the confusion, this service runs only on a weekly basis (see `fstrim.timer`). Moreover, `fstrim` failed to update the metadata in the ext4 superblock, making it more challenging to debug.

To resolve the issue, we configured `fstrim.service` to operate on all file systems except the root file system.

It might be helpful if Mender’s documentation mentioned and recommended disabling services like `fstrim.service` when using delta updates.

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [May 8, 2023, 6:45am UTC](https://hub.mender.io/t/xdelta3-target-window-checksum-mismatch-xd3-invalid-input/5816/2 "2023-05-08T06:45:10Z")

</div>

Thank you very much for sharing @penlect!
