This is a test case issue, and the failure is a false positive.
ecryptfs/tests/kernel/directory-concurrent/test.c hang_check() the
parent uses select() to check to see if the child process has completed.
The child process lets the parent know that its done by writing "EXIT"
to a pipe. select() is non blocking while read() is blocking, so the
select() would timeout after 30s if nothing was read from the pipe, this
timeout state is used to detect a hang in rmdir/mkdir. But the test does
not take into account of the fact that there is no guarantee that the
the order of execution after a fork() will be  child first and then
parent. If the parent executes before the child, we hit these false
positives.

The sync between parent and child can be achieved by calling wait(NULL)
before select(), ie let the parent wait for the child state to change,
but if there really is a hang in rmdir/mkdir the parent would hang
indefinitely, and that would defeat the tests purpose of detecting
hangs.

I found that as a workaround, adding a sleep(1) after write() in the
child helps with resolving this issue. I tested this multiple times
successfully.

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

Title:
  directory-concurrent.sh.ext4 in ubuntu_ecryptfs failed on Atrful and
  Bionic ThunderX ARM64

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-kernel-tests/+bug/1765653/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to