[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: leisner: rm assertion on arm



On Fri, Feb 15, 2008 at 09:59:50PM -0600, Bill Gatliff wrote:
> Peter Palfrader wrote:
> >in the sid chroot on leisner this can be observed:

> >rm: rm.c:371: main: Assertion `((status) == RM_OK || (status) == 
> >RM_USER_DECLINED || (status) == RM_ERROR)' failed.

> >Do we have a guess whether this is hardware, kernel, or coreutils
> >related?  (anybody else seeing this?)

New version of coreutils uses unlinkat instead of unlink as previously.

-unlink("tests")                         = -1 EISDIR (Is a directory)
-open(".", O_RDONLY|O_LARGEFILE)         = 3
-lstat64("tests", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
-chdir("tests")                          = 0
-lstat64(".", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
-open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|0x80000) = 4
-fstat64(4, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
-fcntl64(4, F_GETFD)                     = 0x1 (flags FD_CLOEXEC)
-getdents64(4, /* 2 entries */, 4096)    = 48
-getdents64(4, /* 0 entries */, 4096)    = 0
-close(4)                                = 0
-fchdir(3)                               = 0
-rmdir("tests")                          = 0
+lstat64("/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
+SYS_327(0xffffff9c, 0xbeed8f06, 0xbeed8c50, 0x100, 0xbeed8f06) = 0
+SYS_328(0xffffff9c, 0xbeed8f06, 0, 0, 0x40148000) = -1 EISDIR (Is a directory)
+SYS_322(0xffffff9c, 0xbeed8f06, 0x28900, 0, 0x40148000) = 3
+fstat64(3, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
+fstat64(3, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
+fcntl64(3, F_GETFL)                     = 0x28800 (flags O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_NOFOLLOW)
+fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
+getdents64(3, /* 2 entries */, 4096)    = 48
+getdents64(3, /* 0 entries */, 4096)    = 0
+fcntl64(3, F_GETFD)                     = 0x1 (flags FD_CLOEXEC)
 close(3)                                = 0
+SYS_328(0xffffff9c, 0x1d1a8, 0x200, 0, 0x40148000) = 0
+write(2, "rm: rm.c:371: main: Assertion `("..., 116) = 116

SYS_328 = unlinkat

rm seems works as expected, after unlinkat fails, unlinkat is called with
AT_REMOVEDIR, and directory gets removed and RM_OK is returned. Why rm
decides to assert anyway is complete mystery to me. Reassign to
coreutils?




-- 
"rm -rf" only sounds scary if you don't have backups


Reply to: