[Bug 2125968] Re: resource-agents 1:4.16.0-3ubuntu1 autopkgtests fail on questing

Renan Rodrigo 2125968 at bugs.launchpad.net
Wed Oct 1 21:22:37 UTC 2025


Looking at the error, the problem lies in the Filesystem agent. There
are some monitoring functions being tested, and the one which fails is a
check which reads the starting bytes of a device.

This is done using `dd`. This is the exact command executed in the test:
dd if=/dev/loop0 iflag=direct bs=4k count=1 2>&1 >/dev/null

The first smell is: this passes with `coreutils-from-gnu`, but fails with `coreutils-from-uutils` with:
`dd: IO error: Invalid input`

strace shows that dd can't read from the FD:
`read(3, 0x5d3c457b94a0, 4096)           = -1 EINVAL (Invalid argument)`

It seems the rust coreutils can't deal with the `direct` flag
appropriately [1]. The implementation of O_DIRECT seems different than
the one in the GNU version - and it seems to lack buffer alignment,
which is needed for direct reads.

In the resource-agents side, a workaround would be removing the iflag
from the `dd` call. However, the commit which introduces the flag (tens
of years ago) states: "Reading from the device in O_DIRECT mode is
imperative to bypass caches.", so that's not acceptable for the
monitoring functionality.

So this needs to be looked at in the coreutils side. I am adding bug
tasks.

For the package migrations blocked on this bug, I suggest adding hints
so they get in. As a last resort, migration-reference is also a
workaround for now.

Mind that many other packages (or at least package tests) also
call/depend on the `direct` iflag, and are potentially affected by this
coreutils bug.

---
Steps to reproduce:

1. Launch a questing VM with coreutils-from-uutils
2. Create a file which will be mapped to loop0: 
$ sudo dd if=/dev/zero of=/example bs=1 count=0 seek=16M
Make sure to not create it in a tmpfs, as this is a different scenario - also not supported in the rust coreutils[1]
3. Map loop0 to the file:
$ sudo losetup /dev/loop0 /example
4. Try to read the data without using the `direct` iflag, see it works:
sudo dd if=/dev/loop0 bs=4k count=1
5. Try to read the data using the `direct` iflag, see it fails:
sudo dd if=/dev/loop0 iflag=direct bs=4k count=1

6. Launch a questing VM with coreutils-from-gnu
7. Repeat steps 2 to 4
8. Repeat step 5, but this time it works

---
[1] https://users.rust-lang.org/t/how-does-rust-use-directio/93210

** Changed in: resource-agents (Ubuntu)
       Status: New => Triaged

** Tags removed: server-todo

** Also affects: rust-coreutils (Ubuntu)
   Importance: Undecided
       Status: New

** Also affects: coreutils-from (Ubuntu)
   Importance: Undecided
       Status: New

** Changed in: resource-agents (Ubuntu)
     Assignee: Renan Rodrigo (rr) => (unassigned)

** Changed in: resource-agents (Ubuntu)
   Importance: Undecided => High

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

Title:
  resource-agents 1:4.16.0-3ubuntu1 autopkgtests fail on questing

Status in coreutils-from package in Ubuntu:
  New
Status in resource-agents package in Ubuntu:
  Triaged
Status in rust-coreutils package in Ubuntu:
  New

Bug description:
  dep8 tests for resource-agents are failing, blocking several packages:
  https://objectstorage.prodstack5.canonical.com/swift/v1/AUTH_0f9aae918d5b4744bf7b827671c86842/autopkgtest-questing/questing/amd64/r/resource-agents/20250928_225900_18cdd@/log.gz

  1165s Starting 'Filesystem' case 9 'monitor depth 10 when running':
  1165s Setting agent environment:    export OCF_RESKEY_device=/dev/loop0
  1165s Setting agent environment:    export OCF_RESKEY_fstype=ext3
  1165s Setting agent environment:    export OCF_RESKEY_directory=/run/resource-agents/ocft-Filesystem-mnt
  1167s Running agent:                ./Filesystem start
  1168s Setting agent environment:    export OCF_CHECK_LEVEL=10
  1168s Running agent:                ./Filesystem monitor
  1169s Checking return value:        FAILED. The return value 'OCF_ERR_GENERIC' != 'OCF_SUCCESS'. See details below:
  1169s cat: /tmp/.ocft_runlog: No such file or directory (os error 2)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/coreutils-from/+bug/2125968/+subscriptions




More information about the foundations-bugs mailing list