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

[patch] mc coredumps on exit #2008

Closed
mc-butler opened this issue Feb 6, 2010 · 9 comments
Closed

[patch] mc coredumps on exit #2008

mc-butler opened this issue Feb 6, 2010 · 9 comments
Assignees
Labels
area: core Issues not related to a specific subsystem prio: medium Has the potential to affect progress ver: 4.7.0.2 Reproducible in version 4.7.0.2
Milestone

Comments

@mc-butler
Copy link

Important

This issue was migrated from Trac:

Origin https://midnight-commander.org/ticket/2008
Reporter fjoe (fjoe@….net)

When exiting mc crashes with following message:

read (subshell_pty ...): Bad address (14)

Subshell should be enabled and panels should be on (visible) to reproduce this bug.

Stack trace is:

(gdb) bt
#0 0x000000080118fa3c in kill () from /lib/libc.so.7
#1 0x000000080118e83b in abort () from /lib/libc.so.7
#2 0x0000000000451a72 in feed_subshell (how=0, fail_on_error=0) at subshell.c:1006
#3 0x00000000004515dc in do_subshell_chdir (directory=0x8026c1060 "/usr/home/fjoe/Downloads", do_update=0,

reset_prompt=1) at subshell.c:844

#4 0x000000000044b042 in get_parent_dir_name (cwd=0x7fffffffe340 "\220����\177",

lwd=0x472e3e "��L\211���\213��������n���fff\220fff\220ff\220ff\220H\211
H \2 11 l �H\203�\030H\205�t-�����H\211�H\211��M���H\211�H\211��~\213��H\211�H\213l$\020H\213
$\bH\203�\030�H\215=��\004") at main.c:440

#5 0x000000000041603d in panel_callback (w=0x8026c1000, msg=WIDGET_FOCUS, parm=0) at screen.c:2842
#6 0x000000000040d686 in dlg_focus (h=0x8026c1000) at dialog.c:403
#7 0x000000000040d6f0 in dlg_focus () at dialog.c:409
#8 0x000000000040d9f4 in do_select_widget (h=0x8026982b0, w=0x80267d280, dir=SELECT_EXACT) at dialog.c:521
#9 0x000000000040de71 in dlg_key_event (h=0x8026982b0, d_key=274) at dialog.c:701
#10 0x000000000040df0e in dlg_key_event (h=0x8026982b0, d_key=274) at dialog.c:723
#11 0x000000000040e34f in frontend_run_dlg (h=0x40e34f) at dialog.c:842
#12 0x000000000040e435 in run_dlg (h=0x112026982b0) at dialog.c:871
#13 0x000000000040e49e in destroy_dlg (h=0x40e49e) at dialog.c:883
#14 0x000000000044e031 in prepend_cwd_on_local (filename=0x8026982b0 "") at main.c:1806
#15 0x000000000044e3bd in OS_Setup () at main.c:1911
#16 0x000000000044ec33 in main (argc=1, argv=0x7fffffffe688) at main.c:2240

The reason is that pty_buffer becomes NULL when event is processed (when exit_subshell() is called), but after event is processed panel_callback is called with msg=WIDGET_FOCUS which in turns leads to feed_subshell being called.

Quick workaround attached.

Note

Original attachments:

@mc-butler
Copy link
Author

Changed by fjoe (fjoe@….net) on Feb 6, 2010 at 9:44 UTC

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Feb 7, 2010 at 8:50 UTC

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Feb 7, 2010 at 8:54 UTC

Replying to fjoe (#2008):

The reason is that pty_buffer becomes NULL when event is processed (when exit_subshell() is called), but after event is processed panel_callback is called with msg=WIDGET_FOCUS which in turns leads to feed_subshell being called.

Quick workaround attached.

I have never seen this crash. Would you try my alternative patch 0001-Ticket-2008-reimplemented-pty_buffer-as-static-buf.patch?

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Feb 15, 2010 at 17:27 UTC (comment 2)

  • Severity changed from no branch to on review
  • Status changed from new to accepted
  • Owner set to andrew_b

Created 2008_pty_buffer branch. Parent branch is master.
[06ed7da041cee4584f0315be85d9cb55834aeffb]

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Feb 15, 2010 at 17:29 UTC (comment 3)

  • Milestone changed from 4.7 to 4.7.1

@mc-butler
Copy link
Author

Changed by angel_il (@ilia-maslakov) on Feb 16, 2010 at 10:21 UTC (comment 4)

  • Votes set to angel_il

@mc-butler
Copy link
Author

Changed by slavazanko (@slavaz) on Feb 19, 2010 at 8:14 UTC (comment 5)

  • Votes changed from angel_il to angel_il slavazanko
  • Severity changed from on review to approved

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Feb 19, 2010 at 8:49 UTC (comment 6)

  • Severity changed from approved to merged
  • Resolution set to fixed
  • Status changed from accepted to testing
  • Votes changed from angel_il slavazanko to commited-master

Merged to master.
[163b07d]

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Feb 19, 2010 at 8:54 UTC (comment 7)

  • Status changed from testing to closed
  • Votes changed from commited-master to commited-master commited-stable

Cherry-picked to 4.7.0-stable.
[1d8df79]

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.7.0.2 Reproducible in version 4.7.0.2
Development

No branches or pull requests

2 participants