diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-12-10 14:45:15 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-12-10 14:45:15 +0100 |
commit | ef7b2ad3c40de029e4eda05a2454e6555e3a8a82 (patch) | |
tree | 622bf14bdd1b19c7c2242693d146d6bd8c95004a | |
parent | 982fad340ad46b81257cfeb17f80fd6ca90ebc18 (diff) | |
download | abrt-ef7b2ad3c40de029e4eda05a2454e6555e3a8a82.tar.gz abrt-ef7b2ad3c40de029e4eda05a2454e6555e3a8a82.tar.xz abrt-ef7b2ad3c40de029e4eda05a2454e6555e3a8a82.zip |
abrtd: add comment about ccpp/abrtd race
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | lib/Utils/DebugDump.cpp | 2 | ||||
-rw-r--r-- | src/Daemon/Daemon.cpp | 6 | ||||
-rw-r--r-- | src/Hooks/CCpp.cpp | 2 |
3 files changed, 8 insertions, 2 deletions
diff --git a/lib/Utils/DebugDump.cpp b/lib/Utils/DebugDump.cpp index b1db1698..765b5146 100644 --- a/lib/Utils/DebugDump.cpp +++ b/lib/Utils/DebugDump.cpp @@ -197,7 +197,7 @@ void CDebugDump::Lock() sprintf(pid_buf, "%u", (unsigned)getpid()); while ((m_bLocked = GetAndSetLock(lockFile.c_str(), pid_buf)) != true) { - usleep(500000); + sleep(1); /* was 0.5 seconds */ } } diff --git a/src/Daemon/Daemon.cpp b/src/Daemon/Daemon.cpp index 3f882306..6f98966c 100644 --- a/src/Daemon/Daemon.cpp +++ b/src/Daemon/Daemon.cpp @@ -456,6 +456,12 @@ static gboolean handle_inotify_cb(GIOChannel *gio, GIOCondition condition, gpoin continue; } +//TODO: make it possible to detect when ccpp didn't finish dumping yet. +//We are seeing it *before* ccpp finished, and it can take LONG time +//(users saw 100+ seconds). +//This floods syslog with "Lock file 'XXXXXX' is locked by process NNN" +//Maybe ccpp should use XXXXXX.new name for incomplete dumps +//and abrtd should watch for renames XXXXXX.new -> XXXXXX? log("Directory '%s' creation detected", name); std::string worst_dir; diff --git a/src/Hooks/CCpp.cpp b/src/Hooks/CCpp.cpp index ea616860..fdb31a5c 100644 --- a/src/Hooks/CCpp.cpp +++ b/src/Hooks/CCpp.cpp @@ -20,7 +20,7 @@ */ /* Make all file ops "large" and make off_t 64-bit. - * No need to use O_LORGEFILE anywhere + * No need to use O_LARGEFILE anywhere */ #define _LARGEFILE_SOURCE #define _LARGEFILE64_SOURCE |