-
Bug
-
Resolution: Fixed
-
P3
-
5.0
-
b03
-
x86
-
linux
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2129617 | 6 | Vijayan Jayaraman | P3 | Resolved | Fixed | b51 |
Got "Stale NFS handle" error while building jdk on Linux if source is on NFS. Here's the output:
...
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.26126
+ umask 022
+ cd
/.automount/jview02/root/view/xiaoyi_150_lin_tot/CLO/Components/JAVA_12/
control/build/linux-ia64/tmp/BUILD
+ cd jre1.5.0.00
+ rm -rf
/.automount/jview02/root/view/xiaoyi_150_lin_tot/CLO/Components/JAVA_12/
control/build/linux-ia64/tmp/BUILD/jre1.5.0.00
+ rm -rf
/.automount/jview02/root/view/xiaoyi_150_lin_tot/CLO/Components/JAVA_12/
control/build/linux-ia64/tmp/rpm-root/usr/java/jre1.5.0.00
rm: cannot open current directory: Stale NFS file handle
error: Bad exit status from /var/tmp/rpm-tmp.26126 (%clean)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.26126 (%clean)
gmake: *** [j2re-rpm] Error 1
This is not really an NFS issue. What's happening here is that it "cd" to directory 1, removes directory 1, then removes directory 2. But when the second rm is executed, it seems to try to get the status of the current directory first. And since this directory has already been removed by the first rm command, the NFS server returns a stale file handle error.
The "cd" commands before the "rm" seem unnecessary. But they seem to be added by the RPM automatically. So we can't remove them. The fix is to swap the two rm commands so that it removes the current directory the last.
This fix needs to be made in the "%clean" section in the following two files:
install/make/installer/bundles/linux/rpm-jdk.spec
install/make/installer/bundles/linux/rpm-jre.spec
...
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.26126
+ umask 022
+ cd
/.automount/jview02/root/view/xiaoyi_150_lin_tot/CLO/Components/JAVA_12/
control/build/linux-ia64/tmp/BUILD
+ cd jre1.5.0.00
+ rm -rf
/.automount/jview02/root/view/xiaoyi_150_lin_tot/CLO/Components/JAVA_12/
control/build/linux-ia64/tmp/BUILD/jre1.5.0.00
+ rm -rf
/.automount/jview02/root/view/xiaoyi_150_lin_tot/CLO/Components/JAVA_12/
control/build/linux-ia64/tmp/rpm-root/usr/java/jre1.5.0.00
rm: cannot open current directory: Stale NFS file handle
error: Bad exit status from /var/tmp/rpm-tmp.26126 (%clean)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.26126 (%clean)
gmake: *** [j2re-rpm] Error 1
This is not really an NFS issue. What's happening here is that it "cd" to directory 1, removes directory 1, then removes directory 2. But when the second rm is executed, it seems to try to get the status of the current directory first. And since this directory has already been removed by the first rm command, the NFS server returns a stale file handle error.
The "cd" commands before the "rm" seem unnecessary. But they seem to be added by the RPM automatically. So we can't remove them. The fix is to swap the two rm commands so that it removes the current directory the last.
This fix needs to be made in the "%clean" section in the following two files:
install/make/installer/bundles/linux/rpm-jdk.spec
install/make/installer/bundles/linux/rpm-jre.spec
- backported by
-
JDK-2129617 building JDK on Linux - "Stale NFS file handle" error during RPM build phase
- Resolved