* MC no longer working with cygwin 3.1.x
@ 2019-12-18 16:06 Laurent R
2019-12-18 16:34 ` Takashi Yano
2019-12-18 16:37 ` Marco Atzeri
0 siblings, 2 replies; 9+ messages in thread
From: Laurent R @ 2019-12-18 16:06 UTC (permalink / raw)
To: cygwin
Dear all,
After the update to cygwin-3.1.1, mc (aka Midnight Commander) no longer starts. It goes into an infinite loop, if I go back to cygwin-3.0.7, mc works perfectly.
I tested with cygwin-3.1.0, same problem.
The MC version is 4.8.23 and the operating system is Windows 10 Pro x64 1903.
Regards.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: MC no longer working with cygwin 3.1.x
2019-12-18 16:06 MC no longer working with cygwin 3.1.x Laurent R
@ 2019-12-18 16:34 ` Takashi Yano
2019-12-18 16:37 ` Marco Atzeri
1 sibling, 0 replies; 9+ messages in thread
From: Takashi Yano @ 2019-12-18 16:34 UTC (permalink / raw)
To: cygwin
On Wed, 18 Dec 2019 14:42:53 +0000
Laurent R wrote:
> After the update to cygwin-3.1.1, mc (aka Midnight Commander) no longer starts. It goes into an infinite loop, if I go back to cygwin-3.0.7, mc works perfectly.
>
> I tested with cygwin-3.1.0, same problem.
>
> The MC version is 4.8.23 and the operating system is Windows 10 Pro x64 1903.
Thanks for the report. I looked into this problem and the cause
is the bug in pty code.
I will submit the patch for this issue soon.
--
Takashi Yano <takashi.yano@nifty.ne.jp>
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: MC no longer working with cygwin 3.1.x
2019-12-18 16:06 MC no longer working with cygwin 3.1.x Laurent R
2019-12-18 16:34 ` Takashi Yano
@ 2019-12-18 16:37 ` Marco Atzeri
2019-12-18 20:01 ` Corinna Vinschen
1 sibling, 1 reply; 9+ messages in thread
From: Marco Atzeri @ 2019-12-18 16:37 UTC (permalink / raw)
To: cygwin
Am 18.12.2019 um 15:42 schrieb Laurent R:
> Dear all,
>
> After the update to cygwin-3.1.1, mc (aka Midnight Commander) no longer starts. It goes into an infinite loop, if I go back to cygwin-3.0.7, mc works perfectly.
>
> I tested with cygwin-3.1.0, same problem.
>
> The MC version is 4.8.23 and the operating system is Windows 10 Pro x64 1903.
>
> Regards.
>
confirmed
there must be a race somewhere as running /usr/bin/mc.exe from strace
works fine.
Regards
Marco
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: MC no longer working with cygwin 3.1.x
2019-12-18 16:37 ` Marco Atzeri
@ 2019-12-18 20:01 ` Corinna Vinschen
2019-12-18 22:55 ` Ken Brown
0 siblings, 1 reply; 9+ messages in thread
From: Corinna Vinschen @ 2019-12-18 20:01 UTC (permalink / raw)
To: Ken Brown; +Cc: cygwin
[-- Attachment #1: Type: text/plain, Size: 988 bytes --]
On Dec 18 17:23, Marco Atzeri wrote:
> Am 18.12.2019 um 15:42 schrieb Laurent R:
> > Dear all,
> >
> > After the update to cygwin-3.1.1, mc (aka Midnight Commander) no longer starts. It goes into an infinite loop, if I go back to cygwin-3.0.7, mc works perfectly.
> >
> > I tested with cygwin-3.1.0, same problem.
> >
> > The MC version is 4.8.23 and the operating system is Windows 10 Pro x64 1903.
> >
> > Regards.
> >
>
> confirmed
>
> there must be a race somewhere as running /usr/bin/mc.exe from strace
> works fine.
But that's not the only problem running mc AFAICS. I'm seeing an
error message in the background:
Cannot open named pipe /tmp/mc-corinna/mc.pipe.384
/cygdrive/d/cyg_pub/devel/mc/mc-4.8.23-1.x86_64/src/mc-4.8.23/src/subshell/common.c: open: Permission denied
It looks like there's another problem, this time with the new FIFO
code.
Ken, care to take a look?
Thanks,
Corinna
--
Corinna Vinschen
Cygwin Maintainer
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: MC no longer working with cygwin 3.1.x
2019-12-18 20:01 ` Corinna Vinschen
@ 2019-12-18 22:55 ` Ken Brown
2019-12-19 5:37 ` Thomas Wolff
0 siblings, 1 reply; 9+ messages in thread
From: Ken Brown @ 2019-12-18 22:55 UTC (permalink / raw)
To: cygwin
On 12/18/2019 2:32 PM, Corinna Vinschen wrote:
> On Dec 18 17:23, Marco Atzeri wrote:
>> Am 18.12.2019 um 15:42 schrieb Laurent R:
>>> Dear all,
>>>
>>> After the update to cygwin-3.1.1, mc (aka Midnight Commander) no longer starts. It goes into an infinite loop, if I go back to cygwin-3.0.7, mc works perfectly.
>>>
>>> I tested with cygwin-3.1.0, same problem.
>>>
>>> The MC version is 4.8.23 and the operating system is Windows 10 Pro x64 1903.
>>>
>>> Regards.
>>>
>>
>> confirmed
>>
>> there must be a race somewhere as running /usr/bin/mc.exe from strace
>> works fine.
>
> But that's not the only problem running mc AFAICS. I'm seeing an
> error message in the background:
>
> Cannot open named pipe /tmp/mc-corinna/mc.pipe.384
> /cygdrive/d/cyg_pub/devel/mc/mc-4.8.23-1.x86_64/src/mc-4.8.23/src/subshell/common.c: open: Permission denied
>
> It looks like there's another problem, this time with the new FIFO
> code.
>
> Ken, care to take a look?
I've just looked at the mc source code, and it seems that (under tcsh only), mc
creates a fifo and tries to open it twice as O_RDWR. This is not supported on
Cygwin, so the second attempt fails.
Here's the relevant code from src/subshell/common.c:
if (mc_global.shell->type == SHELL_TCSH)
{
g_snprintf (tcsh_fifo, sizeof (tcsh_fifo), "%s/mc.pipe.%d",
mc_tmpdir (), (int) getpid ());
if (mkfifo (tcsh_fifo, 0600) == -1)
[...]
/* Opening the FIFO as O_RDONLY or O_WRONLY causes deadlock */
if ((subshell_pipe[READ] = open (tcsh_fifo, O_RDWR)) == -1
|| (subshell_pipe[WRITE] = open (tcsh_fifo, O_RDWR)) == -1)
{
fprintf (stderr, _("Cannot open named pipe %s\n"), tcsh_fifo);
perror (__FILE__ ": open");
mc_global.tty.use_subshell = FALSE;
[...]
Under bash, zsh, and some other shells, mc uses ordinary pipes rather than
FIFOs. I have no idea why tcsh is treated differently.
Until someone[*] gets around to making it possible to open a FIFO twice for
reading, I don't think there's anything we can do about it. I also don't know
how important this is for mc. I don't use tcsh or mc, so I can't judge.
Ken
[*] I will probably look into this at some point if there's enough demand for
it, but I'd like the new FIFO code to get lots of testing first.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: MC no longer working with cygwin 3.1.x
2019-12-18 22:55 ` Ken Brown
@ 2019-12-19 5:37 ` Thomas Wolff
2019-12-19 8:36 ` Ken Brown
0 siblings, 1 reply; 9+ messages in thread
From: Thomas Wolff @ 2019-12-19 5:37 UTC (permalink / raw)
To: cygwin
Am 18.12.2019 um 22:14 schrieb Ken Brown:
> On 12/18/2019 2:32 PM, Corinna Vinschen wrote:
>> On Dec 18 17:23, Marco Atzeri wrote:
>>> Am 18.12.2019 um 15:42 schrieb Laurent R:
>>>> Dear all,
>>>>
>>>> After the update to cygwin-3.1.1, mc (aka Midnight Commander) no longer starts. It goes into an infinite loop, if I go back to cygwin-3.0.7, mc works perfectly.
>>>>
>>>> I tested with cygwin-3.1.0, same problem.
>>>>
>>>> The MC version is 4.8.23 and the operating system is Windows 10 Pro x64 1903.
>>>>
>>>> Regards.
>>>>
>>> confirmed
>>>
>>> there must be a race somewhere as running /usr/bin/mc.exe from strace
>>> works fine.
>> But that's not the only problem running mc AFAICS. I'm seeing an
>> error message in the background:
>>
>> Cannot open named pipe /tmp/mc-corinna/mc.pipe.384
>> /cygdrive/d/cyg_pub/devel/mc/mc-4.8.23-1.x86_64/src/mc-4.8.23/src/subshell/common.c: open: Permission denied
>>
>> It looks like there's another problem, this time with the new FIFO
>> code.
>>
>> Ken, care to take a look?
> I've just looked at the mc source code, and it seems that (under tcsh only), mc
> creates a fifo and tries to open it twice as O_RDWR. This is not supported on
> Cygwin, so the second attempt fails.
>
> Here's the relevant code from src/subshell/common.c:
>
> if (mc_global.shell->type == SHELL_TCSH)
> {
> g_snprintf (tcsh_fifo, sizeof (tcsh_fifo), "%s/mc.pipe.%d",
> mc_tmpdir (), (int) getpid ());
> if (mkfifo (tcsh_fifo, 0600) == -1)
> [...]
> /* Opening the FIFO as O_RDONLY or O_WRONLY causes deadlock */
>
> if ((subshell_pipe[READ] = open (tcsh_fifo, O_RDWR)) == -1
> || (subshell_pipe[WRITE] = open (tcsh_fifo, O_RDWR)) == -1)
> {
> fprintf (stderr, _("Cannot open named pipe %s\n"), tcsh_fifo);
> perror (__FILE__ ": open");
> mc_global.tty.use_subshell = FALSE;
> [...]
>
> Under bash, zsh, and some other shells, mc uses ordinary pipes rather than
> FIFOs. I have no idea why tcsh is treated differently.
>
> Until someone[*] gets around to making it possible to open a FIFO twice for
> reading, I don't think there's anything we can do about it. I also don't know
> how important this is for mc. I don't use tcsh or mc, so I can't judge.
I've reproduced mc to fail, from bash, in cygwin 3.1.0 and 3.1.1,
Windows 1809 and 1903.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: MC no longer working with cygwin 3.1.x
2019-12-19 5:37 ` Thomas Wolff
@ 2019-12-19 8:36 ` Ken Brown
2019-12-19 11:26 ` Corinna Vinschen
0 siblings, 1 reply; 9+ messages in thread
From: Ken Brown @ 2019-12-19 8:36 UTC (permalink / raw)
To: cygwin
On 12/18/2019 5:55 PM, Thomas Wolff wrote:
>
>
> Am 18.12.2019 um 22:14 schrieb Ken Brown:
>> On 12/18/2019 2:32 PM, Corinna Vinschen wrote:
>>> On Dec 18 17:23, Marco Atzeri wrote:
>>>> Am 18.12.2019 um 15:42 schrieb Laurent R:
>>>>> Dear all,
>>>>>
>>>>> After the update to cygwin-3.1.1, mc (aka Midnight Commander) no longer
>>>>> starts. It goes into an infinite loop, if I go back to cygwin-3.0.7, mc
>>>>> works perfectly.
>>>>>
>>>>> I tested with cygwin-3.1.0, same problem.
>>>>>
>>>>> The MC version is 4.8.23 and the operating system is Windows 10 Pro x64 1903.
>>>>>
>>>>> Regards.
>>>>>
>>>> confirmed
>>>>
>>>> there must be a race somewhere as running /usr/bin/mc.exe from strace
>>>> works fine.
>>> But that's not the only problem running mc AFAICS. I'm seeing an
>>> error message in the background:
>>>
>>> Cannot open named pipe /tmp/mc-corinna/mc.pipe.384
>>>
>>> /cygdrive/d/cyg_pub/devel/mc/mc-4.8.23-1.x86_64/src/mc-4.8.23/src/subshell/common.c:
>>> open: Permission denied
>>>
>>> It looks like there's another problem, this time with the new FIFO
>>> code.
>>>
>>> Ken, care to take a look?
>> I've just looked at the mc source code, and it seems that (under tcsh only), mc
>> creates a fifo and tries to open it twice as O_RDWR. This is not supported on
>> Cygwin, so the second attempt fails.
>>
>> Here's the relevant code from src/subshell/common.c:
>>
>> if (mc_global.shell->type == SHELL_TCSH)
>> {
>> g_snprintf (tcsh_fifo, sizeof (tcsh_fifo), "%s/mc.pipe.%d",
>> mc_tmpdir (), (int) getpid ());
>> if (mkfifo (tcsh_fifo, 0600) == -1)
>> [...]
>> /* Opening the FIFO as O_RDONLY or O_WRONLY causes deadlock */
>>
>> if ((subshell_pipe[READ] = open (tcsh_fifo, O_RDWR)) == -1
>> || (subshell_pipe[WRITE] = open (tcsh_fifo, O_RDWR)) == -1)
>> {
>> fprintf (stderr, _("Cannot open named pipe %s\n"), tcsh_fifo);
>> perror (__FILE__ ": open");
>> mc_global.tty.use_subshell = FALSE;
>> [...]
>>
>> Under bash, zsh, and some other shells, mc uses ordinary pipes rather than
>> FIFOs. I have no idea why tcsh is treated differently.
>>
>> Until someone[*] gets around to making it possible to open a FIFO twice for
>> reading, I don't think there's anything we can do about it. I also don't know
>> how important this is for mc. I don't use tcsh or mc, so I can't judge.
> I've reproduced mc to fail, from bash, in cygwin 3.1.0 and 3.1.1, Windows 1809
> and 1903.
That's not related to what I've been talking about, which is the error message
"Cannot open named pipe /tmp/mc-corinna/mc.pipe.384" that Corinna reported. The
failure you're talking about occurs in all shells and has already been fixed by
Takashi. I imagine Corinna will release 3.1.2 with the fix very soon.
Ken
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: MC no longer working with cygwin 3.1.x
2019-12-19 8:36 ` Ken Brown
@ 2019-12-19 11:26 ` Corinna Vinschen
2019-12-19 21:33 ` Ken Brown
0 siblings, 1 reply; 9+ messages in thread
From: Corinna Vinschen @ 2019-12-19 11:26 UTC (permalink / raw)
To: cygwin
[-- Attachment #1: Type: text/plain, Size: 2585 bytes --]
On Dec 18 23:09, Ken Brown wrote:
> On 12/18/2019 5:55 PM, Thomas Wolff wrote:
> > Am 18.12.2019 um 22:14 schrieb Ken Brown:
> >> On 12/18/2019 2:32 PM, Corinna Vinschen wrote:
> >>> On Dec 18 17:23, Marco Atzeri wrote:
> >>>> Am 18.12.2019 um 15:42 schrieb Laurent R:
> >>>>> Dear all,
> >>>>>
> >>>>> After the update to cygwin-3.1.1, mc (aka Midnight Commander) no longer
> >>>>> starts. It goes into an infinite loop, if I go back to cygwin-3.0.7, mc
> >>>>> works perfectly.
> >>>>>
> >>>>> I tested with cygwin-3.1.0, same problem.
> >>>>>
> >>>>> The MC version is 4.8.23 and the operating system is Windows 10 Pro x64 1903.
> >>>> confirmed
> >>>>
> >>>> there must be a race somewhere as running /usr/bin/mc.exe from strace
> >>>> works fine.
> >>> But that's not the only problem running mc AFAICS. I'm seeing an
> >>> error message in the background:
> >>>
> >>> Cannot open named pipe /tmp/mc-corinna/mc.pipe.384
> >>>
> >>> /cygdrive/d/cyg_pub/devel/mc/mc-4.8.23-1.x86_64/src/mc-4.8.23/src/subshell/common.c:
> >>> open: Permission denied
> >>> [...]
> >> I've just looked at the mc source code, and it seems that (under tcsh only), mc
> >> creates a fifo and tries to open it twice as O_RDWR. This is not supported on
> >> Cygwin, so the second attempt fails.
> >>
> >> Here's the relevant code from src/subshell/common.c:
> >> [...]
> >> Under bash, zsh, and some other shells, mc uses ordinary pipes rather than
> >> FIFOs. I have no idea why tcsh is treated differently.
> >>
> >> Until someone[*] gets around to making it possible to open a FIFO twice for
> >> reading, I don't think there's anything we can do about it. I also don't know
> >> how important this is for mc. I don't use tcsh or mc, so I can't judge.
Not using mc either here. I see the STATUS_ACCESS_DENIED in the strace
output when calling NtCreateNamedPipeFile, but I wonder why that is.
Ken, btw., we should add a PIPE_REJECT_REMOTE_CLIENTS flag, just for
paranoia.
> > I've reproduced mc to fail, from bash, in cygwin 3.1.0 and 3.1.1, Windows 1809
> > and 1903.
>
> That's not related to what I've been talking about, which is the error
> message "Cannot open named pipe /tmp/mc-corinna/mc.pipe.384" that
> Corinna reported. The failure you're talking about occurs in all
> shells and has already been fixed by Takashi. I imagine Corinna will
> release 3.1.2 with the fix very soon.
Yes, today or tomorrow. Maybe some other low-hanging fruit roles past...
Corinna
--
Corinna Vinschen
Cygwin Maintainer
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: MC no longer working with cygwin 3.1.x
2019-12-19 11:26 ` Corinna Vinschen
@ 2019-12-19 21:33 ` Ken Brown
0 siblings, 0 replies; 9+ messages in thread
From: Ken Brown @ 2019-12-19 21:33 UTC (permalink / raw)
To: cygwin
On 12/19/2019 4:24 AM, Corinna Vinschen wrote:
> On Dec 18 23:09, Ken Brown wrote:
>> On 12/18/2019 5:55 PM, Thomas Wolff wrote:
>>> Am 18.12.2019 um 22:14 schrieb Ken Brown:
>>>> On 12/18/2019 2:32 PM, Corinna Vinschen wrote:
>>>>> On Dec 18 17:23, Marco Atzeri wrote:
>>>>>> Am 18.12.2019 um 15:42 schrieb Laurent R:
>>>>>>> Dear all,
>>>>>>>
>>>>>>> After the update to cygwin-3.1.1, mc (aka Midnight Commander) no longer
>>>>>>> starts. It goes into an infinite loop, if I go back to cygwin-3.0.7, mc
>>>>>>> works perfectly.
>>>>>>>
>>>>>>> I tested with cygwin-3.1.0, same problem.
>>>>>>>
>>>>>>> The MC version is 4.8.23 and the operating system is Windows 10 Pro x64 1903.
>>>>>> confirmed
>>>>>>
>>>>>> there must be a race somewhere as running /usr/bin/mc.exe from strace
>>>>>> works fine.
>>>>> But that's not the only problem running mc AFAICS. I'm seeing an
>>>>> error message in the background:
>>>>>
>>>>> Cannot open named pipe /tmp/mc-corinna/mc.pipe.384
>>>>>
>>>>> /cygdrive/d/cyg_pub/devel/mc/mc-4.8.23-1.x86_64/src/mc-4.8.23/src/subshell/common.c:
>>>>> open: Permission denied
>>>>> [...]
>>>> I've just looked at the mc source code, and it seems that (under tcsh only), mc
>>>> creates a fifo and tries to open it twice as O_RDWR. This is not supported on
>>>> Cygwin, so the second attempt fails.
>>>>
>>>> Here's the relevant code from src/subshell/common.c:
>>>> [...]
>>>> Under bash, zsh, and some other shells, mc uses ordinary pipes rather than
>>>> FIFOs. I have no idea why tcsh is treated differently.
>>>>
>>>> Until someone[*] gets around to making it possible to open a FIFO twice for
>>>> reading, I don't think there's anything we can do about it. I also don't know
>>>> how important this is for mc. I don't use tcsh or mc, so I can't judge.
>
> Not using mc either here. I see the STATUS_ACCESS_DENIED in the strace
> output when calling NtCreateNamedPipeFile, but I wonder why that is.
This happens on the second call to NtCreateNamedPipeFile on the same FIFO, both
times with FILE_CREATE, as a result of mc trying to open it twice for reading.
I recall seeing that error before under these circumstances when I was
developing the new FIFO code.
> Ken, btw., we should add a PIPE_REJECT_REMOTE_CLIENTS flag, just for
> paranoia.
Will do.
Ken
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2019-12-19 19:38 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-18 16:06 MC no longer working with cygwin 3.1.x Laurent R
2019-12-18 16:34 ` Takashi Yano
2019-12-18 16:37 ` Marco Atzeri
2019-12-18 20:01 ` Corinna Vinschen
2019-12-18 22:55 ` Ken Brown
2019-12-19 5:37 ` Thomas Wolff
2019-12-19 8:36 ` Ken Brown
2019-12-19 11:26 ` Corinna Vinschen
2019-12-19 21:33 ` Ken Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).