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

 
 

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

Submitted by:  None
Submitted on:  Tue 29 Mar 2005 07:35:10 PM UTC  
 
Category: findSeverity: 3 - Normal
Item Group: Wrong resultStatus: Fixed
Privacy: PublicAssigned to: James Youngman <jay>
Originator Name: Originator Email: -unavailable-
Open/Closed: ClosedRelease: 4.2.20
Fixed Release: 4.2.21

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission 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>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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 File(s):
   
   
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

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 8 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Tue 07 Jun 2005 11:36:49 PM UTCjayOpen/ClosedOpen=>Closed
  ReleaseNone=>4.2.20
  Fixed ReleaseNone=>4.2.21
Tue 07 Jun 2005 07:56:08 PM UTCjayAssigned toNone=>jay
Wed 06 Apr 2005 08:22:36 AM UTCjayStatusReady For Test=>Fixed
Mon 04 Apr 2005 07:55:30 PM UTCjayStatusNone=>Ready For Test
Mon 04 Apr 2005 07:54:57 PM UTCjayAttached File-=>Added findutils.bug-12503.proposed-1.patch, #2381
Tue 29 Mar 2005 07:35:10 PM UTCNoneCarbon-Copy-=>Added han --AT-- mijncomputer --DOT-- nl

Back to the top


Powered by Savane 3.1-cleanup1