Ticket #2333 (closed defect: invalid)

Opened 14 years ago

Last modified 14 years ago

Mc hangs after exit

Reported by: tempread Owned by: andrew_b
Priority: minor Milestone: 4.7.5
Component: mc-core Version: 4.7.4
Keywords: Cc:
Blocked By: Blocking:
Branch state: Votes for changeset: committed-master committed-stable

Description (last modified by andrew_b) (diff)

On some FreeBSD servers i have sometimes bug: when i try to exit from mc it hangs. More detail:
1.run mc, press F10, press Enter - hangs
2.run mc, press F10, choose Command->File->Exit - NOT hangs.

When i remove /tmp/mc-root(i have many mc.pipe files there) problem disappear.

After some experiments i found how i can repeat problem at any server:
=====
run mc, remove contents of /tmp/mc-root(using started mc),exit from mc.
And:
run mc, press F10,press Enter - hangs
=====

=====
run mc, remove contents of /tmp/mc-root(using started mc),exit from mc.
And:
run mc, press F10, choose Command->File->Exit - NOT hangs.
=====

Change History

comment:1 Changed 14 years ago by andrew_b

Show the result of mc -V.

comment:2 Changed 14 years ago by tempread

GNU Midnight Commander 4.7.2
Virtual File Systems: tarfs, extfs, cpiofs, ftpfs, fish, smbfs
With builtin Editor
Using system-installed S-Lang library with terminfo database
With subshell support as default
With support for background operations
With mouse support on xterm
With internationalization support
With multiple codepages support
Data types: char: 8; int: 32; long: 32; void *: 32; size_t: 32; off_t: 64;

comment:3 follow-up: ↓ 4 Changed 14 years ago by tempread

I can not edit first message if someone can change it to this:

On some FreeBSD servers i have sometimes bug: when i try to exit from mc it hangs.More detail:
1.run mc, press F10, press Enter - hangs
2.run mc, press F10, choose Command->File->Exit - NOT hangs.

When i remove /tmp/mc-root(i have many mc.pipe files there) problem disappear.

After some experiments i found how i can repeat problem at any server:
=====
run mc, remove contents of /tmp/mc-root(using started mc),exit from mc.
And:
run mc, press F10,press Enter - hangs
=====

=====
run mc, remove contents of /tmp/mc-root(using started mc),exit from mc.
And:
run mc,press F10,choose Command->File->Exit - NOT hangs.
=====

comment:4 in reply to: ↑ 3 ; follow-up: ↓ 5 Changed 14 years ago by andrew_b

  • Description modified (diff)

Replying to tempread:

I can not edit first message if someone can change it to this:

Done.

Does mc hang up with disabled subshell support (mc -u)?

comment:5 in reply to: ↑ 4 Changed 14 years ago by tempread

Replying to andrew_b:

Replying to tempread:

I can not edit first message if someone can change it to this:

Done.

Does mc hang up with disabled subshell support (mc -u)?

It is not hang up.

Unfortunately problem sometimes appear and sometimes disappear.

Please try another way to reproduce problem:
1.Run mc
2.Ctrl-O
3.killall mc
4.Then try run mc again
5.Press F10 and Enter - hangs(Command->File->Exit - always NOT hangs)

Note:"hangs" means not crash only hangs("ctrl+z" - suspend and "fg" work)

comment:6 follow-up: ↓ 7 Changed 14 years ago by tempread

I spent many time for reading code and found problem.

When we try "F10 and enter" mc change dir(using func subshell_chdir) AFTER deleting pipe file.

When we press F9, choose "Command->File->Exit" mc change dir(using func subshell_chdir) BEFORE deleting pipe file.

I tried to comment lines at subshell.c:
if (unlink (tcsh_fifo) == -1)
fprintf (stderr, "Cannot remove named pipe %s: %s\r\n",
tcsh_fifo, unix_error_string (errno));
(and remove pipe file by hand after exiting from mc) - mc never hangs.

comment:7 in reply to: ↑ 6 Changed 14 years ago by andrew_b

Replying to tempread:

When we try "F10 and enter" mc change dir(using func subshell_chdir) AFTER deleting pipe file.

When we press F9, choose "Command->File->Exit" mc change dir(using func subshell_chdir) BEFORE deleting pipe file.

This is a result of some incorrect work of dialog manager. Thanks for investigation!

comment:8 Changed 14 years ago by andrew_b

  • Status changed from new to accepted
  • Keywords stable-candidate added
  • severity changed from no branch to on review
  • Owner set to andrew_b
  • Milestone changed from 4.7 to 4.7.4

Created 2333_hangup_after_exit branch. Parent branch is master.
changeset:aa55256b70c341f27efe2a500ed4781233d128f7

Created 2333_hangup_after_exit_stable branch. Parent branch is 4.7.0-stable.
changeset:6a7cd5f7693ccfb67cf0d69223c1e127fe119373

comment:9 Changed 14 years ago by angel_il

  • Votes for changeset set to angel_il

comment:10 Changed 14 years ago by slavazanko

  • Votes for changeset changed from angel_il to angel_il slavazanko

comment:11 Changed 14 years ago by slavazanko

  • severity changed from on review to approved

comment:12 Changed 14 years ago by andrew_b

  • Status changed from accepted to testing
  • Votes for changeset changed from angel_il slavazanko to committed-master committed-stable
  • severity changed from approved to merged
  • Milestone changed from 4.7.4 to 4.7.5
  • Keywords stable-candidate removed
  • Resolution set to fixed

comment:13 Changed 14 years ago by andrew_b

  • Status changed from testing to closed

comment:14 follow-up: ↓ 15 Changed 14 years ago by amd_miek

  • Status changed from closed to reopened
  • Priority changed from major to minor
  • Version changed from 4.7.2 to 4.7.4
  • Resolution fixed deleted

I've got MC on FreeBSD 8.1 Stable (FreeBSD 8.1-STABLE #0 r213171M: Sat Sep 25 22:26:55 MSD 2010)
And lastest MC aviable from ports collection, I've updated it yesterday. - mc-4.7.4_2 Midnight Commander, a free Norton Commander Clone

As far as I remember I've got too hangs on F10-Enter for a some time, few months at least. I've updated MC and whole system few times so I can't say when exactly I've got this bug, but now I'm running lastest MC and it's still here. Ordinary I work as root (I know, I'm pretty baaaad) and run MC as root and everything goes great and there's no hang ups on F10-Enter exit. But when I'm trying F10-Enter exit as non-root user, but I must admit - wheel-group and operator too member, so there's a lots of privelegies, it hangs up. I've tried to reinstall, to remove /tmp MC's files and so on - useless. But under user it exits with F10-File-Exit or O C (interrupt from subshell)
That's my bug

comment:15 in reply to: ↑ 14 Changed 14 years ago by andrew_b

  • Status changed from reopened to closed
  • Resolution set to invalid

Replying to amd_miek:

mc-4.7.4_2

Milestone of this bug is 4.7.5. You should use current master snapshot from git or wait for 4.7.5 release.

Note: See TracTickets for help on using tickets.