All of vdi I/O and dog command freeze during deleting files in .stale dir

Bug #1378779 reported by masahiro tsuji
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
sheepdog
Fix Committed
High
Hitoshi Mitake

Bug Description

Hi

I found a problem that all of vdi I/O and dog command freeze during deleting files in .stale dir.

The system take long time(about 10 min) for deleteing .stae files( about 100,000 object files) when recovery has been finished.
And VM got truble during deleting the files.

I make patch for extend time of delete .stale files.
And reproduce the problem.

I suspect sd_read_lock(&md_lock) in for_each_obj_path.

[root@node001 sheep]# diff -u plain_store.c-org plain_store.c
--- plain_store.c-org 2014-10-08 13:40:00.851572835 +0900
+++ plain_store.c 2014-10-08 13:43:20.374507384 +0900
@@ -9,6 +9,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */

+#include <unistd.h>
 #include <libgen.h>

 #include "sheep_priv.h"
@@ -156,6 +157,9 @@
 static int purge_stale_dir(char *path)
 {
        char p[PATH_MAX];
+ sd_debug("wait 600 sec in pruge_dtale_dir");
+ sleep(600);
+ sd_debug("wait 600 sec in pruge_dtale_dir done");

        snprintf(p, PATH_MAX, "%s/.stale", path);
        return purge_dir(p);

Revision history for this message
masahiro tsuji (masa-tsuji) wrote :

I added sleep at top of default_cleanup(void). it was same result.
So I/O is freeze during default_cleanup.

Changed in sheepdog-project:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Hitoshi Mitake (mitake-hitoshi)
Changed in sheepdog-project:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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