bug-tar
[Top][All Lists]
Advanced

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

Re: [Bug-tar] Small bug in tar-1.29


From: Jack Howarth
Subject: Re: [Bug-tar] Small bug in tar-1.29
Date: Tue, 6 Sep 2016 15:03:09 -0400
User-agent: Mutt/1.5.18 (2008-05-17)

On Tue, Sep 06, 2016 at 02:54:27PM -0400, Jack Howarth wrote:
> On Tue, Sep 06, 2016 at 07:21:24PM +0100, Ralph Corderoy wrote:
> > Hi Rob,
> > 
> > > Incidentally, running "gdb" on the latest Mac OS is a pain--Apple
> > > thought for some reason that it was a security risk.  Running "lldb,"
> > > the default debugger, told me nothing.--Rob
> > 
> > I haven't tried this, but something like `lldb /path/to/tar' to get
> > going, then `run tvzf archive.tgz' to kick it off with your arguments.
> > It should suffer signal 11.  Then `thread backtrace all'.
> 
> I can reproduce this bug here under the MacPorts gnutar build of tar 1.29.
> Normally, the default LANG for the system bash is set to en_US.UTF-8 such
> that...
> 
> gnutar -zcvf test_data.tar.gz test_data
> 
> works fine. If I unset LANG on darwin15, I see the hang...
> 
> $ gnutar -zcvf test_data.tar.gz test_data
> test_data/
> test_data/.noe.tbl.swp
> test_data/dihedral.tbl
> test_data/file.nam
> test_data/io.mc
> test_data/noe.tbl
> gnutar: test_data.tar.gz: Cannot write: Broken pipe
> gnutar: Child died with signal 11
> gnutar: Error is not recoverable: exiting now
> 
> This issue doesn't seem to exist for tar 1.26 on x86_64-apple-darwin15.

Looking at this in lldb, I see...

$ lldb /opt/local/bin/gnutar
(lldb) target create "/opt/local/bin/gnutar"
Current executable set to '/opt/local/bin/gnutar' (x86_64).
(lldb) r  -zcvf test_data.tar.gz test_data 
Process 9363 launched: '/opt/local/bin/gnutar' (x86_64)
test_data/
test_data/.noe.tbl.swp
test_data/dihedral.tbl
test_data/file.nam
test_data/io.mc
test_data/noe.tbl
Process 9363 stopped
* thread #1: tid = 0x12c73d, 0x00007fff8f4a191a libsystem_kernel.dylib`write + 
10, queue = 'com.apple.main-thread', stop reason = signal SIGPIPE
    frame #0: 0x00007fff8f4a191a libsystem_kernel.dylib`write + 10
libsystem_kernel.dylib`write:
->  0x7fff8f4a191a <+10>: jae    0x7fff8f4a1924            ; <+20>
    0x7fff8f4a191c <+12>: movq   %rax, %rdi
    0x7fff8f4a191f <+15>: jmp    0x7fff8f49a7f2            ; cerror
    0x7fff8f4a1924 <+20>: retq   
(lldb) bt
* thread #1: tid = 0x12c73d, 0x00007fff8f4a191a libsystem_kernel.dylib`write + 
10, queue = 'com.apple.main-thread', stop reason = signal SIGPIPE
  * frame #0: 0x00007fff8f4a191a libsystem_kernel.dylib`write + 10
    frame #1: 0x0000000100035b75 gnutar`safe_write + 34
    frame #2: 0x000000010002f640 gnutar`full_write + 42
    frame #3: 0x00000001000051e4 gnutar`_flush_write + 104
    frame #4: 0x0000000100004025 gnutar`gnu_flush_write + 42
    frame #5: 0x0000000100002738 gnutar`find_next_block + 47
    frame #6: 0x0000000100009a98 gnutar`dump_regular_file + 130
    frame #7: 0x0000000100009011 gnutar`dump_file + 1969
    frame #8: 0x0000000100009fa7 gnutar`dump_dir0 + 426
    frame #9: 0x0000000100009055 gnutar`dump_file + 2037
    frame #10: 0x0000000100008609 gnutar`create_archive + 161
    frame #11: 0x000000010001e494 gnutar`main + 3510
    frame #12: 0x00007fff895605ad libdyld.dylib`start + 1
(lldb) 

> 
> > 
> > -- 
> > Cheers, Ralph.
> > https://plus.google.com/+RalphCorderoy



reply via email to

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