[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-kernel
Subject:    Bug in dcache?
From:       Richard Guenther <zxmpm11 () student ! uni-tuebingen ! de>
Date:       1997-10-21 9:46:12
[Download RAW message or body]

Hi!

Now while developing proc2 I come across the following situation:

Mounted proc2, giving me the following directory structure:
/root/proc
/root/proc/test1
/root/proc/test1/ttest
/root/proc/test2
With no files in them (apart from . and .. of course)

There are no Problems doing an ls -Rli /root/proc or entering
/root/proc and doing lookups/readdirs.
But when entering any of the subdirectories, for example
/root/proc # cd test1
pwd: getwd: cannot access parent directories
#
But the cd succeded!
# cd ..
/root/proc #

The debugging output of proc2 shows that after getting into test1,
a readdir of /root/proc is performed, which also succeeds!? So where is the
problem?

I remember this happened too, yesterday accessing a fat paritition
and doing an mkdir toolongname followed by an entry of the directory.
So it seems to be a general problem? (though no probs with ext2)

strace says:

[starting strace /bin/sh, setup output deleted]
fstat(2, {st_mode=S_IFCHR|0620, st_rdev=makedev(4, 1), ...}) = 0
mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40007000
ioctl(2, TCGETS, {B38400 opost isig -icanon -echo ...}) = 0
write(2, "OO:/root # ", 11)             = 11
read(0, "c", 1)                         = 1
write(2, "c", 1)                        = 1
read(0, "d", 1)                         = 1
write(2, "d", 1)                        = 1
read(0, " ", 1)                         = 1
write(2, " ", 1)                        = 1
read(0, "p", 1)                         = 1
write(2, "p", 1)                        = 1
read(0, "r", 1)                         = 1
write(2, "r", 1)                        = 1
read(0, "o", 1)                         = 1
write(2, "o", 1)                        = 1
read(0, "c", 1)                         = 1
write(2, "c", 1)                        = 1
read(0, "/", 1)                         = 1
write(2, "/", 1)                        = 1
read(0, "t", 1)                         = 1
write(2, "t", 1)                        = 1
read(0, "e", 1)                         = 1
write(2, "e", 1)                        = 1
read(0, "s", 1)                         = 1
write(2, "s", 1)                        = 1
read(0, "t", 1)                         = 1
write(2, "t", 1)                        = 1
read(0, "1", 1)                         = 1
write(2, "1", 1)                        = 1
read(0, "\r", 1)                        = 1
write(2, "\n", 1)                       = 1
sigprocmask(SIG_BLOCK, [INT], [])       = 0
ioctl(0, SNDCTL_TMR_START, {B38400 opost isig icanon echo ...}) = 0
sigprocmask(SIG_SETMASK, [], NULL)      = 0
sigaction(SIGINT, {0x804b6a8, [], 0}, {0x807f884, [], 0}) = 0
sigaction(SIGALRM, {0x804b3b0, [], 0}, {0x807f884, [], 0}) = 0
sigaction(SIGWINCH, {SIG_DFL}, {0x807f83c, [], 0}) = 0
sigaction(SIGINT, {0x804b6a8, [], 0}, {0x804b6a8, [], 0}) = 0
chdir("/root/proc/test1")               = 0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no problems !?
sigaction(SIGINT, {0x804b6a8, [], 0}, {0x804b6a8, [], 0}) = 0
pipe([4, 5])                            = 0
sigprocmask(SIG_BLOCK, [INT CHLD], [])  = 0
fork()                                  = 1423
setpgid(1423, 1420)                     = 0
sigprocmask(SIG_SETMASK, [], NULL)      = 0
sigaction(SIGCHLD, {0x805d5ec, [], 0}, {0x805d5ec, [], 0}) = 0
fcntl(4, F_GETFL)                       = 0 (flags O_RDONLY)
fstat(4, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40008000
lseek(4, 0, SEEK_CUR)                   = -1 ESPIPE (Illegal seek)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
???? bash should know this before?
close(5)                                = 0
read(4, "\\h: # \n", 128)               = 7
--- SIGCHLD (Child exited) ---
wait4(-1, [WIFEXITED(s) && WEXITSTATUS(s) == 0], WNOHANG|WUNTRACED, NULL) = 1423
wait4(-1, 0xbffff284, WNOHANG|WUNTRACED, NULL) = -1 ECHILD (No child processes)
sigreturn()                             = ? (mask now [])
read(4, "", 128)                        = 0
close(4)                                = 0
munmap(0x40008000, 4096)                = 0
close(4)                                = -1 EBADF (Bad file number)
[more stuff deleted]


Anyone knows whats going on?

Richard.

--
Richard Guenther <richard.guenther@student.uni-tuebingen.de>
PGP: 2E829319 - 2F 83 FC 93 E9 E4 19 E2 93 7A 32 42 45 37 23 57
WWW: http://www.anatom.uni-tuebingen.de/~richi/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic