Bug 30878
Summary: | tcsh autolist and wildcard / csh wildcard problem | ||||||
---|---|---|---|---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Ulug Unligil <unligil> | ||||
Component: | tcsh | Assignee: | Miloslav Trmač <mitr> | ||||
Status: | CLOSED DUPLICATE | QA Contact: | David Lawrence <dkl> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 7.1 | CC: | donna, jbootle, mark_h_johnson, robert.jones, spr | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | i386 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2006-02-21 18:47:56 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Ulug Unligil
2001-03-06 22:58:42 UTC
I have the same problem with the tcsh. If the autocomplete fails in the tcsh for one file or directory, than it also fail in emacs ! Question to all the others: Could it be that it only appears on nfs mounted partitions ??? midnight commander also hide the directories and files that are always missing from the tcsh autocomplete. Until now this bug is only noticed on files and dirs on nfs mounted partitions. midnight commander also hide the directories and files that are always missing from the tcsh autocomplete. Until now this bug is only noticed on files and dirs on nfs mounted partitions. This problem somehow seems to be related to the nfs problem reported as Bug - 30944. After installing the patch from http://www.fys.uio.no/~trondmy/src/2.4.2/linux-2.4.2-dir.dif as suggested there, the problem disappeared. At least over here ;-). More Detail: tcsh appears to fail when expanding the * wildcard on nfs mounted directory from our SGI fileservers. It does not fail when expanding * on an nfs mounted directory served from a redhat 7.1 machine or on the local filesystem. the section of strace which appears to be important: strace tcsh -c 'echo *' on a SGI nfs directory gives: rt_sigprocmask(SIG_SETMASK, [], [INT], 8) = 0 open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3 fstat64(3, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 fcntl64(3, F_SETFD, FD_CLOEXEC) = 0 getdents64(3, /* 20 entries */, 32768) = 800 _llseek(3, 18446744073199903873, 0xbfff0200, SEEK_SET) = -1 EINVAL (Invalid argument) lstat64("libglx.so.1.0.1251", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 lstat64("mga_drv.o", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 lstat64("mgapdesk-1_00-5beta.i386.rpm", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 lstat64("NVdriver", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 lstat64("config-2.4.4", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 Which has an odd _llseek call. The same on a local file system produces: rt_sigprocmask(SIG_SETMASK, [], [INT], 8) = 0 open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3 fstat64(3, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 fcntl64(3, F_SETFD, FD_CLOEXEC) = 0 getdents64(3, /* 20 entries */, 4096) = 800 lstat64("config-2.4.4", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 lstat64("initrd-2.4.4.img", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 lstat64("kdmrc", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 lstat64("libGLcore.so.1.0.1251", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 lstat64("libGL.so.1.0.1251", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 lstat64("libglx.so.1.0.1251", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 no _llseek call. You also don't get one from a nfs directory served from a redhat 7.1 box. If you do an unsorted directory listing (ls -U) it is always the last listed file that is missing. If you run sh instead (sh -c 'echo *') then this behaves correctly and returns all files, so it is definately a tcsh and nfs interaction problem. Bug also present if you use tcsh 6.09.00 as opposed to 6.10.00 when reading nfs mounted partions. The issue doesn't appear to be entirely tcsh specific as we have reproduced the wildcard expansion problem with bash 2.02.0(1) on dirs NFS mounted from IRIX 6.5.11 . Bash 2.04.21(1) which ships with RH7.1 seems to work correctly. Having looked at a similar bug about NFS (#30944) there is a patch called linux- 2.4.2-dir.dif which can be found here: http://www.fys.uio.no/~trondmy/src/2.4.2/ This is described as: "An experimental patch for fixing a problem that is due to NFSv(2|3) readdir returning (32|64) bit unsigned offsets" I sucessfully applied this to my 2.4.4 kernel using patch -p1 from the kernel source root directory. This appears to have solved all the problems that I have been having, including allowing StarOffice 5.2 to work properly again. So my only outstanding query is why this behaviour is only exhibited in tcsh as part of redhat 7.1 and not in sh / bash. Created attachment 44177 [details]
strace tcsh -cf 'ls F99UA1.L.full.segment.final.5.SPHERE*coord'
I'm having similar globbing problems (wildcards not matching when they should) in tcsh on RedHat 7.1 with IRIX 6.5 nfs file systems. pulvinar 46% uname -a Linux pulvinar 2.4.9-12 #1 Tue Oct 30 18:33:49 EST 2001 i686 unknown pulvinar 47% echo $SHELL /bin/tcsh pulvinar 48% ls *coord ls: No match. pulvinar 49% sh sh-2.04$ ls *coord BAK.F99UA1.L.full.34132.flat.CartStd.coord BAK.F99UA1.L.full.34132.sphere.SphStd.coord F99UA1.L.full.34132.flat.at0.5mm.CartStd.coord F99UA1.L.full.34132.flat.CartStd2.At1mm.coord F99UA1.L.full.34132.flat.CartStd.At1mm.coord F99UA1.L.full.34132.flat.CartStd.At1mm.newcut.sm.coord F99UA1.L.full.34132.flat.CartStd.At1mm.newcut.sm.FLAT_CYCLE1.34132.coord F99UA1.L.full.34132.flat.CartStd.At1mm.newcut.sm.FLAT_CYCLE2.34132.coord F99UA1.L.full.34132.flat.CartStd.At1mm.newcut.sm.FLAT_CYCLE3.34132.coord F99UA1.L.full.34132.flat.CartStd.coord F99UA1.L.full.34132.sphere.SphStd.At1mm..coord F99UA1.L.full.34132.sphere.SphStd.coord F99UA1.L.full.fiducial.SmoothedMW_ACorigin.34132.coord F99UA1.L.full.fiducial.SmoothedMW_ACorigin.At0.5mm.34132.coord F99UA1.L.full.fiducial.SmoothedMW_ACorigin.At1mm.34132.coord F99UA1.L.full.inflated.At1mm.34132.coord F99UA1.L.full.segment.final.5.CompressedMedialWall.34132.coord F99UA1.L.full.segment.final.5.ellipsoid.34132.coord F99UA1.L.full.segment.final.5.fiducial.34132.coord F99UA1.L.full.segment.final.5.fiducial.clean.34132.coord F99UA1.L.full.segment.final.5.fiducial.clean_closed.34132.coord F99UA1.L.full.segment.final.5.fiducial.clean_closed.smMW.34132.coord F99UA1.L.full.segment.final.5.inflated.34132.coord F99UA1.L.full.segment.final.5.InitialFlat.34132.coord F99UA1.L.full.segment.final.5.InitialFlat.sm.34132.coord F99UA1.L.full.segment.final.5.raw.34132.coord F99UA1.L.full.segment.final.5.sphere.34132.coord F99UA1.L.full.segment.final.5.SPHERE.34132.coord sh-2.04$ Unlike the problem described in bug 30944, it is not just one/last file missing. Also, bug 30944 says Patch is in released errata kernel 2.4.3-12; wouldn't this mean it would be included in higher kernel releases (above results are using 2.4.9-12)? I also thought the problem was restricted to tcsh, since bash results are good in the above output; however, the way I found this problem directory was by running this sh script on both IRIX and Linux and comparing the output: #!/bin/sh REV=`uname -a | cut -f1,3 -d' '|sed 's/ /_/g'` OUTFNAME=files_$REV.txt echo $OUTFNAME #rm $OUTFNAME FILE_SYSTEMS="/surface02 /sums2 /sums3 /stpb" for FILE_SYSTEM in $FILE_SYSTEMS do find $FILE_SYSTEM -name "*coord" | sort -uf >> $OUTFNAME done In this case, files_Linux_2.4.9-12.txt was missing F99UA1.L.full.segment.final.5.SPHERE.34132.coord -- the last file in the interactive sh results above. (I confirmed the file was not missing/moved when the script was run.) Using kernel 2.4.2, I also have globbing problems, but with different directories/files. The attached file globtrace.txt (https://bugzilla.redhat.com/bugzilla/showattachment.cgi?attach_id=44177) shows the output from strace tcsh -cf 'ls F99UA1.L.full.segment.final.5.SPHERE*coord'. We are seeing the same symptom - will try to set up a test with a more modern version to see if its been subsequently fixed. *** This bug has been marked as a duplicate of 73877 *** Changed to 'CLOSED' state since 'RESOLVED' has been deprecated. |