bugfindutils - Bugs: bug #12503, find dir -depth -empty returns not...

 
 

bug #12503: find dir -depth -empty returns not found

Submitter:  None
Submitted:  Tue 29 Mar 2005 07:35:10 PM UTC
   
 
Category:  find Severity:  3 - Normal
Item Group:  Wrong result Status:  Fixed
Privacy:  Public Assigned to:  jay
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  Closed Release:  4.2.20
Fixed Release:  4.2.21
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Tue 07 Jun 2005 11:36:49 PM UTC, comment #6: 

You can download a release of findutils in which this problem is
fixed from ftp://alpha.gnu.org/gnu/findutils.

The releases on alpha.gnu.org are for testing purposes, so please
take the time to download the release and verify that your
problem has been solved.  Once the release has been sufficiently
tested, it can be uploaded to ftp.gnu.org for everybody to use it.

James Youngman <jay>
Group administrator
Wed 06 Apr 2005 08:22:43 AM UTC, comment #5: 

This problem is fixed in the CVS code for findutils.
To resolve your problem, you could either wait for the
next official release of findutils, or check out a copy
of the code from the CVS repository for findutils.

James Youngman <jay>
Group administrator
Mon 04 Apr 2005 11:08:58 PM UTC, comment #4: 

That seems to fix the issue; Thanks!

Anonymous
Mon 04 Apr 2005 07:54:56 PM UTC, comment #3: 

I believe that the attached patch fixes the problem.   Please let me know if it does.

I suspect that the reason you thought that recompiling the code last time fixed the problem was that (using the example below) you won't be able to reproduce the problem if the current directory is /mega/home/han when you invoke find.

James Youngman <jay>
Group administrator
Mon 04 Apr 2005 12:59:47 PM UTC, comment #2: 

Hmm it happens again and a recompile doesn't fix it this time:

% ls -R ~/.tmp                           
/mega/home/han/.tmp:
empty/
/mega/home/han/.tmp/empty:

Here is a strace:

execve("/usr/bin/find", ["find", "/mega/home/han/.tmp", "-depth", "-empty"], [/* 38 vars */]) = 0
uname({sys="Linux", node="marsupilami", ...}) = 0
brk(0)                                  = 0x8056000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=51522, ...}) = 0
mmap2(NULL, 51522, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7fe0000
close(3)                                = 0
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0QR\1\000"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1015160, ...}) = 0
mmap2(NULL, 978272, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7ef1000
mmap2(0xb7fda000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xe9) = 0xb7fda000
mmap2(0xb7fde000, 7520, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7fde000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7ef0000
mprotect(0xb7fda000, 4096, PROT_READ)   = 0
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7ef0ac0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
munmap(0xb7fe0000, 51522)               = 0
open("/dev/urandom", O_RDONLY)          = 3
read(3, "\325\f\20\374\247\"\224\207\377T\355\256\247\205\304e{"..., 32) = 32
close(3)                                = 0
uname({sys="Linux", node="marsupilami", ...}) = 0
ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
time(NULL)                              = 1112619350
brk(0)                                  = 0x8056000
brk(0x8077000)                          = 0x8077000
open(".", O_RDONLY|O_LARGEFILE)         = 3
fchdir(3)                               = 0
lstat64(".", {st_mode=S_IFDIR|0755, st_size=96, ...}) = 0
open("/mega/home/han", O_RDONLY|O_LARGEFILE) = 4
fchdir(4)                               = 0
close(4)                                = 0
lstat64(".tmp", {st_mode=S_IFDIR|0755, st_size=573440, ...}) = 0
open(".tmp", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 4
fstat64(4, {st_mode=S_IFDIR|0755, st_size=573440, ...}) = 0
fcntl64(4, F_SETFD, FD_CLOEXEC)         = 0
getdents64(4, /* 3 entries */, 4096)    = 80
getdents64(4, /* 0 entries */, 4096)    = 0
close(4)                                = 0
open(".tmp", O_RDONLY|O_LARGEFILE|O_NOFOLLOW) = 4
fchdir(4)                               = 0
close(4)                                = 0
lstat64("empty", {st_mode=S_IFDIR|0755, st_size=1, ...}) = 0
open("empty", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 4
fstat64(4, {st_mode=S_IFDIR|0755, st_size=1, ...}) = 0
fcntl64(4, F_SETFD, FD_CLOEXEC)         = 0
getdents64(4, /* 2 entries */, 4096)    = 48
getdents64(4, /* 0 entries */, 4096)    = 0
close(4)                                = 0
open("empty", O_RDONLY|O_LARGEFILE|O_NOFOLLOW) = 4
fchdir(4)                               = 0
close(4)                                = 0
open("..", O_RDONLY|O_LARGEFILE|O_NOFOLLOW) = 4
fchdir(4)                               = 0
close(4)                                = 0
open("empty", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 4
fstat64(4, {st_mode=S_IFDIR|0755, st_size=1, ...}) = 0
fcntl64(4, F_SETFD, FD_CLOEXEC)         = 0
getdents64(4, /* 2 entries */, 4096)    = 48
getdents64(4, /* 0 entries */, 4096)    = 0
close(4)                                = 0
fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 5), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fec000
write(1, "/mega/home/han/.tmp/empty\n", 26) = 26
fchdir(3)                               = 0
open(".", O_RDONLY|O_LARGEFILE|O_NOFOLLOW) = 4
fchdir(4)                               = 0
close(4)                                = 0
open(".tmp", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = -1 ENOENT (No such file or directory)
write(2, "find: ", 6)                   = 6
write(2, "/mega/home/han/.tmp", 19)     = 19
write(2, ": No such file or directory", 27) = 27
write(2, "\n", 1)                       = 1
fchdir(3)                               = 0
close(1)                                = 0
munmap(0xb7fec000, 4096)                = 0
exit_group(1)                           = ?

Anonymous
Tue 29 Mar 2005 08:38:58 PM UTC, comment #1: 

recompiling find fixed the problem... Suspicious...

Anonymous
Tue 29 Mar 2005 07:35:10 PM UTC, original submission:  

In the latest findutils; 4.2.20

mkdir -p ~/test/blah; find ~/test -depth -empty

returns:

/mega/home/han/test/blah
find: /mega/home/han/test: No such file or directory

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #2839:  findutils.bug-12503.proposed-1.patch added by jay (3KiB - text/x-patch - First proposed patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

Follow 8 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2005-06-07 jay Open/ClosedOpen Closed
    ReleaseNone 4.2.20
    Fixed ReleaseNone 4.2.21
2005-06-07 jay Assigned toNone jay
2005-04-06 jay StatusReady For Test Fixed
2005-04-04 jay StatusNone Ready For Test
2005-04-04 jay Attached File- Added findutils.bug-12503.proposed-1.patch, #2381
2005-03-29 None Carbon-Copy- Added han --AT-- mijncomputer --DOT-- nl

Back to the top

Powered by Savane 3.13-758e.
Corresponding source code