Package: checkinstall
Version: 1.6.0-1
Severity: normal

[ I submitted this bug report using 'reportbug' over 2 hours ago and
haven't received the automated acknowledgement yet - I'm guessing the
submission got lost, so I'm repeating it ]

I have been trying to build GNU Emacs from CVS and make a package
using checkinstall.  checkinstall is hanging forever while running 'rm
-fr'.  I have managed to reproduce the bug - it seems to happen
whenever rm tries to remove a directory of 201 or more files.  In the
following example I mkdir a directory 'tmpdir' containing 201 empty
files, then make a directory 'tmpdir2' containing a very simple
Makefile.  I run 'sudo checkinstall' in 'tmpdir2' and it hangs on the
'rm' command.  I show that the newfiles.tmp file grows constantly, and
show that it is filling up with '#No such file or directory' messages.

Note that when I make the Makefile in ~ and run checkinstall from
there, rather than making it in ~/tmpdir2 and running checkinstall
from there, the problem doesn't happen.

------------------------------------------------------------------------
        (sid) [EMAIL PROTECTED]:~$ cd
        (sid) [EMAIL PROTECTED]:~$ pwd
        /home/chris
        (sid) [EMAIL PROTECTED]:~$ ls -ld tmpdir*
        ls: tmpdir*: No such file or directory
        (sid) [EMAIL PROTECTED]:~$ mkdir tmpdir
        (sid) [EMAIL PROTECTED]:~$ i=1; while ((i<202)); do touch 
/home/chris/tmpdir/$i; ((i=i+1)); done
        (sid) [EMAIL PROTECTED]:~$ ls tmpdir | wc -l
        201
        (sid) [EMAIL PROTECTED]:~$ mkdir tmpdir2
        (sid) [EMAIL PROTECTED]:~$ cd tmpdir2
        /home/chris/tmpdir2
        (sid) [EMAIL PROTECTED]:~/tmpdir2$ printf "install:\n\trm -fr 
/home/chris/tmpdir\n" > Makefile
        (sid) [EMAIL PROTECTED]:~/tmpdir2$ cat Makefile
        install:
                rm -fr /home/chris/tmpdir
        (sid) [EMAIL PROTECTED]:~/tmpdir2$ sudo checkinstall -y

        checkinstall 1.6.0, Copyright 2002 Felipe Eduardo Sanchez Diaz Duran
                   This software is released under the GNU GPL.


        The package documentation directory ./doc-pak does not exist. 
        Should I create a default set of package docs?  [y]: y

        Preparing package documentation...OK

        *** No known documentation files were found. The new package 
        *** won't include a documentation directory.

        *****************************************
        **** Debian package creation selected ***
        *****************************************

        This package will be built according to these values: 

        0 -  Maintainer: [ [EMAIL PROTECTED] ]
        1 -  Summary: [ Package created with checkinstall 1.6.0 ]
        2 -  Name:    [ tmpdir2 ]
        3 -  Version: [ 20060620 ]
        4 -  Release: [ 1 ]
        5 -  License: [ GPL ]
        6 -  Group:   [ checkinstall ]
        7 -  Architecture: [ i386 ]
        8 -  Source location: [ tmpdir2 ]
        9 -  Alternate source location: [  ]
        10 - Requires: [  ]

        Enter a number to change any of them or press ENTER to continue: 

        Installing with make install...

        ========================= Installation results 
===========================
        rm -fr /home/chris/tmpdir

*** at this point the command hang - I hit control-z to stop it and put it into 
the background ***

        [1]+  Stopped                 sudo checkinstall -y
        (sid) [EMAIL PROTECTED]:~/tmpdir2$ bg
        [1]+ sudo checkinstall -y &
        (sid) [EMAIL PROTECTED]:~/tmpdir2$ ps -ef | grep 'rm -fr'
        root     24981 24980 85 16:39 pts/5    00:00:16 rm -fr 
/home/chris/tmpdir
        chris    24992 21597  0 16:39 pts/5    00:00:00 grep rm -fr
        (sid) [EMAIL PROTECTED]:~/tmpdir2$ sudo ls -l /proc/24981/fd | grep /var
        lr-x------ 1 root root 64 2006-06-20 16:40 4 -> 
/var/tmp/JErNeZYSrkgcAlQeaoSq/META/DIRLS/24981_776_179687
        (sid) [EMAIL PROTECTED]:~/tmpdir2$ sudo ls -l 
/var/tmp/JErNeZYSrkgcAlQeaoSq/newfiles.tmp
        -rw-r--r-- 1 root root 17783709 2006-06-20 16:40 
/var/tmp/JErNeZYSrkgcAlQeaoSq/newfiles.tmp
        (sid) [EMAIL PROTECTED]:~/tmpdir2$ sudo ls -l 
/var/tmp/JErNeZYSrkgcAlQeaoSq/newfiles.tmp
        -rw-r--r-- 1 root root 18735007 2006-06-20 16:40 
/var/tmp/JErNeZYSrkgcAlQeaoSq/newfiles.tmp
        (sid) [EMAIL PROTECTED]:~/tmpdir2$ tail 
/var/tmp/JErNeZYSrkgcAlQeaoSq/newfiles.tmp
        tail: cannot open `/var/tmp/JErNeZYSrkgcAlQeaoSq/newfiles.tmp' for 
reading: Permission denied
        (sid) [EMAIL PROTECTED]:~/tmpdir2$ sudo tail -1000 
/var/tmp/JErNeZYSrkgcAlQeaoSq/newfiles.tmp | sort | uniq -c | sort -n | tail
              5 -1      unlink  /home/chris/tmpdir/91   #No such file or 
directory
              5 -1      unlink  /home/chris/tmpdir/92   #No such file or 
directory
              5 -1      unlink  /home/chris/tmpdir/93   #No such file or 
directory
              5 -1      unlink  /home/chris/tmpdir/94   #No such file or 
directory
              5 -1      unlink  /home/chris/tmpdir/95   #No such file or 
directory
              5 -1      unlink  /home/chris/tmpdir/96   #No such file or 
directory
              5 -1      unlink  /home/chris/tmpdir/97   #No such file or 
directory
              5 -1      unlink  /home/chris/tmpdir/98   #No such file or 
directory
              5 -1      unlink  /home/chris/tmpdir/99   #No such file or 
directory
              5 -1      unlink  /home/chris/tmpdir/9    #No such file or 
directory
        (sid) [EMAIL PROTECTED]:~/tmpdir2$ sudo wc -l 
/var/tmp/JErNeZYSrkgcAlQeaoSq/newfiles.tmp
        581819 /var/tmp/JErNeZYSrkgcAlQeaoSq/newfiles.tmp
        (sid) [EMAIL PROTECTED]:~/tmpdir2$ sudo wc -l 
/var/tmp/JErNeZYSrkgcAlQeaoSq/newfiles.tmp
        590494 /var/tmp/JErNeZYSrkgcAlQeaoSq/newfiles.tmp
        (sid) [EMAIL PROTECTED]:~/tmpdir2$ fg
        sudo checkinstall -y
        make: *** [install] Interrupt


        *** SIGINT received ***

        Cleaning up...OK

        Bye.

        (sid) [EMAIL PROTECTED]:~/tmpdir2$ 
------------------------------------------------------------------------

Here's the same test case, but with 200 files, instead of 201.
Notice now that the "rm -fr" line is immediately followed by
"installation successful" - ie. it doesn't hang any more:

------------------------------------------------------------------------
        (sid) [EMAIL PROTECTED]:~$ /bin/rm -fr tmpdir*
        (sid) [EMAIL PROTECTED]:~$ mkdir tmpdir
        (sid) [EMAIL PROTECTED]:~$ i=1; while ((i<201)); do touch 
/home/chris/tmpdir/$i; ((i=i+1)); done
        (sid) [EMAIL PROTECTED]:~$ mkdir tmpdir2
        (sid) [EMAIL PROTECTED]:~$ cd tmpdir2
        /home/chris/tmpdir2
        (sid) [EMAIL PROTECTED]:~/tmpdir2$ printf "install:\n\trm -fr 
/home/chris/tmpdir\n" > Makefile
        (sid) [EMAIL PROTECTED]:~/tmpdir2$ sudo checkinstall -y

        [...]

        Installing with make install...

        ========================= Installation results 
===========================
        rm -fr /home/chris/tmpdir

        ======================== Installation successful 
==========================

*** at this point I hit control-c, since the 'rm' had completed successfully ***

        *** SIGINT received ***

        Cleaning up...OK

        Bye.

        (sid) [EMAIL PROTECTED]:~/tmpdir2$ 
------------------------------------------------------------------------

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16-2-686
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)

Versions of packages checkinstall depends on:
ii  file                          4.17-2     Determines file type using "magic"
ii  findutils                     4.2.27-3   utilities for finding files--find,
ii  libc6                         2.3.6-15   GNU C Library: Shared libraries

checkinstall recommends no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to