[Bug 459548] [NEW] Error: Can't open directory "blah" (stat() returns -1)

Joel launchpad at tannesen.com
Sat Oct 24 03:22:01 UTC 2009


Public bug reported:

Binary package hint: tagtool

Expected: tagtool would load up a list of mp3's from the specified
directory.

Actual:

tagtool failed to open a cifs mounted directory.
It failed with the message: 'Error: Can't open directory "/mnt/Music" '
The stat call in file_list.c:check_working_dir() fails with a return value of -1.

I was able to get it to work by using the following steps:
1. apt-get build-dep tagtool
2. apt-get source tagtool
3. cd tagtool-0.12.3
4. CFLAGS="-D_FILE_OFFSET_BITS=64 -g" ./configure && make && make install

I have a directory mounted using cifs from fstab.
The fstab entry looks like this:
//192.168.1.2/Music /mnt/Music cifs rw,username=SomeUser,credentials=/root/.smb_creds,uid=1000,gid=1000,file_mode=0755,dir_mode=0755 0 0

The cifs server is a window home server box (essentially windows server
2003 sp2).

aptitude show tagtool
Package: tagtool
State: installed
Automatically installed: no
Version: 0.12.3-6

lsb_release -rd
Description:	Ubuntu 9.10
Release:	9.10


And here is a gdb session using CFLAGS="-D_FILE_OFFSET_BITS=64 -g":
Breakpoint 1, check_working_dir () at /usr/include/bits/string3.h:99
99	  (void) __builtin___memset_chk (__dest, '\0', __len, __bos0 (__dest));
(gdb) n
311		res = stat(working_dir->str, &stat_data);
(gdb) set print pretty
(gdb) info locals
res = 0
stat_data = {
  st_dev = 26, 
  __pad1 = 0, 
  __st_ino = 797, 
  st_mode = 16877, 
  st_nlink = 1, 
  st_uid = 1000, 
  st_gid = 1000, 
  st_rdev = 0, 
  __pad2 = 0, 
  st_size = 0, 
  st_blksize = 16384, 
  st_blocks = 0, 
  st_atim = {
    tv_sec = 1256353883, 
    tv_nsec = 640250000
  }, 
  st_mtim = {
    tv_sec = 1256246783, 
    tv_nsec = 952750000
  }, 
  st_ctim = {
    tv_sec = 1256246783, 
    tv_nsec = 952750000
  }, 
  st_ino = 71494644084507421
}

Notice that stat_data.st_ino is clearly larger than uint32

ProblemType: Bug
Architecture: i386
Date: Fri Oct 23 22:45:52 2009
DistroRelease: Ubuntu 9.10
NonfreeKernelModules: nvidia
Package: tagtool 0.12.3-6
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-14.48-generic-pae
SourcePackage: tagtool
Uname: Linux 2.6.31-14-generic-pae i686

** Affects: tagtool (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: apport-bug i386

-- 
Error: Can't open directory "blah" (stat() returns -1)
https://bugs.launchpad.net/bugs/459548
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs at lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs




More information about the universe-bugs mailing list