-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make check hangs in tests/kern #61
Comments
Just focusing in on The test script only runs Test output
and diod log
gdb says kconjoin is stuck here:
and diod here
which is this function: /* Block the caller until the server has no active connections,
* and there have been at least 'count' connections historically.
*/
void
np_srv_wait_conncount(Npsrv *srv, int count)
{
xpthread_mutex_lock(&srv->lock);
while (srv->conncount > 0 || srv->connhistory < count) {
xpthread_cond_wait(&srv->conncountcond, &srv->lock);
}
xpthread_mutex_unlock(&srv->lock);
} the connection count is 1
So the kernel does not clunk the mount when the test program completes. |
The private namespace established with CLONE_NEWNS appears to be leaking, since it is visible to all in /proc/mounts:
|
This seems to resolve the issue. diff --git a/tests/kern/kconjoin.c b/tests/kern/kconjoin.c
index 83f08b0..4e32342 100644
--- a/tests/kern/kconjoin.c
+++ b/tests/kern/kconjoin.c
@@ -114,6 +114,13 @@ main (int argc, char *argv[])
_movefd (fromsrv[0], RFDNO);
if (unshare (CLONE_NEWNS) < 0)
err_exit ("unshare");
+ /* Change root propagation to private within this namespace,
+ * as systemd may have mounted root with it set to shared,
+ * and then the 9p mount will leak into the main namespace and
+ * not be automatically unmounted when the test completes.
+ */
+ system ("mount --make-private /");
+
if ((cs = system (mntcmd)) == -1)
err_exit ("failed to run %s", _cmd (mntcmd));
if (_interpret_status (cs, _cmd (mntcmd))) |
Still some cleanup issues with that fix applied. After running the test I get
|
Running
make check
as root down in tests/kern hangs at testt05
.My kernel is
5.4.0-7634-generic
(ubuntu 20.04 LTS).This may be a dup of #23 which was against linux-next in 2015, but wanted to open up a new bug until that is confirmed.
The text was updated successfully, but these errors were encountered: