Ticket #86 (closed defect: fixed)
savannah: slow starting of mc
Reported by: | nijman | Owned by: | angel_il |
---|---|---|---|
Priority: | major | Milestone: | 4.8.2 |
Component: | mc-core | Version: | master |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Branch state: | merged | Votes for changeset: | committed-master committed-stable |
Description (last modified by ossi) (diff)
Original: http://savannah.gnu.org/bugs/?24038
Submitted by: | Ies Nijman <nijman> | Submitted on: | Mon 11 Aug 2008 03:21:54 PM UTC |
Category: | Core | Severity: | 3 - Normal |
Status: | None | Privacy: | Public |
Assigned to: | None | Open/Closed: | Open |
Release: | 4.6.2-pre1 | Operating System: | Other |
Original submission:
On openSuse 11 starting mc takes a very long time: about 30s. IpV6 is disabled but VMware player is installed and so virtual network devices are present. nslookup and netstat work immidiately so it isn't the gethostbyname issue. A solution would be greatly appreciated.
Comment 1 by Oswald Buddenhagen <ossi> at Tue 12 Aug 2008 10:07:17 AM UTC:
you should attach the strace of such a startup.
Comment 2 by Ies Nijman <nijman> at Tue 12 Aug 2008 11:26:57 AM UTC:
Strace output added. Funny thing is that with strace, MC starts up rightaway... (file #16277)
Comment 3 by Ies Nijman <nijman> at Tue 12 Aug 2008 12:43:53 PM UTC:
Previous results were from MC 4.6.1 (fast starting). Next slow results from MC 4.6.2 and a strace file.
Comment 4 by Ies Nijman <nijman> at Tue 12 Aug 2008 02:28:09 PM UTC:
New strace file attached, now with timestamps. It seems to timeout several times on "RESOLVE-HOSTNAME-IPV4" Strange because if I do nslookup with this host name it returns immediately.. (file #16281)
Comment 5 by Irakli <ika256> at Wed 03 Sep 2008 07:29:31 AM UTC:
I had this problem too Solution is: add "options no_tld_query" in resolv.conf
Comment 6 by Sorin Sbarnea <sorin> at Tue 07 Oct 2008 10:54:29 AM UTC:
I can confirm the same issue on multiple platform: OS X, Fedora and Ubuntu. It's a real pain and this should be solved inside mc - mc is used as a configuration tools and it's supposed to work even on systems where configuration is not "well done". BTW. The solution with "options no_tld_query" in resolv.conf does not solves the problem in my case. I don't remember exactly but I think it's somewhat related to /etc/hosts
Comment 7 by Sorin Sbarnea <sorin> at Thu 18 Dec 2008 10:48:06 AM UTC:
I can (re)confirm this problem on RHEL also. The DNS is well configured. There is no delay running "netstat -a" I wasn't able to locate any other program with simmilar behaviour on these machines. Possible hint: some partitions are mounted using NIS. If you are searching on google after "midnight commander slow start" you'll see that a lot of people are encountering this issue.
Comment 8 by Sorin Sbarnea <sorin> at Thu 18 Dec 2008 10:58:47 AM UTC:
I would like to add that I have the same problem with version 4.6.1-pre1a and that "options no_tld_query" in resolv.conf does not work (tested even after system restart)
Comment 9 by Sorin Sbarnea <sorin> at Thu 18 Dec 2008 11:17:09 AM UTC:
If this helps: I have some NFS mounted drives but none of them if in one of the mc panes.
Attachments
Change History
Changed 16 years ago by slavazanko
- Attachment 16277-strace_mc.txt added
comment:2 Changed 15 years ago by angel_il
- Type changed from defect to enhancement
- severity set to no branch
comment:3 Changed 13 years ago by ramas
I can add that I am running this problem while on SSH from Putty (windows PC).
Running strace I saw that the startup pauses while trying to connect to port 6000 of my windows machine.
As a workaround I unset the DISPLAY shell variable and now mc starts fast as expected.
comment:5 Changed 13 years ago by ossi
suppressing the problem should be as simple as checking whether WINDOWID is set in addition to DISPLAY before trying XOpenDisplay(). this ensures that mc is running directly inside xterm (or pretty much any other x terminal emulator) and consequently whether making the X connection seems to make sense at all (it's used for keyboard modifier tracking, to work around tty layer deficiencies). on the downside, it would also break modifier tracking for remote shells inside xterm which *do* have configured DISPLAY correctly (fixable with ssh (SendEnv? WINDOWID in ssh_config, AcceptEnv? WINDOWID in sshd_config), but needs root to fix. telnet also has an environment sending option. 'sux -' would be a problem, i think).
the alternative is setting an alarm() over the XOpenDisplay() (5 seconds ought to be enough) and printing "Connection to X server timed out. Please fix or clear $DISPLAY in the future."
comment:6 Changed 13 years ago by angel_il
- Status changed from new to accepted
- Version set to master
- Branch state set to on review
- Milestone changed from Future Releases to 4.8.1
- Owner set to angel_il
- Type changed from enhancement to defect
branch: 86_disable_x11_flag
comment:7 Changed 13 years ago by IceMan
Available binary packages with fixes applied (nightly build 4:4.8.0~git20111028-2) For Debian\Ubuntu see https://www.midnight-commander.org/wiki/Binaries.
comment:8 Changed 13 years ago by slavazanko
- Branch state changed from on review to on rework
New option should be described in MAN page.
comment:12 Changed 13 years ago by angel_il
please review
comment:14 Changed 13 years ago by slavazanko
- Votes for changeset changed from andrew_b to andrew_b slavazanko
- Branch state changed from on review to approved
comment:15 Changed 13 years ago by angel_il
- Status changed from accepted to testing
- Votes for changeset changed from andrew_b slavazanko to committed-master
- Resolution set to fixed
- Branch state changed from approved to merged
comment:16 Changed 13 years ago by angel_il
cherry-picked into 4.8.1-stable 3e15b5af6450a2c93e3caf289fad3e8cf11ce89d
comment:18 Changed 13 years ago by andrew_b
- Votes for changeset changed from committed-master to committed-master committed-stable
comment:19 Changed 11 years ago by ossi
- Description modified (diff)
- Reporter changed from slavazanko to nijman
added by nijman