Re: mc-4.8.14 hangs on select for 10 seconds at startup

2015-10-13 Thread Mike
Thank you very much for investigating this issue. At least we know the 
source of the trouble.


I have to say I'd forgotten about the problem. At the time I was 
installing Arch Linux
to a new box and wanted to use my own compiled mc instead of the factory 
supplied
version. I had much trouble with the factory login scripts and ended up 
completely redoing
them. They were very convoluted and I stripped them down to something 
simple.

The problem went away and I haven't seen it since.
I also recall it only happened with my compiled version of mc and not 
the binary version

that came with the system. Arch has all kinds of oddball hacks to it.

My PROMPT_COMMAND is normal now:

echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"

as set in /etc/bash.bashrc, and no problems these days. I do not recall 
what it was at the

time, and I cannot find any trace of old PROMPT_COMMAND variables.

I've had trouble with subshell from the start on this system. 
Occasionally something happens
on return from command and subshell hangs. CTRL-C will break it. Other 
times it hangs on return
and I have to kill the terminal window. I have not figured what triggers 
these situations yet.
It could be something with factory bash from Arch. When I had 
PROMPT_COMMAND issues

I had no subshell at all.



--
Peace and Cheer

___
mc-devel mailing list
https://mail.gnome.org/mailman/listinfo/mc-devel


Re: mc-4.8.14 hangs on select for 10 seconds at startup

2015-10-12 Thread Egmont Koblinger
The upstream ticket for this issue (caused by the semicolon at the end
of PROMPT_COMMAND) is at:
https://www.midnight-commander.org/ticket/3534

e.

On Mon, Jun 1, 2015 at 2:53 AM, Mooffie  wrote:
> On 6/1/15, Mike Smithson  wrote:
>> On startup it hangs for 10 seconds, apparently on a select() call.
>> I've edited this strace dump for brevity:
>> ...
>> 04:20:19 read(6, "-S", 128) = 2
>> 04:20:19 select(9, [6 8], NULL, NULL, {9, 971293}) = 1 (in [6], left {9,
>> 971287})
>> 04:20:19 read(6, "TO", 128) = 2
>> 04:20:19 select(9, [6 8], NULL, NULL, {9, 971287}) = 1 (in [6], left {9,
>> 971281})
>> 04:20:19 read(6, "P ", 128) = 2
>> 04:20:19 select(9, [6 8], NULL, NULL, {9, 971281}) = 1 (in [6], left {9,
>> 971275})
>> 04:20:19 read(6, "$$", 128) = 2
>> 04:20:19 select(9, [6 8], NULL, NULL, {9, 971275}) = 1 (in [6], left {9,
>> 971269})
>> 04:20:19 read(6, "'\r\n", 128)  = 3
>> 04:20:19 select(9, [6 8], NULL, NULL, {9, 971269}) = 1 (in [6], left {9,
>> 970702})
>> 04:20:19 read(6, "bash: PROMPT_COMMAND: line 1: sy"..., 128) = 128
>> 04:20:19 select(9, [6 8], NULL, NULL, {9, 970702}) = 1 (in [6], left {9,
>> 970700})
>> 04:20:19 read(6, "STOP $$'\r\n[miven@cobra ~]$ ", 128) = 27
>> 04:20:19 select(9, [6 8], NULL, NULL, {9, 970700}) = 0 (Timeout)
>> ...[10 seconds of nothing]...
>
>
> Two people report the same (or similar) problem here:
>
> https://bbs.archlinux.org/viewtopic.php?id=131530
>
> See the last three comments there: try clearing the PROMPT_COMMAND env
> variable, or disabling your keybindings in .inputrc (such bindings can
> also be in your shell's startup file(s) in the form of "bind"
> command(s)).
> ___
> mc-devel mailing list
> https://mail.gnome.org/mailman/listinfo/mc-devel
___
mc-devel mailing list
https://mail.gnome.org/mailman/listinfo/mc-devel


mc-4.8.14 hangs on select for 10 seconds at startup

2015-05-31 Thread Mike Smithson

I'm working over a Mandriva 2011 distro to get it working just the
way I like it. It came with mc-4.7.53, and it works. I decided to
compile 4.8.14 on the PC, pretty standard stuff:

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

On startup it hangs for 10 seconds, apparently on a select() call.
I've edited this strace dump for brevity:

[code]
...
04:20:19 open(/dev/ptmx, O_RDWR)  = 6
04:20:19 statfs(/dev/pts, {f_type=DEVPTS_SUPER_MAGIC, f_bsize=4096,  
f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0},  
f_namelen=255, f_frsize=4096}) = 0
04:20:19 ioctl(6, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or  
TCGETS, {B38400 opost isig icanon echo ...}) = 0

04:20:19 ioctl(6, TIOCGPTN, [3])= 0
04:20:19 stat64(/dev/pts/3, {st_mode=S_IFCHR|0620, st_rdev=makedev(136,  
3), ...}) = 0

04:20:19 getuid32() = 501
04:20:19 socket(PF_FILE, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 7
04:20:19 connect(7, {sa_family=AF_FILE, path=/var/run/nscd/socket}, 110)  
= -1 ENOENT (No such file or  
directory)   
04:20:19 close(7)   = 0

04:20:19 socket(PF_FILE, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 7
04:20:19 connect(7, {sa_family=AF_FILE, path=/var/run/nscd/socket}, 110)  
= -1 ENOENT (No such file or directory)

04:20:19 close(7)   = 0
04:20:19 open(/etc/group, O_RDONLY|O_CLOEXEC) = 7
04:20:19 fstat64(7, {st_mode=S_IFREG|0644, st_size=669, ...}) = 0
04:20:19 mmap2(NULL, 4096, PROT_READ|PROT_WRITE,  
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7189000

04:20:19 read(7, root:x:0:\nbin:x:1:\ndaemon:x:2:\ns..., 4096) = 669
04:20:19 close(7)   = 0
04:20:19 munmap(0xb7189000, 4096)   = 0
04:20:19 ioctl(6, TIOCSPTLCK, [0])  = 0
04:20:19 ioctl(6, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or  
TCGETS, {B38400 opost isig icanon echo ...}) = 0

04:20:19 ioctl(6, TIOCGPTN, [3])= 0
04:20:19 stat64(/dev/pts/3, {st_mode=S_IFCHR|0620, st_rdev=makedev(136,  
3), ...}) = 0

04:20:19 open(/dev/pts/3, O_RDWR|O_LARGEFILE) = 7
04:20:19 fcntl64(7, F_SETFD, FD_CLOEXEC) = 0
04:20:19 pipe([8, 9])   = 0
04:20:19 clone(child_stack=0,  
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,  
child_tidptr=0xb74f7728) = 12097

04:20:19 write(6,  PROMPT_COMMAND=${PROMPT_COMMAND..., 75) = 75
04:20:19 rt_sigaction(SIGINT, {0x8096d10, [], 0}, NULL, 8) = 0
04:20:19 select(9, [6 8], NULL, NULL, {10, 0}) = 1 (in [6], left {9,  
998268})

04:20:19 read(6,  PROMPT_COMMAND=${PROMPT_COMMAND..., 128) = 76
04:20:19 select(9, [6 8], NULL, NULL, {9, 998268}) = 1 (in [6], left {9,  
971360})

04:20:19 read(6, [miven@cobra ~]$  PROMPT_COMMAND..., 128) = 55
04:20:19 select(9, [6 8], NULL, NULL, {9, 971360}) = 1 (in [6], left {9,  
971353})

04:20:19 read(6, MPT_, 128)   = 4
04:20:19 select(9, [6 8], NULL, NULL, {9, 971353}) = 1 (in [6], left {9,  
971347})

04:20:19 read(6, COM, 128)= 3
04:20:19 select(9, [6 8], NULL, NULL, {9, 971347}) = 1 (in [6], left {9,  
971341})

04:20:19 read(6, MAN, 128)= 3
04:20:19 select(9, [6 8], NULL, NULL, {9, 971341}) = 1 (in [6], left {9,  
971335})

04:20:19 read(6, D;, 128) = 2
04:20:19 select(9, [6 8], NULL, NULL, {9, 971335}) = 1 (in [6], left {9,  
971329})

04:20:19 read(6,  }', 128)= 3
04:20:19 select(9, [6 8], NULL, NULL, {9, 971329}) = 1 (in [6], left {9,  
971323})

04:20:19 read(6, pw, 128) = 2
04:20:19 select(9, [6 8], NULL, NULL, {9, 971323}) = 1 (in [6], left {9,  
971317})

04:20:19 read(6, d, 128)= 3
04:20:19 select(9, [6 8], NULL, NULL, {9, 971317}) = 1 (in [6], left {9,  
971311})

04:20:19 read(6, 9;, 128) = 2
04:20:19 select(9, [6 8], NULL, NULL, {9, 971311}) = 1 (in [6], left {9,  
971305})

04:20:19 read(6, kil, 128)= 3
04:20:19 select(9, [6 8], NULL, NULL, {9, 971305}) = 1 (in [6], left {9,  
971299})

04:20:19 read(6, l , 128) = 2
04:20:19 select(9, [6 8], NULL, NULL, {9, 971299}) = 1 (in [6], left {9,  
971293})

04:20:19 read(6, -S, 128) = 2
04:20:19 select(9, [6 8], NULL, NULL, {9, 971293}) = 1 (in [6], left {9,  
971287})

04:20:19 read(6, TO, 128) = 2
04:20:19 select(9, [6 8], NULL, NULL, {9, 971287}) = 1 (in [6], left {9,  
971281})

04:20:19 read(6, P , 128) = 2
04:20:19 select(9, [6 8], NULL, NULL, {9, 971281}) = 1 (in [6], left {9,  
971275})

04:20:19 read(6, $$, 128) = 2
04:20:19 select(9, [6 8], NULL, NULL, {9, 971275}) = 1