kernel-packages team mailing list archive
-
kernel-packages team
-
Mailing list archive
-
Message #72245
[Bug 1341364] Re: cgroupfs rmdir race (regression)
This should be fixed in Utopic as of 3.16.0-5.10, since it was rebased
to upstream 3.16-rc6? Can you test the latest kernel and see if it
resolves this bug? If it does, we should mark it as "Fix Released"
** Changed in: linux (Ubuntu)
Importance: Medium => High
** Tags added: utopic
--
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1341364
Title:
cgroupfs rmdir race (regression)
Status in “linux” package in Ubuntu:
Triaged
Bug description:
In older utopic kernels (abi-3.15.0-6-generic), when I quickly rmdir
/a/b and then rmdir /a, it succeeds. With the kernel in utopic, the
rmdir of cgroup /a fails with EBUSY. This appears to be a race.
The following test program quite reliably shows the race:
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/mount.h>
#include <errno.h>
#include <string.h>
int main()
{
int ret;
int i;
char path[1024], f[30];
ret = mount("cgroup", "/mnt", "cgroup", 0, "memory");
if (ret) {
perror("mount");
exit(1);
}
sprintf(path, "/mnt");
printf("creating\n");
for (i = 0; i < 10; i++) {
sprintf(f, "/dir%d", i);
strcat(path, f);
ret = mkdir(path, 0755);
if (ret && errno != EEXIST) {
perror("mkdir");
printf("Failed on %d\n", i);
umount("/mnt");
exit(1);
}
}
printf("Now removing\n");
for (i = 9; i >= 0; i--) {
ret = rmdir(path);
if (ret) {
perror("rmdir");
printf("Failed removing %s\n", path);
umount("/mnt");
exit(1);
}
char *p = strrchr(path, '/');
*p = '\0';
}
umount("/mnt");
printf("Done - success\n");
}
This is also blocking promotion of the cgmanager package to utopic due
to jenkins failure:
https://jenkins.qa.ubuntu.com/job/utopic-adt-cgmanager/30/ARCH=amd64,label=adt/console
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1341364/+subscriptions
References