Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crash when returning to panels by pressing Ctrl-O #3943

Closed
mc-butler opened this issue Oct 14, 2018 · 23 comments
Closed

crash when returning to panels by pressing Ctrl-O #3943

mc-butler opened this issue Oct 14, 2018 · 23 comments
Assignees
Labels
area: core Issues not related to a specific subsystem prio: medium Has the potential to affect progress ver: 4.8.21 Reproducible in version 4.8.21
Milestone

Comments

@mc-butler
Copy link

Important

This issue was migrated from Trac:

Origin https://midnight-commander.org/ticket/3943
Reporter nerijus (nerijus@….sourceforge.net)

I posted https://bugzilla.redhat.com/show_bug.cgi?id=1639016 but duplicate it here too.
I get lots of crashes when returning to mc panels from terminal by pressing Ctrl-O.

# coredumpctl debug
           PID: 10643 (mc)
           UID: 0 (root)
           GID: 0 (root)
        Signal: 11 (SEGV)
     Timestamp: Sun 2018-10-14 12:54:41 EEST (10min ago)
  Command Line: /usr/bin/mc -P /var/tmp/mc-root/mc.pwd.10566
    Executable: /usr/bin/mc
...
Core was generated by `/usr/bin/mc -P /var/tmp/mc-root/mc.pwd.10566'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x000055e1c86ac045 in display_mini_info (panel=0x55e1ca8856f0) at panel.c:1006
1006	    if (S_ISLNK (panel->dir.list[panel->selected].st.st_mode))
Missing separate debuginfos, use: dnf debuginfo-install glib2-2.58.1-1.fc29.x86_64 glibc-2.28-9.fc29.x86_64 gpm-libs-1.20.7-16.fc29.x86_64 libssh2-1.8.0-8.fc29.x86_64 openssl-libs-1.1.1-3.fc29.x86_64 pcre-8.42-4.fc29.x86_64 zlib-1.2.11-14.fc29.x86_64
(gdb) bt
#0  0x000055e1c86ac045 in display_mini_info (panel=0x55e1ca8856f0) at panel.c:1006
#1  0x000055e1c86b0fdb in panel_callback (w=0x55e1ca8856f0, sender=<optimized out>, msg=<optimized out>, 
    parm=<optimized out>, data=<optimized out>) at panel.c:3673
#2  0x000055e1c86a4404 in setup_panels () at layout.c:756
#3  0x000055e1c86a8e2d in midnight_callback (w=<optimized out>, sender=<optimized out>, msg=<optimized out>, 
    parm=0, data=<optimized out>) at midnight.c:1470
#4  0x000055e1c868f4c2 in send_message (data=0x0, parm=0, msg=MSG_RESIZE, sender=0x0, w=<optimized out>)
    at ../../lib/widget/widget-common.h:210
#5  dialog_switch_resize (d=<optimized out>) at dialog-switch.c:120
#6  dialog_change_screen_size () at dialog-switch.c:374
#7  0x000055e1c868f51d in mc_refresh () at dialog-switch.c:349
#8  0x000055e1c8710faf in dir_list_reload (list=list@entry=0x55e1ca885738, vpath=0x55e1ca892e50, 
    sort=0x55e1c870fc30 <sort_name>, sort_op=sort_op@entry=0x55e1ca8857a8, fltr=0x0) at dir.c:800
#9  0x000055e1c86ae366 in panel_reload (panel=panel@entry=0x55e1ca8856f0) at panel.c:4424
#10 0x000055e1c86ae578 in update_one_panel_widget (panel=0x55e1ca8856f0, flags=<optimized out>, 
    current_file=0x55e1ca979d10 "libicui18n.so.62.1") at panel.c:4028
#11 0x000055e1c86aeb69 in update_one_panel (
    current_file=0xffffffffffffffff <error: Cannot access memory at address 0xffffffffffffffff>, 
    flags=UP_OPTIMIZE, which=0) at panel.c:4049
#12 update_panels (flags=flags@entry=UP_OPTIMIZE, 
    current_file=current_file@entry=0xffffffffffffffff <error: Cannot access memory at address 0xffffffffffffffff>) at panel.c:4819
#13 0x000055e1c86866de in toggle_panels () at execute.c:554
#14 0x000055e1c870e73d in view_other_cmd () at cmd.c:1216
#15 0x000055e1c86a8975 in midnight_execute_cmd (sender=0x0, command=45) at midnight.c:1330
#16 0x000055e1c86a8f72 in midnight_callback (w=<optimized out>, sender=<optimized out>, msg=<optimized out>, 
    parm=16399, data=<optimized out>) at midnight.c:1565
#17 0x000055e1c86906e1 in send_message (data=0x0, parm=16399, msg=MSG_UNHANDLED_KEY, sender=0x0, w=0x55e1ca864800)
    at ../../lib/widget/widget-common.h:210
#18 dlg_key_event (d_key=16399, h=0x55e1ca864800) at dialog.c:489
#19 dlg_process_event (h=0x55e1ca864800, key=16399, event=<optimized out>) at dialog.c:1168
#20 0x000055e1c8690c61 in frontend_dlg_run (h=0x55e1ca864800) at dialog.c:541
#21 dlg_run (h=0x55e1ca864800) at dialog.c:1199
#22 0x000055e1c86a9e2c in do_nc () at midnight.c:1791
#23 0x000055e1c868474b in main (argc=<optimized out>, argv=<optimized out>) at main.c:409

Note

Original attachments:

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Oct 14, 2018 at 14:04 UTC (comment 1)

  • Description edited

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Oct 14, 2018 at 14:07 UTC (comment 2)

Please show the output of mc -V.

@mc-butler
Copy link
Author

Changed by nerijus (nerijus@….sourceforge.net) on Oct 14, 2018 at 14:16 UTC (comment 3)

$ LANG=C mc -V
GNU Midnight Commander 4.8.21
Built with GLib 2.56.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 internationalization support
With multiple codepages support
Virtual File Systems: cpiofs, tarfs, sfs, extfs, ftpfs, sftpfs, fish, smbfs
Data types: char: 8; int: 32; long: 64; void *: 64; size_t: 64; off_t: 64;

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Oct 14, 2018 at 14:25 UTC (comment 4)

Thanks.
Please describe step-by-step how to reproduce this bug.

@mc-butler
Copy link
Author

Changed by nerijus (nerijus@….sourceforge.net) on Oct 14, 2018 at 14:31 UTC (comment 5)

I often leave subshell opened (Ctrl-O). If I leave the terminal tab with mc for a while, then come back and press Ctrl-O in order to get back mc panels, it often crashes. It usually does not crash if I don't change the terminal tab.

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Oct 14, 2018 at 14:51 UTC (comment 6)

I do the same many times in a day. I never got such crashes.

#6  dialog_change_screen_size () at dialog-switch.c:374

This is strange. This means than SIGWINCH was received (the terminal window was resized). But window resize should not crash mc in any case.

I'm unable to reproduce this bug.

@mc-butler
Copy link
Author

Changed by nerijus (nerijus@….sourceforge.net) on Oct 14, 2018 at 14:58 UTC (comment 7)

I use https://github.com/asbru-cm/asbru-cm as a terminal emulator. Could probably be related to it. Is it possible to get some info from the coredump?

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Oct 20, 2018 at 15:55 UTC (comment 8)

Well, I used asbru-cm for several days and dind't get any crash.

@mc-butler
Copy link
Author

Changed by nerijus (nerijus@….sourceforge.net) on Oct 20, 2018 at 16:24 UTC (comment 9)

I updated asbru-cm and did not get the crash yet too. I used version 5.0.0 before. mc usually crashed when there were lots of files in a directory and it took quite a time for mc to scan them.

@mc-butler
Copy link
Author

Changed by atan (vitaliy.osypenko@….com) on Oct 22, 2018 at 8:14 UTC (comment 10)

I'm facing the same problem with Asbru CM (the latest 5.1.0) on Debian 9.5. MC segfaults very often after Ctrl-O.

GNU Midnight Commander 4.8.18
Built with GLib 2.50.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
Data types: char: 8; int: 32; long: 64; void *: 64; size_t: 64; off_t: 64;

@mc-butler
Copy link
Author

Changed by nerijus (nerijus@….sourceforge.net) on Oct 22, 2018 at 8:19 UTC (comment 11)

I've just got a segfault on the newest asbru and mc too.

@mc-butler
Copy link
Author

Changed by atan (vitaliy.osypenko@….com) on Oct 22, 2018 at 8:33 UTC (comment 12)

Forgot to mention, it also happens after mc editor exit.

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Oct 22, 2018 at 12:11 UTC

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Oct 22, 2018 at 12:13 UTC (comment 13)

Would you please test the attached patch?

@mc-butler
Copy link
Author

Changed by nerijus (nerijus@….sourceforge.net) on Oct 24, 2018 at 13:07 UTC (comment 14)

Just got a crash (with patch), but not when returning to mc by Ctrl-O, but by just doing nothing - I found mc crashed when returned to the terminal tab:

Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x000055617de361ea in display_mini_info (panel=0x55617e583080) at panel.c:1026
1026	    else if (DIR_IS_DOTDOT (panel->dir.list[panel->selected].fname))
Missing separate debuginfos, use: dnf debuginfo-install glib2-2.58.1-1.fc29.x86_64 glibc-2.28-9.fc29.x86_64 gpm-libs-1.20.7-16.fc29.x86_64 libX11-devel-1.6.7-1.fc29.x86_64 libXau-1.0.8-14.fc29.x86_64 libssh2-1.8.0-8.fc29.x86_64 libxcb-1.13.1-1.fc29.x86_64 openssl-libs-1.1.1-3.fc29.x86_64 pcre-8.42-4.fc29.x86_64 zlib-1.2.11-14.fc29.x86_64
(gdb) bt
#0  0x000055617de361ea in display_mini_info (panel=0x55617e583080) at panel.c:1026
#1  0x000055617de3b16b in panel_callback (w=0x55617e583080, sender=<optimized out>, msg=<optimized out>, 
    parm=<optimized out>, data=<optimized out>) at panel.c:3673
#2  0x000055617de2e594 in setup_panels () at layout.c:756
#3  0x000055617de32fbd in midnight_callback (w=<optimized out>, sender=<optimized out>, msg=<optimized out>, 
    parm=0, data=<optimized out>) at midnight.c:1470
#4  0x000055617de19522 in send_message (data=0x0, parm=0, msg=MSG_RESIZE, sender=0x0, w=<optimized out>)
    at ../../lib/widget/widget-common.h:210
#5  dialog_switch_resize (d=<optimized out>) at dialog-switch.c:120
#6  dialog_change_screen_size () at dialog-switch.c:374
#7  0x000055617de1957d in mc_refresh () at dialog-switch.c:349
#8  0x000055617de9b5ef in dir_list_reload (list=list@entry=0x55617e5830c8, vpath=0x55617e583c30, 
    sort=0x55617de9a270 <sort_name>, sort_op=sort_op@entry=0x55617e583138, fltr=0x0) at dir.c:800
#9  0x000055617de384f6 in panel_reload (panel=panel@entry=0x55617e583080) at panel.c:4424
#10 0x000055617de38708 in update_one_panel_widget (panel=0x55617e583080, flags=<optimized out>, 
    current_file=0x55617e5893b0 "native-20181022-194506-issues-8.xml") at panel.c:4028
#11 0x000055617de38d3b in update_one_panel (
    current_file=0xffffffffffffffff <error: Cannot access memory at address 0xffffffffffffffff>, flags=UP_OPTIMIZE, 
    which=0) at panel.c:4049
#12 update_panels (flags=flags@entry=UP_OPTIMIZE, 
    current_file=current_file@entry=0xffffffffffffffff <error: Cannot access memory at address 0xffffffffffffffff>)
    at panel.c:4817
#13 0x000055617de1073e in toggle_panels () at execute.c:559
#14 0x000055617de98d7d in view_other_cmd () at cmd.c:1216
#15 0x000055617de32b05 in midnight_execute_cmd (sender=0x0, command=45) at midnight.c:1330
#16 0x000055617de33102 in midnight_callback (w=<optimized out>, sender=<optimized out>, msg=<optimized out>, 
    parm=16399, data=<optimized out>) at midnight.c:1565
#17 0x000055617de1a741 in send_message (data=0x0, parm=16399, msg=MSG_UNHANDLED_KEY, sender=0x0, w=0x55617e558e40)
    at ../../lib/widget/widget-common.h:210
#18 dlg_key_event (d_key=16399, h=0x55617e558e40) at dialog.c:489
#19 dlg_process_event (h=0x55617e558e40, key=16399, event=<optimized out>) at dialog.c:1168
#20 0x000055617de1acc1 in frontend_dlg_run (h=0x55617e558e40) at dialog.c:541
#21 dlg_run (h=0x55617e558e40) at dialog.c:1199
#22 0x000055617de33fbc in do_nc () at midnight.c:1791
#23 0x000055617de0e7ab in main (argc=<optimized out>, argv=<optimized out>) at main.c:409

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Oct 26, 2018 at 8:43 UTC

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Oct 26, 2018 at 8:45 UTC (comment 15)

Please drop the 3943.patch​ patch and test the 3943_2.patch​ one.

@mc-butler
Copy link
Author

Changed by nerijus (nerijus@….sourceforge.net) on Oct 29, 2018 at 21:06 UTC (comment 16)

Seems to work without crashes so far.

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Nov 3, 2018 at 17:41 UTC (comment 17)

  • Milestone changed from Future Releases to 4.8.22
  • Owner set to andrew_b
  • Status changed from new to accepted

Branch: 3943_crash_ctrl_o.
[071dbd9]

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Nov 3, 2018 at 17:42 UTC (comment 18)

  • Votes set to amdrew_b nerijus
  • Branch state changed from no branch to approved

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Nov 3, 2018 at 17:44 UTC (comment 19)

  • Votes changed from amdrew_b nerijus to committed-master
  • Branch state changed from approved to merged
  • Status changed from accepted to testing
  • Resolution set to fixed

Merged to master: [791148e].

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Nov 3, 2018 at 17:45 UTC (comment 20)

  • Status changed from testing to closed

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on Oct 18, 2024 at 7:57 UTC (comment 21)

For backreference: #3976

https://bugs.launchpad.net/mc/+bug/1601999

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: core Issues not related to a specific subsystem prio: medium Has the potential to affect progress ver: 4.8.21 Reproducible in version 4.8.21
Development

No branches or pull requests

2 participants