Skip to content

lstat and NFS server not responding

5 messages · Paul Gilbert, Brian Ripley, Friedrich Leisch

#
In a somewhat unusual circumstance I have been having trouble when
making R from source and with "R CMD build dse"
forcing the machine to look for an NFS server which was not available,
and then stalling. Our system administrator traced this back to the fact
that these go through all the directories back to "/" , doing an lstat
on everything. He suggests that that seems odd, but it doesn't take long
normally.  The problem was apparently caused by the fact that something
(possible a cdrom) on /mnt had not been unmounted properly.

We have fixed the problem but since it was rather difficult to track
down I thought  I would point it out in case others experience a similar
difficulty. Also, is there a good explanation for doing an lstat on
everything up to /?

Paul Gilbert

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
On Mon, 2 Apr 2001, Paul Gilbert wrote:

            
Do you know what was doing it?  Since R CMD build is basically a Perl
program, I can only guess that Perl was doing this, and it looks like a
Perl quirk/bug that perhaps you need to track down and report (if your Perl
version is current).  One thing I did notice is that the R scripts use
Cwd::getcwd in Perl when the manual page recommends Cwd::cwd, and reading
the code suggests Cwd::getcwd is the culprit.  (Any explanation,
Fritz/Kurt?)
#
Yes, I'm almost certain it is in the Perl but I don't know much more than that. I'm
using Perl version 5.004_04 built for sun4-solaris.

Paul Gilbert

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#

        
> On Mon, 2 Apr 2001, Paul Gilbert wrote:
>> In a somewhat unusual circumstance I have been having trouble when
  >> making R from source and with "R CMD build dse"
  >> forcing the machine to look for an NFS server which was not available,
  >> and then stalling. Our system administrator traced this back to the fact
  >> that these go through all the directories back to "/" , doing an lstat
  >> on everything. He suggests that that seems odd, but it doesn't take long
  >> normally.  The problem was apparently caused by the fact that something
  >> (possible a cdrom) on /mnt had not been unmounted properly.
  >> 
  >> We have fixed the problem but since it was rather difficult to track
  >> down I thought  I would point it out in case others experience a similar
  >> difficulty. Also, is there a good explanation for doing an lstat on
  >> everything up to /?

  > Do you know what was doing it?  Since R CMD build is basically a Perl
  > program, I can only guess that Perl was doing this, and it looks like a
  > Perl quirk/bug that perhaps you need to track down and report (if your Perl
  > version is current).  One thing I did notice is that the R scripts use
  > Cwd::getcwd in Perl when the manual page recommends Cwd::cwd, and reading
  > the code suggests Cwd::getcwd is the culprit.  (Any explanation,
  > Fritz/Kurt?)

No particular reason ... the only one is that I've always used getcwd
(and didn't even know that cwd exists). My manpage says ``It is
recommended that cwd (or another *cwd() function) is used in all code
...'' which I wouldn't take as a particulartly strong recommendation
for cvw, but I'd be fine.

Paul, could you try if that fixes your problem (i.e., replace all
occurrences of ``getcwd'' by ``Cwd::cwd'' in the build script and run
it again)?

Thanks in advance,
Fritz


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
On Tue, 3 Apr 2001, Friedrich Leisch wrote:

            
The code says (5.6.0)

# The 'natural and safe form' for UNIX (pwd may be setuid root)

sub _backtick_pwd {
    my $cwd;
    chop($cwd = `pwd`);
    $cwd;
}

# Since some ports may predefine cwd internally (e.g., NT)
# we take care not to override an existing definition for cwd().

*cwd = \&_backtick_pwd unless defined &cwd;

which looks like a recommendation for cwd to me.
(just cwd seems to work.)