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

Bug#522082: marked as done (tla: file descriptor leak, causes panic when removing temporary directory)



Your message dated Tue, 01 Sep 2015 21:30:56 +0000
with message-id <E1ZWt8q-0000C2-Rz@franck.debian.org>
and subject line Bug#522082: fixed in tla 1.3.5+dfsg1-2
has caused the Debian Bug report #522082,
regarding tla: file descriptor leak, causes panic when removing temporary directory
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 owner@bugs.debian.org
immediately.)


-- 
522082: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=522082
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: tla
Version: 1.3.5+dfsg-14
Tags: patch

When computing a changeset (e.g. for the "tla changes --diffs" command), tla
creates a temporary directory with a name that begins in ,,what-changed.
This directory is cleaned up at the end of the operation.

Symbolic links are compared by writing the target of the link into a
text file under that directory, then relying on usual "diff" behaviour.

Unfortunately, tla doesn't explicitly close this text file. As a result:
(1) it uses more file descriptors than necessary;
(2) on some filesystems (e.g., OpenAFS 1.4.8 and newer) tla dies with
an I/O panic as the rmdir() operation on the parent directory fails with 
ENOTEMPTY, even though the unlink() of the file itself succeeded, because 
the file is still open.

The attached patch has been tested and gets rid of symptom (2). I expect
it to help with (1) as well. The variables that hold the file descriptor
numbers go out of scope shortly afterwards.
#! /bin/sh /usr/share/dpatch/dpatch-run
## 07-changeset-fd-leak.dpatch by Sergio Gelato <Sergio.Gelato@astro.su.se>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Remember to close file descriptors before they go out of scope.

@DPATCH@
diff -urNad tla-1.3.5+dfsg-14~/src/tla/libarch/make-changeset.c tla-1.3.5+dfsg-14/src/tla/libarch/make-changeset.c
--- tla-1.3.5+dfsg-14~/src/tla/libarch/make-changeset.c	2006-07-20 08:34:40.000000000 +0200
+++ tla-1.3.5+dfsg-14/src/tla/libarch/make-changeset.c	2009-03-31 00:19:39.449388785 +0200
@@ -1485,6 +1485,9 @@
           safe_printfmt (orig_out_fd, "%s\n", orig_target);
           safe_printfmt (mod_out_fd, "%s\n", mod_target);
 
+          safe_close (orig_out_fd);
+	   safe_close (mod_out_fd);
+
           lim_free (0, patch_basename_path);
           lim_free (0, orig_patch);
           lim_free (0, mod_patch);

--- End Message ---
--- Begin Message ---
Source: tla
Source-Version: 1.3.5+dfsg1-2

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

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 522082@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Santiago Vila <sanvila@debian.org> (supplier of updated tla 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 ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Tue, 01 Sep 2015 22:07:06 +0200
Source: tla
Binary: tla tla-doc
Architecture: source
Version: 1.3.5+dfsg1-2
Distribution: unstable
Urgency: medium
Maintainer: Debian QA Group <packages@qa.debian.org>
Changed-By: Santiago Vila <sanvila@debian.org>
Description:
 tla        - GNU Arch revision control system
 tla-doc    - GNU Arch revision control system (documentation)
Closes: 417441 522082
Changes:
 tla (1.3.5+dfsg1-2) unstable; urgency=medium
 .
   * QA upload.
   * Add debian/patches/0014-do-not-show-the-build-date.patch.
   * debian/control: Suggest openssh-client instead of ssh.
     Thanks to Magnus Holmgren for the report. Closes: #417441.
   * Add debian/patches/0015-changeset-fd-leak.patch from Sergio Gelato to
     close file descriptors before they go out of scope. Closes: #522082.
Checksums-Sha1:
 e927bc50925ba063f58430b083f660b4b406cef2 1447 tla_1.3.5+dfsg1-2.dsc
 0e10975c36a5110ba6beb3e50e7b308bc5da9fd2 32764 tla_1.3.5+dfsg1-2.debian.tar.xz
Checksums-Sha256:
 d3da2e99fd57a4e35a14a95c531f69c270976b0c99ccd19ce4b3627c4db7b77e 1447 tla_1.3.5+dfsg1-2.dsc
 0123a643fc99194761dc3d9172987e318b0d497c62010988692813e92e4a9f61 32764 tla_1.3.5+dfsg1-2.debian.tar.xz
Files:
 c3ea2efd4fc5306e708de4f896bb072b 1447 vcs optional tla_1.3.5+dfsg1-2.dsc
 ddd4ced5f512a77dbe48f5d2df13b2de 32764 vcs optional tla_1.3.5+dfsg1-2.debian.tar.xz

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBCAAGBQJV5gnSAAoJEEHOfwufG4sylDQH/0rg+uM9PIbJjUKj8AHFfNAu
FdYQShaKjJkimIdHFYYSu+fGHEnpUHMuTyly3R0jBnOI1Jm3b/Pr7Egg+tsoqnus
l7QBEJcwW7JQSKNsOruo8fC2P1vwkhp5PDuS7DNLXRw1uzUcFNeQZstvOxiwslxd
ex3zfhK3aaCdvii58fX1MdQ58xuOZyD3oFZI/rCNyroUEY3WdEYw/IeFoTG/AdSt
RuiOY3itMTma7JKegjohr3j1beII0z97Y/4yhTqUtOLSnju/8rhxX91/ava114ei
Og5XpNSl1cQW8jpVXulk4Xjb2zIAb3ynwK2XZwr9zsCbZiAAcpXO6ubqzxlbedg=
=EVn1
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: