[sheepdog-users] Cluster snapshot out of memory
Valerio Pachera
sirio81 at gmail.com
Thu Sep 26 17:47:46 CEST 2013
It looks fixed to me.
Note: I was initially not able to start the cluster after the upgrade:
Sep 26 17:14:02 INFO [main] main(828) shutdown
Sep 26 17:35:25 INFO [main] md_add_disk(310) /mnt/sheep/dsk02, vdisk
nr 932, total disk 1
Sep 26 17:35:25 ERROR [main] do_epoch_log_read(78) invalid epoch 1 log
Sep 26 17:35:25 ERROR [main] main(759) failed to create sheepdog cluster
Sep 26 17:35:25 ERROR [main] crash_handler(492) sheep pid 28764
exited unexpectedly.
Sep 26 17:35:49 INFO [main] md_add_disk(310) /mnt/sheep/dsk02, vdisk
nr 932, total disk 1
Sep 26 17:35:49 ERROR [main] do_epoch_log_read(78) invalid epoch 1 log
Sep 26 17:35:49 ERROR [main] main(759) failed to create sheepdog cluster
Sep 26 17:35:49 ERROR [main] crash_handler(492) sheep pid 28781
exited unexpectedly.
I removed all data and restarted sheep, then it worked fine
Sep 26 17:38:06 INFO [main] md_add_disk(310) /mnt/sheep/dsk02, vdisk
nr 932, total disk 1
Sep 26 17:38:06 INFO [main] send_join_request(778) IPv4
ip:192.168.2.44 port:7000
Sep 26 17:38:06 INFO [main] check_host_env(420) Allowed open files
1024000, suggested 6144000
Sep 26 17:38:06 INFO [main] main(821) sheepdog daemon (version
0.7.0_131_gfd43e6f) started
top
top - 17:43:39 up 2 days, 5:17, 2 users, load average: 0,90, 0,53, 0,26
Tasks: 88 total, 2 running, 86 sleeping, 0 stopped, 0 zombie
%Cpu(s): 10,3 us, 9,2 sy, 0,0 ni, 55,0 id, 22,1 wa, 0,0 hi, 3,4 si, 0,0 st
KiB Mem: 1929452 total, 1861252 used, 68200 free, 5136 buffers
KiB Swap: 7812092 total, 13604 used, 7798488 free, 1724968 cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
28874 root 20 0 40888 12m 692 S 26,6 0,7 1:10.37 dog
28840 root 20 0 97644 8688 1956 S 13,3 0,5 0:35.76 sheep
Ram is used but it doesn't swap.
This is my script monitoring ram used by sheep (ps axv)
09/26/13 17:39:01 93190 2516
09/26/13 17:40:01 93314 4548
09/26/13 17:41:01 93314 4436
09/26/13 17:42:01 93314 4460
09/26/13 17:43:01 93314 4500
09/26/13 17:44:01 93314 4532
09/26/13 17:45:01 93314 4484
git branch -a
* devel
master
remotes/origin/HEAD -> origin/master
remotes/origin/devel
remotes/origin/gh-pages
remotes/origin/master
remotes/origin/option
remotes/origin/reclaim
remotes/origin/stable-0.6
remotes/origin/stable-0.7
sheep -v
Sheepdog daemon version 0.7.0_131_gfd43e6f
git show -1
commit fd43e6f0e9450d916c916b908af8834c6aacae1c
Author: Liu Yuan <namei.unix at gmail.com>
Date: Wed Sep 25 23:36:11 2013 +0800
farm: fix memory leak of slice_read()
This is yet another leaker of slice_read.
Signed-off-by: Liu Yuan <namei.unix at gmail.com>
diff --git a/dog/farm/slice.c b/dog/farm/slice.c
index 79fa859..77db771 100644
--- a/dog/farm/slice.c
+++ b/dog/farm/slice.c
@@ -96,6 +96,7 @@ void *slice_read(const unsigned char *sha1, size_t *outsize)
if (!sbuf)
goto err;
strbuf_add(&buf, sbuf, size);
+ free(sbuf);
*outsize += size;
}
More information about the sheepdog-users
mailing list