Your message dated Tue, 22 Feb 2011 07:02:07 +0000
with message-id <[email protected]>
and subject line Bug#614347: fixed in curlftpfs 0.9.2-4
has caused the Debian Bug report #614347,
regarding curlftpfs: Memory leak when cache=no is used
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
614347: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=614347
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: curlftpfs
Severity: important
Tags: patch

A big leak when cache=no is used (ftpfs-ls.c used cache anyway for
file attributes, but the cache was never freed).
This leak exhausted system memory e.g. after doing copy and stat()
several hundred files one by one.
We used cache=no,attr_timeout=0 to completely disable caching - we
needed to check file size after it was uploaded.

The patch can be downloaded at http://www.oec.sk/patches
Apply the patch against debian package curlftpfs-0.9.2-3. For smooth
patching, apply this patch as the last one.
The symptoms were first detected on amd64 squeeze, with
curlftpfs-0.9.2-3.

Thanks
  Tom Olexa

-- System Information:
Debian Release: 5.0.4
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-2-xen-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
diff -ur curlftpfs-0.9.2/cache.c curlftpfs-0.9.2-olexat/cache.c
--- curlftpfs-0.9.2/cache.c	2008-04-30 01:03:09.000000000 +0200
+++ curlftpfs-0.9.2-olexat/cache.c	2011-02-04 16:43:05.000000000 +0100
@@ -25,7 +25,7 @@
     time_t last_cleaned;
 };
 
-static struct cache cache;
+struct cache cache;
 
 struct node {
     struct stat stat;
diff -ur curlftpfs-0.9.2/ftpfs-ls.c curlftpfs-0.9.2-olexat/ftpfs-ls.c
--- curlftpfs-0.9.2/ftpfs-ls.c	2008-04-23 12:55:41.000000000 +0200
+++ curlftpfs-0.9.2-olexat/ftpfs-ls.c	2011-02-07 17:23:37.000000000 +0100
@@ -25,6 +25,19 @@
 #include "charset_utils.h"
 #include "ftpfs-ls.h"
 
+struct cache {
+    int on;
+    unsigned stat_timeout;
+    unsigned dir_timeout;
+    unsigned link_timeout;
+    struct fuse_cache_operations *next_oper;
+    GHashTable *table;
+    pthread_mutex_t lock;
+    time_t last_cleaned;
+};
+
+extern struct cache cache;
+
 static int parse_dir_unix(const char *line,
                           struct stat *sbuf,
                           char *file,
@@ -243,8 +256,10 @@
           reallink = g_strdup(link);
         }
         int linksize = strlen(reallink);
-        cache_add_link(full_path, reallink, linksize+1);
-        DEBUG(1, "cache_add_link: %s %s\n", full_path, reallink);
+        if (cache.on) {
+          cache_add_link(full_path, reallink, linksize+1);
+          DEBUG(1, "cache_add_link: %s %s\n", full_path, reallink);
+        }
         if (linkbuf && linklen) {
           if (linksize > linklen) linksize = linklen - 1;
           strncpy(linkbuf, reallink, linksize);
@@ -257,8 +272,10 @@
         DEBUG(1, "filler: %s\n", file);
         filler(h, file, &stat_buf);
       } else {
-        DEBUG(1, "cache_add_attr: %s\n", full_path);
-        cache_add_attr(full_path, &stat_buf);
+        if (cache.on) {
+          DEBUG(1, "cache_add_attr: %s\n", full_path);
+          cache_add_attr(full_path, &stat_buf);
+        }
       }
 
       DEBUG(2, "comparing %s %s\n", name, file);


--- End Message ---
--- Begin Message ---
Source: curlftpfs
Source-Version: 0.9.2-4

We believe that the bug you reported is fixed in the latest version of
curlftpfs, which is due to be installed in the Debian FTP archive:

curlftpfs_0.9.2-4.debian.tar.gz
  to main/c/curlftpfs/curlftpfs_0.9.2-4.debian.tar.gz
curlftpfs_0.9.2-4.dsc
  to main/c/curlftpfs/curlftpfs_0.9.2-4.dsc
curlftpfs_0.9.2-4_amd64.deb
  to main/c/curlftpfs/curlftpfs_0.9.2-4_amd64.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Vincent Bernat <[email protected]> (supplier of updated curlftpfs package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Tue, 22 Feb 2011 07:30:01 +0100
Source: curlftpfs
Binary: curlftpfs
Architecture: source amd64
Version: 0.9.2-4
Distribution: unstable
Urgency: low
Maintainer: Vincent Bernat <[email protected]>
Changed-By: Vincent Bernat <[email protected]>
Description: 
 curlftpfs  - filesystem to access FTP hosts based on FUSE and cURL
Closes: 614347
Changes: 
 curlftpfs (0.9.2-4) unstable; urgency=low
 .
   * Fix another memory leak, thanks to a patch from Tom Olexa.
     Closes: #614347.
   * Bump Standards-Version to 3.9.1.
Checksums-Sha1: 
 11b4a199bd2956d6ecde404084a6be5a83dfd998 1291 curlftpfs_0.9.2-4.dsc
 4cb7b4a4aa2753416f75ec8ed8c8190b07d92747 4199 curlftpfs_0.9.2-4.debian.tar.gz
 eaf5211ad0005ae4bde923917ec520a05c8e6e48 34198 curlftpfs_0.9.2-4_amd64.deb
Checksums-Sha256: 
 5fa008d30ab54774021d385ed0412ca7f0a9e72c2bef8e11eb46ea0a0fcb7f04 1291 
curlftpfs_0.9.2-4.dsc
 5b1639bbc377e59efe4e308d63b3c48beeac551a41bf443f3e2c6954c1c4eb7b 4199 
curlftpfs_0.9.2-4.debian.tar.gz
 9b106330f5f54fb39643bd9134d86c22951ce975729c3a3824a0e2eb5582b1de 34198 
curlftpfs_0.9.2-4_amd64.deb
Files: 
 87abd750698b147f7ca7c1e984f6a4e9 1291 utils optional curlftpfs_0.9.2-4.dsc
 ec2defe91f2bc6a9311052e7d61e89c6 4199 utils optional 
curlftpfs_0.9.2-4.debian.tar.gz
 b389175e5ea04868a6368c82b278d806 34198 utils optional 
curlftpfs_0.9.2-4_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk1jXUIACgkQKFvXofIqeU7WMACePlOPwUE11eiCfNAafyCuaaVD
KjAAoIOhYuIkbUjI/FeurS8cJ+zBqGkS
=S3jO
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to