Ticket #3943 (closed defect: fixed)
crash when returning to panels by pressing Ctrl-O
Reported by: | nerijus | Owned by: | andrew_b |
---|---|---|---|
Priority: | major | Milestone: | 4.8.22 |
Component: | mc-core | Version: | 4.8.21 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Branch state: | merged | Votes for changeset: | committed-master |
Description (last modified by andrew_b) (diff)
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
Attachments
Change History
comment:3 Changed 6 years ago by nerijus
$ 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;
comment:4 Changed 6 years ago by andrew_b
Thanks.
Please describe step-by-step how to reproduce this bug.
comment:5 Changed 6 years ago by nerijus
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.
comment:6 Changed 6 years ago by andrew_b
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.
comment:7 Changed 6 years ago by nerijus
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?
comment:8 Changed 6 years ago by andrew_b
Well, I used asbru-cm for several days and dind't get any crash.
comment:9 Changed 6 years ago by nerijus
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.
comment:10 Changed 6 years ago by atan
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;
comment:11 Changed 6 years ago by nerijus
I've just got a segfault on the newest asbru and mc too.
comment:12 Changed 6 years ago by atan
Forgot to mention, it also happens after mc editor exit.
comment:13 Changed 6 years ago by andrew_b
Would you please test the attached patch?
comment:14 Changed 6 years ago by nerijus
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
comment:15 Changed 6 years ago by andrew_b
Please drop the 3943.patch patch and test the 3943_2.patch one.
comment:16 Changed 6 years ago by nerijus
Seems to work without crashes so far.
comment:17 Changed 6 years ago by andrew_b
- Owner set to andrew_b
- Status changed from new to accepted
- Milestone changed from Future Releases to 4.8.22
Branch: 3943_crash_ctrl_o.
changeset:071dbd907684560fc30c2b57073a367c4c478bcb
comment:18 Changed 6 years ago by andrew_b
- Votes for changeset set to amdrew_b nerijus
- Branch state changed from no branch to approved
comment:19 Changed 6 years ago by andrew_b
- Status changed from accepted to testing
- Votes for changeset changed from amdrew_b nerijus to committed-master
- Resolution set to fixed
- Branch state changed from approved to merged
Merged to master: [791148ed667b31b859a3891ae2ccc3725e0e06fa].
comment:21 Changed 7 weeks ago by zaytsev
For backreference: #3976