1

I recently discovered that my MidnightCommander takes around 40 seconds for every startup and the same goes for McEdit.

I access my machine only via ssh and of course I'm not logging in as root, only to prevent the questions.

I did an strace and it puts out two system calls that take around 20 seconds:

poll([{fd =3, events=POLLIN}], 1, -1) = 1 ([{fd=3, revents=POLLIN}]) select(5, [4], NULL, NULL, NULL) = 1 (in [4])

Unfortunately I don't have the heck of a clue what these calls are, any hints or help would be appreciated, thanks in advance!

Update: If I do a sudo mc it works as usual, only with my accout it does take that long.

Solution: The solution is simple, I had X11 forwarding in Putty enabled, after deactivating it everything works like a charm. Strange, but anyway, it works again.

Thanks for your answers!

  • You should ask them about this via the mail list or a bug report. I've been using mc (but never the internal editor) constantly, everywhere I work, for years and years, and never seen it take more than a second (two would indicate a very busy machine) even remotely on a wimpy little system. Of course first make sure the system isn't constantly busy... – goldilocks Apr 23 '14 at 8:51
  • Thanks, I will if no solution pops up. At least I know it's not about the busyness, the machine has way enough resources left for this little task! – Mäx Müller Apr 23 '14 at 9:10
  • You need to scroll back in the trace and find what is opened on that file descriptor. – Gilles 'SO- stop being evil' Apr 23 '14 at 21:24
1

I have had similar problem. Check if your hostname is properly resolved to IP address. If not, try to add your hostname to /etc/hosts eg.:

127.0.0.2 myhostname myhostname.mydomain

  • I'm a bit confused, the /etc/hosts says 127.0.1.1 myhost Can this be right? Sounds wrong to me, but I don't know. – Mäx Müller Apr 23 '14 at 9:12
  • It's ok. loopback has address network 127.0.0.0/8 – Artur Szymczak Apr 23 '14 at 9:15
  • Alright, so this is not the solution. I updated the question because I discovered that everything is fine if I call mc via sudo, any ideas? – Mäx Müller Apr 23 '14 at 9:17
  • Could you post your strace on pastebin? And another strace with -c – Artur Szymczak Apr 23 '14 at 9:21
  • strace -c: pastebin.com/SxQUrXP2 strace:pastebin.com/pFbiWGYC – Mäx Müller Apr 23 '14 at 9:33
0

I have a similar problem when X forwarding is on, but X server is not running on my client. You have to use the -X or --no-x11 command line parameter with mc to prevent waiting for a timeout (which may be only 2 seconds, not 40).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.