#22 7z crashes when adding a directory

closed-out-of-date
nobody
None
5
2005-09-22
2005-02-18
adn
No

More details on
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=295643

Adam Porter reported:

Package: p7zip
Version: 4.14.01-1

I'm a former Windows user. I used to use 7-Zip on
Windows to compress
my backups before writing them to CD. 7-Zip definitely
compresses
better than bzip2, so I would like to use it to
compress my backups.

I've used rsync to copy my home directory to another
hard disk,
`/mnt/backup/home/first` (the username is "first").
Then I installed
p7zip from experimental. Then, after reading the man
page, I ran this:

`7z a -r /mnt/backup/home/first.7z
/mnt/backup/home/first/*`

`/mnt/backup/home/first` is my backed-up home
directory, and I want it
compressed to a file called `/mnt/backup/home/first.7z`.

After running that command, it crashed with this output:
----
# 7z a -r /mnt/backup/home/first.7z
/mnt/backup/home/first/*

7-Zip 4.14 beta Copyright (c) 1999-2005 Igor Pavlov
2005-01-11
p7zip Version 4.14.01 (locale=en_US,Utf16=on,HugeFiles=on)
Scanning/usr/bin/7z: line 2: 12034 Segmentation fault
/usr/lib/p7zip/7z "$@"
----

One of the times I tried it, it said:

"Command exited with non-zero status 139"

I don't think I'm doing anything wrong.

Discussion

  • adn
    adn
    2005-02-23

    Logged In: YES
    user_id=1151198

    In fact, it only crashes when -r option is used
    Strace gives :
    7-Zip 4.14 beta Copyright (c) 1999-2005 Igor Pavlov 2005-01-11
    p7zip Version 4.14.01 (locale=fr_FR.UTF-8,Utf16=on,HugeFiles=on)
    Scanningchild_stack=0,
    flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
    child_tidptr=0xb7f99bc8) = 8540
    rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
    rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
    rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
    rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
    rt_sigaction(SIGINT, {0x8079bd0, [], 0}, {SIG_DFL}, 8) = 0
    waitpid(-1,

     
  • my space
    my space
    2005-02-23

    Logged In: YES
    user_id=336051

    - FIRST : DO NOT USE the 7-zip format for backup purpose on
    Linux/Unix because :
    - 7-zip does not handle links (7-zip follows the link and
    stores the files instead of the links)
    - 7-zip does not store the unix file permission
    - 7-zip does not store the owner/group of the file

    On Linux/Unix you must always use TAR for backup purpose !

    to backup a directory : tar cf - directory | 7za a
    -si directory.7z
    to restore your backup : 7za x -so directory.7z | tar xf -

    - if you want to send files and directories (not link, not
    the file permissions,
    not the owner of file) to others Unix/MacOS/Windows users,
    you can use
    the 7-zip format.

    example : 7za a directory.7z directory

    do not use "-r" because this flag does not do what you think
    do not use directory/* because of ".*" files
    (example : "directory/*" does not match "directory/.profile")

    This warning will be written in the readme of the next
    version of p7zip.

    "7z a -r /mnt/backup/home/first.7z /mnt/backup/home/first/*"
    works on my system.

    The only problem I have found is when you use some version
    of gnome.
    If you use gnome, you can have in your home directory :
    Desktop that is a link to /home/username/.gnome-desktop
    in the directory "/home/username/.gnome-desktop" you can
    find :
    "Home directory" that is a link to "/home/username" !

    So during 7za scans :
    /home/username/.gnome-desktop
    then
    /home/username/.gnome-desktop/Home directory/.gnome-desktop
    and
    /home/username/.gnome-desktop/Home directory ... Home
    directory/.gnome-desktop

    and then 7za crashes because it cannot have more memories
    during its scanning ...

    For adnene :

    7z a directory.7z directory/* : does not store
    "directory/.*" files or directories
    whereas
    7z a -r directory.7z directory/* : stores "directory/.*"
    files or directories

    I think that "-r" crashes because you have something like
    ".gnome-desktop"

    can you confirm ?

     
  • Blank Blank
    Blank Blank
    2005-02-28

    Logged In: YES
    user_id=278209

    This is the original Debian bug reporter.

    Yes, I am using Gnome, so I guess that is why -r is making
    it crash.

    I'd like to suggest that you add a note to the man page and
    full manual about -r adding .files and non--r not adding
    .files. It's not mentioned anywhere, so how would someone
    like me know? :)

    Thanks for your information about using tar instead. Are
    there any plans for 7z to store links, permissions and
    owners in the future?

     
  • my space
    my space
    2005-09-22

    • status: open --> closed-out-of-date