monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-devel] Re: monotone ls unknown


From: graydon hoare
Subject: [Monotone-devel] Re: monotone ls unknown
Date: Tue, 16 Dec 2003 10:24:23 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031115 Thunderbird/0.3

Peter Simons wrote:

I'm running monotone on a Gentoo Linux/x86 system, using the patched
version of the 2.4.21 kernel with SELinux, PaX and ProPolice
activated. The stack protection features are disabled for monotone,
because they seem to break the LUA interpreter, among other things.
Also, I'm compiling the program with gcc version 3.3.2, using -O0 for
CFLAGS and CXXFLAGS, to avoid the bug in cryptopp.

right. well, it's a foreign enough environment that I'm not surprised we're seeing *some* sort of bug. all that security jazz tends to make old wrong assumptions break.

I've looked through the output and it appears that monotone never even
checks for the contents of the current directory!

good, this pinpoints pretty well where it's failing:

getdents64(3, /* 121 entries */, 4096)  = 4080

try applying the following patch, which turns on a lot more debugging chatter in the affected area, and see if it gets you anything more precise.

-graydon
--- file_io.cc
+++ file_io.cc
@@ -235,22 +235,34 @@
       fs::path entry = *di;
       fs::path rel_entry = relative / fs::path(entry.leaf());
 
+      L(F("tree walk examining %s\n") % rel_entry.string());
+
       if (book_keeping_file (entry))
        return;
 
+      L(F("%s is not a book keeping file\n") % rel_entry.string());
+
       if (fs::is_directory(entry))
-       walk_tree_recursive(entry, rel_entry, walker);
+       {
+         L(F("%s is a directory, recursing\n") % rel_entry.string());
+         walk_tree_recursive(entry, rel_entry, walker);
+       }
       else
        {
          file_path p;
+         L(F("trying to construct a file path from %s\n") % 
rel_entry.string());
          try 
            {
              p = file_path(rel_entry.string());
+             L(F("constructed a file path from %s\n") % rel_entry.string());
            }
          catch (std::runtime_error const & c)
            {
+             L(F("caught runtime error %s constructing file path for %s\n") 
+               % c.what() % rel_entry.string());
              continue;
            }     
+         L(F("visiting file path %s\n") % rel_entry.string());
          walker.visit_file(p);
        }
     }
@@ -260,10 +272,15 @@
 void walk_tree(file_path const & path,
               tree_walker & walker)
 {
+  L(F("beginning tree-walk on %s\n") % path);
   if (! fs::is_directory(fs::path(path())))
-    walker.visit_file(path);
+    {
+      L(F("doing non-directory walk on %s\n") % path);
+      walker.visit_file(path);
+    }
   else
     {
+      L(F("doing directory walk on %s\n") % path);
       fs::path root(fs::current_path());
       fs::path rel(path());
       walk_tree_recursive(root / rel, rel, walker);

reply via email to

[Prev in Thread] Current Thread [Next in Thread]