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

savannah: slow starting of mc #86

Closed
mc-butler opened this issue Dec 26, 2008 · 21 comments
Closed

savannah: slow starting of mc #86

mc-butler opened this issue Dec 26, 2008 · 21 comments
Labels
area: core Issues not related to a specific subsystem prio: medium Has the potential to affect progress
Milestone

Comments

@mc-butler
Copy link

Important

This issue was migrated from Trac:

Origin https://midnight-commander.org/ticket/86
Reporter nijman

Original: http://savannah.gnu.org/bugs/?24038

Submitted by:Ies Nijman <nijman>Submitted on:Mon 11 Aug 2008 03:21:54 PM UTC
Category:CoreSeverity:3 - Normal
Status:NonePrivacy:Public
Assigned to:NoneOpen/Closed:Open
Release:4.6.2-pre1Operating 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.

Note

Original attachments:

@mc-butler
Copy link
Author

Changed by slavazanko (@slavaz) on Dec 26, 2008 at 10:43 UTC

added by nijman

@mc-butler
Copy link
Author

Changed by slavazanko (@slavaz) on Dec 26, 2008 at 10:43 UTC

added by nijman

@mc-butler
Copy link
Author

Changed by styx (@styx) on May 25, 2009 at 7:18 UTC (comment 1)

  • Milestone set to future releases

@mc-butler
Copy link
Author

Changed by angel_il (@ilia-maslakov) on Apr 8, 2010 at 10:13 UTC (comment 2)

  • Severity set to no branch
  • Type changed from defect to enhancement

@mc-butler
Copy link
Author

Changed by ramas on Jun 9, 2011 at 9:48 UTC (comment 3)

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.

@mc-butler
Copy link
Author

Changed by slavazanko (@slavaz) on Jun 9, 2011 at 9:52 UTC (comment 4)

thanks for tip!

@mc-butler
Copy link
Author

Changed by ossi (@ossilator) on Jun 9, 2011 at 16:09 UTC (comment 5)

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."

@mc-butler
Copy link
Author

Changed by angel_il (@ilia-maslakov) on Oct 28, 2011 at 12:16 UTC (comment 6)

  • Status changed from new to accepted
  • Owner set to angel_il
  • Milestone changed from Future Releases to 4.8.1
  • Branch state set to on review
  • Version set to master
  • Type changed from enhancement to defect

branch: 86_disable_x11_flag

@mc-butler
Copy link
Author

Changed by IceMan (@tataranovich) on Oct 29, 2011 at 6:58 UTC (comment 7)

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.

@mc-butler
Copy link
Author

Changed by slavazanko (@slavaz) on Oct 29, 2011 at 11:16 UTC (comment 8)

  • Branch state changed from on review to on rework

New option should be described in MAN page.

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Dec 15, 2011 at 8:59 UTC (comment 9)

  • Milestone changed from 4.8.1 to Future Releases

@mc-butler
Copy link
Author

Changed by angel_il (@ilia-maslakov) on Dec 15, 2011 at 9:17 UTC (comment 10)

  • Milestone changed from Future Releases to 4.8.2

@mc-butler
Copy link
Author

Changed by angel_il (@ilia-maslakov) on Dec 16, 2011 at 11:30 UTC (comment 11)

  • Branch state changed from on rework to on review

@mc-butler
Copy link
Author

Changed by angel_il (@ilia-maslakov) on Dec 21, 2011 at 7:48 UTC (comment 12)

please review

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Dec 22, 2011 at 5:18 UTC (comment 13)

  • Votes set to andrew_b

@mc-butler
Copy link
Author

Changed by slavazanko (@slavaz) on Dec 22, 2011 at 7:10 UTC (comment 14)

  • Branch state changed from on review to approved
  • Votes changed from andrew_b to andrew_b slavazanko

@mc-butler
Copy link
Author

Changed by angel_il (@ilia-maslakov) on Dec 22, 2011 at 7:22 UTC (comment 15)

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

Fixed: [847b109]

@mc-butler
Copy link
Author

Changed by angel_il (@ilia-maslakov) on Dec 22, 2011 at 7:37 UTC (comment 16)

cherry-picked into 4.8.1-stable [3e15b5a]

@mc-butler
Copy link
Author

Changed by angel_il (@ilia-maslakov) on Dec 22, 2011 at 7:38 UTC (comment 17)

  • Status changed from testing to closed

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Jan 15, 2012 at 15:34 UTC (comment 18)

  • Votes changed from committed-master to committed-master committed-stable

@mc-butler
Copy link
Author

Changed by ossi (@ossilator) on Jan 11, 2014 at 23:04 UTC (comment 19)

  • Reporter changed from slavazanko to nijman
  • Description edited

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
Development

No branches or pull requests

1 participant