Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 15
I'm sorry for this lengthy post, but the problem is complex and hard to explain. Hopefully someone here can tell me what's going on or help me debug the problem! ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2010
    Posts
    8

    Linux suddenly thinks everything in a directory mounted with bind is a directory


    I'm sorry for this lengthy post, but the problem is complex and hard to explain. Hopefully someone here can tell me what's going on or help me debug the problem!

    I'm having a bizarre problem on my Ubuntu Karmic 64-bit workstation: a number of directories mounted using the "bind" option has suddenly started to show every file in them with the same permissions as the directory itself, including the fact that it is a directory! In other words, Linux suddenly thinks all the files in my bound directories are directories!

    Here's a part of my /etc/fstab:

    Code:
    //diskstation/home /home/pepijn_remote cifs credentials=/home/pepijn.smbcredentials,uid=pepijn,gid=pepijn,iocharset=utf8 0 0
    /home/pepijn_remote/Documents /home/pepijn/Documents none bind 0 0
    /home/pepijn_remote/Downloads /home/pepijn/Downloads none bind 0 0
    etc...
    As you can see, I mount my remote home directory from my NAS on /home/pepijn_remote using CIFS. I then bind some of the directories from that share in my real home directory. This has worked perfectly for months now.

    But then suddenly all hell broke loose. Programs started going haywire. It turned out that this was because Linux had suddenly decided that all the files in my directories were now directories! As you can imagine my IDE went berserk. To illustrate, here's (the first few lines of) the result of an "ls -al" in /home/pepijn_remote/Documents:

    Code:
    total 256
    drwxrwxrw- 12 pepijn pepijn 0 2010-03-07 12:24 .
    drwxr-xr-x 10 pepijn pepijn 0 2010-02-09 22:50 ..
    -rw-r--r-- 1 pepijn pepijn 14702 2010-02-12 12:43 Afrekening Merlot.ods
    -rw-r--r-- 1 pepijn pepijn 22287 2010-01-15 19:37 Afrekening New York en Atlanta.ods
    -rw-r--r-- 1 pepijn pepijn 13153 2010-02-18 11:34 Amerika 2010.ods
    drwxrwxrwx 3 pepijn pepijn 0 2010-01-06 13:04 Belastingdienst
    etc...
    Perfectly normal. But here's the result of the same command in /home/pepijn/Documents (which should be exactly the same, and has been for months):

    Code:
    total 12
    drwxrwxrw- 12 pepijn pepijn 0 2010-03-07 12:24 .
    drwxr-xr-x 139 pepijn pepijn 12288 2010-03-07 12:44 ..
    drwxrwxrw- 12 pepijn pepijn 0 2010-03-07 12:24 Afrekening Merlot.ods
    drwxrwxrw- 12 pepijn pepijn 0 2010-03-07 12:24 Afrekening New York en Atlanta.ods
    drwxrwxrw- 12 pepijn pepijn 0 2010-03-07 12:24 Amerika 2010.ods
    drwxrwxrw- 12 pepijn pepijn 0 2010-03-07 12:24 Belastingdienst
    etc...
    As you can see it thinks every file is a directory! In fact, the permissions of every entry are precisely the same as for ., the current directory. I have verified that the same goes for the other directories redirected using the "bind" option, they all have the same permissions as . for every file in the directory.

    When it happens it plays havoc with my system, since any process which processes directories recursively (such as trackerd, the search indexer) gets stuck in an endless loop, consuming more and more resources.

    It gets even more bizarre: not only does Linux think every file is a directory, but it even thinks non-existent files are directories!!! I can "cd" to a non-existent directory completely successfully as far as the shell is concerned, it even thinks I'm in the directory. Here's a snippet I copy and pasted from my terminal window:

    Code:
    ~/Documents$ cd aasdghf
    ~/Documents/aasdghf$ cd fnurk
    ~/Documents/aasdghf/fnurk$ cd blah
    ~/Documents/aasdghf/fnurk/blah$
    Needless to say, I don't have a directory (nor a file) called aasdghf in my Documents directory. If I do an "ls" at this point I see the contents of the Documents directory (with every file listed as a directory with the same permissions as the Documents directory itself). If I try to do the same from /home/pepijn_remote I get:

    Code:
    /home/pepijn_remote/Documents$ cd aasdghf
    bash: cd: aasdghf: No such file or directory
    The problem is recurrent, but very unpredictable. When it happens, I can unmount all bound directories (after hunting down every process with open files on them) and mount them again and it will be fine for a while. When it first happened I was working in Netbeans (which I don't think had anything to do with the problem), it was not after rebooting or installing something or anything like that.

    One program which seems to trigger the bug very often is Filezilla. For some reason when I start that the problem will almost always immediately occur. But not every time, and it also sometimes happens when Filezilla is not running.

    I've filed a bug with Ubuntu, but they seem uninterested in helping me. I haven't received one single reply.

    Hopefully someone here can help me! Is this a known problem? How can I debug it and try and find out what on Earth is going on? Many thanks in advance to anyone who can help me!

    uname -a:
    Linux peregrin 2.6.31-21-generic #59-Ubuntu SMP Wed Mar 24 07:28:27 UTC 2010 x86_64 GNU/Linux

    mount --version:
    mount from util-linux-ng 2.16 (with libblkid and selinux support)

    Kind regards,
    Pepijn Schmitz

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,393
    Let me guess, that this started just after you did an update and got a new kernel? If so, perhaps the kernel regressed. That's where I'd start. Other possibilities is that the cifs driver module was updated and has a problem, or finally that the cifs driver module got corrupted somehow. Those are the things I'd check to start with.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined!
    Join Date
    May 2010
    Posts
    8
    I don't think the problem is in the cifs module, as the directories under /home/pepijn_remote look fine, it's only the redirected directories that display the problem.

    It does seem to be connected to a kernel update though. I first noticed it two days after kernel 2.6.31-20 was installed. I tried to reproduce the problem with kernel 2.6.31-19 and couldn't, although I can't be absolutely certain since the problem is unpredictable.

  4. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,393
    Quote Originally Posted by Captain_Chaos View Post
    I don't think the problem is in the cifs module, as the directories under /home/pepijn_remote look fine, it's only the redirected directories that display the problem.

    It does seem to be connected to a kernel update though. I first noticed it two days after kernel 2.6.31-20 was installed. I tried to reproduce the problem with kernel 2.6.31-19 and couldn't, although I can't be absolutely certain since the problem is unpredictable.
    That seems reasonable enough, which is why I suggested looking into kernel updates as a possible root cause. Since going back to the previous kernel eliminates the problem, I think you can safely assume that is the case. So, report the bug to the kernel maintainers for your distribution and use the older kernel for now would be my recommendation.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  5. #5
    Just Joined!
    Join Date
    May 2010
    Posts
    8
    Thanks. I have done exactly that (although I've reported it at kernel.org. I had already reported it to Ubuntu, but they don't seem interested). It's bug 15931 (this idiotic BBS won't let me post the URL...)

    But with the (lack of) response I've been getting everywhere so far I won't hold my breath... You're actually the first person to respond to me about this issue anywhere!

    I was just hoping that someone would recognize the situation as some kind of known problem, but that does not seem the case...

  6. #6
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,393
    Karmic Koala is 9.10, right? Something Lynx is the new 10.04 I believe, and Jaunty Jackalope is 9.04. Personally, I've had better results (fewer hardware-related issues) with 9.04 than 9.10, which is why I am not upgrading my 3 9.04 laptops as yet. I'll wait until 10.04 gets a few cycles of bug smashing out of the shop first. I don't think that 9.10 is an LTS (Long Term Support) candidate, so it will not be a priority in fixing such problems most likely.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  7. #7
    Just Joined!
    Join Date
    May 2010
    Posts
    8
    Yes, Karmic Koala is 9.10, which isn't an LTS version. But I don't think that's a valid reason not to fix such a fundamental bug, especially since it was working fine before the kernel update.

    But even if it is the case that they don't want to fix the bug because it's not an LTS version, you would think they could at least do me the common courtesy of letting me know that...

  8. #8
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,393
    How long ago did you report the bug? Have you gone back to the bug page to see if anyone has even looked at it and/or commented on it?
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  9. #9
    Just Joined!
    Join Date
    May 2010
    Posts
    8
    I reported it two months ago and added new information regularly. They first responded today, but only after I had changed the package to "linux" (the kernel) and added a bug watch for the kernel.org bug.

  10. #10
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,393
    So, what was the comment?
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •