Ticket #3660 (closed defect: fixed)

Opened 8 years ago

Last modified 8 years ago

Unable to view archive content using F3

Reported by: IceMan Owned by: andrew_b
Priority: minor Milestone: 4.8.18
Component: mc-core Version: master
Keywords: Cc:
Blocked By: Blocking:
Branch state: merged Votes for changeset: committed-master

Description

When trying to view archive content using F3 I get error "Cannot create pipe streams".

To reproduce the issue create any archive and try to list it's content using F3 key.

  1. tar -czf test.tar.gz /usr/share/doc
  2. Point cursor in mc to test.tar.gz and press F3
  3. Error "Cannot create pipe streams" occured.
    $ mc -V
    GNU Midnight Commander 4.8.17-33-gcb06f8c
    Built with GLib 2.42.1
    Using the S-Lang library with terminfo database
    With builtin Editor
    With subshell support as default
    With support for background operations
    With mouse support on xterm and Linux console
    With support for X11 events
    With internationalization support
    With multiple codepages support
    Virtual File Systems: cpiofs, tarfs, sfs, extfs, ftpfs, sftpfs, fish
    Data types: char: 8; int: 32; long: 32; void *: 32; size_t: 32; off_t: 64;
    

Attachments

mc-check.ogv (572.9 KB) - added by IceMan 8 years ago.
MC archive content list

Change History

comment:1 Changed 8 years ago by andrew_b

Cannot reproduce. Works for me.

Changed 8 years ago by IceMan

MC archive content list

comment:2 Changed 8 years ago by IceMan

Checked on Debian Jessie and Debian Sid - always reproduced.

Strace output when pressing F3 on archive (strace -fF -e process -p pidof mc):

clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb7182b28) = 23509
Process 23509 attached
[pid 23509] execve("/bin/sh", ["sh", "-c", "/bin/sh /tmp/mc-root/mcextYEF3JY", "", 0x734bdb00, "(\336\25\0100\331v\267\320\17v\267\200\3458\267\326\334\4\10\320u8\267`{R\267\6\335\4\10"..., "", "/bin/sh /tmp/mc-root/mcextYEF3JY", "\203\304\20\205\300\17\204\5\1", "/bin/sh /tmp/mc-root/mcextYEF3JY", "", "/bin/sh /tmp/mc-root/mcextYEF3JY", "\203\304\20\203\304\10[\303\215\264&"], [/* 28 vars */]) = -1 EFAULT (Bad address)
[pid 23509] exit_group(1)               = ?
[pid 23471] waitpid(23509,  <unfinished ...>
[pid 23509] +++ exited with 1 +++
<... waitpid resumed> NULL, 0)          = 23509
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=23509, si_uid=0, si_status=1, si_utime=0, si_stime=0} ---
waitpid(23473, 0xbfd93e18, WNOHANG|WSTOPPED) = 0
waitpid(23472, 0xbfd93de8, WNOHANG|WSTOPPED) = -1 ECHILD (No child processes)
waitpid(23472, 0xbfd93de8, WNOHANG|WSTOPPED) = -1 ECHILD (No child processes)

comment:3 Changed 8 years ago by andrew_b

  • Status changed from new to accepted
  • Owner set to andrew_b
  • Branch state changed from no branch to on review
  • Milestone changed from Future Releases to 4.8.18

comment:4 Changed 8 years ago by thelittlethings

I can confirm this as well...
It only recently showed up so its from changes that happened in the last month or so.
For me it occurs while looking at anything that is a binary stream or an .so library file.

GNU Midnight Commander 4.8.17-39-g36d00d0
Built with GLib 2.49.1
Using the S-Lang library with terminfo database
With builtin Editor
With subshell support as default
With support for background operations
With mouse support on xterm and Linux console
With support for X11 events
With internationalization support
With multiple codepages support
Virtual File Systems: cpiofs, tarfs, sfs, extfs, ext2undelfs, ftpfs, sftpfs, fish, smbfs
Data types: char: 8; int: 32; long: 64; void *: 64; size_t: 64; off_t: 64;

comment:5 Changed 8 years ago by IceMan

It's very strange for me, but I can't reproduce the issue when building MC from source. But on the same system MC from packages gives me an error. I have no idea why this happens. Unfortunately now I have not enough time to digg this issue deeper. Maybe I will check it again next week.

Or maybe somebody have an idea why this issue presents in packages but not presents in source builds?

comment:6 Changed 8 years ago by severach

https://aur.archlinux.org/packages/mc-git

With some manual bisecting in TIG I've narrowed it down to two commits. (-) non working, (+) working.

- 4485902 2016-05-17 10:11 Andrew Borodin ¦ o Ticket #3646: Filtered View doesn't work.
+ 35ad1ab 2016-05-22 14:18 Andrew Borodin M-+ Merge branch '3637_search_memleaks'

Looks like the change was in mc_popen.

https://github.com/MidnightCommander/mc/pull/59

Last edited 8 years ago by severach (previous) (diff)

comment:7 Changed 8 years ago by andrew_b

Guys, don't tell me about the bug. Tell me about the fix: comment:3.

comment:8 Changed 8 years ago by IceMan

I have tested 3660_view_archive branch - MC from package working fine with this patch, and do not work if I revert patch.

comment:9 Changed 8 years ago by severach

Branch "b941c7c [3660_view_archive]" views archives and pdf fine for me. Took me a minute to learn how to use git in two dimensions.

comment:10 Changed 8 years ago by andrew_b

  • Votes for changeset set to andrew_b
  • Branch state changed from on review to approved

comment:11 Changed 8 years ago by andrew_b

  • Status changed from accepted to testing
  • Votes for changeset changed from andrew_b to committed-master
  • Resolution set to fixed
  • Branch state changed from approved to merged

comment:12 Changed 8 years ago by andrew_b

  • Status changed from testing to closed
Note: See TracTickets for help on using tickets.