[Bug 2136917] Re: inotify never detects file change with rust-coreutils in 0 A.D.

Julian Andres Klode 2136917 at bugs.launchpad.net
Sun Jan 25 16:21:29 UTC 2026


gnutouch opens the file for writing and closes it:

openat(AT_FDCWD, "README.md", O_WRONLY|O_CREAT|O_NOCTTY|O_NONBLOCK, 0666) = 3
dup2(3, 0)                              = 0
close(3)                                = 0
utimensat(0, NULL, NULL, 0)             = 0
close(0)                                = 0

This triggers `CLOSE_WRITE` inotify events which are monitored for by
0ad.

uutils touch only calls utimensat()

utimensat(AT_FDCWD, "README.md", [{tv_sec=1769357943, tv_nsec=925117368}
/* 2026-01-25T17:19:03.925117368+0100 */, {tv_sec=1769357943,
tv_nsec=925117368} /* 2026-01-25T17:19:03.925117368+0100 */], 0) = 0

This only triggers `ATTRIB` inotify events.

Also to note it passes times explicitly, and uses AT_FDCWD instead of
passing in the file fd, but those should be irrelevant.

** Bug watch added: github.com/uutils/coreutils/issues #9812
   https://github.com/uutils/coreutils/issues/9812

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to rust-coreutils in Ubuntu.
https://bugs.launchpad.net/bugs/2136917

Title:
  inotify never detects file change with rust-coreutils in 0 A.D.

Status in rust-coreutils:
  New
Status in rust-coreutils package in Ubuntu:
  Triaged

Bug description:
  In 0 A.D. (package 0ad), we support reloading files when they are
  changed on disk.

  On Linux, our C++ code watches loaded files using `inotify`:
  https://gitea.wildfiregames.com/0ad/0ad/src/branch/main/source/lib/sysdep/os/linux/dir_watch_inotify.cpp

  Since Questing, one of our tests goes into an infinite loop, when a
  file is modified on disk, the modification is not being detected.

  We observed that switching back to `gnu-coreutils` immediately fixes
  the issue. Details are at
  https://gitea.wildfiregames.com/0ad/0ad/issues/8508

  I have tested replacing system uutils-coreutils with latest version
  from cargo (0.5.0 at time of writing) which doesn't make a difference.

To manage notifications about this bug go to:
https://bugs.launchpad.net/rust-coreutils/+bug/2136917/+subscriptions




More information about the foundations-bugs mailing list