Failure on getcwd when make invoked with -C option

Bug #516506 reported by Alexey Rodriguez Yakushev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
make-dfsg (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: make

If make is invoked as follows

$ make -C broken

The following error messages are printed:

shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
pwd: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory

if instead make is executed inside the directory, no error is printed:

$ cd broken
$ make
<correct result printed>

The directory broken contains the following Makefile:

> SHELL := /bin/bash
> -include ../afilethatdoesnotexist
> all:
> pwd

The bug is not triggered if the SHELL line is removed or if the "include" line is removed. If the included file does exist, the bug is still triggered.

Ubuntu release:
Description: Ubuntu 9.10
Release: 9.10

We also updated the installation (as of today) and the bug still triggers.

Revision history for this message
Alexey Rodriguez Yakushev (mrchebas) wrote :
Revision history for this message
Alexey Rodriguez Yakushev (mrchebas) wrote :

I should add that the expected behaviour of the "-C" invocation of make should be the same as with the explicit "cd" invocation, i.e. no "getcwd" errors should occur.

Revision history for this message
Rob W. Brooks (rob-atomicpenguin) wrote :

Thanks for reporting this bug and attaching your data files. Unfortunately, I cannot confirm your problem as make -C doesn't print the getcwd error for me. (I'm using 9.04 but the version of make is the same). Usually that error happens when you are inside a deleted directory. Is "broken" a symbolic link on your system? Can you verify that the directory permissions are correct (you have rwx rights) for both the broken and parent directories?

Revision history for this message
Alexey Rodriguez Yakushev (mrchebas) wrote :

The directory is not a symlink and we reproduced the bug in two workstations with three different accounts. However we just realized this is NFS related. If this test is carried out locally it works, when run on an NFS share, it breaks.

Note that although this could be an NFS bug we only saw problems with make, so perhaps it is still a make bug?

The NFS version of the client:

$ apt-cache policy nfs-common
nfs-common:
  Installed: 1:1.2.0-2ubuntu8
  Candidate: 1:1.2.0-2ubuntu8
  Version table:
 *** 1:1.2.0-2ubuntu8 0
        500 http://nl.archive.ubuntu.com karmic/main Packages
        100 /var/lib/dpkg/status

The uname output is:
Linux vfa 2.6.31-17-generic-pae #54-Ubuntu SMP Thu Dec 10 17:23:29 UTC 2009 i686 GNU/Linux

-------
On the server side we have:

apt-cache policy nfs-kernel-server
nfs-kernel-server:
  Installed: 1:1.1.2-4ubuntu1.1
  Candidate: 1:1.1.2-4ubuntu1.1
  Version table:
 *** 1:1.1.2-4ubuntu1.1 0
        500 http://nl.archive.ubuntu.com intrepid-updates/main Packages
        500 http://security.ubuntu.com intrepid-security/main Packages
        100 /var/lib/dpkg/status
     1:1.1.2-4ubuntu1 0
        500 http://nl.archive.ubuntu.com intrepid/main Packages

The server side's ubuntu version is:

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 8.10
Release: 8.10
Codename: intrepid

uname output:

Linux vfs2 2.6.27-7-server #1 SMP Tue Nov 4 20:16:57 UTC 2008 x86_64 GNU/Linux

Revision history for this message
Alexey Rodriguez Yakushev (mrchebas) wrote :

Rob, replying to your other questions, the permissions of the directory are correct (rwx) for both the directory and the parent.

Michael Bienia (geser)
affects: make (Ubuntu) → make-dfsg (Ubuntu)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.