You are not logged in.

#1 2011-12-07 05:32:53

jtkmt
Member
From: Japan
Registered: 2009-11-23
Posts: 14

[SOLVED] mc is slow to start up

After the last update, mc (midnight commander) takes more than 10 seconds to start up.
At the update, there was a message that $HOME/.mc moved to $HOME/.config/mc.
I tried deleting both direcotries and launching mc freshly, but it's same slow.
Is there anyone experiencing the same problem and knows the solution?

Last edited by jtkmt (2012-01-13 09:54:28)

Offline

#2 2011-12-07 05:54:50

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 17,462

Re: [SOLVED] mc is slow to start up

I did not have it on my system.  I installed and ran it.  It starts on the order of 100mS.  Sorry.

Can you tell us more about the environment? (Console, KDE4, Openbox, Gnome)?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2011-12-07 06:10:34

jtkmt
Member
From: Japan
Registered: 2009-11-23
Posts: 14

Re: [SOLVED] mc is slow to start up

Environment has nothing to do with. No difference even on console.
One weird thing I find is that the shell aliases I defined don't work and
customized $PS1 becomes just '$' in mc.

Offline

#4 2011-12-07 06:14:54

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 17,462

Re: [SOLVED] mc is slow to start up

My $PS1 works in mc here.  I know that does not help, but it is a data point.  BTW, I am launching it from the command line from within zsh


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#5 2011-12-07 06:27:01

jtkmt
Member
From: Japan
Registered: 2009-11-23
Posts: 14

Re: [SOLVED] mc is slow to start up

I don't have zsh installed, but same on sh and ast-ksh.
I use urxvt and tried on xterm, but same result.
I also found that Options>Configure options>Pause after run>Always
doesn't work.
I use the same .bashrc and .Xresources. What changed is only the location
of mc's config files.

Offline

#6 2011-12-07 07:10:04

itman
Member
From: Switzerland
Registered: 2010-05-21
Posts: 124

Re: [SOLVED] mc is slow to start up

it might be a far shot, but try to re-compile/re-install the slang pkg

Offline

#7 2011-12-07 09:39:00

bohoomil
Member
Registered: 2010-09-04
Posts: 2,376
Website

Re: [SOLVED] mc is slow to start up

I used to experience once or twice what the OP is writing about. (The prompt behaved exactly the same way.) I am unable to recall any crucial details of how I managed to resolve it, but any recompilation wasn't involved (IIRC). What I always start with, however, is reviewing my shell configs, locale & hostname variables. I'd suggest that you backup your .bashrc, double check your locale and networking variables (especially those two things). The problem lies somewhere there, not in the particular release of MC.


:: Registered Linux User No. 223384

:: github
:: infinality-bundle+fonts: good looking fonts made easy

Offline

#8 2011-12-07 12:19:24

bohoomil
Member
Registered: 2010-09-04
Posts: 2,376
Website

Re: [SOLVED] mc is slow to start up

OK, got it. Try running MC via an alias:

DISPLAY=;mc

I believe it should work.


:: Registered Linux User No. 223384

:: github
:: infinality-bundle+fonts: good looking fonts made easy

Offline

#9 2011-12-08 11:03:25

jtkmt
Member
From: Japan
Registered: 2009-11-23
Posts: 14

Re: [SOLVED] mc is slow to start up

Reinstalled mc and slang with pacman -Rns.
Renamed .bashrc and .bash_profile to find out what happens with default settings.
Tried 'LOCALE=C mc' and 'DISPLAY=;mc'.
All didn't work.

I found that root user has no this problem, which means that the cause resides in somewhere of my dotfiles.
Do I have to move all of them to somewhere else, put them back one by one and see the result? Daunting.

Offline

#10 2011-12-08 11:34:12

bohoomil
Member
Registered: 2010-09-04
Posts: 2,376
Website

Re: [SOLVED] mc is slow to start up

How do you log-in to the system as a user and the root? Do you run startx, or use a login manager? What DE/WM is your default one? It seems very unlikely that all your personal config files are to blame... I'd rather create a new user and re-create step by step a minimal working environment utilizing your current config files. I still believe the problem lies somewhere there -- in permissions (groups) or shell environment.


:: Registered Linux User No. 223384

:: github
:: infinality-bundle+fonts: good looking fonts made easy

Offline

#11 2011-12-08 11:45:59

Ashren
Member
From: Denmark
Registered: 2007-06-13
Posts: 1,226
Website

Re: [SOLVED] mc is slow to start up

Have you tried to strace mc? With strace you can identify where it hangs.

Offline

#12 2011-12-23 14:02:45

jtkmt
Member
From: Japan
Registered: 2009-11-23
Posts: 14

Re: [SOLVED] mc is slow to start up

Sorry for leaving long.
@bohoomil
Invoking mc in bash --noprofile makes no change.
@Ashren
I tried strace and found where mc stops with user and not with root. Following are the snippets of the outputs.

By the user in trouble at console, no X, just after login:

munmap(0xb77fa000, 4096)                = 0
chown32("/dev/pts/0", 1000, 5)          = -1 EPERM (Operation not permitted)
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb7337938) = 2851
waitpid(2851, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0) = 2851
--- {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=2851, si_status=0, si_utime=0, si_stime=0} (Child exited) ---
waitpid(1, 0xbf8e5dcc, WNOHANG|WSTOPPED) = -1 ECHILD (No child processes)
waitpid(2850, 0xbf8e5dcc, WNOHANG|WSTOPPED) = -1 ECHILD (No child processes)
sigreturn()                             = ? (mask now [])
ioctl(5, TIOCSPTLCK, [0])               = 0
ioctl(5, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(5, TIOCGPTN, [0])                 = 0
stat64("/dev/pts/0", {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
open("/dev/pts/0", O_RDWR|O_LARGEFILE)  = 6
fcntl64(6, F_SETFD, FD_CLOEXEC)         = 0
pipe([7, 8])                            = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb7337938) = 2852
write(5, " PROMPT_COMMAND='pwd>&8;kill -ST"..., 39) = 39
rt_sigaction(SIGINT, {0x808a240, [], 0}, NULL, 8) = 0
select(8, [5 7], NULL, NULL, {10, 0})   = 1 (in [5], left {9, 999993})
read(5, " PROMPT_COMMAND='pwd>&8;kill -ST"..., 128) = 40
select(8, [5 7], NULL, NULL, {9, 999993}) = 1 (in [5], left {9, 954209})
read(5, "\33[1;32m~$\33[0m  PR", 128)   = 17
select(8, [5 7], NULL, NULL, {9, 954209}) = 1 (in [5], left {9, 954204})
read(5, "OMPT_", 128)                   = 5
select(8, [5 7], NULL, NULL, {9, 954204}) = 1 (in [5], left {9, 954200})
read(5, "COM", 128)                     = 3
select(8, [5 7], NULL, NULL, {9, 954200}) = 1 (in [5], left {9, 954196})
read(5, "MAN", 128)                     = 3
select(8, [5 7], NULL, NULL, {9, 954196}) = 1 (in [5], left {9, 954192})
read(5, "D=", 128)                      = 2
select(8, [5 7], NULL, NULL, {9, 954192}) = 1 (in [5], left {9, 954188})
read(5, "'pw", 128)                     = 3
select(8, [5 7], NULL, NULL, {9, 954188}) = 1 (in [5], left {9, 954185})
read(5, "d>", 128)                      = 2
select(8, [5 7], NULL, NULL, {9, 954185}) = 1 (in [5], left {9, 954182})
read(5, "&8", 128)                      = 2
select(8, [5 7], NULL, NULL, {9, 954182}) = 1 (in [5], left {9, 954179})
read(5, ";k", 128)                      = 2
select(8, [5 7], NULL, NULL, {9, 954179}) = 1 (in [5], left {9, 954175})
read(5, "ill", 128)                     = 3
select(8, [5 7], NULL, NULL, {9, 954175}) = 1 (in [5], left {9, 954172})
read(5, " -", 128)                      = 2
select(8, [5 7], NULL, NULL, {9, 954172}) = 1 (in [5], left {9, 954168})
read(5, "S", 128)                       = 1
select(8, [5 7], NULL, NULL, {9, 954168}) = 1 (in [5], left {9, 954164})
read(5, "TO", 128)
select(8, [5 7], NULL, NULL, {9, 954164}) = 1 (in [5], left {9, 954161})
read(5, "P ", 128)                      = 2
select(8, [5 7], NULL, NULL, {9, 954161}) = 1 (in [5], left {9, 954158})
read(5, "$$", 128)                      = 2
select(8, [5 7], NULL, NULL, {9, 954158}) = 1 (in [5], left {9, 954143})
read(5, "'\r\33[C\33[C\33[C\33[K", 128) = 14
select(8, [5 7], NULL, NULL, {9, 954143}) = 0 (Timeout)
==== stops here for seconds ===
rt_sigaction(SIGINT, {SIG_IGN, [], 0}, NULL, 8) = 0
geteuid32()                             = 1000
getcwd("/home/jtkmt", 4096)             = 12
stat64("/home/jtkmt", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
stat64("/home/jtkmt", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0

By root at console, no X, just after login:

munmap(0xb76ef000, 4096)                = 0
chown32("/dev/pts/0", 0, 5)             = 0
chmod("/dev/pts/0", 0620)               = 0
ioctl(7, TIOCSPTLCK, [0])               = 0
ioctl(7, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(7, TIOCGPTN, [0])                 = 0
stat64("/dev/pts/0", {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
open("/dev/pts/0", O_RDWR|O_LARGEFILE)  = 8
fcntl64(8, F_SETFD, FD_CLOEXEC)         = 0
pipe([9, 10])                           = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb722c938) = 2798
write(7, " PROMPT_COMMAND='pwd>&10;kill -S"..., 40) = 40
rt_sigaction(SIGINT, {0x808a240, [], 0}, NULL, 8) = 0
select(10, [7 9], NULL, NULL, {10, 0})  = 1 (in [7], left {9, 999992})
read(7, " PROMPT_COMMAND='pwd>&10;kill -S"..., 128) = 41
select(10, [7 9], NULL, NULL, {9, 999992}) = 1 (in [7], left {9, 971540})
read(7, "\33[1;31m~#\33[0m  PR", 128)   = 17
select(10, [7 9], NULL, NULL, {9, 971540}) = 1 (in [7], left {9, 971534})
read(7, "OMPT", 128)                    = 4
select(10, [7 9], NULL, NULL, {9, 971534}) = 1 (in [7], left {9, 971530})
read(7, "_COM", 128)                    = 4
select(10, [7 9], NULL, NULL, {9, 971530}) = 1 (in [7], left {9, 971526})
read(7, "MAN", 128)                     = 3
select(10, [7 9], NULL, NULL, {9, 971526}) = 1 (in [7], left {9, 971522})
read(7, "D=", 128)                      = 2
select(10, [7 9], NULL, NULL, {9, 971522}) = 1 (in [7], left {9, 971507})
read(7, "'pw", 128)                     = 3
select(10, [7 9], NULL, NULL, {9, 971507}) = 1 (in [7], left {9, 971503})
read(7, "d>", 128)                      = 2
select(10, [7 9], NULL, NULL, {9, 971503}) = 1 (in [7], left {9, 971499})
read(7, "&10", 128)                     = 3
select(10, [7 9], NULL, NULL, {9, 971499}) = 1 (in [7], left {9, 971495})
read(7, ";k", 128)                      = 2
select(10, [7 9], NULL, NULL, {9, 971495}) = 1 (in [7], left {9, 971491})
read(7, "il", 128)                      = 2
select(10, [7 9], NULL, NULL, {9, 971491}) = 1 (in [7], left {9, 971487})
read(7, "l ", 128)                      = 2
select(10, [7 9], NULL, NULL, {9, 971487}) = 1 (in [7], left {9, 971483})
read(7, "-S", 128)                      = 2
select(10, [7 9], NULL, NULL, {9, 971483}) = 1 (in [7], left {9, 971479})
read(7, "TO", 128)                      = 2
select(10, [7 9], NULL, NULL, {9, 971479}) = 1 (in [7], left {9, 971459})
read(7, "P", 128)                       = 1
select(10, [7 9], NULL, NULL, {9, 971459}) = 1 (in [7], left {9, 971455})
read(7, " $", 128)                      = 2
select(10, [7 9], NULL, NULL, {9, 971455}) = 1 (in [7], left {9, 971451})
read(7, "$'\r\n", 128)                  = 4
select(10, [7 9], NULL, NULL, {9, 971451}) = 1 (in [9], left {9, 971340})
--- {si_signo=SIGCHLD, si_code=CLD_STOPPED, si_pid=2798, si_status=SIGSTOP, si_utime=1, si_stime=0} (Child exited) ---
waitpid(2798, [{WIFSTOPPED(s) && WSTOPSIG(s) == SIGSTOP}], WNOHANG|WSTOPPED) = 2798
waitpid(2797, 0xbfd23cdc, WNOHANG|WSTOPPED) = 0
sigreturn()                             = ? (mask now [])
read(9, "/root\n", 4097)                = 6
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
ioctl(8, TCFLSH, 0)                     = 0
kill(2798, SIGCONT)                     = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
--- {si_signo=SIGCHLD, si_code=CLD_CONTINUED, si_pid=2798, si_status=SIGCONT, si_utime=1, si_stime=0} (Child exited) ---
waitpid(2798, 0xbfd23c5c, WNOHANG|WSTOPPED) = 0
waitpid(2797, 0xbfd23c5c, WNOHANG|WSTOPPED) = 0
sigreturn()                             = ? (mask now [])
rt_sigaction(SIGINT, {SIG_IGN, [], 0}, NUkill(2797, SIGCONT)                     = 0
kill(2797, SIGCONT)                     = 0
write(4, "3", 1)                        = 1
read(5, "\3", 1)                        = 1
geteuid32()                             = 0
getcwd("/root", 4096)                   = 6
stat64("/root", {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0
stat64("/root", {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0

Last edited by jtkmt (2011-12-23 14:06:48)

Offline

#13 2012-01-13 09:49:15

jtkmt
Member
From: Japan
Registered: 2009-11-23
Posts: 14

Re: [SOLVED] mc is slow to start up

I finally pinpointed the problem. It was in hiding in .inputrc.

"\C-j": kill-whole-line

This keybinding does work, but mc users should keep C-j as default.
(Assigning it to other functions also causes a slow startup.)

Offline

#14 2015-04-13 14:24:57

x-yuri
Member
Registered: 2013-01-06
Posts: 133

Re: [SOLVED] mc is slow to start up

I had very similar issue:

0.000247 write(5, " PROMPT_COMMAND=${PROMPT_COMMAND"..., 75) = 75
0.000050 rt_sigaction(SIGINT, {0x449960, [], SA_RESTORER, 0x7fcaced23740}, NULL, 8) = 0
0.000034 select(8, [5 7], NULL, NULL, {10, 0}) = 1 (in [5], left {9, 999996})
0.000039 read(5, " PROMPT_COMMAND=${PROMPT_COMMAND"..., 128) = 76
0.000032 select(8, [5 7], NULL, NULL, {9, 999996}) = 1 (in [5], left {9, 985005})
0.015050 read(5, "[yuri@yuri ~]  PROM", 128) = 19
0.000031 select(8, [5 7], NULL, NULL, {9, 985005}) = 1 (in [5], left {9, 985001})
0.000036 read(5, "PT_COM", 128)    = 6
0.000026 select(8, [5 7], NULL, NULL, {9, 985001}) = 1 (in [5], left {9, 984998})
0.000033 read(5, "MAND=", 128)     = 5
0.000026 select(8, [5 7], NULL, NULL, {9, 984998}) = 1 (in [5], left {9, 984995})
0.000033 read(5, "${PR", 128)      = 4
0.000025 select(8, [5 7], NULL, NULL, {9, 984995}) = 1 (in [5], left {9, 984992})
0.000034 read(5, "OMPT", 128)      = 4
0.000025 select(8, [5 7], NULL, NULL, {9, 984992}) = 1 (in [5], left {9, 984989})
0.000034 read(5, "_COM", 128)      = 4
0.000026 select(8, [5 7], NULL, NULL, {9, 984989}) = 1 (in [5], left {9, 984986})
0.000034 read(5, "MAND", 128)      = 4
0.000025 select(8, [5 7], NULL, NULL, {9, 984986}) = 1 (in [5], left {9, 984983})
0.000033 read(5, ":+$", 128)       = 3
0.000025 select(8, [5 7], NULL, NULL, {9, 984983}) = 1 (in [5], left {9, 984980})
0.000033 read(5, "PRO", 128)       = 3
0.000025 select(8, [5 7], NULL, NULL, {9, 984980}) = 1 (in [5], left {9, 984977})
0.000033 read(5, "MPT", 128)       = 3
0.000025 select(8, [5 7], NULL, NULL, {9, 984977}) = 1 (in [5], left {9, 984974})
0.000033 read(5, "_CO", 128)       = 3
0.000025 select(8, [5 7], NULL, NULL, {9, 984974}) = 1 (in [5], left {9, 984971})
0.000033 read(5, "MMA", 128)       = 3
0.000026 select(8, [5 7], NULL, NULL, {9, 984971}) = 1 (in [5], left {9, 984968})
0.000032 read(5, "ND;", 128)       = 3
0.000025 select(8, [5 7], NULL, NULL, {9, 984968}) = 1 (in [5], left {9, 984965})
0.000033 read(5, " }", 128)        = 2
0.000026 select(8, [5 7], NULL, NULL, {9, 984965}) = 1 (in [5], left {9, 984962})
0.000033 read(5, "'pw", 128)       = 3
0.000025 select(8, [5 7], NULL, NULL, {9, 984962}) = 1 (in [5], left {9, 984959})
0.000033 read(5, "d>", 128)        = 2
0.000026 select(8, [5 7], NULL, NULL, {9, 984959}) = 1 (in [5], left {9, 984956})
0.000032 read(5, "&8;", 128)       = 3
0.000026 select(8, [5 7], NULL, NULL, {9, 984956}) = 1 (in [5], left {9, 984953})
0.000032 read(5, "ki", 128)        = 2
0.000025 select(8, [5 7], NULL, NULL, {9, 984953}) = 1 (in [5], left {9, 984950})
0.000033 read(5, "ll ", 128)       = 3
0.000026 select(8, [5 7], NULL, NULL, {9, 984950}) = 1 (in [5], left {9, 984947})
0.000032 read(5, "-S", 128)        = 2
0.000025 select(8, [5 7], NULL, NULL, {9, 984947}) = 1 (in [5], left {9, 984944})
0.000033 read(5, "TO", 128)        = 2
0.000025 select(8, [5 7], NULL, NULL, {9, 984944}) = 1 (in [5], left {9, 984941})
0.000033 read(5, "P ", 128)        = 2
0.000025 select(8, [5 7], NULL, NULL, {9, 984941}) = 1 (in [5], left {9, 984938})
0.000033 read(5, "$$", 128)        = 2
0.000033 select(8, [5 7], NULL, NULL, {9, 984938}) = 1 (in [5], left {9, 984935})
0.000034 read(5, "'\r\n", 128)     = 3
0.000025 select(8, [5 7], NULL, NULL, {9, 984935}) = 1 (in [5], left {9, 984886})
0.000082 read(5, "bash: PROMPT_COMMAND: line 1: sy"..., 128) = 128
0.000033 select(8, [5 7], NULL, NULL, {9, 984886}) = 1 (in [5], left {9, 984882})
0.000071 read(5, "tory -r; ; pwd>&8;kill -STOP $$'"..., 128) = 48
0.000061 select(8, [5 7], NULL, NULL, {9, 984882}) = 0 (Timeout)
9.995037 rt_sigaction(SIGINT, {SIG_IGN, [], SA_RESTORER, 0x7fcaced23740}, NULL, 8) = 0

But I resolved it with:

PROMPT_COMMAND= mc

Offline

Board footer

Powered by FluxBB