bug-tar
[Top][All Lists]
Advanced

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

[Bug-tar] tar: Segfault with --listed-incremental when archive includes


From: Matthew Gabeler-Lee
Subject: [Bug-tar] tar: Segfault with --listed-incremental when archive includes root directory (fwd)
Date: Mon, 17 May 2010 03:45:15 -0400 (EDT)
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)

I originally submitted this bug to debian as #575298 on March 24th, however there has been no followup from debian, so I'm forwarding this issue up.

Tar 1.23 has (at least for me) broken the ability to do listed incremental backups. Any listed incremental backup that includes the root directory triggers a segfault.

Example:

## create the full backup
tar --create --one-file-system --file /tmp/tartest.tar \
    --listed-incremental /tmp/tartest.list --exclude /tmp /
## do the incremental backup -- this crashes
tar --create --one-file-system --file /tmp/tartest2.tar \
    --listed-incremental /tmp/tartest.list --exclude /tmp /

I built a debug version of tar, and got this backtrace:

Program received signal SIGSEGV, Segmentation fault.
hash_string (string=0x0, n_buckets=53) at hash.c:427
427       for (; (ch = *string); string++)
(gdb) bt
#0  hash_string (string=0x0, n_buckets=53) at hash.c:427
#1  0x000000000042d156 in hash_find_entry (table=0x65b950, entry=0x664ea0,
# bucket_head=0x7fffffffe078,
    delete=false) at hash.c:788
#2  0x000000000042d8a6 in hash_insert (table=0x65b950, entry=0x664ea0) at
hash.c:1042
#3  0x0000000000412881 in note_directory (name=<value optimized out>,
# mtime=..., dev=2304, ino=2, nfs=false,
    found=false, contents=0x65afb0 "Nbin") at incremen.c:327
#4  0x000000000041400c in read_incr_db_2 () at incremen.c:1267
#5  read_directory_file () at incremen.c:1343
#6  0x0000000000418aea in collect_and_sort_names () at names.c:904
#7  0x000000000040bce2 in create_archive () at create.c:1283
#8  0x000000000041dc9d in main (argc=<value optimized out>, argv=<value
#optimized out>) at tar.c:2605

Looking at the code in the call tree and comparing that with the contents of
the incremental list file, this appears to be because the listed incremental
has an empty string stored for the name of the root directory, instead of
"/", even if --absolute-names is used.

This crash was not present in tar 1.22, but the incremental list files
exhibited the same empty string behavior in that version (I first saw the
crash doing an incremental backup using tar 1.23 after a full backup that
was created with tar 1.22).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]