public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: (call-process ...) hangs in emacs
@ 2014-08-01 12:51 Angelo Graziosi
  2014-08-01 13:17 ` Peter Hull
  0 siblings, 1 reply; 84+ messages in thread
From: Angelo Graziosi @ 2014-08-01 12:51 UTC (permalink / raw)
  To: cygwin

  Katsumi Yamaoka wrote:
> I'm troubled with a similar problem since Wednesday[1].
> /usr/bin/emacs that Cygwin distributed (24.3) seems ok, but
> /usr/local/bin/emacs that I built from the Emacs trunk Tuesday
> (24.4.50) got not to work conditionally.  With that version of
> Emacs:
>
> Evaluating the form `(call-process "pwd" nil t)' on normally
> running Emacs works.  It returns "/home/yamaoka" immediately.
> However, if it is done in the bacth mode,
>
> /usr/local/bin/emacs -Q -batch -eval '(call-process "pwd" nil t)'
>
> it never returns; the Emacs process eats no cpu but stays
> consistently[2].  `kill -9 PID' has no effect.
> Using the Windows Task Manager is the only means to kill it.

> [1] I did updating my Cygwin installation on Wednesday morning
>  for the first time in the last 7 days.  It must be the trigger
>  of the problem.  I also tried clean install of Cygwin, however
>  it didn't help.  Since it didn't seem to finish because of
>  texlive-collection-basic.sh (the bash process didn't eat cpu,
>  but never returned), I redid it by marking all the texlive
>  packages to be `Skip'.

Just for completeness.. or to add another story to the eternal Cygwin - 
Emacs saga..

Since I upgraded to Cygwin-1.7.31*, I see similar issue in building 
Emacs trunk (--with-w32 build)... The build always hangs in compiling 
some .el file. CTRL-C does not work and I have to search the running 
processes with "ps" and kill them with 'kill -9'. Downgrading to 1.7.30, 
things work better. Now I am using 1.7.30...

Here is on Win7 64 and cygwin64.

Ciao,
  Angelo.

--
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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-01 12:51 (call-process ...) hangs in emacs Angelo Graziosi
@ 2014-08-01 13:17 ` Peter Hull
  2014-08-01 13:32   ` Corinna Vinschen
  0 siblings, 1 reply; 84+ messages in thread
From: Peter Hull @ 2014-08-01 13:17 UTC (permalink / raw)
  To: cygwin

On Fri, Aug 1, 2014 at 1:50 PM, Angelo Graziosi
<angelo.graziosi@alice.it> wrote:
> Since I upgraded to Cygwin-1.7.31*, I see similar issue in building Emacs
> trunk (--with-w32 build)... The build always hangs in compiling some .el
> file. CTRL-C does not work and I have to search the running processes with
> "ps" and kill them with 'kill -9'. Downgrading to 1.7.30, things work
> better. Now I am using 1.7.30...
By better, do you mean 'perfectly'? It seems like it might be a little
bit intermittent, from the reports I have seen.

It's easy enough to do a cvs rdiff between the releases if 1.7.30 is
known to be good - I am happy to help but I am unfamiliar with the
code so I don't know where to start looking...

Pete

--
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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-01 13:17 ` Peter Hull
@ 2014-08-01 13:32   ` Corinna Vinschen
  2014-08-04  1:03     ` Ken Brown
  0 siblings, 1 reply; 84+ messages in thread
From: Corinna Vinschen @ 2014-08-01 13:32 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1104 bytes --]

On Aug  1 14:17, Peter Hull wrote:
> On Fri, Aug 1, 2014 at 1:50 PM, Angelo Graziosi
> <angelo.graziosi@alice.it> wrote:
> > Since I upgraded to Cygwin-1.7.31*, I see similar issue in building Emacs
> > trunk (--with-w32 build)... The build always hangs in compiling some .el
> > file. CTRL-C does not work and I have to search the running processes with
> > "ps" and kill them with 'kill -9'. Downgrading to 1.7.30, things work
> > better. Now I am using 1.7.30...
> By better, do you mean 'perfectly'? It seems like it might be a little
> bit intermittent, from the reports I have seen.
> 
> It's easy enough to do a cvs rdiff between the releases if 1.7.30 is
> known to be good - I am happy to help but I am unfamiliar with the
> code so I don't know where to start looking...

It could be a problem with the new default pthread mutexes being
NORMAL, rather then ERRORCHECK mutexes.  Somebody would have to
debug it...


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-01 13:32   ` Corinna Vinschen
@ 2014-08-04  1:03     ` Ken Brown
  2014-08-04  8:00       ` Corinna Vinschen
  2014-08-04  8:05       ` Peter Hull
  0 siblings, 2 replies; 84+ messages in thread
From: Ken Brown @ 2014-08-04  1:03 UTC (permalink / raw)
  To: cygwin

On 8/1/2014 9:32 AM, Corinna Vinschen wrote:
> On Aug  1 14:17, Peter Hull wrote:
>> On Fri, Aug 1, 2014 at 1:50 PM, Angelo Graziosi
>> <angelo.graziosi@alice.it> wrote:
>>> Since I upgraded to Cygwin-1.7.31*, I see similar issue in building Emacs
>>> trunk (--with-w32 build)... The build always hangs in compiling some .el
>>> file. CTRL-C does not work and I have to search the running processes with
>>> "ps" and kill them with 'kill -9'. Downgrading to 1.7.30, things work
>>> better. Now I am using 1.7.30...
>> By better, do you mean 'perfectly'? It seems like it might be a little
>> bit intermittent, from the reports I have seen.
>>
>> It's easy enough to do a cvs rdiff between the releases if 1.7.30 is
>> known to be good - I am happy to help but I am unfamiliar with the
>> code so I don't know where to start looking...
>
> It could be a problem with the new default pthread mutexes being
> NORMAL, rather then ERRORCHECK mutexes.

That does seem to be the problem, since I can reproduce the bug starting 
with the 2014-07-14 snapshot.  More precisely, I can reproduce it using 
emacs-nox (which is what the OP was using according to his cygcheck 
output) but not using emacs-X11 or emacs-w32.

I tried running emacs under gdb with a breakpoint at call_process, but 
all I could see from that is that emacs tries to fork a subprocess, but 
the call to fork() never returns.  I also tried running it under strace, 
but again all I can see is that fork() is called and then everything 
seems to be at a standstill.

Corinna, if you want to take a look, here's the precise recipe:

1. emacs-nox -Q [This should start emacs and put you in the *scratch* 
buffer.]

2. Enter the following text into the buffer:

   (call-process "pwd" nil t)

3. Position the cursor at the end of the line and type Ctrl-j.

What should happen, and what does happen prior to the 2014-07-14 
snapshot, is that the current directory is displayed, followed by the 
exit code of 0.  What happens instead is that emacs appears to hang.

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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-04  1:03     ` Ken Brown
@ 2014-08-04  8:00       ` Corinna Vinschen
  2014-08-04 13:34         ` Ken Brown
  2014-08-04  8:05       ` Peter Hull
  1 sibling, 1 reply; 84+ messages in thread
From: Corinna Vinschen @ 2014-08-04  8:00 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 2547 bytes --]

On Aug  3 21:02, Ken Brown wrote:
> On 8/1/2014 9:32 AM, Corinna Vinschen wrote:
> >On Aug  1 14:17, Peter Hull wrote:
> >>On Fri, Aug 1, 2014 at 1:50 PM, Angelo Graziosi
> >><angelo.graziosi@alice.it> wrote:
> >>>Since I upgraded to Cygwin-1.7.31*, I see similar issue in building Emacs
> >>>trunk (--with-w32 build)... The build always hangs in compiling some .el
> >>>file. CTRL-C does not work and I have to search the running processes with
> >>>"ps" and kill them with 'kill -9'. Downgrading to 1.7.30, things work
> >>>better. Now I am using 1.7.30...
> >>By better, do you mean 'perfectly'? It seems like it might be a little
> >>bit intermittent, from the reports I have seen.
> >>
> >>It's easy enough to do a cvs rdiff between the releases if 1.7.30 is
> >>known to be good - I am happy to help but I am unfamiliar with the
> >>code so I don't know where to start looking...
> >
> >It could be a problem with the new default pthread mutexes being
> >NORMAL, rather then ERRORCHECK mutexes.
> 
> That does seem to be the problem, since I can reproduce the bug starting
> with the 2014-07-14 snapshot.  More precisely, I can reproduce it using
> emacs-nox (which is what the OP was using according to his cygcheck output)
> but not using emacs-X11 or emacs-w32.
> 
> I tried running emacs under gdb with a breakpoint at call_process, but all I
> could see from that is that emacs tries to fork a subprocess, but the call
> to fork() never returns.  I also tried running it under strace, but again
> all I can see is that fork() is called and then everything seems to be at a
> standstill.
> 
> Corinna, if you want to take a look, here's the precise recipe:
> 
> 1. emacs-nox -Q [This should start emacs and put you in the *scratch*
> buffer.]
> 
> 2. Enter the following text into the buffer:
> 
>   (call-process "pwd" nil t)
> 
> 3. Position the cursor at the end of the line and type Ctrl-j.
> 
> What should happen, and what does happen prior to the 2014-07-14 snapshot,
> is that the current directory is displayed, followed by the exit code of 0.
> What happens instead is that emacs appears to hang.

How does emacs start a process?  Does it create a thread and then
forks and execs from the thread?  Does it use its own pthread_mutex
to control the job?  Is there a chance to create an STC of this
process?


Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-04  1:03     ` Ken Brown
  2014-08-04  8:00       ` Corinna Vinschen
@ 2014-08-04  8:05       ` Peter Hull
  2014-08-04 13:36         ` Ken Brown
  1 sibling, 1 reply; 84+ messages in thread
From: Peter Hull @ 2014-08-04  8:05 UTC (permalink / raw)
  To: cygwin

On Mon, Aug 4, 2014 at 2:02 AM, Ken Brown <kbrown@cornell.edu> wrote:
> That does seem to be the problem, since I can reproduce the bug starting
> with the 2014-07-14 snapshot.  More precisely, I can reproduce it using
> emacs-nox (which is what the OP was using according to his cygcheck output)
> but not using emacs-X11 or emacs-w32.
Thanks for your help in resolving this. I am indeed using emacs-nox.
Do you think emacs-x11 or emacs-w32 would be a good alternative to
work round the problem in the short term?

Peter

--
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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-04  8:00       ` Corinna Vinschen
@ 2014-08-04 13:34         ` Ken Brown
  2014-08-04 13:45           ` Corinna Vinschen
  0 siblings, 1 reply; 84+ messages in thread
From: Ken Brown @ 2014-08-04 13:34 UTC (permalink / raw)
  To: cygwin

On 8/4/2014 4:00 AM, Corinna Vinschen wrote:
> On Aug  3 21:02, Ken Brown wrote:
>> On 8/1/2014 9:32 AM, Corinna Vinschen wrote:
>>> On Aug  1 14:17, Peter Hull wrote:
>>>> On Fri, Aug 1, 2014 at 1:50 PM, Angelo Graziosi
>>>> <angelo.graziosi@alice.it> wrote:
>>>>> Since I upgraded to Cygwin-1.7.31*, I see similar issue in building Emacs
>>>>> trunk (--with-w32 build)... The build always hangs in compiling some .el
>>>>> file. CTRL-C does not work and I have to search the running processes with
>>>>> "ps" and kill them with 'kill -9'. Downgrading to 1.7.30, things work
>>>>> better. Now I am using 1.7.30...
>>>> By better, do you mean 'perfectly'? It seems like it might be a little
>>>> bit intermittent, from the reports I have seen.
>>>>
>>>> It's easy enough to do a cvs rdiff between the releases if 1.7.30 is
>>>> known to be good - I am happy to help but I am unfamiliar with the
>>>> code so I don't know where to start looking...
>>>
>>> It could be a problem with the new default pthread mutexes being
>>> NORMAL, rather then ERRORCHECK mutexes.
>>
>> That does seem to be the problem, since I can reproduce the bug starting
>> with the 2014-07-14 snapshot.  More precisely, I can reproduce it using
>> emacs-nox (which is what the OP was using according to his cygcheck output)
>> but not using emacs-X11 or emacs-w32.
>>
>> I tried running emacs under gdb with a breakpoint at call_process, but all I
>> could see from that is that emacs tries to fork a subprocess, but the call
>> to fork() never returns.  I also tried running it under strace, but again
>> all I can see is that fork() is called and then everything seems to be at a
>> standstill.
>>
>> Corinna, if you want to take a look, here's the precise recipe:
>>
>> 1. emacs-nox -Q [This should start emacs and put you in the *scratch*
>> buffer.]
>>
>> 2. Enter the following text into the buffer:
>>
>>    (call-process "pwd" nil t)
>>
>> 3. Position the cursor at the end of the line and type Ctrl-j.
>>
>> What should happen, and what does happen prior to the 2014-07-14 snapshot,
>> is that the current directory is displayed, followed by the exit code of 0.
>> What happens instead is that emacs appears to hang.
>
> How does emacs start a process?  Does it create a thread and then
> forks and execs from the thread?  Does it use its own pthread_mutex
> to control the job?  Is there a chance to create an STC of this
> process?

emacs does some bookkeeping and then calls vfork.  It does not create a 
new thread, nor does it create a pthread_mutex.  The only 
pthread_mutexes created anywhere in the emacs source code are in its 
implementation of malloc and friends, not in anything directly related 
to controlling subprocesses.  (FWIW, this malloc implementation is used 
in the Cygwin build of emacs but not in the Linux build.)

I did think about trying to create an STC, but I'm stymied because the 
problem depends so strongly on how emacs is run:

  - If emacs is run interactively, the problem only occurs with 
emacs-nox, not with emacs-X11 or emacs-w32.

  - If emacs is run non-interactively (i.e., in batch mode), the problem 
occurs with emacs-w32 and emacs-X11 too, as Angelo and Katsumi pointed 
out earlier in the thread.

I can't think of any way to capture these peculiarities in an STC.

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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-04  8:05       ` Peter Hull
@ 2014-08-04 13:36         ` Ken Brown
  0 siblings, 0 replies; 84+ messages in thread
From: Ken Brown @ 2014-08-04 13:36 UTC (permalink / raw)
  To: cygwin

On 8/4/2014 4:05 AM, Peter Hull wrote:
> On Mon, Aug 4, 2014 at 2:02 AM, Ken Brown <kbrown@cornell.edu> wrote:
>> That does seem to be the problem, since I can reproduce the bug starting
>> with the 2014-07-14 snapshot.  More precisely, I can reproduce it using
>> emacs-nox (which is what the OP was using according to his cygcheck output)
>> but not using emacs-X11 or emacs-w32.
> Thanks for your help in resolving this. I am indeed using emacs-nox.
> Do you think emacs-x11 or emacs-w32 would be a good alternative to
> work round the problem in the short term?

Yes.

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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-04 13:34         ` Ken Brown
@ 2014-08-04 13:45           ` Corinna Vinschen
  2014-08-05 12:21             ` Ken Brown
  0 siblings, 1 reply; 84+ messages in thread
From: Corinna Vinschen @ 2014-08-04 13:45 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 3299 bytes --]

On Aug  4 09:34, Ken Brown wrote:
> On 8/4/2014 4:00 AM, Corinna Vinschen wrote:
> >On Aug  3 21:02, Ken Brown wrote:
> >>On 8/1/2014 9:32 AM, Corinna Vinschen wrote:
> >>>It could be a problem with the new default pthread mutexes being
> >>>NORMAL, rather then ERRORCHECK mutexes.
> >>
> >>That does seem to be the problem, since I can reproduce the bug starting
> >>with the 2014-07-14 snapshot.  More precisely, I can reproduce it using
> >>emacs-nox (which is what the OP was using according to his cygcheck output)
> >>but not using emacs-X11 or emacs-w32.
> >>
> >>I tried running emacs under gdb with a breakpoint at call_process, but all I
> >>could see from that is that emacs tries to fork a subprocess, but the call
> >>to fork() never returns.  I also tried running it under strace, but again
> >>all I can see is that fork() is called and then everything seems to be at a
> >>standstill.
> >>
> >>Corinna, if you want to take a look, here's the precise recipe:
> >>
> >>1. emacs-nox -Q [This should start emacs and put you in the *scratch*
> >>buffer.]
> >>
> >>2. Enter the following text into the buffer:
> >>
> >>   (call-process "pwd" nil t)
> >>
> >>3. Position the cursor at the end of the line and type Ctrl-j.
> >>
> >>What should happen, and what does happen prior to the 2014-07-14 snapshot,
> >>is that the current directory is displayed, followed by the exit code of 0.
> >>What happens instead is that emacs appears to hang.
> >
> >How does emacs start a process?  Does it create a thread and then
> >forks and execs from the thread?  Does it use its own pthread_mutex
> >to control the job?  Is there a chance to create an STC of this
> >process?
> 
> emacs does some bookkeeping and then calls vfork.  It does not create a new
> thread, nor does it create a pthread_mutex.  The only pthread_mutexes
> created anywhere in the emacs source code are in its implementation of
> malloc and friends, not in anything directly related to controlling
> subprocesses.  (FWIW, this malloc implementation is used in the Cygwin build
> of emacs but not in the Linux build.)

Can you take a close look here?  This malloc will be used by Cygwin
as well if it's implemented in the usual way and...

> I did think about trying to create an STC, but I'm stymied because the
> problem depends so strongly on how emacs is run:
> 
>  - If emacs is run interactively, the problem only occurs with emacs-nox,
> not with emacs-X11 or emacs-w32.
> 
>  - If emacs is run non-interactively (i.e., in batch mode), the problem
> occurs with emacs-w32 and emacs-X11 too, as Angelo and Katsumi pointed out
> earlier in the thread.
> 
> I can't think of any way to capture these peculiarities in an STC.

...this, and the fact that fork/exec (vfork == fork on Cygwin) still
works nicely in other scenarios points to some problem with the usage of
pthread_mutexes in the application may be the culprit.

For instance, is it possible that emacs expects the pthread_mutexes
in malloc to be ERRORCHECK mutexes?  What if you explicitely set
them to ERRORCHECK at creation time?


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-04 13:45           ` Corinna Vinschen
@ 2014-08-05 12:21             ` Ken Brown
  2014-08-05 13:33               ` Peter Hull
  2014-08-05 13:58               ` Corinna Vinschen
  0 siblings, 2 replies; 84+ messages in thread
From: Ken Brown @ 2014-08-05 12:21 UTC (permalink / raw)
  To: cygwin

On 8/4/2014 9:45 AM, Corinna Vinschen wrote:
> On Aug  4 09:34, Ken Brown wrote:
>> On 8/4/2014 4:00 AM, Corinna Vinschen wrote:
>>> On Aug  3 21:02, Ken Brown wrote:
>>>> On 8/1/2014 9:32 AM, Corinna Vinschen wrote:
>>>>> It could be a problem with the new default pthread mutexes being
>>>>> NORMAL, rather then ERRORCHECK mutexes.
>>>>
>>>> That does seem to be the problem, since I can reproduce the bug starting
>>>> with the 2014-07-14 snapshot.  More precisely, I can reproduce it using
>>>> emacs-nox (which is what the OP was using according to his cygcheck output)
>>>> but not using emacs-X11 or emacs-w32.
>>>>
>>>> I tried running emacs under gdb with a breakpoint at call_process, but all I
>>>> could see from that is that emacs tries to fork a subprocess, but the call
>>>> to fork() never returns.  I also tried running it under strace, but again
>>>> all I can see is that fork() is called and then everything seems to be at a
>>>> standstill.
>>>>
>>>> Corinna, if you want to take a look, here's the precise recipe:
>>>>
>>>> 1. emacs-nox -Q [This should start emacs and put you in the *scratch*
>>>> buffer.]
>>>>
>>>> 2. Enter the following text into the buffer:
>>>>
>>>>    (call-process "pwd" nil t)
>>>>
>>>> 3. Position the cursor at the end of the line and type Ctrl-j.
>>>>
>>>> What should happen, and what does happen prior to the 2014-07-14 snapshot,
>>>> is that the current directory is displayed, followed by the exit code of 0.
>>>> What happens instead is that emacs appears to hang.
>>>
>>> How does emacs start a process?  Does it create a thread and then
>>> forks and execs from the thread?  Does it use its own pthread_mutex
>>> to control the job?  Is there a chance to create an STC of this
>>> process?
>>
>> emacs does some bookkeeping and then calls vfork.  It does not create a new
>> thread, nor does it create a pthread_mutex.  The only pthread_mutexes
>> created anywhere in the emacs source code are in its implementation of
>> malloc and friends, not in anything directly related to controlling
>> subprocesses.  (FWIW, this malloc implementation is used in the Cygwin build
>> of emacs but not in the Linux build.)
>
> Can you take a close look here?  This malloc will be used by Cygwin
> as well if it's implemented in the usual way and...
>
>> I did think about trying to create an STC, but I'm stymied because the
>> problem depends so strongly on how emacs is run:
>>
>>   - If emacs is run interactively, the problem only occurs with emacs-nox,
>> not with emacs-X11 or emacs-w32.
>>
>>   - If emacs is run non-interactively (i.e., in batch mode), the problem
>> occurs with emacs-w32 and emacs-X11 too, as Angelo and Katsumi pointed out
>> earlier in the thread.
>>
>> I can't think of any way to capture these peculiarities in an STC.
>
> ...this, and the fact that fork/exec (vfork == fork on Cygwin) still
> works nicely in other scenarios points to some problem with the usage of
> pthread_mutexes in the application may be the culprit.
>
> For instance, is it possible that emacs expects the pthread_mutexes
> in malloc to be ERRORCHECK mutexes?  What if you explicitely set
> them to ERRORCHECK at creation time?

That doesn't seem to be the issue, but I think I did find the problem, 
and it looks like there might be both an emacs bug and a Cygwin bug. 
Here's the relevant code from emacs's gmalloc.c:

pthread_mutex_t _malloc_mutex = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t _aligned_blocks_mutex = PTHREAD_MUTEX_INITIALIZER;

[...]

   /* Some pthread implementations call malloc for statically
      initialized mutexes when they are used first.  To avoid such a
      situation, we initialize mutexes here while their use is
      disabled in malloc etc.  */
   pthread_mutex_init (&_malloc_mutex, NULL);
   pthread_mutex_init (&_aligned_blocks_mutex, NULL);


The pthread_mutexes are initialized twice, resulting in undefined 
behavior according to Posix.  That's the emacs bug.  But simply removing 
the static initialization doesn't fix the problem.  On the other hand, 
the following patch does seem to fix it, at least in preliminary testing:

=== modified file 'src/gmalloc.c'
--- src/gmalloc.c       2014-03-04 19:02:49 +0000
+++ src/gmalloc.c       2014-08-05 01:35:38 +0000
@@ -490,8 +490,8 @@
  }

  #ifdef USE_PTHREAD
-pthread_mutex_t _malloc_mutex = PTHREAD_MUTEX_INITIALIZER;
-pthread_mutex_t _aligned_blocks_mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t _malloc_mutex;
+pthread_mutex_t _aligned_blocks_mutex;
  int _malloc_thread_enabled_p;

  static void
@@ -526,8 +526,11 @@
       initialized mutexes when they are used first.  To avoid such a
       situation, we initialize mutexes here while their use is
       disabled in malloc etc.  */
-  pthread_mutex_init (&_malloc_mutex, NULL);
-  pthread_mutex_init (&_aligned_blocks_mutex, NULL);
+  pthread_mutexattr_t attr1, attr2;
+  pthread_mutexattr_settype (&attr1, PTHREAD_MUTEX_NORMAL);
+  pthread_mutexattr_settype (&attr2, PTHREAD_MUTEX_NORMAL);
+  pthread_mutex_init (&_malloc_mutex, &attr1);
+  pthread_mutex_init (&_aligned_blocks_mutex, &attr2);
    pthread_atfork (malloc_atfork_handler_prepare,
                   malloc_atfork_handler_parent,
                   malloc_atfork_handler_child);


The first hunk avoids the double initialization, but I don't understand 
why the second hunk does anything.  Since PTHREAD_MUTEX_NORMAL is now 
the default, shouldn't calling pthread_mutex_init with NULL second 
argument be equivalent to my calls to pthread_mutexattr_settype?  Does 
this indicate a Cygwin bug, or am I misunderstanding something?

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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-05 12:21             ` Ken Brown
@ 2014-08-05 13:33               ` Peter Hull
  2014-08-05 13:59                 ` Peter Hull
  2014-08-05 13:58               ` Corinna Vinschen
  1 sibling, 1 reply; 84+ messages in thread
From: Peter Hull @ 2014-08-05 13:33 UTC (permalink / raw)
  To: cygwin

On Tue, Aug 5, 2014 at 1:21 PM, Ken Brown <kbrown@cornell.edu> wrote:
> -  pthread_mutex_init (&_malloc_mutex, NULL);
> -  pthread_mutex_init (&_aligned_blocks_mutex, NULL);
> +  pthread_mutexattr_t attr1, attr2;
> +  pthread_mutexattr_settype (&attr1, PTHREAD_MUTEX_NORMAL);
> +  pthread_mutexattr_settype (&attr2, PTHREAD_MUTEX_NORMAL);
> +  pthread_mutex_init (&_malloc_mutex, &attr1);
> +  pthread_mutex_init (&_aligned_blocks_mutex, &attr2);
>    pthread_atfork (malloc_atfork_handler_prepare,
>                   malloc_atfork_handler_parent,
>                   malloc_atfork_handler_child);
Does there need to be a 'pthread_mutexattr_init' in there? I don't
think that's the problem though...
Pete

--
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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-05 12:21             ` Ken Brown
  2014-08-05 13:33               ` Peter Hull
@ 2014-08-05 13:58               ` Corinna Vinschen
  2014-08-05 17:55                 ` Ken Brown
  1 sibling, 1 reply; 84+ messages in thread
From: Corinna Vinschen @ 2014-08-05 13:58 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 3998 bytes --]

On Aug  5 08:21, Ken Brown wrote:
> On 8/4/2014 9:45 AM, Corinna Vinschen wrote:
> >...this, and the fact that fork/exec (vfork == fork on Cygwin) still
> >works nicely in other scenarios points to some problem with the usage of
> >pthread_mutexes in the application may be the culprit.
> >
> >For instance, is it possible that emacs expects the pthread_mutexes
> >in malloc to be ERRORCHECK mutexes?  What if you explicitely set
> >them to ERRORCHECK at creation time?
> 
> That doesn't seem to be the issue, but I think I did find the problem, and
> it looks like there might be both an emacs bug and a Cygwin bug. Here's the
> relevant code from emacs's gmalloc.c:
> 
> pthread_mutex_t _malloc_mutex = PTHREAD_MUTEX_INITIALIZER;
> pthread_mutex_t _aligned_blocks_mutex = PTHREAD_MUTEX_INITIALIZER;
> 
> [...]
> 
>   /* Some pthread implementations call malloc for statically
>      initialized mutexes when they are used first.  To avoid such a
>      situation, we initialize mutexes here while their use is
>      disabled in malloc etc.  */
>   pthread_mutex_init (&_malloc_mutex, NULL);
>   pthread_mutex_init (&_aligned_blocks_mutex, NULL);
> 
> 
> The pthread_mutexes are initialized twice, resulting in undefined behavior
> according to Posix.  That's the emacs bug.

That's not the problem.  It's not necessary to call pthread_mutex_init
on statically initialized mutexes, but it doesn't hurt either.  Only
when calling pthread_mutex_init twice on the same object it goes
downhill, especially when the first incarnation of the mutex was already
locked.

> But simply removing the static
> initialization doesn't fix the problem.  On the other hand, the following
> patch does seem to fix it, at least in preliminary testing:
> 
> === modified file 'src/gmalloc.c'
> --- src/gmalloc.c       2014-03-04 19:02:49 +0000
> +++ src/gmalloc.c       2014-08-05 01:35:38 +0000
> @@ -490,8 +490,8 @@
>  }
> 
>  #ifdef USE_PTHREAD
> -pthread_mutex_t _malloc_mutex = PTHREAD_MUTEX_INITIALIZER;
> -pthread_mutex_t _aligned_blocks_mutex = PTHREAD_MUTEX_INITIALIZER;
> +pthread_mutex_t _malloc_mutex;
> +pthread_mutex_t _aligned_blocks_mutex;
>  int _malloc_thread_enabled_p;
> 
>  static void
> @@ -526,8 +526,11 @@
>       initialized mutexes when they are used first.  To avoid such a
>       situation, we initialize mutexes here while their use is
>       disabled in malloc etc.  */
> -  pthread_mutex_init (&_malloc_mutex, NULL);
> -  pthread_mutex_init (&_aligned_blocks_mutex, NULL);
> +  pthread_mutexattr_t attr1, attr2;
> +  pthread_mutexattr_settype (&attr1, PTHREAD_MUTEX_NORMAL);
> +  pthread_mutexattr_settype (&attr2, PTHREAD_MUTEX_NORMAL);
> +  pthread_mutex_init (&_malloc_mutex, &attr1);
> +  pthread_mutex_init (&_aligned_blocks_mutex, &attr2);
>    pthread_atfork (malloc_atfork_handler_prepare,
>                   malloc_atfork_handler_parent,
>                   malloc_atfork_handler_child);
> 
> 
> The first hunk avoids the double initialization, but I don't understand why
> the second hunk does anything.  Since PTHREAD_MUTEX_NORMAL is now the
> default, shouldn't calling pthread_mutex_init with NULL second argument be
> equivalent to my calls to pthread_mutexattr_settype?  Does this indicate a
> Cygwin bug, or am I misunderstanding something?

AFAICS you're missing something.  Your pthread_mutexattr_t attr1, attr2
are not initialized.  They contain some random values, thus they are not
good objects.  The calls to pthread_mutexattr_settype as well as the
calls to pthread_mutex_init will fail with EINVAL, but you won't see it
due to missing error handling, and you end up without mutexes at all.
If you call pthread_mutexattr_init before calling
pthread_mutexattr_settype the situation shoul;d be the same as before.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-05 13:33               ` Peter Hull
@ 2014-08-05 13:59                 ` Peter Hull
  0 siblings, 0 replies; 84+ messages in thread
From: Peter Hull @ 2014-08-05 13:59 UTC (permalink / raw)
  To: cygwin

In my experiments, not calling pthread_mutexattr_init caused errors
such that the final mutex was invalid and could not be locked.

The difference between the explicitly initialised mutex and the
statically initialised one is that the latter does get 'lazily'
initialised when the mutex is first locked (I think...?) so  maybe the
problem is something to do with the timing of that?

Pete

--
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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-05 13:58               ` Corinna Vinschen
@ 2014-08-05 17:55                 ` Ken Brown
  2014-08-05 18:40                   ` Corinna Vinschen
  2014-08-06  2:30                   ` Katsumi Yamaoka
  0 siblings, 2 replies; 84+ messages in thread
From: Ken Brown @ 2014-08-05 17:55 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 4399 bytes --]

On 8/5/2014 9:58 AM, Corinna Vinschen wrote:
> On Aug  5 08:21, Ken Brown wrote:
>> On 8/4/2014 9:45 AM, Corinna Vinschen wrote:
>>> ...this, and the fact that fork/exec (vfork == fork on Cygwin) still
>>> works nicely in other scenarios points to some problem with the usage of
>>> pthread_mutexes in the application may be the culprit.
>>>
>>> For instance, is it possible that emacs expects the pthread_mutexes
>>> in malloc to be ERRORCHECK mutexes?  What if you explicitely set
>>> them to ERRORCHECK at creation time?
>>
>> That doesn't seem to be the issue, but I think I did find the problem, and
>> it looks like there might be both an emacs bug and a Cygwin bug. Here's the
>> relevant code from emacs's gmalloc.c:
>>
>> pthread_mutex_t _malloc_mutex = PTHREAD_MUTEX_INITIALIZER;
>> pthread_mutex_t _aligned_blocks_mutex = PTHREAD_MUTEX_INITIALIZER;
>>
>> [...]
>>
>>    /* Some pthread implementations call malloc for statically
>>       initialized mutexes when they are used first.  To avoid such a
>>       situation, we initialize mutexes here while their use is
>>       disabled in malloc etc.  */
>>    pthread_mutex_init (&_malloc_mutex, NULL);
>>    pthread_mutex_init (&_aligned_blocks_mutex, NULL);
>>
>>
>> The pthread_mutexes are initialized twice, resulting in undefined behavior
>> according to Posix.  That's the emacs bug.
>
> That's not the problem.  It's not necessary to call pthread_mutex_init
> on statically initialized mutexes, but it doesn't hurt either.  Only
> when calling pthread_mutex_init twice on the same object it goes
> downhill, especially when the first incarnation of the mutex was already
> locked.
>
>> But simply removing the static
>> initialization doesn't fix the problem.  On the other hand, the following
>> patch does seem to fix it, at least in preliminary testing:
>>
>> === modified file 'src/gmalloc.c'
>> --- src/gmalloc.c       2014-03-04 19:02:49 +0000
>> +++ src/gmalloc.c       2014-08-05 01:35:38 +0000
>> @@ -490,8 +490,8 @@
>>   }
>>
>>   #ifdef USE_PTHREAD
>> -pthread_mutex_t _malloc_mutex = PTHREAD_MUTEX_INITIALIZER;
>> -pthread_mutex_t _aligned_blocks_mutex = PTHREAD_MUTEX_INITIALIZER;
>> +pthread_mutex_t _malloc_mutex;
>> +pthread_mutex_t _aligned_blocks_mutex;
>>   int _malloc_thread_enabled_p;
>>
>>   static void
>> @@ -526,8 +526,11 @@
>>        initialized mutexes when they are used first.  To avoid such a
>>        situation, we initialize mutexes here while their use is
>>        disabled in malloc etc.  */
>> -  pthread_mutex_init (&_malloc_mutex, NULL);
>> -  pthread_mutex_init (&_aligned_blocks_mutex, NULL);
>> +  pthread_mutexattr_t attr1, attr2;
>> +  pthread_mutexattr_settype (&attr1, PTHREAD_MUTEX_NORMAL);
>> +  pthread_mutexattr_settype (&attr2, PTHREAD_MUTEX_NORMAL);
>> +  pthread_mutex_init (&_malloc_mutex, &attr1);
>> +  pthread_mutex_init (&_aligned_blocks_mutex, &attr2);
>>     pthread_atfork (malloc_atfork_handler_prepare,
>>                    malloc_atfork_handler_parent,
>>                    malloc_atfork_handler_child);
>>
>>
>> The first hunk avoids the double initialization, but I don't understand why
>> the second hunk does anything.  Since PTHREAD_MUTEX_NORMAL is now the
>> default, shouldn't calling pthread_mutex_init with NULL second argument be
>> equivalent to my calls to pthread_mutexattr_settype?  Does this indicate a
>> Cygwin bug, or am I misunderstanding something?
>
> AFAICS you're missing something.  Your pthread_mutexattr_t attr1, attr2
> are not initialized.  They contain some random values, thus they are not
> good objects.  The calls to pthread_mutexattr_settype as well as the
> calls to pthread_mutex_init will fail with EINVAL, but you won't see it
> due to missing error handling, and you end up without mutexes at all.
> If you call pthread_mutexattr_init before calling
> pthread_mutexattr_settype the situation shoul;d be the same as before.

Thanks for catching my mistake.  Your earlier suggestion about 
explicitly setting the pthread_mutexes to be ERRORCHECK mutexes seems to 
fix the problem (as long as I remember to call pthread_mutexattr_init). 
  The revised patch is attached.  I went back to using both the static 
and dynamic initializations as in the original code, since you said 
that's harmless.

Angelo and Katsumi, could you test it and see if it solves the problems 
you reported?  If so, I'll issue new emacs releases.

Ken

[-- Attachment #2: pthread_mutex.patch --]
[-- Type: text/plain, Size: 1248 bytes --]

=== modified file 'src/gmalloc.c'
--- src/gmalloc.c	2014-03-04 19:02:49 +0000
+++ src/gmalloc.c	2014-08-05 17:30:18 +0000
@@ -490,8 +490,8 @@
 }
 
 #ifdef USE_PTHREAD
-pthread_mutex_t _malloc_mutex = PTHREAD_MUTEX_INITIALIZER;
-pthread_mutex_t _aligned_blocks_mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t _malloc_mutex = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP;
+pthread_mutex_t _aligned_blocks_mutex = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP;
 int _malloc_thread_enabled_p;
 
 static void
@@ -526,8 +526,13 @@
      initialized mutexes when they are used first.  To avoid such a
      situation, we initialize mutexes here while their use is
      disabled in malloc etc.  */
-  pthread_mutex_init (&_malloc_mutex, NULL);
-  pthread_mutex_init (&_aligned_blocks_mutex, NULL);
+  pthread_mutexattr_t attr1, attr2;
+  pthread_mutexattr_init (&attr1);
+  pthread_mutexattr_init (&attr2);
+  pthread_mutexattr_settype (&attr1, PTHREAD_MUTEX_ERRORCHECK);
+  pthread_mutexattr_settype (&attr2, PTHREAD_MUTEX_ERRORCHECK);
+  pthread_mutex_init (&_malloc_mutex, &attr1);
+  pthread_mutex_init (&_aligned_blocks_mutex, &attr2);
   pthread_atfork (malloc_atfork_handler_prepare,
 		  malloc_atfork_handler_parent,
 		  malloc_atfork_handler_child);


[-- Attachment #3: Type: text/plain, Size: 218 bytes --]

--
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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-05 17:55                 ` Ken Brown
@ 2014-08-05 18:40                   ` Corinna Vinschen
  2014-08-07 11:52                     ` Ken Brown
  2014-08-06  2:30                   ` Katsumi Yamaoka
  1 sibling, 1 reply; 84+ messages in thread
From: Corinna Vinschen @ 2014-08-05 18:40 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 3319 bytes --]

Hi Ken,

On Aug  5 13:55, Ken Brown wrote:
> On 8/5/2014 9:58 AM, Corinna Vinschen wrote:
> >On Aug  5 08:21, Ken Brown wrote:
> >>=== modified file 'src/gmalloc.c'
> >>--- src/gmalloc.c       2014-03-04 19:02:49 +0000
> >>+++ src/gmalloc.c       2014-08-05 01:35:38 +0000
> >>@@ -490,8 +490,8 @@
> >>  }
> >>
> >>  #ifdef USE_PTHREAD
> >>-pthread_mutex_t _malloc_mutex = PTHREAD_MUTEX_INITIALIZER;
> >>-pthread_mutex_t _aligned_blocks_mutex = PTHREAD_MUTEX_INITIALIZER;
> >>+pthread_mutex_t _malloc_mutex;
> >>+pthread_mutex_t _aligned_blocks_mutex;
> >>  int _malloc_thread_enabled_p;
> >>
> >>  static void
> >>@@ -526,8 +526,11 @@
> >>       initialized mutexes when they are used first.  To avoid such a
> >>       situation, we initialize mutexes here while their use is
> >>       disabled in malloc etc.  */
> >>-  pthread_mutex_init (&_malloc_mutex, NULL);
> >>-  pthread_mutex_init (&_aligned_blocks_mutex, NULL);
> >>+  pthread_mutexattr_t attr1, attr2;
> >>+  pthread_mutexattr_settype (&attr1, PTHREAD_MUTEX_NORMAL);
> >>+  pthread_mutexattr_settype (&attr2, PTHREAD_MUTEX_NORMAL);
> >>+  pthread_mutex_init (&_malloc_mutex, &attr1);
> >>+  pthread_mutex_init (&_aligned_blocks_mutex, &attr2);
> >>    pthread_atfork (malloc_atfork_handler_prepare,
> >>                   malloc_atfork_handler_parent,
> >>                   malloc_atfork_handler_child);
> >>
> >>
> >>The first hunk avoids the double initialization, but I don't understand why
> >>the second hunk does anything.  Since PTHREAD_MUTEX_NORMAL is now the
> >>default, shouldn't calling pthread_mutex_init with NULL second argument be
> >>equivalent to my calls to pthread_mutexattr_settype?  Does this indicate a
> >>Cygwin bug, or am I misunderstanding something?
> >
> >AFAICS you're missing something.  Your pthread_mutexattr_t attr1, attr2
> >are not initialized.  They contain some random values, thus they are not
> >good objects.  The calls to pthread_mutexattr_settype as well as the
> >calls to pthread_mutex_init will fail with EINVAL, but you won't see it
> >due to missing error handling, and you end up without mutexes at all.
> >If you call pthread_mutexattr_init before calling
> >pthread_mutexattr_settype the situation shoul;d be the same as before.
> 
> Thanks for catching my mistake.  Your earlier suggestion about explicitly
> setting the pthread_mutexes to be ERRORCHECK mutexes seems to fix the
> problem (as long as I remember to call pthread_mutexattr_init).  The revised
> patch is attached.  I went back to using both the static and dynamic
> initializations as in the original code, since you said that's harmless.

I'm glad to read that, but I'm still a little bit concerned.  If your
code works with ERRORCHECK mutexes but hangs with NORMAL mutexes, you
*might* miss an error case.

I'd suggest to tweak the pthread_mutex_lock/unlock calls and log the
threads calling it.  It looks like the same thread calls malloc from
malloc for some reason and it might be interesting to learn how that
happens and if it's really ok in this scenario, because it seems to
be unexpected by the code.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-05 17:55                 ` Ken Brown
  2014-08-05 18:40                   ` Corinna Vinschen
@ 2014-08-06  2:30                   ` Katsumi Yamaoka
  2014-08-06  8:48                     ` Corinna Vinschen
  1 sibling, 1 reply; 84+ messages in thread
From: Katsumi Yamaoka @ 2014-08-06  2:30 UTC (permalink / raw)
  To: cygwin

On Tue, 05 Aug 2014 13:55:31 -0400, Ken Brown wrote:
> Angelo and Katsumi, could you test it and see if it solves the
> problems you reported?  If so, I'll issue new emacs releases.

Thanks.  But currently I cannot test it since the autogen.sh
script doesn't work as the following.  I must make it work,
somehow or other...

% ./autogen.sh
[...]
Running 'autoreconf -fi -I m4' ...
      0 [main] perl 4508 child_info_fork::abort: address space needed by 'POSIX.dll' (0x2D0000) is already occupied
Can't fork, trying again in 5 seconds at /usr/bin/autoreconf-2.69 line 188.
      0 [main] perl 6264 child_info_fork::abort: address space needed by 'POSIX.dll' (0x260000) is already occupied
Can't fork, trying again in 5 seconds at /usr/lib/perl5/5.14/i686-cygwin-threads-64int/IO/File.pm line 188.
[...]

rebaseall nor reinstalling of perl and some things doesn't help.
:<

--
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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-06  2:30                   ` Katsumi Yamaoka
@ 2014-08-06  8:48                     ` Corinna Vinschen
  2014-08-06 23:41                       ` Katsumi Yamaoka
  0 siblings, 1 reply; 84+ messages in thread
From: Corinna Vinschen @ 2014-08-06  8:48 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1197 bytes --]

On Aug  6 11:30, Katsumi Yamaoka wrote:
> On Tue, 05 Aug 2014 13:55:31 -0400, Ken Brown wrote:
> > Angelo and Katsumi, could you test it and see if it solves the
> > problems you reported?  If so, I'll issue new emacs releases.
> 
> Thanks.  But currently I cannot test it since the autogen.sh
> script doesn't work as the following.  I must make it work,
> somehow or other...
> 
> % ./autogen.sh
> [...]
> Running 'autoreconf -fi -I m4' ...
>       0 [main] perl 4508 child_info_fork::abort: address space needed by 'POSIX.dll' (0x2D0000) is already occupied
> Can't fork, trying again in 5 seconds at /usr/bin/autoreconf-2.69 line 188.
>       0 [main] perl 6264 child_info_fork::abort: address space needed by 'POSIX.dll' (0x260000) is already occupied
> Can't fork, trying again in 5 seconds at /usr/lib/perl5/5.14/i686-cygwin-threads-64int/IO/File.pm line 188.
> [...]
> 
> rebaseall nor reinstalling of perl and some things doesn't help.
> :<

You definitely have a DLL collision.  What about perlrebase?


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-06  8:48                     ` Corinna Vinschen
@ 2014-08-06 23:41                       ` Katsumi Yamaoka
  2014-08-07  0:35                         ` Andrey Repin
  0 siblings, 1 reply; 84+ messages in thread
From: Katsumi Yamaoka @ 2014-08-06 23:41 UTC (permalink / raw)
  To: cygwin

On Wed, 06 Aug 2014 10:48:49 +0200, Corinna Vinschen wrote:
> On Aug  6 11:30, Katsumi Yamaoka wrote:
>> % ./autogen.sh
>> [...]
>> Running 'autoreconf -fi -I m4' ...
>>       0 [main] perl 4508 child_info_fork::abort: address space needed by 'POSIX.dll' (0x2D0000) is already occupied
[...]
> You definitely have a DLL collision.  What about perlrebase?

Oh, I did never know such a help tool existence.  Thanks so much!
But strangely enough, autogen.sh and perl work today without doing
anything in particular.  What I did since last night was only to
shutdown and to boot the PC.  Such is one of mysteries of Cygwin.

>> On Tue, 05 Aug 2014 13:55:31 -0400, Ken Brown wrote:
>>> Angelo and Katsumi, could you test it and see if it solves the
>>> problems you reported?  If so, I'll issue new emacs releases.

Great!  Now I'm running trunk Emacs that I built with the patch.
I also verified it runs with no problem for the batch jobs; I'm
using newly built ELisp packages, such as Gnus, for the first time
in these 7 days.  Thanks a lot!

--
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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-06 23:41                       ` Katsumi Yamaoka
@ 2014-08-07  0:35                         ` Andrey Repin
  0 siblings, 0 replies; 84+ messages in thread
From: Andrey Repin @ 2014-08-07  0:35 UTC (permalink / raw)
  To: Katsumi Yamaoka, cygwin

Greetings, Katsumi Yamaoka!

>>> % ./autogen.sh
>>> [...]
>>> Running 'autoreconf -fi -I m4' ...
>>>       0 [main] perl 4508 child_info_fork::abort: address space needed by 'POSIX.dll' (0x2D0000) is already occupied
> [...]
>> You definitely have a DLL collision.  What about perlrebase?

> Oh, I did never know such a help tool existence.  Thanks so much!
> But strangely enough, autogen.sh and perl work today without doing
> anything in particular.  What I did since last night was only to
> shutdown and to boot the PC.  Such is one of mysteries of Cygwin.

That's no mystery, but looks more like BLODA. One or another DLL got loaded
into different address, and everything went up in flames.


--
WBR,
Andrey Repin (anrdaemon@yandex.ru) 07.08.2014, <04:20>

Sorry for my terrible english...


--
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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-05 18:40                   ` Corinna Vinschen
@ 2014-08-07 11:52                     ` Ken Brown
  2014-08-07 12:51                       ` Corinna Vinschen
  2014-08-07 15:30                       ` Eric Blake
  0 siblings, 2 replies; 84+ messages in thread
From: Ken Brown @ 2014-08-07 11:52 UTC (permalink / raw)
  To: cygwin

Hi Corinna,

On 8/5/2014 2:40 PM, Corinna Vinschen wrote:
> Hi Ken,
>
> On Aug  5 13:55, Ken Brown wrote:
>> On 8/5/2014 9:58 AM, Corinna Vinschen wrote:
>>> On Aug  5 08:21, Ken Brown wrote:
>>>> === modified file 'src/gmalloc.c'
>>>> --- src/gmalloc.c       2014-03-04 19:02:49 +0000
>>>> +++ src/gmalloc.c       2014-08-05 01:35:38 +0000
>>>> @@ -490,8 +490,8 @@
>>>>   }
>>>>
>>>>   #ifdef USE_PTHREAD
>>>> -pthread_mutex_t _malloc_mutex = PTHREAD_MUTEX_INITIALIZER;
>>>> -pthread_mutex_t _aligned_blocks_mutex = PTHREAD_MUTEX_INITIALIZER;
>>>> +pthread_mutex_t _malloc_mutex;
>>>> +pthread_mutex_t _aligned_blocks_mutex;
>>>>   int _malloc_thread_enabled_p;
>>>>
>>>>   static void
>>>> @@ -526,8 +526,11 @@
>>>>        initialized mutexes when they are used first.  To avoid such a
>>>>        situation, we initialize mutexes here while their use is
>>>>        disabled in malloc etc.  */
>>>> -  pthread_mutex_init (&_malloc_mutex, NULL);
>>>> -  pthread_mutex_init (&_aligned_blocks_mutex, NULL);
>>>> +  pthread_mutexattr_t attr1, attr2;
>>>> +  pthread_mutexattr_settype (&attr1, PTHREAD_MUTEX_NORMAL);
>>>> +  pthread_mutexattr_settype (&attr2, PTHREAD_MUTEX_NORMAL);
>>>> +  pthread_mutex_init (&_malloc_mutex, &attr1);
>>>> +  pthread_mutex_init (&_aligned_blocks_mutex, &attr2);
>>>>     pthread_atfork (malloc_atfork_handler_prepare,
>>>>                    malloc_atfork_handler_parent,
>>>>                    malloc_atfork_handler_child);
>>>>
>>>>
>>>> The first hunk avoids the double initialization, but I don't understand why
>>>> the second hunk does anything.  Since PTHREAD_MUTEX_NORMAL is now the
>>>> default, shouldn't calling pthread_mutex_init with NULL second argument be
>>>> equivalent to my calls to pthread_mutexattr_settype?  Does this indicate a
>>>> Cygwin bug, or am I misunderstanding something?
>>>
>>> AFAICS you're missing something.  Your pthread_mutexattr_t attr1, attr2
>>> are not initialized.  They contain some random values, thus they are not
>>> good objects.  The calls to pthread_mutexattr_settype as well as the
>>> calls to pthread_mutex_init will fail with EINVAL, but you won't see it
>>> due to missing error handling, and you end up without mutexes at all.
>>> If you call pthread_mutexattr_init before calling
>>> pthread_mutexattr_settype the situation shoul;d be the same as before.
>>
>> Thanks for catching my mistake.  Your earlier suggestion about explicitly
>> setting the pthread_mutexes to be ERRORCHECK mutexes seems to fix the
>> problem (as long as I remember to call pthread_mutexattr_init).  The revised
>> patch is attached.  I went back to using both the static and dynamic
>> initializations as in the original code, since you said that's harmless.
>
> I'm glad to read that, but I'm still a little bit concerned.  If your
> code works with ERRORCHECK mutexes but hangs with NORMAL mutexes, you
> *might* miss an error case.
>
> I'd suggest to tweak the pthread_mutex_lock/unlock calls and log the
> threads calling it.  It looks like the same thread calls malloc from
> malloc for some reason and it might be interesting to learn how that
> happens and if it's really ok in this scenario, because it seems to
> be unexpected by the code.

I think I found the problem with NORMAL mutexes.  emacs calls 
pthread_atfork after initializing the mutexes, and the resulting 
'prepare' handler locks the mutexes.  (The parent and child handlers 
unlock them.)  So when emacs calls fork, the mutexes are locked, and 
shortly thereafter the Cygwin DLL calls calloc, leading to a deadlock. 
Here's a gdb backtrace showing the sequence of calls:

#0  malloc (size=size@entry=40) at gmalloc.c:919
#1  0x0053fc28 in calloc (nmemb=1, size=40) at gmalloc.c:1510
#2  0x61082074 in calloc (nmemb=1, size=40)
     at /usr/src/debug/cygwin-1.7.31-3/winsup/cygwin/malloc_wrapper.cc:100
#3  0x61003177 in operator new (s=s@entry=40)
     at /usr/src/debug/cygwin-1.7.31-3/winsup/cygwin/cxx.cc:23
#4  0x610fc9d3 in pthread_mutex::init (mutex=0x61187d34 <reent_data+852>,
     attr=0x0, initializer=0x12)
     at /usr/src/debug/cygwin-1.7.31-3/winsup/cygwin/thread.cc:3118
#5  0x610fcc13 in pthread_mutex_lock (mutex=0x61187d34 <reent_data+852>)
     at /usr/src/debug/cygwin-1.7.31-3/winsup/cygwin/thread.cc:3170
#6  0x611319d8 in __fp_lock (ptr=0x61187cd0 <reent_data+752>)
     at /usr/src/debug/cygwin-1.7.31-3/newlib/libc/stdio/findfp.c:287
#7  0x61154f75 in _fwalk (ptr=0x28d544,
     function=function@entry=0x611319c0 <__fp_lock>)
     at /usr/src/debug/cygwin-1.7.31-3/newlib/libc/stdio/fwalk.c:50
#8  0x61131dea in __fp_lock_all ()
     at /usr/src/debug/cygwin-1.7.31-3/newlib/libc/stdio/findfp.c:307
#9  0x610fa45e in pthread::atforkprepare ()
     at /usr/src/debug/cygwin-1.7.31-3/winsup/cygwin/thread.cc:2031
#10 0x61076292 in lock_pthread (this=<synthetic pointer>)
     at /usr/src/debug/cygwin-1.7.31-3/winsup/cygwin/sigproc.h:137
#11 hold_everything (x=<synthetic pointer>, this=<synthetic pointer>)
     at /usr/src/debug/cygwin-1.7.31-3/winsup/cygwin/sigproc.h:169
#12 fork () at /usr/src/debug/cygwin-1.7.31-3/winsup/cygwin/fork.cc:582

Is there a better way to deal with this issue than using ERRORCHECK mutexes?

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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-07 11:52                     ` Ken Brown
@ 2014-08-07 12:51                       ` Corinna Vinschen
  2014-08-07 18:54                         ` Ken Brown
  2014-08-07 15:30                       ` Eric Blake
  1 sibling, 1 reply; 84+ messages in thread
From: Corinna Vinschen @ 2014-08-07 12:51 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 3425 bytes --]

Hi Ken,

On Aug  7 07:51, Ken Brown wrote:
> Hi Corinna,
> 
> On 8/5/2014 2:40 PM, Corinna Vinschen wrote:
> >I'm glad to read that, but I'm still a little bit concerned.  If your
> >code works with ERRORCHECK mutexes but hangs with NORMAL mutexes, you
> >*might* miss an error case.
> >
> >I'd suggest to tweak the pthread_mutex_lock/unlock calls and log the
> >threads calling it.  It looks like the same thread calls malloc from
> >malloc for some reason and it might be interesting to learn how that
> >happens and if it's really ok in this scenario, because it seems to
> >be unexpected by the code.
> 
> I think I found the problem with NORMAL mutexes.  emacs calls pthread_atfork
> after initializing the mutexes, and the resulting 'prepare' handler locks
> the mutexes.  (The parent and child handlers unlock them.)  So when emacs
> calls fork, the mutexes are locked, and shortly thereafter the Cygwin DLL
> calls calloc, leading to a deadlock. Here's a gdb backtrace showing the
> sequence of calls:

First question:  Why does emacs use its own malloc on Cygwin rather 
than the system-provided one?  Is that really necessary?

> #0  malloc (size=size@entry=40) at gmalloc.c:919
> #1  0x0053fc28 in calloc (nmemb=1, size=40) at gmalloc.c:1510
> #2  0x61082074 in calloc (nmemb=1, size=40)
>     at /usr/src/debug/cygwin-1.7.31-3/winsup/cygwin/malloc_wrapper.cc:100
> #3  0x61003177 in operator new (s=s@entry=40)
>     at /usr/src/debug/cygwin-1.7.31-3/winsup/cygwin/cxx.cc:23
> #4  0x610fc9d3 in pthread_mutex::init (mutex=0x61187d34 <reent_data+852>,
>     attr=0x0, initializer=0x12)
>     at /usr/src/debug/cygwin-1.7.31-3/winsup/cygwin/thread.cc:3118
> #5  0x610fcc13 in pthread_mutex_lock (mutex=0x61187d34 <reent_data+852>)
>     at /usr/src/debug/cygwin-1.7.31-3/winsup/cygwin/thread.cc:3170
> #6  0x611319d8 in __fp_lock (ptr=0x61187cd0 <reent_data+752>)

Right, __fp_lock needs a pthread lock and since this lock hasn't been
used yet, it has to create it.  The pthread_mutex creation calls the
new operator which in turn calls calloc.

>     at /usr/src/debug/cygwin-1.7.31-3/newlib/libc/stdio/findfp.c:287
> #7  0x61154f75 in _fwalk (ptr=0x28d544,
>     function=function@entry=0x611319c0 <__fp_lock>)
>     at /usr/src/debug/cygwin-1.7.31-3/newlib/libc/stdio/fwalk.c:50
> #8  0x61131dea in __fp_lock_all ()
>     at /usr/src/debug/cygwin-1.7.31-3/newlib/libc/stdio/findfp.c:307
> #9  0x610fa45e in pthread::atforkprepare ()
>     at /usr/src/debug/cygwin-1.7.31-3/winsup/cygwin/thread.cc:2031
> #10 0x61076292 in lock_pthread (this=<synthetic pointer>)
>     at /usr/src/debug/cygwin-1.7.31-3/winsup/cygwin/sigproc.h:137
> #11 hold_everything (x=<synthetic pointer>, this=<synthetic pointer>)
>     at /usr/src/debug/cygwin-1.7.31-3/winsup/cygwin/sigproc.h:169
> #12 fork () at /usr/src/debug/cygwin-1.7.31-3/winsup/cygwin/fork.cc:582
> 
> Is there a better way to deal with this issue than using ERRORCHECK mutexes?

Did you check if you get an error from pthread_mutex_lock on the
second invocation of malloc?  Is it EDEADLK?  If so, you can
ignore the error, but if you want to go ahead without adding lots
of error checking you might be better off using a RECURSIVE mutex.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-07 11:52                     ` Ken Brown
  2014-08-07 12:51                       ` Corinna Vinschen
@ 2014-08-07 15:30                       ` Eric Blake
  2014-08-07 18:54                         ` Ken Brown
  1 sibling, 1 reply; 84+ messages in thread
From: Eric Blake @ 2014-08-07 15:30 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1120 bytes --]

On 08/07/2014 05:51 AM, Ken Brown wrote:
> 
> I think I found the problem with NORMAL mutexes.  emacs calls
> pthread_atfork after initializing the mutexes, and the resulting
> 'prepare' handler locks the mutexes.  (The parent and child handlers
> unlock them.)  So when emacs calls fork, the mutexes are locked, and
> shortly thereafter the Cygwin DLL calls calloc, leading to a deadlock.
> Here's a gdb backtrace showing the sequence of calls:

Arguably, that's an upstream bug in emacs.  POSIX has declared
pthread_atfork to be fundamentally useless; it is broken by design,
because you cannot use it for anything that is not async-signal-safe
without risking deadlock.  And (except for sem_post()), NONE of the
standardized locking functions are async-signal-safe.

http://austingroupbugs.net/view.php?id=858

That said, it would still be nice to support this, since even though the
theory says it is broken, there are still lots of (broken)
programs/libraries still trying to use it.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 539 bytes --]

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-07 12:51                       ` Corinna Vinschen
@ 2014-08-07 18:54                         ` Ken Brown
  0 siblings, 0 replies; 84+ messages in thread
From: Ken Brown @ 2014-08-07 18:54 UTC (permalink / raw)
  To: cygwin

On 8/7/2014 8:51 AM, Corinna Vinschen wrote:
> Hi Ken,
>
> On Aug  7 07:51, Ken Brown wrote:
>> Hi Corinna,
>>
>> On 8/5/2014 2:40 PM, Corinna Vinschen wrote:
>>> I'm glad to read that, but I'm still a little bit concerned.  If your
>>> code works with ERRORCHECK mutexes but hangs with NORMAL mutexes, you
>>> *might* miss an error case.
>>>
>>> I'd suggest to tweak the pthread_mutex_lock/unlock calls and log the
>>> threads calling it.  It looks like the same thread calls malloc from
>>> malloc for some reason and it might be interesting to learn how that
>>> happens and if it's really ok in this scenario, because it seems to
>>> be unexpected by the code.
>>
>> I think I found the problem with NORMAL mutexes.  emacs calls pthread_atfork
>> after initializing the mutexes, and the resulting 'prepare' handler locks
>> the mutexes.  (The parent and child handlers unlock them.)  So when emacs
>> calls fork, the mutexes are locked, and shortly thereafter the Cygwin DLL
>> calls calloc, leading to a deadlock. Here's a gdb backtrace showing the
>> sequence of calls:
>
> First question:  Why does emacs use its own malloc on Cygwin rather
> than the system-provided one?  Is that really necessary?

Cygwin's malloc lacks a few features that emacs requires because of the 
unusual way emacs is built.  The most important such features (or maybe 
even the only ones) are malloc_set_state and malloc_get_state.
>
>> #0  malloc (size=size@entry=40) at gmalloc.c:919
>> #1  0x0053fc28 in calloc (nmemb=1, size=40) at gmalloc.c:1510
>> #2  0x61082074 in calloc (nmemb=1, size=40)
>>      at /usr/src/debug/cygwin-1.7.31-3/winsup/cygwin/malloc_wrapper.cc:100
>> #3  0x61003177 in operator new (s=s@entry=40)
>>      at /usr/src/debug/cygwin-1.7.31-3/winsup/cygwin/cxx.cc:23
>> #4  0x610fc9d3 in pthread_mutex::init (mutex=0x61187d34 <reent_data+852>,
>>      attr=0x0, initializer=0x12)
>>      at /usr/src/debug/cygwin-1.7.31-3/winsup/cygwin/thread.cc:3118
>> #5  0x610fcc13 in pthread_mutex_lock (mutex=0x61187d34 <reent_data+852>)
>>      at /usr/src/debug/cygwin-1.7.31-3/winsup/cygwin/thread.cc:3170
>> #6  0x611319d8 in __fp_lock (ptr=0x61187cd0 <reent_data+752>)
>
> Right, __fp_lock needs a pthread lock and since this lock hasn't been
> used yet, it has to create it.  The pthread_mutex creation calls the
> new operator which in turn calls calloc.
>
>>      at /usr/src/debug/cygwin-1.7.31-3/newlib/libc/stdio/findfp.c:287
>> #7  0x61154f75 in _fwalk (ptr=0x28d544,
>>      function=function@entry=0x611319c0 <__fp_lock>)
>>      at /usr/src/debug/cygwin-1.7.31-3/newlib/libc/stdio/fwalk.c:50
>> #8  0x61131dea in __fp_lock_all ()
>>      at /usr/src/debug/cygwin-1.7.31-3/newlib/libc/stdio/findfp.c:307
>> #9  0x610fa45e in pthread::atforkprepare ()
>>      at /usr/src/debug/cygwin-1.7.31-3/winsup/cygwin/thread.cc:2031
>> #10 0x61076292 in lock_pthread (this=<synthetic pointer>)
>>      at /usr/src/debug/cygwin-1.7.31-3/winsup/cygwin/sigproc.h:137
>> #11 hold_everything (x=<synthetic pointer>, this=<synthetic pointer>)
>>      at /usr/src/debug/cygwin-1.7.31-3/winsup/cygwin/sigproc.h:169
>> #12 fork () at /usr/src/debug/cygwin-1.7.31-3/winsup/cygwin/fork.cc:582
>>
>> Is there a better way to deal with this issue than using ERRORCHECK mutexes?
>
> Did you check if you get an error from pthread_mutex_lock on the
> second invocation of malloc?  Is it EDEADLK?  If so, you can
> ignore the error, but if you want to go ahead without adding lots
> of error checking you might be better off using a RECURSIVE mutex.

I didn't check the error, but it seemed clear from the code that that 
was what was happening.  Yes, using a RECURSIVE mutex sounds like a good 
idea.  Or maybe it would be just as good to remove the call to 
pthread_atfork.  See my reply to Eric later in the thread.

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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-07 15:30                       ` Eric Blake
@ 2014-08-07 18:54                         ` Ken Brown
  2014-08-07 21:42                           ` Eric Blake
  0 siblings, 1 reply; 84+ messages in thread
From: Ken Brown @ 2014-08-07 18:54 UTC (permalink / raw)
  To: cygwin

On 8/7/2014 11:30 AM, Eric Blake wrote:
> On 08/07/2014 05:51 AM, Ken Brown wrote:
>>
>> I think I found the problem with NORMAL mutexes.  emacs calls
>> pthread_atfork after initializing the mutexes, and the resulting
>> 'prepare' handler locks the mutexes.  (The parent and child handlers
>> unlock them.)  So when emacs calls fork, the mutexes are locked, and
>> shortly thereafter the Cygwin DLL calls calloc, leading to a deadlock.
>> Here's a gdb backtrace showing the sequence of calls:
>
> Arguably, that's an upstream bug in emacs.  POSIX has declared
> pthread_atfork to be fundamentally useless; it is broken by design,
> because you cannot use it for anything that is not async-signal-safe
> without risking deadlock.  And (except for sem_post()), NONE of the
> standardized locking functions are async-signal-safe.
>
> http://austingroupbugs.net/view.php?id=858
>
> That said, it would still be nice to support this, since even though the
> theory says it is broken, there are still lots of (broken)
> programs/libraries still trying to use it.

So what do you think emacs should do instead of using pthread_atfork? 
Or is it better to just remove it?  I don't know how likely it is that 
this would cause a problem.

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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-07 18:54                         ` Ken Brown
@ 2014-08-07 21:42                           ` Eric Blake
  2014-08-08 13:27                             ` Ken Brown
  0 siblings, 1 reply; 84+ messages in thread
From: Eric Blake @ 2014-08-07 21:42 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 3329 bytes --]

On 08/07/2014 12:53 PM, Ken Brown wrote:
> On 8/7/2014 11:30 AM, Eric Blake wrote:
>> On 08/07/2014 05:51 AM, Ken Brown wrote:
>>>
>>> I think I found the problem with NORMAL mutexes.  emacs calls
>>> pthread_atfork after initializing the mutexes, and the resulting
>>> 'prepare' handler locks the mutexes.  (The parent and child handlers
>>> unlock them.)  So when emacs calls fork, the mutexes are locked, and
>>> shortly thereafter the Cygwin DLL calls calloc, leading to a deadlock.
>>> Here's a gdb backtrace showing the sequence of calls:
>>
>> Arguably, that's an upstream bug in emacs.  POSIX has declared
>> pthread_atfork to be fundamentally useless; it is broken by design,
>> because you cannot use it for anything that is not async-signal-safe
>> without risking deadlock.  And (except for sem_post()), NONE of the
>> standardized locking functions are async-signal-safe.
>>
>> http://austingroupbugs.net/view.php?id=858
>>
>> That said, it would still be nice to support this, since even though the
>> theory says it is broken, there are still lots of (broken)
>> programs/libraries still trying to use it.
> 
> So what do you think emacs should do instead of using pthread_atfork? Or
> is it better to just remove it?  I don't know how likely it is that this
> would cause a problem.

The POSIX recommendation is that multithreaded apps limit themselves
solely to async-signal-safe functions in the window between fork and
exec (or to use pthread_spawn instead of fork/exec).  I don't know what
emacs is trying to do in that window, but at this point, it's certainly
worth reporting it upstream.  If you need a pointer to the full list of
async-signal-safe functions:

http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_04
and search for "The following table defines a set of functions that
shall be async-signal-safe."

The most common deadlocks when violating async-signal-safety rules look
like this in single-threaded programs:

function calls malloc()
  malloc() grabs a non-recursive mutex
    async signal arrives
      signal handler called
        signal handler calls malloc()
          malloc() can't grab the mutex - deadlock

and this counterpart in multithreaded programs:

thread1 calls malloc()
  malloc() grabs a non-recursive mutex
thread 2 gains control and calls fork()
  because of the fork, thread1 no longer exists to release the lock
  child process calls malloc()
    malloc() tries to grab mutex, but it is locked with no thread to
release it

Switching malloc() to a recursive lock may or may not "solve" the
single-threaded deadlock (in that malloc can now obtain the mutex), but
it is probably NOT what you want to happen (unless malloc is fully
re-entrant, the inner instance will see incomplete data and either be
totally clobbered itself, or else totally clobber the outer instance
when it returns).  So it's GOOD that malloc does NOT use a recursive
mutex by default.

In the multithreaded case, you are flat out hosed. Switching to a
recursive lock does not change the picture - you are still deadlocked
waiting on thread1 to release the lock, but thread1 doesn't exist.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 539 bytes --]

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-07 21:42                           ` Eric Blake
@ 2014-08-08 13:27                             ` Ken Brown
  2014-08-08 15:39                               ` Peter Hull
  2014-08-18 12:28                               ` Ken Brown
  0 siblings, 2 replies; 84+ messages in thread
From: Ken Brown @ 2014-08-08 13:27 UTC (permalink / raw)
  To: cygwin

On 8/7/2014 5:42 PM, Eric Blake wrote:
> On 08/07/2014 12:53 PM, Ken Brown wrote:
>> On 8/7/2014 11:30 AM, Eric Blake wrote:
>>> On 08/07/2014 05:51 AM, Ken Brown wrote:
>>>>
>>>> I think I found the problem with NORMAL mutexes.  emacs calls
>>>> pthread_atfork after initializing the mutexes, and the resulting
>>>> 'prepare' handler locks the mutexes.  (The parent and child handlers
>>>> unlock them.)  So when emacs calls fork, the mutexes are locked, and
>>>> shortly thereafter the Cygwin DLL calls calloc, leading to a deadlock.
>>>> Here's a gdb backtrace showing the sequence of calls:
>>>
>>> Arguably, that's an upstream bug in emacs.  POSIX has declared
>>> pthread_atfork to be fundamentally useless; it is broken by design,
>>> because you cannot use it for anything that is not async-signal-safe
>>> without risking deadlock.  And (except for sem_post()), NONE of the
>>> standardized locking functions are async-signal-safe.
>>>
>>> http://austingroupbugs.net/view.php?id=858
>>>
>>> That said, it would still be nice to support this, since even though the
>>> theory says it is broken, there are still lots of (broken)
>>> programs/libraries still trying to use it.
>>
>> So what do you think emacs should do instead of using pthread_atfork? Or
>> is it better to just remove it?  I don't know how likely it is that this
>> would cause a problem.
>
> The POSIX recommendation is that multithreaded apps limit themselves
> solely to async-signal-safe functions in the window between fork and
> exec (or to use pthread_spawn instead of fork/exec).  I don't know what
> emacs is trying to do in that window, but at this point, it's certainly
> worth reporting it upstream.  If you need a pointer to the full list of
> async-signal-safe functions:
>
> http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_04
> and search for "The following table defines a set of functions that
> shall be async-signal-safe."
>
> The most common deadlocks when violating async-signal-safety rules look
> like this in single-threaded programs:
>
> function calls malloc()
>    malloc() grabs a non-recursive mutex
>      async signal arrives
>        signal handler called
>          signal handler calls malloc()
>            malloc() can't grab the mutex - deadlock
>
> and this counterpart in multithreaded programs:
>
> thread1 calls malloc()
>    malloc() grabs a non-recursive mutex
> thread 2 gains control and calls fork()
>    because of the fork, thread1 no longer exists to release the lock
>    child process calls malloc()
>      malloc() tries to grab mutex, but it is locked with no thread to
> release it
>
> Switching malloc() to a recursive lock may or may not "solve" the
> single-threaded deadlock (in that malloc can now obtain the mutex), but
> it is probably NOT what you want to happen (unless malloc is fully
> re-entrant, the inner instance will see incomplete data and either be
> totally clobbered itself, or else totally clobber the outer instance
> when it returns).  So it's GOOD that malloc does NOT use a recursive
> mutex by default.
>
> In the multithreaded case, you are flat out hosed. Switching to a
> recursive lock does not change the picture - you are still deadlocked
> waiting on thread1 to release the lock, but thread1 doesn't exist.

Thanks for the explanations, Eric.  I've filed an emacs bug report:

   http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18222

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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-08 13:27                             ` Ken Brown
@ 2014-08-08 15:39                               ` Peter Hull
  2014-08-09  1:38                                 ` Ken Brown
  2014-08-18 12:28                               ` Ken Brown
  1 sibling, 1 reply; 84+ messages in thread
From: Peter Hull @ 2014-08-08 15:39 UTC (permalink / raw)
  To: cygwin

A bug in Emacs? Gosh I thought it was probably just me doing something silly!

Thanks for your help everyone in tracking this down.

Ken, do you know if it's possible to subscribe to the bug report - I'd
be interested in knowing how it pans out.

Pete

--
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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-08 15:39                               ` Peter Hull
@ 2014-08-09  1:38                                 ` Ken Brown
  0 siblings, 0 replies; 84+ messages in thread
From: Ken Brown @ 2014-08-09  1:38 UTC (permalink / raw)
  To: cygwin

On 8/8/2014 11:39 AM, Peter Hull wrote:
> A bug in Emacs? Gosh I thought it was probably just me doing something silly!
>
> Thanks for your help everyone in tracking this down.
>
> Ken, do you know if it's possible to subscribe to the bug report - I'd
> be interested in knowing how it pans out.

No, I don't think so.  (You can subscribe to the bug mailing list, but 
then you'd get all emacs bug reports.)  But I'll CC you the next time I 
write to the report, and then you'll probably stay in the CC.  And you 
can keep checking back at 
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18222.

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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-08 13:27                             ` Ken Brown
  2014-08-08 15:39                               ` Peter Hull
@ 2014-08-18 12:28                               ` Ken Brown
  2014-08-18 14:58                                 ` Peter Hull
  2014-08-25 19:00                                 ` Ken Brown
  1 sibling, 2 replies; 84+ messages in thread
From: Ken Brown @ 2014-08-18 12:28 UTC (permalink / raw)
  To: cygwin

On 8/8/2014 9:26 AM, Ken Brown wrote:
> On 8/7/2014 5:42 PM, Eric Blake wrote:
>> On 08/07/2014 12:53 PM, Ken Brown wrote:
>>> On 8/7/2014 11:30 AM, Eric Blake wrote:
>>>> On 08/07/2014 05:51 AM, Ken Brown wrote:
>>>>>
>>>>> I think I found the problem with NORMAL mutexes.  emacs calls
>>>>> pthread_atfork after initializing the mutexes, and the resulting
>>>>> 'prepare' handler locks the mutexes.  (The parent and child handlers
>>>>> unlock them.)  So when emacs calls fork, the mutexes are locked, and
>>>>> shortly thereafter the Cygwin DLL calls calloc, leading to a deadlock.
>>>>> Here's a gdb backtrace showing the sequence of calls:
>>>>
>>>> Arguably, that's an upstream bug in emacs.  POSIX has declared
>>>> pthread_atfork to be fundamentally useless; it is broken by design,
>>>> because you cannot use it for anything that is not async-signal-safe
>>>> without risking deadlock.  And (except for sem_post()), NONE of the
>>>> standardized locking functions are async-signal-safe.
>>>>
>>>> http://austingroupbugs.net/view.php?id=858
>>>>
>>>> That said, it would still be nice to support this, since even though
>>>> the
>>>> theory says it is broken, there are still lots of (broken)
>>>> programs/libraries still trying to use it.
>>>
>>> So what do you think emacs should do instead of using pthread_atfork? Or
>>> is it better to just remove it?  I don't know how likely it is that this
>>> would cause a problem.
>>
>> The POSIX recommendation is that multithreaded apps limit themselves
>> solely to async-signal-safe functions in the window between fork and
>> exec (or to use pthread_spawn instead of fork/exec).  I don't know what
>> emacs is trying to do in that window, but at this point, it's certainly
>> worth reporting it upstream.  If you need a pointer to the full list of
>> async-signal-safe functions:
>>
>> http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_04
>>
>> and search for "The following table defines a set of functions that
>> shall be async-signal-safe."
>>
>> The most common deadlocks when violating async-signal-safety rules look
>> like this in single-threaded programs:
>>
>> function calls malloc()
>>    malloc() grabs a non-recursive mutex
>>      async signal arrives
>>        signal handler called
>>          signal handler calls malloc()
>>            malloc() can't grab the mutex - deadlock
>>
>> and this counterpart in multithreaded programs:
>>
>> thread1 calls malloc()
>>    malloc() grabs a non-recursive mutex
>> thread 2 gains control and calls fork()
>>    because of the fork, thread1 no longer exists to release the lock
>>    child process calls malloc()
>>      malloc() tries to grab mutex, but it is locked with no thread to
>> release it
>>
>> Switching malloc() to a recursive lock may or may not "solve" the
>> single-threaded deadlock (in that malloc can now obtain the mutex), but
>> it is probably NOT what you want to happen (unless malloc is fully
>> re-entrant, the inner instance will see incomplete data and either be
>> totally clobbered itself, or else totally clobber the outer instance
>> when it returns).  So it's GOOD that malloc does NOT use a recursive
>> mutex by default.
>>
>> In the multithreaded case, you are flat out hosed. Switching to a
>> recursive lock does not change the picture - you are still deadlocked
>> waiting on thread1 to release the lock, but thread1 doesn't exist.
>
> Thanks for the explanations, Eric.  I've filed an emacs bug report:
>
>    http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18222

I've just made a new emacs test release that includes a workaround for 
this bug.  I think I see a way to make emacs use Cygwin's malloc; if 
this works, it will provide a better fix for the bug.

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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-18 12:28                               ` Ken Brown
@ 2014-08-18 14:58                                 ` Peter Hull
  2014-08-18 15:03                                   ` Larry Hall (Cygwin)
  2014-08-25 19:00                                 ` Ken Brown
  1 sibling, 1 reply; 84+ messages in thread
From: Peter Hull @ 2014-08-18 14:58 UTC (permalink / raw)
  To: cygwin

On Mon, Aug 18, 2014 at 1:28 PM, Ken Brown <kbrown@cornell.edu> wrote:
> I've just made a new emacs test release that includes a workaround for this
> bug.  I think I see a way to make emacs use Cygwin's malloc; if this works,
> it will provide a better fix for the bug.
I'd like to give this a try. I've selected Exp mode in setup.exe but I
don't see the latest version - do I need to do anything else or is it
just a matter of waiting for the mirror to catch up (I am in the UK)?
Pete

--
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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-18 14:58                                 ` Peter Hull
@ 2014-08-18 15:03                                   ` Larry Hall (Cygwin)
  0 siblings, 0 replies; 84+ messages in thread
From: Larry Hall (Cygwin) @ 2014-08-18 15:03 UTC (permalink / raw)
  To: cygwin

On 08/18/2014 10:58 AM, Peter Hull wrote:
> On Mon, Aug 18, 2014 at 1:28 PM, Ken Brown <kbrown@cornell.edu> wrote:
>> I've just made a new emacs test release that includes a workaround for this
>> bug.  I think I see a way to make emacs use Cygwin's malloc; if this works,
>> it will provide a better fix for the bug.
> I'd like to give this a try. I've selected Exp mode in setup.exe but I
> don't see the latest version - do I need to do anything else or is it
> just a matter of waiting for the mirror to catch up (I am in the UK)?

Probably the latter.  If you don't want to wait, check out some other
mirrors.


-- 
Larry

_____________________________________________________________________

A: Yes.
 > Q: Are you sure?
 >> A: Because it reverses the logical flow of conversation.
 >>> Q: Why is top posting annoying in email?

--
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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-18 12:28                               ` Ken Brown
  2014-08-18 14:58                                 ` Peter Hull
@ 2014-08-25 19:00                                 ` Ken Brown
  2014-08-26  9:13                                   ` Peter Hull
  2014-08-26 18:55                                   ` Achim Gratz
  1 sibling, 2 replies; 84+ messages in thread
From: Ken Brown @ 2014-08-25 19:00 UTC (permalink / raw)
  To: cygwin

On 8/18/2014 8:28 AM, Ken Brown wrote:
> On 8/8/2014 9:26 AM, Ken Brown wrote:
>> On 8/7/2014 5:42 PM, Eric Blake wrote:
>>> On 08/07/2014 12:53 PM, Ken Brown wrote:
>>>> On 8/7/2014 11:30 AM, Eric Blake wrote:
>>>>> On 08/07/2014 05:51 AM, Ken Brown wrote:
>>>>>>
>>>>>> I think I found the problem with NORMAL mutexes.  emacs calls
>>>>>> pthread_atfork after initializing the mutexes, and the resulting
>>>>>> 'prepare' handler locks the mutexes.  (The parent and child handlers
>>>>>> unlock them.)  So when emacs calls fork, the mutexes are locked, and
>>>>>> shortly thereafter the Cygwin DLL calls calloc, leading to a
>>>>>> deadlock.
>>>>>> Here's a gdb backtrace showing the sequence of calls:
>>>>>
>>>>> Arguably, that's an upstream bug in emacs.  POSIX has declared
>>>>> pthread_atfork to be fundamentally useless; it is broken by design,
>>>>> because you cannot use it for anything that is not async-signal-safe
>>>>> without risking deadlock.  And (except for sem_post()), NONE of the
>>>>> standardized locking functions are async-signal-safe.
>>>>>
>>>>> http://austingroupbugs.net/view.php?id=858
>>>>>
>>>>> That said, it would still be nice to support this, since even though
>>>>> the
>>>>> theory says it is broken, there are still lots of (broken)
>>>>> programs/libraries still trying to use it.
>>>>
>>>> So what do you think emacs should do instead of using
>>>> pthread_atfork? Or
>>>> is it better to just remove it?  I don't know how likely it is that
>>>> this
>>>> would cause a problem.
>>>
>>> The POSIX recommendation is that multithreaded apps limit themselves
>>> solely to async-signal-safe functions in the window between fork and
>>> exec (or to use pthread_spawn instead of fork/exec).  I don't know what
>>> emacs is trying to do in that window, but at this point, it's certainly
>>> worth reporting it upstream.  If you need a pointer to the full list of
>>> async-signal-safe functions:
>>>
>>> http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_04
>>>
>>>
>>> and search for "The following table defines a set of functions that
>>> shall be async-signal-safe."
>>>
>>> The most common deadlocks when violating async-signal-safety rules look
>>> like this in single-threaded programs:
>>>
>>> function calls malloc()
>>>    malloc() grabs a non-recursive mutex
>>>      async signal arrives
>>>        signal handler called
>>>          signal handler calls malloc()
>>>            malloc() can't grab the mutex - deadlock
>>>
>>> and this counterpart in multithreaded programs:
>>>
>>> thread1 calls malloc()
>>>    malloc() grabs a non-recursive mutex
>>> thread 2 gains control and calls fork()
>>>    because of the fork, thread1 no longer exists to release the lock
>>>    child process calls malloc()
>>>      malloc() tries to grab mutex, but it is locked with no thread to
>>> release it
>>>
>>> Switching malloc() to a recursive lock may or may not "solve" the
>>> single-threaded deadlock (in that malloc can now obtain the mutex), but
>>> it is probably NOT what you want to happen (unless malloc is fully
>>> re-entrant, the inner instance will see incomplete data and either be
>>> totally clobbered itself, or else totally clobber the outer instance
>>> when it returns).  So it's GOOD that malloc does NOT use a recursive
>>> mutex by default.
>>>
>>> In the multithreaded case, you are flat out hosed. Switching to a
>>> recursive lock does not change the picture - you are still deadlocked
>>> waiting on thread1 to release the lock, but thread1 doesn't exist.
>>
>> Thanks for the explanations, Eric.  I've filed an emacs bug report:
>>
>>    http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18222
>
> I've just made a new emacs test release that includes a workaround for
> this bug.  I think I see a way to make emacs use Cygwin's malloc; if
> this works, it will provide a better fix for the bug.

It looks like my idea is going to work, but it needs testing to make 
sure I've implemented it correctly.  If anyone is willing to test it, 
you can download emacs-24.3.93-2 from my personal Cygwin repository:

   http://sanibeltranquility.com/cygwin/

Instructions can be found at that URL.

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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-25 19:00                                 ` Ken Brown
@ 2014-08-26  9:13                                   ` Peter Hull
  2014-08-26 18:55                                   ` Achim Gratz
  1 sibling, 0 replies; 84+ messages in thread
From: Peter Hull @ 2014-08-26  9:13 UTC (permalink / raw)
  To: cygwin

On Mon, Aug 25, 2014 at 8:00 PM, Ken Brown <kbrown@cornell.edu> wrote:
> It looks like my idea is going to work, but it needs testing to make sure
> I've implemented it correctly.  If anyone is willing to test it, you can
> download emacs-24.3.93-2 from my personal Cygwin repository:
I've downloaded it - no problems so far but I'll run with it from now
on and let know you if anything untoward happens.
Pete

--
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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-25 19:00                                 ` Ken Brown
  2014-08-26  9:13                                   ` Peter Hull
@ 2014-08-26 18:55                                   ` Achim Gratz
  2014-08-26 22:13                                     ` Ken Brown
  1 sibling, 1 reply; 84+ messages in thread
From: Achim Gratz @ 2014-08-26 18:55 UTC (permalink / raw)
  To: cygwin

Ken Brown writes:
> It looks like my idea is going to work, but it needs testing to make
> sure I've implemented it correctly.  If anyone is willing to test it,
> you can download emacs-24.3.93-2 from my personal Cygwin repository:
>
>   http://sanibeltranquility.com/cygwin/
>
> Instructions can be found at that URL.

I've switched to this version today.

I've noticed that two bugs are still present at least in the emacs-w32
version:

1) When showing the Windows desktop with Win-D and then restoring it
(including Emacs) with Win-D again, the cursor becomes a hollow
rectangle that doesn't blink.  To get the normal cursor behaviour back
you have to minimize and restore the Emacs window in the "normal" way.

2) Files that have no POSIX permissions (filemode 0000) and where access
is granted via ACL only get always opened as "read-only" and you have to
C-x C-q them before saving.  It appears that this is Cygwin specific
since on Linux the same version copes with that situation correctly
(however, the mask bits in the ACL get displayed in the group portion of
the file mode, which I've never seen happen on Cygwin, so this may be
something that Cygwin needs to do -- maybe that'd even solve the
problems that Perl has in the same situation).


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds

--
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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-26 18:55                                   ` Achim Gratz
@ 2014-08-26 22:13                                     ` Ken Brown
  2014-08-27  8:42                                       ` Corinna Vinschen
  0 siblings, 1 reply; 84+ messages in thread
From: Ken Brown @ 2014-08-26 22:13 UTC (permalink / raw)
  To: cygwin

On 8/26/2014 2:55 PM, Achim Gratz wrote:
> Ken Brown writes:
>> It looks like my idea is going to work, but it needs testing to make
>> sure I've implemented it correctly.  If anyone is willing to test it,
>> you can download emacs-24.3.93-2 from my personal Cygwin repository:
>>
>>    http://sanibeltranquility.com/cygwin/
>>
>> Instructions can be found at that URL.
>
> I've switched to this version today.
>
> I've noticed that two bugs are still present at least in the emacs-w32
> version:
>
> 1) When showing the Windows desktop with Win-D and then restoring it
> (including Emacs) with Win-D again, the cursor becomes a hollow
> rectangle that doesn't blink.  To get the normal cursor behaviour back
> you have to minimize and restore the Emacs window in the "normal" way.

This one has nothing to do with emacs.  I see the same thing in mintty, 
with just a shell prompt (bash in my case).

> 2) Files that have no POSIX permissions (filemode 0000) and where access
> is granted via ACL only get always opened as "read-only" and you have to
> C-x C-q them before saving.  It appears that this is Cygwin specific
> since on Linux the same version copes with that situation correctly
> (however, the mask bits in the ACL get displayed in the group portion of
> the file mode, which I've never seen happen on Cygwin, so this may be
> something that Cygwin needs to do -- maybe that'd even solve the
> problems that Perl has in the same situation).

AFAICT, emacs decides whether the file is writable via the system call 
faccessat.  (See the function 'check_writable' in src/fileio.c.)  This 
is not Cygwin specific.  So faccessat must be returning failure in the 
scenario you described.  I don't know if that's a Cygwin bug or not.

BTW, emacs on Cygwin doesn't directly check ACLs, because the relevant 
configure test fails.  That would explain the ACL display you see on 
Linux but not on Cygwin.  But I think this is a separate matter, not 
related to the bug you're reporting.

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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-26 22:13                                     ` Ken Brown
@ 2014-08-27  8:42                                       ` Corinna Vinschen
  2014-08-27 12:53                                         ` Ken Brown
  2014-08-27 21:05                                         ` Andrey Repin
  0 siblings, 2 replies; 84+ messages in thread
From: Corinna Vinschen @ 2014-08-27  8:42 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 2941 bytes --]

On Aug 26 18:12, Ken Brown wrote:
> On 8/26/2014 2:55 PM, Achim Gratz wrote:
> >Ken Brown writes:
> >>It looks like my idea is going to work, but it needs testing to make
> >>sure I've implemented it correctly.  If anyone is willing to test it,
> >>you can download emacs-24.3.93-2 from my personal Cygwin repository:
> >>
> >>   http://sanibeltranquility.com/cygwin/
> >>
> >>Instructions can be found at that URL.
> >
> >I've switched to this version today.
> >
> >I've noticed that two bugs are still present at least in the emacs-w32
> >version:
> >
> >1) When showing the Windows desktop with Win-D and then restoring it
> >(including Emacs) with Win-D again, the cursor becomes a hollow
> >rectangle that doesn't blink.  To get the normal cursor behaviour back
> >you have to minimize and restore the Emacs window in the "normal" way.
> 
> This one has nothing to do with emacs.  I see the same thing in mintty, with
> just a shell prompt (bash in my case).
> 
> >2) Files that have no POSIX permissions (filemode 0000) and where access
> >is granted via ACL only get always opened as "read-only" and you have to
> >C-x C-q them before saving.  It appears that this is Cygwin specific
> >since on Linux the same version copes with that situation correctly
> >(however, the mask bits in the ACL get displayed in the group portion of
> >the file mode, which I've never seen happen on Cygwin, so this may be
> >something that Cygwin needs to do -- maybe that'd even solve the
> >problems that Perl has in the same situation).
> 
> AFAICT, emacs decides whether the file is writable via the system call
> faccessat.  (See the function 'check_writable' in src/fileio.c.)  This is
> not Cygwin specific.  So faccessat must be returning failure in the scenario
> you described.  I don't know if that's a Cygwin bug or not.

faccessat/access/eaccess don't try to be intelligent by themselves.
Rather they just call a Windows function if the filesystem is mounted
with "acl" mount flags:

- Fetch file's security descriptor
- Create process impersonation token.
- Call NtAccessCheck
- If NtAccessCheck returns "not allowed", check for backup/restore
  privileges via NtPrivilegeCheck.

In "noacl" mode or on filesystems not supporting ACLs, access uses the
st_mode flags from stat() to figure out the permissions.

The relevant parts of the implementation are the check_file_access and
subsequently called check_access functions in security.cc.

If you see a bug there, please let me know.

> BTW, emacs on Cygwin doesn't directly check ACLs, because the relevant
> configure test fails.

Works for vim.  Does the Emacs configure test only check for POSIX
ACL functions and not for Solaris ACL functions, by any chance?


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-27  8:42                                       ` Corinna Vinschen
@ 2014-08-27 12:53                                         ` Ken Brown
  2014-08-27 13:47                                           ` Corinna Vinschen
  2014-08-27 15:15                                           ` Achim Gratz
  2014-08-27 21:05                                         ` Andrey Repin
  1 sibling, 2 replies; 84+ messages in thread
From: Ken Brown @ 2014-08-27 12:53 UTC (permalink / raw)
  To: cygwin

On 8/27/2014 4:42 AM, Corinna Vinschen wrote:
> On Aug 26 18:12, Ken Brown wrote:
>> On 8/26/2014 2:55 PM, Achim Gratz wrote:
>>> 2) Files that have no POSIX permissions (filemode 0000) and where access
>>> is granted via ACL only get always opened as "read-only" and you have to
>>> C-x C-q them before saving.  It appears that this is Cygwin specific
>>> since on Linux the same version copes with that situation correctly
>>> (however, the mask bits in the ACL get displayed in the group portion of
>>> the file mode, which I've never seen happen on Cygwin, so this may be
>>> something that Cygwin needs to do -- maybe that'd even solve the
>>> problems that Perl has in the same situation).
>>
>> AFAICT, emacs decides whether the file is writable via the system call
>> faccessat.  (See the function 'check_writable' in src/fileio.c.)  This is
>> not Cygwin specific.  So faccessat must be returning failure in the scenario
>> you described.  I don't know if that's a Cygwin bug or not.
>
> faccessat/access/eaccess don't try to be intelligent by themselves.
> Rather they just call a Windows function if the filesystem is mounted
> with "acl" mount flags:
>
> - Fetch file's security descriptor
> - Create process impersonation token.
> - Call NtAccessCheck
> - If NtAccessCheck returns "not allowed", check for backup/restore
>    privileges via NtPrivilegeCheck.
>
> In "noacl" mode or on filesystems not supporting ACLs, access uses the
> st_mode flags from stat() to figure out the permissions.
>
> The relevant parts of the implementation are the check_file_access and
> subsequently called check_access functions in security.cc.
>
> If you see a bug there, please let me know.

Achim, could you send me a recipe for reproducing the problem so that I 
can test further?  Please be very detailed; I have no experience with ACLs.

>> BTW, emacs on Cygwin doesn't directly check ACLs, because the relevant
>> configure test fails.
>
> Works for vim.  Does the Emacs configure test only check for POSIX
> ACL functions and not for Solaris ACL functions, by any chance?

I spoke too soon.  It does detect that Cygwin has certain ACL functions. 
  But the feature that Achim was asking about seems to get used only on 
systems that have acl_get_file.  I guess that's a POSIX ACL function.

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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-27 12:53                                         ` Ken Brown
@ 2014-08-27 13:47                                           ` Corinna Vinschen
  2014-08-27 14:40                                             ` Eric Blake
  2014-08-27 15:15                                           ` Achim Gratz
  1 sibling, 1 reply; 84+ messages in thread
From: Corinna Vinschen @ 2014-08-27 13:47 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 3090 bytes --]

On Aug 27 08:52, Ken Brown wrote:
> On 8/27/2014 4:42 AM, Corinna Vinschen wrote:
> >On Aug 26 18:12, Ken Brown wrote:
> >>On 8/26/2014 2:55 PM, Achim Gratz wrote:
> >>>2) Files that have no POSIX permissions (filemode 0000) and where access
> >>>is granted via ACL only get always opened as "read-only" and you have to
> >>>C-x C-q them before saving.  It appears that this is Cygwin specific
> >>>since on Linux the same version copes with that situation correctly
> >>>(however, the mask bits in the ACL get displayed in the group portion of
> >>>the file mode, which I've never seen happen on Cygwin, so this may be
> >>>something that Cygwin needs to do -- maybe that'd even solve the
> >>>problems that Perl has in the same situation).
> >>
> >>AFAICT, emacs decides whether the file is writable via the system call
> >>faccessat.  (See the function 'check_writable' in src/fileio.c.)  This is
> >>not Cygwin specific.  So faccessat must be returning failure in the scenario
> >>you described.  I don't know if that's a Cygwin bug or not.
> >
> >faccessat/access/eaccess don't try to be intelligent by themselves.
> >Rather they just call a Windows function if the filesystem is mounted
> >with "acl" mount flags:
> >
> >- Fetch file's security descriptor
> >- Create process impersonation token.
> >- Call NtAccessCheck
> >- If NtAccessCheck returns "not allowed", check for backup/restore
> >   privileges via NtPrivilegeCheck.
> >
> >In "noacl" mode or on filesystems not supporting ACLs, access uses the
> >st_mode flags from stat() to figure out the permissions.
> >
> >The relevant parts of the implementation are the check_file_access and
> >subsequently called check_access functions in security.cc.
> >
> >If you see a bug there, please let me know.
> 
> Achim, could you send me a recipe for reproducing the problem so that I can
> test further?  Please be very detailed; I have no experience with ACLs.

I'd be interested in a way to reproduce this as well.  On *real* local
or remote NTFS, if possible.

> >>BTW, emacs on Cygwin doesn't directly check ACLs, because the relevant
> >>configure test fails.
> >
> >Works for vim.  Does the Emacs configure test only check for POSIX
> >ACL functions and not for Solaris ACL functions, by any chance?
> 
> I spoke too soon.  It does detect that Cygwin has certain ACL functions.
> But the feature that Achim was asking about seems to get used only on
> systems that have acl_get_file.  I guess that's a POSIX ACL function.

Yes, it is.  It's pretty much the same as the Solaris/Cygwin function

  int acl (const char *path, int cmd, int nentries, aclent_t *aclbufp);

See http://docs.oracle.com/cd/E23823_01/html/816-5167/acl-2.html for
a description.  We're only supporting the aclent_t type (funny, isn't it?)
which is pretty much based on POSIX ACLs and which is defined in
/usr/include/cygwin/acl.h.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-27 13:47                                           ` Corinna Vinschen
@ 2014-08-27 14:40                                             ` Eric Blake
  2014-08-27 17:15                                               ` Ken Brown
  0 siblings, 1 reply; 84+ messages in thread
From: Eric Blake @ 2014-08-27 14:40 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1433 bytes --]

On 08/27/2014 07:47 AM, Corinna Vinschen wrote:

>>>
>>> Works for vim.  Does the Emacs configure test only check for POSIX
>>> ACL functions and not for Solaris ACL functions, by any chance?
>>
>> I spoke too soon.  It does detect that Cygwin has certain ACL functions.
>> But the feature that Achim was asking about seems to get used only on
>> systems that have acl_get_file.  I guess that's a POSIX ACL function.
> 
> Yes, it is.  It's pretty much the same as the Solaris/Cygwin function
> 
>   int acl (const char *path, int cmd, int nentries, aclent_t *aclbufp);
> 
> See http://docs.oracle.com/cd/E23823_01/html/816-5167/acl-2.html for
> a description.  We're only supporting the aclent_t type (funny, isn't it?)
> which is pretty much based on POSIX ACLs and which is defined in
> /usr/include/cygwin/acl.h.

Hmm; isn't emacs using gnulib's acl wrappers?  (Paul Eggert would know;
he's the developer that's done the most recent work on Gnulib ACL
support as well as on emacs).  In that case, shouldn't the behavior be
the same as for coreutils, which also uses gnulib?  I'm wondering if
there are any bugs in the gnulib acl wrappers which might affect more
than just emacs, and/or where a cygwin patch would make the gnulib
wrappers happier.  Sadly, I'm also not the best expert on ACLs.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 539 bytes --]

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-27 12:53                                         ` Ken Brown
  2014-08-27 13:47                                           ` Corinna Vinschen
@ 2014-08-27 15:15                                           ` Achim Gratz
  2014-08-28  7:25                                             ` Achim Gratz
  2014-08-28 10:34                                             ` Eric Blake
  1 sibling, 2 replies; 84+ messages in thread
From: Achim Gratz @ 2014-08-27 15:15 UTC (permalink / raw)
  To: cygwin

Ken Brown <kbrown <at> cornell.edu> writes:
> Achim, could you send me a recipe for reproducing the problem so that I 
> can test further?  Please be very detailed; I have no experience with ACLs.

Let's get one issue out of the way first that may be a Cygwin bug: on Linux
a file with all access removed via standard POSIX modes and then access
granted via ACL would place the mask bits of the ACL (the maximum permission
that can be granted via ACL, usually rwx) into the group portion of the
POSIX modes (ls --color would even show these in different color if you
didn't happen to notice the "+").  That doesn't happen on Cygwin and it
seems that some software optimizes based on that information to not traverse
the ACL when there's no chance to ever get a permission granted.  This
behaviour is mandated by POSIX IIUC (and it is what Linux is doing) so
unless Cygwin explicitly follows a different ACL model, I think that should
be taken care of before diving into this further.


Regards,
Achim.


--
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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-27 14:40                                             ` Eric Blake
@ 2014-08-27 17:15                                               ` Ken Brown
  0 siblings, 0 replies; 84+ messages in thread
From: Ken Brown @ 2014-08-27 17:15 UTC (permalink / raw)
  To: cygwin

On 8/27/2014 10:40 AM, Eric Blake wrote:
> On 08/27/2014 07:47 AM, Corinna Vinschen wrote:
>
>>>>
>>>> Works for vim.  Does the Emacs configure test only check for POSIX
>>>> ACL functions and not for Solaris ACL functions, by any chance?
>>>
>>> I spoke too soon.  It does detect that Cygwin has certain ACL functions.
>>> But the feature that Achim was asking about seems to get used only on
>>> systems that have acl_get_file.  I guess that's a POSIX ACL function.
>>
>> Yes, it is.  It's pretty much the same as the Solaris/Cygwin function
>>
>>    int acl (const char *path, int cmd, int nentries, aclent_t *aclbufp);
>>
>> See http://docs.oracle.com/cd/E23823_01/html/816-5167/acl-2.html for
>> a description.  We're only supporting the aclent_t type (funny, isn't it?)
>> which is pretty much based on POSIX ACLs and which is defined in
>> /usr/include/cygwin/acl.h.
>
> Hmm; isn't emacs using gnulib's acl wrappers?  (Paul Eggert would know;
> he's the developer that's done the most recent work on Gnulib ACL
> support as well as on emacs).  In that case, shouldn't the behavior be
> the same as for coreutils, which also uses gnulib?  I'm wondering if
> there are any bugs in the gnulib acl wrappers which might affect more
> than just emacs, and/or where a cygwin patch would make the gnulib
> wrappers happier.  Sadly, I'm also not the best expert on ACLs.

I'll follow up on the emacs-devel list.

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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-27  8:42                                       ` Corinna Vinschen
  2014-08-27 12:53                                         ` Ken Brown
@ 2014-08-27 21:05                                         ` Andrey Repin
  2014-08-28 10:01                                           ` Corinna Vinschen
  1 sibling, 1 reply; 84+ messages in thread
From: Andrey Repin @ 2014-08-27 21:05 UTC (permalink / raw)
  To: Corinna Vinschen

Greetings, Corinna Vinschen!

> faccessat/access/eaccess don't try to be intelligent by themselves.
> Rather they just call a Windows function if the filesystem is mounted
> with "acl" mount flags:

> - Fetch file's security descriptor
> - Create process impersonation token.
> - Call NtAccessCheck
> - If NtAccessCheck returns "not allowed", check for backup/restore
>   privileges via NtPrivilegeCheck.

> In "noacl" mode or on filesystems not supporting ACLs, access uses the
> st_mode flags from stat() to figure out the permissions.

I'm not very much into Cygwin internals, so beg pardon if I got something
wrong here... But reading this makes my internal sanity checker go into red
alarm state.

Here's why:

When Cygwin mount a filesystem with 'acl' flag set, it mangles current ACL's
set on the files to produce something that can be understood as basic POSIX
'ugly'...erm, 'ugo' permissions. Behavior least desirable in many cases.
You say, it will then use native functions to determine access rights... No
wonder they will work, since you already mangled them to suit your needs.

When Cygwin mount a filesystem with 'noacl' flag, thus let OS use true ACL's
(a feature Windows implemented surprisingly fast, while *NIX was only
proposing it... for far too long without any result in sight), it is then
followed by some magic and guesswork on Cygwin's end to find out access
rights.

If you ask me, something isn't quite right here. Or something is missing.

> The relevant parts of the implementation are the check_file_access and
> subsequently called check_access functions in security.cc.

> If you see a bug there, please let me know.

>> BTW, emacs on Cygwin doesn't directly check ACLs, because the relevant
>> configure test fails.

> Works for vim.  Does the Emacs configure test only check for POSIX
> ACL functions and not for Solaris ACL functions, by any chance?


--
WBR,
Andrey Repin (anrdaemon@yandex.ru) 28.08.2014, <00:48>

Sorry for my terrible english...


--
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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-27 15:15                                           ` Achim Gratz
@ 2014-08-28  7:25                                             ` Achim Gratz
  2014-08-28  9:55                                               ` Corinna Vinschen
  2014-08-28 10:34                                             ` Eric Blake
  1 sibling, 1 reply; 84+ messages in thread
From: Achim Gratz @ 2014-08-28  7:25 UTC (permalink / raw)
  To: cygwin

Achim Gratz <Stromeko <at> NexGo.DE> writes:
> Let's get one issue out of the way first that may be a Cygwin bug: on Linux
> a file with all access removed via standard POSIX modes and then access
> granted via ACL would place the mask bits of the ACL (the maximum permission
> that can be granted via ACL, usually rwx) into the group portion of the
> POSIX modes (ls --color would even show these in different color if you
> didn't happen to notice the "+").  That doesn't happen on Cygwin and it
> seems that some software optimizes based on that information to not traverse
> the ACL when there's no chance to ever get a permission granted.  This
> behaviour is mandated by POSIX IIUC (and it is what Linux is doing) so
> unless Cygwin explicitly follows a different ACL model, I think that should
> be taken care of before diving into this further.

As a concrete example, in the following the directory x86 shows up on Cygwin
as follows:

> getfacl x86
# file: x86
# owner: otheruser
# group: Domain Users
user::---
group::---
group:FilerAdmins:rwx
group:ShareOwners:rwx
mask:rwx
other:---
default:user::---
default:group::---
default:group:FilerAdmins:rwx
default:group:ShareOwners:rwx
default:mask:rwx
default:other:---
> ls -ld x86
d---------+ 1 otheruser Domain Users 0 Jun 23 14:09 x86/

Under Linux in the same situation you'd get

> ls -ld x86
d---rwx---+ 1 otheruser Domain Users 0 Jun 23 14:09 x86/

instead (i.e. the mask bits shown in the group portion of the standard mode
flags).  If the file was owned by your uid, then you'd get indeed

> ls -ld x86
d---------+ 1 myself Domain Users 0 Jun 23 14:09 x86/

but you'd also really have no permissions.  On Windows you do have
permission to the file in that situation since the POSIX part of the ACL
(particularly the user::--- part that revokes all access for the file owner)
are faked by Cygwin and not taken into account when the file gets finally
accessed:

> icacls x86
x86 DOM\FilerAdmins:(I)(OI)(IO)(F)
    DOM\FilerAdmins:(I)(CI)(F)
    DOM\ShareOwners:(I)(OI)(IO)(M)
    DOM\ShareOwners:(I)(CI)(M)

If getting at the correct mask is too expensive, simply always faking an
"rwx" mask might actually be better than what we have now, since once the
ACL are fully processed you'll get the correct permissions anyway.


Regards,
Achim.


--
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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-28  7:25                                             ` Achim Gratz
@ 2014-08-28  9:55                                               ` Corinna Vinschen
  2014-08-28 13:18                                                 ` Corinna Vinschen
  0 siblings, 1 reply; 84+ messages in thread
From: Corinna Vinschen @ 2014-08-28  9:55 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 3067 bytes --]

On Aug 28 07:25, Achim Gratz wrote:
> Achim Gratz <Stromeko <at> NexGo.DE> writes:
> > Let's get one issue out of the way first that may be a Cygwin bug: on Linux
> > a file with all access removed via standard POSIX modes and then access
> > granted via ACL would place the mask bits of the ACL (the maximum permission
> > that can be granted via ACL, usually rwx) into the group portion of the
> > POSIX modes (ls --color would even show these in different color if you
> > didn't happen to notice the "+").  That doesn't happen on Cygwin and it
> > seems that some software optimizes based on that information to not traverse
> > the ACL when there's no chance to ever get a permission granted.  This
> > behaviour is mandated by POSIX IIUC (and it is what Linux is doing) so
> > unless Cygwin explicitly follows a different ACL model, I think that should
> > be taken care of before diving into this further.
> 
> As a concrete example, in the following the directory x86 shows up on Cygwin
> as follows:
> 
> > getfacl x86
> # file: x86
> # owner: otheruser
> # group: Domain Users
> user::---
> group::---
> group:FilerAdmins:rwx
> group:ShareOwners:rwx
> mask:rwx
> other:---
> default:user::---
> default:group::---
> default:group:FilerAdmins:rwx
> default:group:ShareOwners:rwx
> default:mask:rwx
> default:other:---
> > ls -ld x86
> d---------+ 1 otheruser Domain Users 0 Jun 23 14:09 x86/
> 
> Under Linux in the same situation you'd get
> 
> > ls -ld x86
> d---rwx---+ 1 otheruser Domain Users 0 Jun 23 14:09 x86/
> 
> instead (i.e. the mask bits shown in the group portion of the standard mode
> flags).  If the file was owned by your uid, then you'd get indeed
> 
> > ls -ld x86
> d---------+ 1 myself Domain Users 0 Jun 23 14:09 x86/
> 
> but you'd also really have no permissions.  On Windows you do have
> permission to the file in that situation since the POSIX part of the ACL
> (particularly the user::--- part that revokes all access for the file owner)
> are faked by Cygwin and not taken into account when the file gets finally
> accessed:
> 
> > icacls x86
> x86 DOM\FilerAdmins:(I)(OI)(IO)(F)
>     DOM\FilerAdmins:(I)(CI)(F)
>     DOM\ShareOwners:(I)(OI)(IO)(M)
>     DOM\ShareOwners:(I)(CI)(M)
> 
> If getting at the correct mask is too expensive, simply always faking an
> "rwx" mask might actually be better than what we have now, since once the
> ACL are fully processed you'll get the correct permissions anyway.

Handling of the CLASS object (aka "mask") has never been fully
implemented, especially because there's no such thing as a CLASS object
in a Windows ACL.

I guess it will always be some fake, but, yes, we can try to change
stat() so that the st_mode group permissions reflect the or'ed bits of
all permissions given to non-primary users and groups.  Same in acl(2).
That might be useful.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-27 21:05                                         ` Andrey Repin
@ 2014-08-28 10:01                                           ` Corinna Vinschen
  2014-08-28 13:35                                             ` Andrey Repin
  0 siblings, 1 reply; 84+ messages in thread
From: Corinna Vinschen @ 2014-08-28 10:01 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 2123 bytes --]

On Aug 28 01:02, Andrey Repin wrote:
> Greetings, Corinna Vinschen!
> 
> > faccessat/access/eaccess don't try to be intelligent by themselves.
> > Rather they just call a Windows function if the filesystem is mounted
> > with "acl" mount flags:
> 
> > - Fetch file's security descriptor
> > - Create process impersonation token.
> > - Call NtAccessCheck
> > - If NtAccessCheck returns "not allowed", check for backup/restore
> >   privileges via NtPrivilegeCheck.
> 
> > In "noacl" mode or on filesystems not supporting ACLs, access uses the
> > st_mode flags from stat() to figure out the permissions.
> 
> I'm not very much into Cygwin internals, so beg pardon if I got something
> wrong here... But reading this makes my internal sanity checker go into red
> alarm state.
> 
> Here's why:
> 
> When Cygwin mount a filesystem with 'acl' flag set, it mangles current ACL's
> set on the files to produce something that can be understood as basic POSIX
> 'ugly'...erm, 'ugo' permissions. Behavior least desirable in many cases.
> You say, it will then use native functions to determine access rights... No
> wonder they will work, since you already mangled them to suit your needs.
> 
> When Cygwin mount a filesystem with 'noacl' flag, thus let OS use true ACL's
> (a feature Windows implemented surprisingly fast, while *NIX was only
> proposing it... for far too long without any result in sight), it is then
> followed by some magic and guesswork on Cygwin's end to find out access
> rights.
> 
> If you ask me, something isn't quite right here. Or something is missing.

It's what "acl" means on Cygwin.  "acl" means that Windowsd ACLs are used
and permissions are handled and converted to and from POSIX permissions.
"noacl" means, Cygwin ignores all ACLs and fakes ownership and POSIX
permissions only based only on filetype and DOS R/O attribute, as it has
to on filesystems not supporting ACLs, like FAT/FAT32.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-27 15:15                                           ` Achim Gratz
  2014-08-28  7:25                                             ` Achim Gratz
@ 2014-08-28 10:34                                             ` Eric Blake
  1 sibling, 0 replies; 84+ messages in thread
From: Eric Blake @ 2014-08-28 10:34 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1518 bytes --]

On 08/27/2014 09:15 AM, Achim Gratz wrote:
> Ken Brown <kbrown <at> cornell.edu> writes:
>> Achim, could you send me a recipe for reproducing the problem so that I 
>> can test further?  Please be very detailed; I have no experience with ACLs.
> 
> Let's get one issue out of the way first that may be a Cygwin bug: on Linux
> a file with all access removed via standard POSIX modes and then access
> granted via ACL would place the mask bits of the ACL (the maximum permission
> that can be granted via ACL, usually rwx) into the group portion of the
> POSIX modes (ls --color would even show these in different color if you
> didn't happen to notice the "+").  That doesn't happen on Cygwin and it
> seems that some software optimizes based on that information to not traverse
> the ACL when there's no chance to ever get a permission granted.  This
> behaviour is mandated by POSIX IIUC (and it is what Linux is doing) so
> unless Cygwin explicitly follows a different ACL model, I think that should
> be taken care of before diving into this further.

Sadly, POSIX doesn't mandate ACLs (in part because there are so many
differing implementations that it was impossible to standardize a common
ground).  So code using ACLs across multiple platforms has to deal with
quirks, and although gnulib attempts to do so, it may be a shortcoming
in the gnulib wrappers that emacs is using.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 539 bytes --]

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-28  9:55                                               ` Corinna Vinschen
@ 2014-08-28 13:18                                                 ` Corinna Vinschen
  2014-08-28 15:04                                                   ` Achim Gratz
  2014-08-28 15:27                                                   ` Achim Gratz
  0 siblings, 2 replies; 84+ messages in thread
From: Corinna Vinschen @ 2014-08-28 13:18 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 2878 bytes --]

On Aug 28 11:55, Corinna Vinschen wrote:
> On Aug 28 07:25, Achim Gratz wrote:
> > As a concrete example, in the following the directory x86 shows up on Cygwin
> > as follows:
> > 
> > > getfacl x86
> > # file: x86
> > # owner: otheruser
> > # group: Domain Users
> > user::---
> > group::---
> > group:FilerAdmins:rwx
> > group:ShareOwners:rwx
> > mask:rwx
> > other:---
> > default:user::---
> > default:group::---
> > default:group:FilerAdmins:rwx
> > default:group:ShareOwners:rwx
> > default:mask:rwx
> > default:other:---
> > > ls -ld x86
> > d---------+ 1 otheruser Domain Users 0 Jun 23 14:09 x86/
> > 
> > Under Linux in the same situation you'd get
> > 
> > > ls -ld x86
> > d---rwx---+ 1 otheruser Domain Users 0 Jun 23 14:09 x86/
> > 
> > instead (i.e. the mask bits shown in the group portion of the standard mode
> > flags).  If the file was owned by your uid, then you'd get indeed
> > 
> > > ls -ld x86
> > d---------+ 1 myself Domain Users 0 Jun 23 14:09 x86/
> > 
> > but you'd also really have no permissions.  On Windows you do have
> > permission to the file in that situation since the POSIX part of the ACL
> > (particularly the user::--- part that revokes all access for the file owner)
> > are faked by Cygwin and not taken into account when the file gets finally
> > accessed:
> > 
> > > icacls x86
> > x86 DOM\FilerAdmins:(I)(OI)(IO)(F)
> >     DOM\FilerAdmins:(I)(CI)(F)
> >     DOM\ShareOwners:(I)(OI)(IO)(M)
> >     DOM\ShareOwners:(I)(CI)(M)
> > 
> > If getting at the correct mask is too expensive, simply always faking an
> > "rwx" mask might actually be better than what we have now, since once the
> > ACL are fully processed you'll get the correct permissions anyway.
> 
> Handling of the CLASS object (aka "mask") has never been fully
> implemented, especially because there's no such thing as a CLASS object
> in a Windows ACL.
> 
> I guess it will always be some fake, but, yes, we can try to change
> stat() so that the st_mode group permissions reflect the or'ed bits of
> all permissions given to non-primary users and groups.  Same in acl(2).
> That might be useful.

I implemented this preliminary and uploaded a snapshot to
https://cygwin.com/snapshots/

"Preliminary", because this change introduces an API change:

Since the CLASS_OBJ and DEF_CLASS_OBJ entries only exist if secondary
user and group (default) entries exist, that means the default
permission entry only consists of 3 ACEs.  This in turn means, the
constant MIN_ACL_ENTRIES changed from 4 to 3.

This might negatively affect coreutils, at least `ls', even though in my
local testing it looked all normal.

Please test.


Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-28 10:01                                           ` Corinna Vinschen
@ 2014-08-28 13:35                                             ` Andrey Repin
  2014-08-28 14:10                                               ` Corinna Vinschen
  0 siblings, 1 reply; 84+ messages in thread
From: Andrey Repin @ 2014-08-28 13:35 UTC (permalink / raw)
  To: Corinna Vinschen

Greetings, Corinna Vinschen!

>> > faccessat/access/eaccess don't try to be intelligent by themselves.
>> > Rather they just call a Windows function if the filesystem is mounted
>> > with "acl" mount flags:
>> 
>> > - Fetch file's security descriptor
>> > - Create process impersonation token.
>> > - Call NtAccessCheck
>> > - If NtAccessCheck returns "not allowed", check for backup/restore
>> >   privileges via NtPrivilegeCheck.
>> 
>> > In "noacl" mode or on filesystems not supporting ACLs, access uses the
>> > st_mode flags from stat() to figure out the permissions.
>> 
>> I'm not very much into Cygwin internals, so beg pardon if I got something
>> wrong here... But reading this makes my internal sanity checker go into red
>> alarm state.
>> 
>> Here's why:
>> 
>> When Cygwin mount a filesystem with 'acl' flag set, it mangles current ACL's
>> set on the files to produce something that can be understood as basic POSIX
>> 'ugly'...erm, 'ugo' permissions. Behavior least desirable in many cases.
>> You say, it will then use native functions to determine access rights... No
>> wonder they will work, since you already mangled them to suit your needs.
>> 
>> When Cygwin mount a filesystem with 'noacl' flag, thus let OS use true ACL's
>> (a feature Windows implemented surprisingly fast, while *NIX was only
>> proposing it... for far too long without any result in sight), it is then
>> followed by some magic and guesswork on Cygwin's end to find out access
>> rights.
>> 
>> If you ask me, something isn't quite right here. Or something is missing.

> It's what "acl" means on Cygwin.  "acl" means that Windowsd ACLs are used
> and permissions are handled and converted to and from POSIX permissions.
> "noacl" means, Cygwin ignores all ACLs and fakes ownership and POSIX
> permissions only based only on filetype and DOS R/O attribute, as it has
> to on filesystems not supporting ACLs, like FAT/FAT32.

Got it.
It seems, Cygwin need a middle groung between these two for cases, where FS
support access control, but don't want to be mangled.


--
WBR,
Andrey Repin (anrdaemon@yandex.ru) 28.08.2014, <17:22>

Sorry for my terrible english...


--
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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-28 13:35                                             ` Andrey Repin
@ 2014-08-28 14:10                                               ` Corinna Vinschen
  2014-08-28 17:05                                                 ` ACL behavior in Cygwin // " Andrey Repin
  2014-08-28 18:38                                                 ` Achim Gratz
  0 siblings, 2 replies; 84+ messages in thread
From: Corinna Vinschen @ 2014-08-28 14:10 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1350 bytes --]

On Aug 28 17:23, Andrey Repin wrote:
> > It's what "acl" means on Cygwin.  "acl" means that Windowsd ACLs are used
> > and permissions are handled and converted to and from POSIX permissions.
> > "noacl" means, Cygwin ignores all ACLs and fakes ownership and POSIX
> > permissions only based only on filetype and DOS R/O attribute, as it has
> > to on filesystems not supporting ACLs, like FAT/FAT32.
> 
> Got it.
> It seems, Cygwin need a middle groung between these two for cases, where FS
> support access control, but don't want to be mangled.

I'm certainly not going to introduce another mount mode.  What Cygwin
could do is to perform ACL-based access checks independently of the
"acl"/"noacl" mount mode on FSes supporting ACLs.  However, if you want
ACLs, why not use the "acl" mount mode in the first place?

Still, it *might* makes sense in some scenarios, even if the results of
stat(2)/acl(2) may differ surprisingly from what access(2) returns.

We can also simply try it out.  A patch to enable this behaviour is
dead-simple.

Here's the prerequisite:

  Would more than one person want that *and* be willing to give this a
  *thorough* testing?


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-28 13:18                                                 ` Corinna Vinschen
@ 2014-08-28 15:04                                                   ` Achim Gratz
  2014-08-28 15:10                                                     ` Corinna Vinschen
  2014-08-28 15:27                                                   ` Achim Gratz
  1 sibling, 1 reply; 84+ messages in thread
From: Achim Gratz @ 2014-08-28 15:04 UTC (permalink / raw)
  To: cygwin

Corinna Vinschen <corinna-cygwin <at> cygwin.com> writes:
> I implemented this preliminary and uploaded a snapshot to
> https://cygwin.com/snapshots/

Oh, great!  I'll bump my machine to that snapshot tomorrow.

Since I can now compile my own DLL, would that be a good time to ask what
could be done for that link count problem on NetApp volumes?  I guess the
first step would be to patch out the forced ihash mount option?


Regards,
Achim.


--
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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-28 15:04                                                   ` Achim Gratz
@ 2014-08-28 15:10                                                     ` Corinna Vinschen
  0 siblings, 0 replies; 84+ messages in thread
From: Corinna Vinschen @ 2014-08-28 15:10 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1004 bytes --]

On Aug 28 15:04, Achim Gratz wrote:
> Corinna Vinschen <corinna-cygwin <at> cygwin.com> writes:
> > I implemented this preliminary and uploaded a snapshot to
> > https://cygwin.com/snapshots/
> 
> Oh, great!  I'll bump my machine to that snapshot tomorrow.
> 
> Since I can now compile my own DLL, would that be a good time to ask what
> could be done for that link count problem on NetApp volumes?  I guess the
> first step would be to patch out the forced ihash mount option?

It's a bug in Netapp which you won't be able to workaround in Cygwin.
Netapp inode numbers are unstable.  This is non-trivial.  Hardlinks
with different inode numbers will be a major PITA.

Unless, of course, this has been fixed.  But then again there's no way
for Cygwin to know whether it's acessing a fixed Netapp or an older
non-fixed one.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-28 13:18                                                 ` Corinna Vinschen
  2014-08-28 15:04                                                   ` Achim Gratz
@ 2014-08-28 15:27                                                   ` Achim Gratz
  2014-08-29  9:59                                                     ` Achim Gratz
  1 sibling, 1 reply; 84+ messages in thread
From: Achim Gratz @ 2014-08-28 15:27 UTC (permalink / raw)
  To: cygwin

Corinna Vinschen <corinna-cygwin <at> cygwin.com> writes:
> Since the CLASS_OBJ and DEF_CLASS_OBJ entries only exist if secondary
> user and group (default) entries exist, that means the default
> permission entry only consists of 3 ACEs.  This in turn means, the
> constant MIN_ACL_ENTRIES changed from 4 to 3.
> 
> This might negatively affect coreutils, at least `ls', even though in my
> local testing it looked all normal.
> 
> Please test.

This fixes the "read-only" problem in Emacs (so that hunch was correct). 
Perl still doesn't play, but I think the 5.18 version should get it correct.
 Will need to switch a test installation over for that, though.

Thanks!


Regards,
Achim.


--
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] 84+ messages in thread

* ACL behavior in Cygwin // Re: (call-process ...) hangs in emacs
  2014-08-28 14:10                                               ` Corinna Vinschen
@ 2014-08-28 17:05                                                 ` Andrey Repin
  2014-08-28 18:29                                                   ` Achim Gratz
  2014-08-29  8:29                                                   ` Corinna Vinschen
  2014-08-28 18:38                                                 ` Achim Gratz
  1 sibling, 2 replies; 84+ messages in thread
From: Andrey Repin @ 2014-08-28 17:05 UTC (permalink / raw)
  To: Corinna Vinschen

Greetings, Corinna Vinschen!

>> > It's what "acl" means on Cygwin.  "acl" means that Windowsd ACLs are used
>> > and permissions are handled and converted to and from POSIX permissions.
>> > "noacl" means, Cygwin ignores all ACLs and fakes ownership and POSIX
>> > permissions only based only on filetype and DOS R/O attribute, as it has
>> > to on filesystems not supporting ACLs, like FAT/FAT32.
>> 
>> Got it.
>> It seems, Cygwin need a middle groung between these two for cases, where FS
>> support access control, but don't want to be mangled.

> I'm certainly not going to introduce another mount mode.

I didn't said it has to be mount mode... besides, it doesn't make sense to
implement YA mode to do what is already done, just a little different.

> What Cygwin could do is to perform ACL-based access checks independently of
> the "acl"/"noacl" mount mode on FSes supporting ACLs.  However, if you want
> ACLs, why not use the "acl" mount mode in the first place?

ACL inheritance, mostly. POSIX'ized permissions break inheritance on newly
created files, at times making these files inaccessible to native
applications, even though inheritance rules would allow it otherwise.

> Still, it *might* makes sense in some scenarios, even if the results of
> stat(2)/acl(2) may differ surprisingly from what access(2) returns.

> We can also simply try it out.  A patch to enable this behaviour is
> dead-simple.

> Here's the prerequisite:

>   Would more than one person want that *and* be willing to give this a
>   *thorough* testing?

I'd like to hear out expected behavior from this patch first.
I might be able to do some testing, but not in the nearest month, I'm afraid.
The "list of things to do" grew out of control, and I'm trying hard to make
it shorter.
If there's no other interested parties, let's put it on ice, until you come
back from your vacation?


--
WBR,
Andrey Repin (anrdaemon@yandex.ru) 28.08.2014, <20:37>

Sorry for my terrible english...


--
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] 84+ messages in thread

* Re: ACL behavior in Cygwin // Re: (call-process ...) hangs in emacs
  2014-08-28 17:05                                                 ` ACL behavior in Cygwin // " Andrey Repin
@ 2014-08-28 18:29                                                   ` Achim Gratz
  2014-08-29  8:29                                                   ` Corinna Vinschen
  1 sibling, 0 replies; 84+ messages in thread
From: Achim Gratz @ 2014-08-28 18:29 UTC (permalink / raw)
  To: cygwin

Andrey Repin writes:
>> What Cygwin could do is to perform ACL-based access checks independently of
>> the "acl"/"noacl" mount mode on FSes supporting ACLs.  However, if you want
>> ACLs, why not use the "acl" mount mode in the first place?
>
> ACL inheritance, mostly. POSIX'ized permissions break inheritance on newly
> created files, at times making these files inaccessible to native
> applications, even though inheritance rules would allow it otherwise.

You can prevent this from happening if you forbid users to change the
ACL and enforce inheritance.  That's the reason I can't give those files
sensible POSIX permissions since they'd need to be translated into ACL
which I can't write.  All our filers are set up that way.  No I don't
think this is a good idea, but I guess there'd been one support call too
many with a share that somebody made inaccessible by fiddling with the
ACL.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

DIY Stuff:
http://Synth.Stromeko.net/DIY.html

--
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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-28 14:10                                               ` Corinna Vinschen
  2014-08-28 17:05                                                 ` ACL behavior in Cygwin // " Andrey Repin
@ 2014-08-28 18:38                                                 ` Achim Gratz
  2014-08-28 19:50                                                   ` Andrey Repin
  1 sibling, 1 reply; 84+ messages in thread
From: Achim Gratz @ 2014-08-28 18:38 UTC (permalink / raw)
  To: cygwin

Corinna Vinschen writes:
> Here's the prerequisite:
>
>   Would more than one person want that *and* be willing to give this a
>   *thorough* testing?

That really becomes an issue only if you have to use external shares
that are set up in peculiar ways and AD integration.  The number of
people that fall into that category is… small, let's say.  For the ACL
part it would be possible to set up a test bed on a local machine, but
my guess for the number of people doing that just for the fun of testing
is that it's likely to be an even smaller number.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptations for KORG EX-800 and Poly-800MkII V0.9:
http://Synth.Stromeko.net/Downloads.html#KorgSDada

--
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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-28 18:38                                                 ` Achim Gratz
@ 2014-08-28 19:50                                                   ` Andrey Repin
  0 siblings, 0 replies; 84+ messages in thread
From: Andrey Repin @ 2014-08-28 19:50 UTC (permalink / raw)
  To: Achim Gratz, cygwin

Greetings, Achim Gratz!

>> Here's the prerequisite:
>>
>>   Would more than one person want that *and* be willing to give this a
>>   *thorough* testing?

> That really becomes an issue only if you have to use external shares
> that are set up in peculiar ways and AD integration.

I've managed to do that on a local machine that is not a member of any domain.
Using noacl mount flag ever since, to avoid similar things from happening.

> The number of people that fall into that category is… small, let's say.
> For the ACL
> part it would be possible to set up a test bed on a local machine, but
> my guess for the number of people doing that just for the fun of testing
> is that it's likely to be an even smaller number.


--
WBR,
Andrey Repin (anrdaemon@yandex.ru) 28.08.2014, <23:40>

Sorry for my terrible english...

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: ACL behavior in Cygwin // Re: (call-process ...) hangs in emacs
  2014-08-28 17:05                                                 ` ACL behavior in Cygwin // " Andrey Repin
  2014-08-28 18:29                                                   ` Achim Gratz
@ 2014-08-29  8:29                                                   ` Corinna Vinschen
  1 sibling, 0 replies; 84+ messages in thread
From: Corinna Vinschen @ 2014-08-29  8:29 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 2127 bytes --]

On Aug 28 21:00, Andrey Repin wrote:
> Greetings, Corinna Vinschen!
> 
> >> > It's what "acl" means on Cygwin.  "acl" means that Windowsd ACLs are used
> >> > and permissions are handled and converted to and from POSIX permissions.
> >> > "noacl" means, Cygwin ignores all ACLs and fakes ownership and POSIX
> >> > permissions only based only on filetype and DOS R/O attribute, as it has
> >> > to on filesystems not supporting ACLs, like FAT/FAT32.
> >> 
> >> Got it.
> >> It seems, Cygwin need a middle groung between these two for cases, where FS
> >> support access control, but don't want to be mangled.
> 
> > I'm certainly not going to introduce another mount mode.
> 
> I didn't said it has to be mount mode... besides, it doesn't make sense to
> implement YA mode to do what is already done, just a little different.
> 
> > What Cygwin could do is to perform ACL-based access checks independently of
> > the "acl"/"noacl" mount mode on FSes supporting ACLs.  However, if you want
> > ACLs, why not use the "acl" mount mode in the first place?
> 
> ACL inheritance, mostly. POSIX'ized permissions break inheritance on newly
> created files, at times making these files inaccessible to native
> applications, even though inheritance rules would allow it otherwise.
> 
> > Still, it *might* makes sense in some scenarios, even if the results of
> > stat(2)/acl(2) may differ surprisingly from what access(2) returns.
> 
> > We can also simply try it out.  A patch to enable this behaviour is
> > dead-simple.
> 
> > Here's the prerequisite:
> 
> >   Would more than one person want that *and* be willing to give this a
> >   *thorough* testing?
> 
> I'd like to hear out expected behavior from this patch first.

Same output from stat(2), different output from access(2).  Access(2)
would only take the actual Windows ACL into account and let Windows
functions decide about granting or denying the requested access.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-28 15:27                                                   ` Achim Gratz
@ 2014-08-29  9:59                                                     ` Achim Gratz
  2014-08-29 11:09                                                       ` Corinna Vinschen
  2014-09-01 11:57                                                       ` Corinna Vinschen
  0 siblings, 2 replies; 84+ messages in thread
From: Achim Gratz @ 2014-08-29  9:59 UTC (permalink / raw)
  To: cygwin

Achim Gratz <Stromeko <at> NexGo.DE> writes:
> > Please test.
> 
> This fixes the "read-only" problem in Emacs (so that hunch was correct). 
> Perl still doesn't play, but I think the 5.18 version should get it correct.
> Will need to switch a test installation over for that, though.

With that snapshot in place, ssh suddenly recognized that my private key
file was more readable than it liked it to be, so it looks that it's using
the same general strategy of dealing with ACL as Emacs.  I'm starting to
like this patch very much... :-)

Regards,
Achim.


--
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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-29  9:59                                                     ` Achim Gratz
@ 2014-08-29 11:09                                                       ` Corinna Vinschen
  2014-08-29 18:08                                                         ` Ken Brown
  2014-09-01 11:57                                                       ` Corinna Vinschen
  1 sibling, 1 reply; 84+ messages in thread
From: Corinna Vinschen @ 2014-08-29 11:09 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1650 bytes --]

On Aug 29 09:58, Achim Gratz wrote:
> Achim Gratz <Stromeko <at> NexGo.DE> writes:
> > > Please test.
> > 
> > This fixes the "read-only" problem in Emacs (so that hunch was correct). 
> > Perl still doesn't play, but I think the 5.18 version should get it correct.
> > Will need to switch a test installation over for that, though.
> 
> With that snapshot in place, ssh suddenly recognized that my private key
> file was more readable than it liked it to be, so it looks that it's using
> the same general strategy of dealing with ACL as Emacs.

...which means, they don't deal with ACLs at all.  They only see what's
given in the st_mode permission bits.  With this change, the group
permission bits now show that *somebody* has certain permissions on the
file, thus the group permissions indicate a too open access for ssh, if
somebody except you have write access to the file.

Downside: If you use inherited Windows permissions, you'll often have
the case that Administrators and/or SYSTEM have full access to your
files.  This in turn shows up as rwx group permissions now.  If you
can't change the permissions (company requirements, etc) the ssh key
file permission test will get annoying.

So it's probably a very nice change (thanks a lot for bringing this up!),
but it will probably have some negative side-effects for existing
installations.

> I'm starting to
> like this patch very much... :-)

Despite of what I'm outlining above, me too :)


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-29 11:09                                                       ` Corinna Vinschen
@ 2014-08-29 18:08                                                         ` Ken Brown
  2014-08-29 19:23                                                           ` Achim Gratz
  0 siblings, 1 reply; 84+ messages in thread
From: Ken Brown @ 2014-08-29 18:08 UTC (permalink / raw)
  To: cygwin

On 8/29/2014 7:09 AM, Corinna Vinschen wrote:
> On Aug 29 09:58, Achim Gratz wrote:
>> Achim Gratz <Stromeko <at> NexGo.DE> writes:
>>>> Please test.
>>>
>>> This fixes the "read-only" problem in Emacs (so that hunch was correct).
>>> Perl still doesn't play, but I think the 5.18 version should get it correct.
>>> Will need to switch a test installation over for that, though.
>>
>> With that snapshot in place, ssh suddenly recognized that my private key
>> file was more readable than it liked it to be, so it looks that it's using
>> the same general strategy of dealing with ACL as Emacs.
>
> ...which means, they don't deal with ACLs at all.  They only see what's
> given in the st_mode permission bits.  With this change, the group
> permission bits now show that *somebody* has certain permissions on the
> file, thus the group permissions indicate a too open access for ssh, if
> somebody except you have write access to the file.
>
> Downside: If you use inherited Windows permissions, you'll often have
> the case that Administrators and/or SYSTEM have full access to your
> files.  This in turn shows up as rwx group permissions now.  If you
> can't change the permissions (company requirements, etc) the ssh key
> file permission test will get annoying.
>
> So it's probably a very nice change (thanks a lot for bringing this up!),
> but it will probably have some negative side-effects for existing
> installations.
>
>> I'm starting to
>> like this patch very much... :-)
>
> Despite of what I'm outlining above, me too :)

With the latest snapshot I can't start the sshd service.  The 
Application Log just says, "`sshd' service stopped, exit status:255". 
The problem doesn't occur with the 2014-08-27 snapshot.  I guess this 
has something to do with the new permissions on various files, but I'm 
not sure which ones.

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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-29 18:08                                                         ` Ken Brown
@ 2014-08-29 19:23                                                           ` Achim Gratz
  2014-08-29 19:36                                                             ` Ken Brown
  0 siblings, 1 reply; 84+ messages in thread
From: Achim Gratz @ 2014-08-29 19:23 UTC (permalink / raw)
  To: cygwin

Ken Brown writes:
> With the latest snapshot I can't start the sshd service.  The
> Application Log just says, "`sshd' service stopped, exit
> status:255". The problem doesn't occur with the 2014-08-27 snapshot.
> I guess this has something to do with the new permissions on various
> files, but I'm not sure which ones.

Off the top of my head for the standard installation:

/etc/ssh*
/var/empty
/var/log/sshd

When you try to debug the sshd, IIR these are the files that must be
chown'ed to the admin user that runs sshd from the terminal.  Running in
debug mode (either from the terminal or via sshd_config) should produce
messages which file or directory sshd is choking on.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf rackAttack:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds

--
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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-29 19:23                                                           ` Achim Gratz
@ 2014-08-29 19:36                                                             ` Ken Brown
  2014-08-29 20:00                                                               ` Achim Gratz
                                                                                 ` (2 more replies)
  0 siblings, 3 replies; 84+ messages in thread
From: Ken Brown @ 2014-08-29 19:36 UTC (permalink / raw)
  To: cygwin

On 8/29/2014 3:23 PM, Achim Gratz wrote:
> Ken Brown writes:
>> With the latest snapshot I can't start the sshd service.  The
>> Application Log just says, "`sshd' service stopped, exit
>> status:255". The problem doesn't occur with the 2014-08-27 snapshot.
>> I guess this has something to do with the new permissions on various
>> files, but I'm not sure which ones.
>
> Off the top of my head for the standard installation:
>
> /etc/ssh*
> /var/empty
> /var/log/sshd
>
> When you try to debug the sshd, IIR these are the files that must be
> chown'ed to the admin user that runs sshd from the terminal.  Running in
> debug mode (either from the terminal or via sshd_config) should produce
> messages which file or directory sshd is choking on.

I just checked /var/log/sshd.log.  (I hadn't thought to do that before.) 
  The last message in it is, "/var/empty must be owned by root and not 
group or world-writable."  So the problem seems to be that /var/empty 
appears to sshd to be group writable under the latest snapshot.  This is 
the "downside" that Corinna mentioned.  What needs to be done to 
/var/empty to fix this?

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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-29 19:36                                                             ` Ken Brown
@ 2014-08-29 20:00                                                               ` Achim Gratz
  2014-08-29 21:38                                                                 ` Ken Brown
  2014-08-29 20:05                                                               ` Andrey Repin
  2014-08-29 21:43                                                               ` Corinna Vinschen
  2 siblings, 1 reply; 84+ messages in thread
From: Achim Gratz @ 2014-08-29 20:00 UTC (permalink / raw)
  To: cygwin

Ken Brown writes:
> I just checked /var/log/sshd.log.  (I hadn't thought to do that
> before.) The last message in it is, "/var/empty must be owned by root
> and not group or world-writable."  So the problem seems to be that
> /var/empty appears to sshd to be group writable under the latest
> snapshot.  This is the "downside" that Corinna mentioned.  What needs
> to be done to /var/empty to fix this?

You need to remove all ACL from the directory, either with setfacl or
(from cmd) icacls or even the security tab in Explorer.  Most likely
these are inherited from the parent directory of the Cygwin
installation.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf rackAttack:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds

--
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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-29 19:36                                                             ` Ken Brown
  2014-08-29 20:00                                                               ` Achim Gratz
@ 2014-08-29 20:05                                                               ` Andrey Repin
  2014-08-29 21:43                                                               ` Corinna Vinschen
  2 siblings, 0 replies; 84+ messages in thread
From: Andrey Repin @ 2014-08-29 20:05 UTC (permalink / raw)
  To: Ken Brown, cygwin

Greetings, Ken Brown!

>>> With the latest snapshot I can't start the sshd service.  The
>>> Application Log just says, "`sshd' service stopped, exit
>>> status:255". The problem doesn't occur with the 2014-08-27 snapshot.
>>> I guess this has something to do with the new permissions on various
>>> files, but I'm not sure which ones.
>>
>> Off the top of my head for the standard installation:
>>
>> /etc/ssh*
>> /var/empty
>> /var/log/sshd
>>
>> When you try to debug the sshd, IIR these are the files that must be
>> chown'ed to the admin user that runs sshd from the terminal.  Running in
>> debug mode (either from the terminal or via sshd_config) should produce
>> messages which file or directory sshd is choking on.

> I just checked /var/log/sshd.log.  (I hadn't thought to do that before.) 
>   The last message in it is, "/var/empty must be owned by root and not 
> group or world-writable."  So the problem seems to be that /var/empty 
> appears to sshd to be group writable under the latest snapshot.  This is 
> the "downside" that Corinna mentioned.  What needs to be done to 
> /var/empty to fix this?

I think, setting ACL that will directly translate to -rwx------ without any
"+" should help.

I'm in the middle of transfer to Win7/64, can't test anything right now.


--
WBR,
Andrey Repin (anrdaemon@yandex.ru) 29.08.2014, <23:56>

Sorry for my terrible english...


--
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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-29 20:00                                                               ` Achim Gratz
@ 2014-08-29 21:38                                                                 ` Ken Brown
  0 siblings, 0 replies; 84+ messages in thread
From: Ken Brown @ 2014-08-29 21:38 UTC (permalink / raw)
  To: cygwin

On 8/29/2014 4:00 PM, Achim Gratz wrote:
> Ken Brown writes:
>> I just checked /var/log/sshd.log.  (I hadn't thought to do that
>> before.) The last message in it is, "/var/empty must be owned by root
>> and not group or world-writable."  So the problem seems to be that
>> /var/empty appears to sshd to be group writable under the latest
>> snapshot.  This is the "downside" that Corinna mentioned.  What needs
>> to be done to /var/empty to fix this?
> 
> You need to remove all ACL from the directory, either with setfacl or
> (from cmd) icacls or even the security tab in Explorer.  Most likely
> these are inherited from the parent directory of the Cygwin
> installation.

The ACLs aren't inherited.  They're explicitly set by ssh-host-config:

if ! /usr/bin/setfacl -m u:system:rwx "${LOCALSTATEDIR}/empty" >/dev/null 2>&1
then
  csih_warning "Can't set extended permissions on ${LOCALSTATEDIR}/empty!"
  let ++warning_cnt
fi

This must be done for a reason, but I don't know what it is.

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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-29 19:36                                                             ` Ken Brown
  2014-08-29 20:00                                                               ` Achim Gratz
  2014-08-29 20:05                                                               ` Andrey Repin
@ 2014-08-29 21:43                                                               ` Corinna Vinschen
  2014-08-29 23:35                                                                 ` Andrey Repin
  2 siblings, 1 reply; 84+ messages in thread
From: Corinna Vinschen @ 2014-08-29 21:43 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 2114 bytes --]

On Aug 29 15:36, Ken Brown wrote:
> On 8/29/2014 3:23 PM, Achim Gratz wrote:
> >Ken Brown writes:
> >>With the latest snapshot I can't start the sshd service.  The
> >>Application Log just says, "`sshd' service stopped, exit
> >>status:255". The problem doesn't occur with the 2014-08-27 snapshot.
> >>I guess this has something to do with the new permissions on various
> >>files, but I'm not sure which ones.
> >
> >Off the top of my head for the standard installation:
> >
> >/etc/ssh*
> >/var/empty
> >/var/log/sshd
> >
> >When you try to debug the sshd, IIR these are the files that must be
> >chown'ed to the admin user that runs sshd from the terminal.  Running in
> >debug mode (either from the terminal or via sshd_config) should produce
> >messages which file or directory sshd is choking on.
> 
> I just checked /var/log/sshd.log.  (I hadn't thought to do that before.)
> The last message in it is, "/var/empty must be owned by root and not group
> or world-writable."  So the problem seems to be that /var/empty appears to
> sshd to be group writable under the latest snapshot.  This is the "downside"
> that Corinna mentioned.  What needs to be done to /var/empty to fix this?

What needs to be done is to fix the ssh-host-config script.  It adds an
ACE for SYSTEM on /var/empty, /etc, and /var/log for no apparent reason.

I just sent a patch upstream which removes the code trying to generate
/etc and /var/log entirely (done by setup.exe) and which drops adding
a SYSTEM ACE to /var/empty.

A temporary workaround is either to remove the SYSTEM ACE:

  $ setfacl -d g:18: /var/empty

or to change /etc/sshd_config not to use privilege separation:

  UsePrivilegeSeparation no

However, this is obviously a problem for all existing installations.
OpenSSH 6.7p1 will be released pretty soon.  I will add a postinstall
script which removes the SYSTEM ACE from /var/empty at installation
time.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-29 21:43                                                               ` Corinna Vinschen
@ 2014-08-29 23:35                                                                 ` Andrey Repin
  2014-09-01 11:47                                                                   ` Corinna Vinschen
  0 siblings, 1 reply; 84+ messages in thread
From: Andrey Repin @ 2014-08-29 23:35 UTC (permalink / raw)
  To: Corinna Vinschen

Greetings, Corinna Vinschen!

> What needs to be done is to fix the ssh-host-config script.  It adds an
> ACE for SYSTEM on /var/empty, /etc, and /var/log for no apparent reason.

If it's not apparent: you can actually prevent system from accessing the file
by removing access from SYSTEM user to the file.
Windows ACL's are THAT nasty.

[C:\WINDOWS\system32]$ cacls.exe cmd.exe
C:\WINDOWS\system32\cmd.exe DAEMON2\AnrDaemon:R
                            NT AUTHORITY\SYSTEM:R
                            BUILTIN\Administrators:R
                            BUILTIN\Advanced users:R
                            BUILTIN\Users:R

[C:\WINDOWS\system32]$

Ergo, Windows now unable to delete/overwrite cmd.exe... (It's not actually a
cmd.exe - it's a renamed 4nt.exe. Windows SFC always trying to "repair" it.
And always fail. So do windowsupdate.)


--
WBR,
Andrey Repin (anrdaemon@yandex.ru) 30.08.2014, <03:25>

Sorry for my terrible english...


--
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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-29 23:35                                                                 ` Andrey Repin
@ 2014-09-01 11:47                                                                   ` Corinna Vinschen
  0 siblings, 0 replies; 84+ messages in thread
From: Corinna Vinschen @ 2014-09-01 11:47 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 765 bytes --]

On Aug 30 03:32, Andrey Repin wrote:
> Greetings, Corinna Vinschen!
> 
> > What needs to be done is to fix the ssh-host-config script.  It adds an
> > ACE for SYSTEM on /var/empty, /etc, and /var/log for no apparent reason.
> 
> If it's not apparent: you can actually prevent system from accessing the file
> by removing access from SYSTEM user to the file.

No, you can't.  You only can for accounts not having and applications
not enabling backup and restore rights.  But, anyway, this has nothing
to do with extra permissions on /var/empty which the SYSTEM account
really doesn't need.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-29  9:59                                                     ` Achim Gratz
  2014-08-29 11:09                                                       ` Corinna Vinschen
@ 2014-09-01 11:57                                                       ` Corinna Vinschen
  2014-09-01 17:38                                                         ` Achim Gratz
  1 sibling, 1 reply; 84+ messages in thread
From: Corinna Vinschen @ 2014-09-01 11:57 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1207 bytes --]

On Aug 29 09:58, Achim Gratz wrote:
> Achim Gratz <Stromeko <at> NexGo.DE> writes:
> > > Please test.
> > 
> > This fixes the "read-only" problem in Emacs (so that hunch was correct). 
> > Perl still doesn't play, but I think the 5.18 version should get it correct.
> > Will need to switch a test installation over for that, though.
> 
> With that snapshot in place, ssh suddenly recognized that my private key
> file was more readable than it liked it to be, so it looks that it's using
> the same general strategy of dealing with ACL as Emacs.  I'm starting to
> like this patch very much... :-)

Over the weekend it occured to me that the acl(2) function created ACLs
which not aligned well with the ACLs created by open(2),chmod(2), etc.
Yesterday I fixed the acl(2) function to create ACLs the same way as 
the other functions, especially in terms of the owner and group entries
and the SE_DACL_PROTECTED flag.  The changes are in the latest snapshot
from https://cygwin.com/snapshots/  Please give them a try.


Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-09-01 11:57                                                       ` Corinna Vinschen
@ 2014-09-01 17:38                                                         ` Achim Gratz
  2014-09-02  8:32                                                           ` Corinna Vinschen
  0 siblings, 1 reply; 84+ messages in thread
From: Achim Gratz @ 2014-09-01 17:38 UTC (permalink / raw)
  To: cygwin

Corinna Vinschen writes:
> Over the weekend it occured to me that the acl(2) function created ACLs
> which not aligned well with the ACLs created by open(2),chmod(2), etc.
> Yesterday I fixed the acl(2) function to create ACLs the same way as 
> the other functions, especially in terms of the owner and group entries
> and the SE_DACL_PROTECTED flag.  The changes are in the latest snapshot
> from https://cygwin.com/snapshots/  Please give them a try.

Installed, everything looks fine so far.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf rackAttack:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds

--
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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-09-01 17:38                                                         ` Achim Gratz
@ 2014-09-02  8:32                                                           ` Corinna Vinschen
  2014-09-02 17:29                                                             ` Achim Gratz
  0 siblings, 1 reply; 84+ messages in thread
From: Corinna Vinschen @ 2014-09-02  8:32 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 939 bytes --]

On Sep  1 19:38, Achim Gratz wrote:
> Corinna Vinschen writes:
> > Over the weekend it occured to me that the acl(2) function created ACLs
> > which not aligned well with the ACLs created by open(2),chmod(2), etc.
> > Yesterday I fixed the acl(2) function to create ACLs the same way as 
> > the other functions, especially in terms of the owner and group entries
> > and the SE_DACL_PROTECTED flag.  The changes are in the latest snapshot
> > from https://cygwin.com/snapshots/  Please give them a try.
> 
> Installed, everything looks fine so far.

Thanks for testing!  Maybe you'd like to have a view into the simple
as well as the more complex ACLs created by Cygwin?  Icacls output
is moderately easy to read.  If you have questions or concerns...


Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-09-02  8:32                                                           ` Corinna Vinschen
@ 2014-09-02 17:29                                                             ` Achim Gratz
  2014-09-02 19:19                                                               ` Corinna Vinschen
  0 siblings, 1 reply; 84+ messages in thread
From: Achim Gratz @ 2014-09-02 17:29 UTC (permalink / raw)
  To: cygwin

Corinna Vinschen writes:
>> Installed, everything looks fine so far.
>
> Thanks for testing!  Maybe you'd like to have a view into the simple
> as well as the more complex ACLs created by Cygwin?  Icacls output
> is moderately easy to read.  If you have questions or concerns...

I've used icacls in the past.  Is there anything that you want me to
check specifically?


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptation for Waldorf microQ V2.22R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada

--
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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-09-02 17:29                                                             ` Achim Gratz
@ 2014-09-02 19:19                                                               ` Corinna Vinschen
  2014-09-02 19:42                                                                 ` Achim Gratz
  0 siblings, 1 reply; 84+ messages in thread
From: Corinna Vinschen @ 2014-09-02 19:19 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1143 bytes --]

On Sep  2 19:29, Achim Gratz wrote:
> Corinna Vinschen writes:
> >> Installed, everything looks fine so far.
> >
> > Thanks for testing!  Maybe you'd like to have a view into the simple
> > as well as the more complex ACLs created by Cygwin?  Icacls output
> > is moderately easy to read.  If you have questions or concerns...
> 
> I've used icacls in the past.  Is there anything that you want me to
> check specifically?

More or less, just compare the ACLs and see if you find strange
differences.  This only works for the ACLs created or modified with
`setfacl' and the snapshot DLL.  The ACLs created or modified via
setfacl with the older DLLs always were different and, I have to admit,
kind of broke the default POSIX permissions created via open() or
chmod().  The idea of my change was to make them always in an identical
fashion.  The order may only vary in secondary permissions, but never
in the standard permissions, which also always come first.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-09-02 19:19                                                               ` Corinna Vinschen
@ 2014-09-02 19:42                                                                 ` Achim Gratz
  2014-09-02 20:09                                                                   ` Corinna Vinschen
  0 siblings, 1 reply; 84+ messages in thread
From: Achim Gratz @ 2014-09-02 19:42 UTC (permalink / raw)
  To: cygwin

Corinna Vinschen writes:
> More or less, just compare the ACLs and see if you find strange
> differences.  This only works for the ACLs created or modified with
> `setfacl' and the snapshot DLL.

I see, I'll have to make extra tests for this.  Usually I just have to
live with some inherited ACL that I can't change at all.

> The ACLs created or modified via
> setfacl with the older DLLs always were different and, I have to admit,
> kind of broke the default POSIX permissions created via open() or
> chmod().  The idea of my change was to make them always in an identical
> fashion.  The order may only vary in secondary permissions, but never
> in the standard permissions, which also always come first.

One thing I've noticed, but can't really say if it's related to the
change, is that setfacl quite often claims an "illegal ACL" when trying
to remove for instance the SYSTEM read permission.  Removing the group
owner ACL instead did the right thing in at least one instance.  But
I've mostly been removing all ACL from the whole tree via the explorer
security tab (for ~/.ssh/ and similar stuff).


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds

--
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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-09-02 19:42                                                                 ` Achim Gratz
@ 2014-09-02 20:09                                                                   ` Corinna Vinschen
  2014-09-02 20:23                                                                     ` Achim Gratz
  0 siblings, 1 reply; 84+ messages in thread
From: Corinna Vinschen @ 2014-09-02 20:09 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1787 bytes --]

On Sep  2 21:42, Achim Gratz wrote:
> Corinna Vinschen writes:
> > More or less, just compare the ACLs and see if you find strange
> > differences.  This only works for the ACLs created or modified with
> > `setfacl' and the snapshot DLL.
> 
> I see, I'll have to make extra tests for this.  Usually I just have to
> live with some inherited ACL that I can't change at all.
> 
> > The ACLs created or modified via
> > setfacl with the older DLLs always were different and, I have to admit,
> > kind of broke the default POSIX permissions created via open() or
> > chmod().  The idea of my change was to make them always in an identical
> > fashion.  The order may only vary in secondary permissions, but never
> > in the standard permissions, which also always come first.
> 
> One thing I've noticed, but can't really say if it's related to the
> change, is that setfacl quite often claims an "illegal ACL" when trying
> to remove for instance the SYSTEM read permission.

  $ setfacl -d g:system: filename

Note the trailing colon.  

> Removing the group
> owner ACL instead did the right thing in at least one instance.

??? It shouldn't.  Removing the standard ACL entries for the owner,
owner group, and other is not allowed:

  $ setfacl -d g:: filename
  setfacl: No error

The "No error" is a bug, related to the fact that the aclsort() function
doesn't set errno if aclcheck() failed.  I just fixed that in CVS.

> I've mostly been removing all ACL from the whole tree via the explorer
> security tab (for ~/.ssh/ and similar stuff).

*All* ACL???  That sounds wrong to me.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-09-02 20:09                                                                   ` Corinna Vinschen
@ 2014-09-02 20:23                                                                     ` Achim Gratz
  2014-09-03 13:04                                                                       ` Corinna Vinschen
  0 siblings, 1 reply; 84+ messages in thread
From: Achim Gratz @ 2014-09-02 20:23 UTC (permalink / raw)
  To: cygwin

Corinna Vinschen writes:
>   $ setfacl -d g:system: filename
>
> Note the trailing colon.  

That's not what the man page specifies, however.  I'll keep it in mind.

>> Removing the group
>> owner ACL instead did the right thing in at least one instance.
>
> ??? It shouldn't.  Removing the standard ACL entries for the owner,
> owner group, and other is not allowed:
>
>   $ setfacl -d g:: filename
>   setfacl: No error
>
> The "No error" is a bug, related to the fact that the aclsort() function
> doesn't set errno if aclcheck() failed.  I just fixed that in CVS.

I'll try that again to be sure.

>> I've mostly been removing all ACL from the whole tree via the explorer
>> security tab (for ~/.ssh/ and similar stuff).
>
> *All* ACL???  That sounds wrong to me.

Take ownership (if not already owner), give full acces and nuke
everything else (general read access for user and change permission for
admin groups of various sorts mostly).  Under Cygwin this then leaves a
clean mode (600 or 700, depending) with no "+" ACL.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf Q+, Q and microQ:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds

--
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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-09-02 20:23                                                                     ` Achim Gratz
@ 2014-09-03 13:04                                                                       ` Corinna Vinschen
  2014-09-03 17:59                                                                         ` Achim Gratz
  0 siblings, 1 reply; 84+ messages in thread
From: Corinna Vinschen @ 2014-09-03 13:04 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1183 bytes --]

On Sep  2 22:23, Achim Gratz wrote:
> Corinna Vinschen writes:
> >   $ setfacl -d g:system: filename
> >
> > Note the trailing colon.  
> 
> That's not what the man page specifies, however.  I'll keep it in mind.

I patched setfacl to not require trailing colons anymore.  This also
fixes a bug in terms of the allowed acl entries when deleting.

I now also fixed setfacl to add missing acl entries when modifying an
acl, same way as the Linux setfacl handles this.

And, this is important, given that setfacl now always creates complete
acls when modifying an acl, I could finally fix the aclcheck(2) function
in the Cygwin DLL to more thorougly test the incoming acl for all
required entries.

That means, when using the new Cygwin DLL, you also have to use the
accompanying setfacl(1).  With any older setfacl you'll suffer "setfacl:
Invalid argument" error messages.

I just created a new snapshot on https://cygwin.com/snapshots/
containing these patches.  Please give them a try.


Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-09-03 13:04                                                                       ` Corinna Vinschen
@ 2014-09-03 17:59                                                                         ` Achim Gratz
  0 siblings, 0 replies; 84+ messages in thread
From: Achim Gratz @ 2014-09-03 17:59 UTC (permalink / raw)
  To: cygwin

Corinna Vinschen writes:
> I patched setfacl to not require trailing colons anymore.  This also
> fixes a bug in terms of the allowed acl entries when deleting.

Great, thanks!

[…]
> I just created a new snapshot on https://cygwin.com/snapshots/
> containing these patches.  Please give them a try.

I'll do.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds

--
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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
@ 2014-08-06  0:15 Angelo Graziosi
  0 siblings, 0 replies; 84+ messages in thread
From: Angelo Graziosi @ 2014-08-06  0:15 UTC (permalink / raw)
  To: cygwin

Ciao, Ken

Ken Brown wrote:
> Angelo and Katsumi, could you test it and see if it solves the problems you reported?

for what I can see, with your patch (pthread_mutex.patch), the things 
work better.. at least the build does not hang and with repeated 'make 
-j3' it was also completed in Cygwin-1.7.31... :)

Ciao,
Angelo.

--
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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-08-01 10:22 ` Katsumi Yamaoka
@ 2014-08-01 11:33   ` Peter Hull
  0 siblings, 0 replies; 84+ messages in thread
From: Peter Hull @ 2014-08-01 11:33 UTC (permalink / raw)
  To: cygwin

On Fri, Aug 1, 2014 at 11:22 AM, Katsumi Yamaoka <yamaoka@jpl.org> wrote:
> On Thu, 31 Jul 2014 15:51:49 +0100, Peter Hull wrote:
> I'm troubled with a similar problem since Wednesday[1].
I checked my /var/log/setup.log. The last time I installed anything
was 2014/07/30 (Wednesday). That update included the  'cygwin' package
which for me now is at version  1.7.31-3

Pete

--
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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-07-31 14:51 Peter Hull
  2014-07-31 17:35 ` Ken Brown
  2014-08-01  7:36 ` Peter Hull
@ 2014-08-01 10:22 ` Katsumi Yamaoka
  2014-08-01 11:33   ` Peter Hull
  2 siblings, 1 reply; 84+ messages in thread
From: Katsumi Yamaoka @ 2014-08-01 10:22 UTC (permalink / raw)
  To: cygwin

On Thu, 31 Jul 2014 15:51:49 +0100, Peter Hull wrote:
> VC integration in emacs has stopped working for me in the past few
> days. Using emacs debugger I found the last function call was to
> call-process which never returns.

> I can reproduce this by evaluating in Lisp Interaction mode (using ^J)
> (call-process "pwd" nil t)
> I would expect to see the PWD and exit code but instead it just hangs
> until I Quit it (^G)

> I am using GNU Emacs 24.3.1 and confirmed cygwin and all packages up
> to date. (cygwin DLL 1.7.31)

I'm troubled with a similar problem since Wednesday[1].
/usr/bin/emacs that Cygwin distributed (24.3) seems ok, but
/usr/local/bin/emacs that I built from the Emacs trunk Tuesday
(24.4.50) got not to work conditionally.  With that version of
Emacs:

Evaluating the form `(call-process "pwd" nil t)' on normally
running Emacs works.  It returns "/home/yamaoka" immediately.
However, if it is done in the bacth mode,

/usr/local/bin/emacs -Q -batch -eval '(call-process "pwd" nil t)'

it never returns; the Emacs process eats no cpu but stays
consistently[2].  `kill -9 PID' has no effect.
Using the Windows Task Manager is the only means to kill it.

I tried to rebuild that version of Emacs from scratch, but failed.
During bootstrap, bootstrap-emacs for the first use never returns
as follows (a trigger that makes bootstrap-emacs hang might be
different, though):

make[3]: Entering directory '/Work/emacs/lisp'
EMACSLOADPATH= '../src/bootstrap-emacs.exe' -batch --no-site-file --no-site-lisp -l autoload \
   --eval "(setq generate-autoload-cookie \";;;###cal-autoload\")" \
   --eval "(setq generated-autoload-file (expand-file-name (unmsys--file-name \"calendar/cal-loaddefs.el\")))" \
   -f batch-update-autoloads ./calendar
Wrote /Work/emacs/lisp/calendar/cal-loaddefs.el

(Note: the cal-loaddefs.el file is created but bootstrap-emacs
 doesn't exit.)

Thanks.

[1] I did updating my Cygwin installation on Wednesday morning
 for the first time in the last 7 days.  It must be the trigger
 of the problem.  I also tried clean install of Cygwin, however
 it didn't help.  Since it didn't seem to finish because of
 texlive-collection-basic.sh (the bash process didn't eat cpu,
 but never returned), I redid it by marking all the texlive
 packages to be `Skip'.

[2] The configure script of some packages uses `call-process' in
 the batch mode of Emacs in order to examine something.  It
 prevents the package from being built because of this problem.

--
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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-07-31 14:51 Peter Hull
  2014-07-31 17:35 ` Ken Brown
@ 2014-08-01  7:36 ` Peter Hull
  2014-08-01 10:22 ` Katsumi Yamaoka
  2 siblings, 0 replies; 84+ messages in thread
From: Peter Hull @ 2014-08-01  7:36 UTC (permalink / raw)
  To: cygwin

>I can't reproduce this.  I tested both emacs-X11 and emacs-w32, on both
>32-bit Cygwin and 64-bit Cygwin.  Can you think of anything on your
>system that has changed in the last few days?  And have you tried
>starting emacs with the '-Q' option to rule out a problem in your
>initialization files?

No effect from emacs -Q.

I've found that if I run call-process and then quit, subsequent
invocations work.

The last 2 things I can remember installing were numpy and guile. At
the same time there were quite a number of updates to my packages and
to cygwin itself IIRC. I've not installed anything new on Windows
itself recently though there have been WIndows Updates (mostly
Defender files)

cygcheck output below.

Thanks for your help,
Pete



Cygwin Configuration Diagnostics
Current System Time: Thu Jul 31 15:48:46 2014

Windows 8.1 Professional Ver 6.3 Build 9600

Running under WOW64 on AMD64

Path:    C:\cygwin\usr\local\bin
    C:\cygwin\bin
    C:\Program Files (x86)\Intel\iCLS Client
    C:\Program Files\Intel\iCLS Client
    C:\WINDOWS
    C:\WINDOWS\system32
    C:\WINDOWS\system32\wbem
    C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit
    C:\Program Files (x86)\Microchip\MPLAB C32 Suite\bin
    C:\Program Files\Microsoft\Web Platform Installer
    C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0
    C:\Program Files (x86)\Windows Live\Shared
    C:\Program Files\Intel\Intel(R) Management Engine Components\DAL
    C:\Program Files\Intel\Intel(R) Management Engine Components\IPT
    C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL
    C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT
    C:\Program Files\Microsoft SQL Server\120\Tools\Binn
    C:\cygwin\lib\lapack

Output from C:\cygwin\bin\id.exe
UID: 1001(Peter)            GID: 545(Users)
545(Users)                  578(Hyper-V Administrators)
559(Performance Log Users)

SysDir: C:\WINDOWS\system32
WinDir: C:\WINDOWS

USER = 'Peter'
PWD = '/home/Peter'
HOME = '/home/Peter'

USERDOMAIN_ROAMINGPROFILE = 'DELL_E5530'
HOMEPATH = '\Users\Peter'
APPDATA = 'C:\Users\Peter\AppData\Roaming'
ProgramW6432 = 'C:\Program Files'
HOSTNAME = 'DELL_E5530'
SHELL = '/bin/bash'
TERM = 'xterm'
PROCESSOR_IDENTIFIER = 'Intel64 Family 6 Model 58 Stepping 9, GenuineIntel'
PROFILEREAD = 'true'
WINDIR = 'C:\WINDOWS'
PUBLIC = 'C:\Users\Public'
OLDPWD = '/tmp'
ORIGINAL_PATH = '/cygdrive/c/Program Files (x86)/Intel/iCLS
Client:/cygdrive/c/Program Files/Intel/iCLS
Client:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS/system32/wbem:/cygdrive/c/Program
Files (x86)/Windows Kits/8.1/Windows Performance
Toolkit:/cygdrive/c/Program Files (x86)/Microchip/MPLAB C32
Suite/bin:/cygdrive/c/Program Files/Microsoft/Web Platform
Installer:/cygdrive/c/Program Files (x86)/Microsoft
SDKs/TypeScript/1.0:/cygdrive/c/Program Files (x86)/Windows
Live/Shared:/cygdrive/c/Program Files/Intel/Intel(R) Management Engine
Components/DAL:/cygdrive/c/Program Files/Intel/Intel(R) Management
Engine Components/IPT:/cygdrive/c/Program Files (x86)/Intel/Intel(R)
Management Engine Components/DAL:/cygdrive/c/Program Files
(x86)/Intel/Intel(R) Management Engine
Components/IPT:/cygdrive/c/Program Files/Microsoft SQL
Server/120/Tools/Binn'
USERDOMAIN = 'DELL_E5530'
CommonProgramFiles(x86) = 'C:\Program Files (x86)\Common Files'
OS = 'Windows_NT'
ALLUSERSPROFILE = 'C:\ProgramData'
!:: = '::\'
TEMP = '/tmp'
COMMONPROGRAMFILES = 'C:\Program Files (x86)\Common Files'
USERNAME = 'Peter'
PROCESSOR_LEVEL = '6'
ProgramFiles(x86) = 'C:\Program Files (x86)'
LIBGL_ALWAYS_INDIRECT = '1'
PSModulePath = 'C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\'
FP_NO_HOST_CHECK = 'NO'
SYSTEMDRIVE = 'C:'
PROCESSOR_ARCHITEW6432 = 'AMD64'
LANG = 'en_US.UTF-8'
VS120COMNTOOLS = 'C:\Program Files (x86)\Microsoft Visual Studio
12.0\Common7\Tools\'
USERPROFILE = 'C:\Users\Peter'
TZ = 'Europe/London'
Data_FuncRetVal = 'True'
PS1 = '\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\n\$ '
LOGONSERVER = '\\MicrosoftAccount'
CommonProgramW6432 = 'C:\Program Files\Common Files'
PROCESSOR_ARCHITECTURE = 'x86'
LOCALAPPDATA = 'C:\Users\Peter\AppData\Local'
ProgramData = 'C:\ProgramData'
EXECIGNORE = '*.dll'
SHLVL = '1'
PATHEXT = '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC'
HOMEDRIVE = 'C:'
VBOX_MSI_INSTALL_PATH = 'C:\Program Files\Oracle\VirtualBox\'
COMSPEC = 'C:\WINDOWS\system32\cmd.exe'
TMP = '/tmp'
SYSTEMROOT = 'C:\WINDOWS'
MERGE_INI = 'C:\Mortara Instrument Inc\ELI Link\merge.ini'
PRINTER = 'Canon MX510 series Printer (Copy 1)'
PROCESSOR_REVISION = '3a09'
INFOPATH = '/usr/local/info:/usr/share/info:/usr/info'
PROGRAMFILES = 'C:\Program Files (x86)'
VS110COMNTOOLS = 'C:\Program Files (x86)\Microsoft Visual Studio
11.0\Common7\Tools\'
NUMBER_OF_PROCESSORS = '4'
SESSIONNAME = 'Console'
COMPUTERNAME = 'DELL_E5530'
_ = '/usr/bin/cygcheck'

HKEY_CURRENT_USER\Software\Cygwin
HKEY_CURRENT_USER\Software\Cygwin\Installations
  (default) = '\??\C:\cygwin'
HKEY_CURRENT_USER\Software\Cygwin\Program Options
HKEY_CURRENT_USER\Software\Cygwin\setup
HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin
HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\Installations
  (default) = '\??\C:\cygwin'
HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\Program Options
HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\setup
  (default) = 'C:\cygwin'

obcaseinsensitive set to 1

Cygwin installations found in the registry:
  System: Key: c5e39b7a9d22bafb Path: C:\cygwin
  User:   Key: c5e39b7a9d22bafb Path: C:\cygwin

c:  hd  NTFS    466167Mb  54% CP CS UN PA FC     OS
d:  cd             N/A    N/A

C:\cygwin        /          system  binary,auto
C:\cygwin\bin    /usr/bin   system  binary,auto
C:\cygwin\lib    /usr/lib   system  binary,auto
cygdrive prefix  /cygdrive  user    binary,auto

Found: C:\cygwin\bin\awk
 -> C:\cygwin\bin\gawk.exe
Found: C:\cygwin\bin\bash.exe
Found: C:\cygwin\bin\cat.exe
Found: C:\cygwin\bin\cp.exe
Found: C:\cygwin\bin\cpp.exe
Not Found: crontab
Found: C:\cygwin\bin\find.exe
Found: C:\WINDOWS\system32\find.exe
Warning: C:\cygwin\bin\find.exe hides C:\WINDOWS\system32\find.exe
Found: C:\cygwin\bin\gcc.exe
Found: C:\cygwin\bin\gdb.exe
Found: C:\cygwin\bin\grep.exe
Found: C:\cygwin\bin\kill.exe
Found: C:\cygwin\bin\ld.exe
Found: C:\cygwin\bin\ls.exe
Found: C:\cygwin\bin\make.exe
Found: C:\cygwin\bin\mv.exe
Not Found: patch
Found: C:\cygwin\bin\perl.exe
Found: C:\cygwin\bin\rm.exe
Found: C:\cygwin\bin\sed.exe
Found: C:\cygwin\bin\ssh.exe
Found: C:\cygwin\bin\sh.exe
Found: C:\cygwin\bin\tar.exe
Found: C:\cygwin\bin\test.exe
Found: C:\cygwin\bin\vi.exe
Found: C:\cygwin\bin\vim.exe

   35k 2013/07/13 C:\cygwin\bin\cygamd-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygamd-0.dll" v0.0 ts=2013-07-13 18:50
   38k 2013/07/23 C:\cygwin\bin\cygargp-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygargp-0.dll" v0.0 ts=2013-07-23 15:35
  300k 2013/11/17 C:\cygwin\bin\cygarpack-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygarpack-0.dll" v0.0 ts=2013-11-17 06:32
  547k 2014/03/23 C:\cygwin\bin\cygasn1-8.dll - os=4.0 img=1.0 sys=4.0
                  "cygasn1-8.dll" v0.0 ts=2014-03-23 23:03
   87k 2014/07/22 C:\cygwin\bin\cygatomic-1.dll - os=4.0 img=1.0 sys=4.0
                  "cygatomic-1.dll" v0.0 ts=1970-01-01 00:00
   14k 2012/05/04 C:\cygwin\bin\cygattr-1.dll - os=4.0 img=1.0 sys=4.0
                  "cygattr-1.dll" v0.0 ts=2012-05-04 12:35
  191k 2014/07/09 C:\cygwin\bin\cygblkid-1.dll - os=4.0 img=1.0 sys=4.0
                  "cygblkid-1.dll" v0.0 ts=1970-01-01 00:00
   62k 2011/05/21 C:\cygwin\bin\cygbz2-1.dll - os=4.0 img=1.0 sys=4.0
                  "cygbz2-1.dll" v0.0 ts=2011-05-21 20:16
 1094k 2014/03/12 C:\cygwin\bin\cygcairo-2.dll - os=4.0 img=1.0 sys=4.0
                  "cygcairo-2.dll" v0.0 ts=2014-03-12 16:07
   23k 2014/03/12 C:\cygwin\bin\cygcairo-gobject-2.dll - os=4.0 img=1.0 sys=4.0
                  "cygcairo-gobject-2.dll" v0.0 ts=2014-03-12 16:08
  121k 2014/03/12 C:\cygwin\bin\cygcairo-script-interpreter-2.dll -
os=4.0 img=1.0 sys=4.0
                  "cygcairo-script-interpreter-2.dll" v0.0 ts=2014-03-12 16:08
   37k 2013/07/13 C:\cygwin\bin\cygcamd-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygcamd-0.dll" v0.0 ts=2013-07-13 19:14
   41k 2013/07/13 C:\cygwin\bin\cygccolamd-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygccolamd-0.dll" v0.0 ts=2013-07-13 19:26
    8k 2011/10/16 C:\cygwin\bin\cygcharset-1.dll - os=4.0 img=1.0 sys=4.0
                  "cygcharset-1.dll" v0.0 ts=2011-10-16 18:00
  811k 2013/07/13 C:\cygwin\bin\cygcholmod-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygcholmod-0.dll" v0.0 ts=2013-07-13 20:42
  115k 2013/04/11 C:\cygwin\bin\cygcloog-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygcloog-0.dll" v0.0 ts=2013-04-11 19:44
  125k 2013/05/09 C:\cygwin\bin\cygcloog-isl-4.dll - os=4.0 img=1.0 sys=4.0
                  "cygcloog-isl-4.dll" v0.0 ts=2013-05-09 08:37
   27k 2013/07/13 C:\cygwin\bin\cygcolamd-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygcolamd-0.dll" v0.0 ts=2013-07-13 19:01
   14k 2014/06/09 C:\cygwin\bin\cygcom_err-2.dll - os=4.0 img=1.0 sys=4.0
                  "cygcom_err-2.dll" v0.0 ts=1970-01-01 00:00
    7k 2012/05/07 C:\cygwin\bin\cygcrypt-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygcrypt-0.dll" v0.0 ts=2012-05-07 12:18
 1520k 2014/06/06 C:\cygwin\bin\cygcrypto-0.9.8.dll - os=4.0 img=1.0 sys=4.0
                  "cygcrypto-0.9.8.dll" v0.0 ts=1970-01-01 00:00
 1774k 2014/06/06 C:\cygwin\bin\cygcrypto-1.0.0.dll - os=4.0 img=1.0 sys=4.0
                  "cygcrypto-1.0.0.dll" v0.0 ts=1970-01-01 00:00
  440k 2014/05/23 C:\cygwin\bin\cygcurl-4.dll - os=4.0 img=1.0 sys=4.0
                  "cygcurl-4.dll" v0.0 ts=1970-01-01 00:00
  164k 2013/07/13 C:\cygwin\bin\cygcxsparse-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygcxsparse-0.dll" v0.0 ts=2013-07-13 19:42
   20k 2013/04/12 C:\cygwin\bin\cygdatrie-1.dll - os=4.0 img=1.0 sys=4.0
                  "cygdatrie-1.dll" v0.0 ts=2013-04-12 12:01
  929k 2011/11/10 C:\cygwin\bin\cygdb-4.5.dll - os=4.0 img=1.0 sys=4.0
                  "cygdb-4.5.dll" v0.0 ts=2011-11-10 19:52
 1284k 2011/11/10 C:\cygwin\bin\cygdb-4.8.dll - os=4.0 img=1.0 sys=4.0
                  "cygdb-4.8.dll" v0.0 ts=2011-11-10 18:45
  270k 2014/04/01 C:\cygwin\bin\cygdbus-1-3.dll - os=4.0 img=1.0 sys=4.0
                  "cygdbus-1-3.dll" v0.0 ts=1970-01-01 00:00
   93k 2011/11/10 C:\cygwin\bin\cygdb_cxx-4.5.dll - os=4.0 img=1.0 sys=4.0
                  "cygdb_cxx-4.5.dll" v0.0 ts=2011-11-10 19:53
  105k 2011/11/10 C:\cygwin\bin\cygdb_cxx-4.8.dll - os=4.0 img=1.0 sys=4.0
                  "cygdb_cxx-4.8.dll" v0.0 ts=2011-11-10 18:46
  171k 2014/02/10 C:\cygwin\bin\cygdialog-11.dll - os=4.0 img=1.0 sys=4.0
                  "cygdialog-11.dll" v0.0 ts=2014-02-10 01:34
  159k 2013/10/20 C:\cygwin\bin\cygedit-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygedit-0.dll" v0.0 ts=2013-10-20 22:09
  153k 2013/07/31 C:\cygwin\bin\cygexpat-1.dll - os=4.0 img=1.0 sys=4.0
                  "cygexpat-1.dll" v0.0 ts=2013-07-31 22:33
   31k 2013/08/06 C:\cygwin\bin\cygfam-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygfam-0.dll" v0.0 ts=2013-08-06 18:44
   21k 2011/10/26 C:\cygwin\bin\cygffi-4.dll - os=4.0 img=1.0 sys=4.0
                  "cygffi-4.dll" v0.0 ts=2011-10-23 14:33
   24k 2013/05/12 C:\cygwin\bin\cygffi-6.dll - os=4.0 img=1.0 sys=4.0
                  "cygffi-6.dll" v0.0 ts=2013-05-12 22:40
  854k 2014/04/13 C:\cygwin\bin\cygfftw3-3.dll - os=4.0 img=1.0 sys=4.0
                  "cygfftw3-3.dll" v0.0 ts=1970-01-01 00:00
  823k 2014/04/13 C:\cygwin\bin\cygfftw3f-3.dll - os=4.0 img=1.0 sys=4.0
                  "cygfftw3f-3.dll" v0.0 ts=1970-01-01 00:00
   25k 2014/04/13 C:\cygwin\bin\cygfftw3f_threads-3.dll - os=4.0 img=1.0 sys=4.0
                  "cygfftw3f_threads-3.dll" v0.0 ts=1970-01-01 00:00
   25k 2014/04/13 C:\cygwin\bin\cygfftw3_threads-3.dll - os=4.0 img=1.0 sys=4.0
                  "cygfftw3_threads-3.dll" v0.0 ts=1970-01-01 00:00
 1018k 2013/09/10 C:\cygwin\bin\cygfltk-1.3.dll - os=4.0 img=1.0 sys=4.0
                  "cygfltk-1.3.dll" v0.0 ts=2013-09-10 18:44
   21k 2013/09/10 C:\cygwin\bin\cygfltk_forms-1.3.dll - os=4.0 img=1.0 sys=4.0
                  "cygfltk_forms-1.3.dll" v0.0 ts=2013-09-10 18:45
   86k 2013/09/10 C:\cygwin\bin\cygfltk_gl-1.3.dll - os=4.0 img=1.0 sys=4.0
                  "cygfltk_gl-1.3.dll" v0.0 ts=2013-09-10 18:45
   49k 2013/09/10 C:\cygwin\bin\cygfltk_images-1.3.dll - os=4.0 img=1.0 sys=4.0
                  "cygfltk_images-1.3.dll" v0.0 ts=2013-09-10 18:45
  226k 2014/04/29 C:\cygwin\bin\cygfontconfig-1.dll - os=4.0 img=1.0 sys=4.0
                  "cygfontconfig-1.dll" v0.0 ts=1970-01-01 00:00
   23k 2013/06/06 C:\cygwin\bin\cygfontenc-1.dll - os=4.0 img=1.0 sys=4.0
                  "cygfontenc-1.dll" v0.0 ts=2013-06-06 22:17
   54k 2014/05/26 C:\cygwin\bin\cygform-10.dll - os=4.0 img=1.0 sys=4.0
                  "cygform-10.dll" v0.0 ts=1970-01-01 00:00
   43k 2009/11/20 C:\cygwin\bin\cygform-9.dll - os=4.0 img=1.0 sys=4.0
                  "cygform-9.dll" v0.0 ts=2009-11-20 19:14
   60k 2014/05/26 C:\cygwin\bin\cygformw-10.dll - os=4.0 img=1.0 sys=4.0
                  "cygformw-10.dll" v0.0 ts=1970-01-01 00:00
  594k 2014/03/31 C:\cygwin\bin\cygfreetype-6.dll - os=4.0 img=1.0 sys=4.0
                  "cygfreetype-6.dll" v0.0 ts=1970-01-01 00:00
  101k 2014/07/22 C:\cygwin\bin\cyggcc_s-1.dll - os=4.0 img=1.0 sys=4.0
                  "cyggcc_s-1.dll" v0.0 ts=1970-01-01 00:00
  227k 2012/09/05 C:\cygwin\bin\cyggd-2.dll - os=4.0 img=1.0 sys=4.0
                  "cyggd-2.dll" v0.0 ts=2012-09-05 14:38
   19k 2009/02/26 C:\cygwin\bin\cyggdbm-4.dll - os=4.0 img=1.0 sys=4.0
                  "cyggdbm-4.dll" v0.0 ts=2009-02-26 07:58
    8k 2009/02/26 C:\cygwin\bin\cyggdbm_compat-4.dll - os=4.0 img=1.0 sys=4.0
                  "cyggdbm_compat-4.dll" v0.0 ts=2009-02-26 07:58
  971k 2014/07/22 C:\cygwin\bin\cyggfortran-3.dll - os=4.0 img=1.0 sys=4.0
                  "cyggfortran-3.dll" v0.0 ts=1970-01-01 00:00
   33k 2013/03/15 C:\cygwin\bin\cyggg-1.dll - os=4.0 img=1.0 sys=4.0
                  "cyggg-1.dll" v0.0 ts=2013-03-15 23:30
   46k 2013/03/15 C:\cygwin\bin\cygggi-2.dll - os=4.0 img=1.0 sys=4.0
                  "cygggi-2.dll" v0.0 ts=2013-03-15 23:38
   10k 2013/03/15 C:\cygwin\bin\cygggiwmh-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygggiwmh-0.dll" v0.0 ts=2013-03-15 23:47
   24k 2013/03/15 C:\cygwin\bin\cyggii-1.dll - os=4.0 img=1.0 sys=4.0
                  "cyggii-1.dll" v0.0 ts=2013-03-15 23:30
 1334k 2014/07/20 C:\cygwin\bin\cyggio-2.0-0.dll - os=4.0 img=1.0 sys=4.0
                  "cyggio-2.0-0.dll" v0.0 ts=1970-01-01 00:00
  492k 2014/07/22 C:\cygwin\bin\cygGL-1.dll - os=4.0 img=1.0 sys=4.0
                  "cygGL-1.dll" v0.0 ts=1970-01-01 00:00
  244k 2014/07/22 C:\cygwin\bin\cygglapi-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygglapi-0.dll" v0.0 ts=1970-01-01 00:00
  973k 2014/07/20 C:\cygwin\bin\cygglib-2.0-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygglib-2.0-0.dll" v0.0 ts=1970-01-01 00:00
  832k 2013/02/03 C:\cygwin\bin\cygglpk-33.dll - os=4.0 img=1.0 sys=4.0
                  "cygglpk-33.dll" v0.0 ts=2013-02-03 06:01
  472k 2012/11/18 C:\cygwin\bin\cygGLU-1.dll - os=4.0 img=1.0 sys=4.0
                  "cygGLU-1.dll" v0.0 ts=2012-11-18 21:09
   15k 2014/07/20 C:\cygwin\bin\cyggmodule-2.0-0.dll - os=4.0 img=1.0 sys=4.0
                  "cyggmodule-2.0-0.dll" v0.0 ts=1970-01-01 00:00
  495k 2014/04/05 C:\cygwin\bin\cyggmp-10.dll - os=4.0 img=1.0 sys=4.0
                  "cyggmp-10.dll" v0.0 ts=1970-01-01 00:00
  317k 2011/07/31 C:\cygwin\bin\cyggmp-3.dll - os=4.0 img=1.0 sys=4.0
                  "cyggmp-3.dll" v0.0 ts=2011-07-31 06:14
   23k 2014/04/05 C:\cygwin\bin\cyggmpxx-4.dll - os=4.0 img=1.0 sys=4.0
                  "cyggmpxx-4.dll" v0.0 ts=1970-01-01 00:00
  934k 2013/09/03 C:\cygwin\bin\cyggnutls-28.dll - os=4.0 img=1.0 sys=4.0
                  "cyggnutls-28.dll" v0.0 ts=2013-09-03 15:06
   24k 2013/09/03 C:\cygwin\bin\cyggnutls-openssl-27.dll - os=4.0
img=1.0 sys=4.0
                  "cyggnutls-openssl-27.dll" v0.0 ts=2013-09-03 15:06
   23k 2013/09/03 C:\cygwin\bin\cyggnutls-xssl-0.dll - os=4.0 img=1.0 sys=4.0
                  "cyggnutls-xssl-0.dll" v0.0 ts=2013-09-03 15:06
   42k 2013/09/03 C:\cygwin\bin\cyggnutlsxx-28.dll - os=4.0 img=1.0 sys=4.0
                  "cyggnutlsxx-28.dll" v0.0 ts=2013-09-03 15:06
  307k 2014/07/20 C:\cygwin\bin\cyggobject-2.0-0.dll - os=4.0 img=1.0 sys=4.0
                  "cyggobject-2.0-0.dll" v0.0 ts=1970-01-01 00:00
   51k 2014/07/22 C:\cygwin\bin\cyggomp-1.dll - os=4.0 img=1.0 sys=4.0
                  "cyggomp-1.dll" v0.0 ts=1970-01-01 00:00
  296k 2014/01/01 C:\cygwin\bin\cygGraphicsMagick++-3.dll - os=4.0
img=1.0 sys=4.0
                  "cygGraphicsMagick++-3.dll" v0.0 ts=2014-01-01 20:53
 2955k 2014/01/01 C:\cygwin\bin\cygGraphicsMagick-3.dll - os=4.0 img=1.0 sys=4.0
                  "cygGraphicsMagick-3.dll" v0.0 ts=2014-01-01 20:52
  156k 2014/01/01 C:\cygwin\bin\cygGraphicsMagickWand-2.dll - os=4.0
img=1.0 sys=4.0
                  "cygGraphicsMagickWand-2.dll" v0.0 ts=2014-01-01 20:53
  121k 2013/08/05 C:\cygwin\bin\cyggraphite2-3.dll - os=4.0 img=3.0 sys=4.0
                  "cyggraphite2-3.dll" v0.0 ts=2013-08-05 07:41
 7083k 2013/09/09 C:\cygwin\bin\cyggs-9.dll - os=4.0 img=1.0 sys=4.0
                  "cyggs-9.dll" v0.0 ts=2013-09-09 15:01
  212k 2014/03/23 C:\cygwin\bin\cyggssapi-3.dll - os=4.0 img=1.0 sys=4.0
                  "cyggssapi-3.dll" v0.0 ts=2014-03-23 23:18
  265k 2014/05/23 C:\cygwin\bin\cyggssapi_krb5-2.dll - os=4.0 img=1.0 sys=4.0
                  "cyggssapi_krb5-2.dll" v0.0 ts=1970-01-01 00:00
    8k 2014/07/20 C:\cygwin\bin\cyggthread-2.0-0.dll - os=4.0 img=1.0 sys=4.0
                  "cyggthread-2.0-0.dll" v0.0 ts=1970-01-01 00:00
  528k 2005/10/09 C:\cygwin\bin\cygguile-12.dll - os=4.0 img=1.0 sys=4.0
                  "cygguile-12.dll" v0.0 ts=2005-10-09 14:25
  665k 2010/11/25 C:\cygwin\bin\cygguile-17.dll - os=4.0 img=1.0 sys=4.0
                  "cygguile-17.dll" v0.0 ts=2010-11-25 09:10
   18k 2005/10/09 C:\cygwin\bin\cygguile-ltdl-1.dll - os=4.0 img=1.0 sys=4.0
                  "cygguile-ltdl-1.dll" v0.0 ts=2005-10-09 14:24
   24k 2010/11/25 C:\cygwin\bin\cygguile-srfi-srfi-1-v-3-3.dll -
os=4.0 img=1.0 sys=4.0
                  "cygguile-srfi-srfi-1-v-3-3.dll" v0.0 ts=2010-11-25 09:10
   68k 2005/10/09 C:\cygwin\bin\cygguile-srfi-srfi-13-14-v-1-1.dll -
os=4.0 img=1.0 sys=4.0
                  "cygguile-srfi-srfi-13-14-v-1-1.dll" v0.0 ts=2005-10-09 14:25
    5k 2010/11/25 C:\cygwin\bin\cygguile-srfi-srfi-13-14-v-3-3.dll -
os=4.0 img=1.0 sys=4.0
                  "cygguile-srfi-srfi-13-14-v-3-3.dll" v0.0 ts=2010-11-25 09:10
   31k 2005/10/09 C:\cygwin\bin\cygguile-srfi-srfi-4-v-1-1.dll -
os=4.0 img=1.0 sys=4.0
                  "cygguile-srfi-srfi-4-v-1-1.dll" v0.0 ts=2005-10-09 14:25
    5k 2010/11/25 C:\cygwin\bin\cygguile-srfi-srfi-4-v-3-3.dll -
os=4.0 img=1.0 sys=4.0
                  "cygguile-srfi-srfi-4-v-3-3.dll" v0.0 ts=2010-11-25 09:10
    9k 2010/11/25 C:\cygwin\bin\cygguile-srfi-srfi-60-v-2-2.dll -
os=4.0 img=1.0 sys=4.0
                  "cygguile-srfi-srfi-60-v-2-2.dll" v0.0 ts=2010-11-25 09:10
   12k 2005/10/09 C:\cygwin\bin\cygguilereadline-v-12-12.dll - os=4.0
img=1.0 sys=4.0
                  "cygguilereadline-v-12-12.dll" v0.0 ts=2005-10-09 14:25
    5k 2010/11/25 C:\cygwin\bin\cygguilereadline-v-17-17.dll - os=4.0
img=1.0 sys=4.0
                  "cygguilereadline-v-17-17.dll" v0.0 ts=2010-11-25 09:10
  331k 2014/01/09 C:\cygwin\bin\cygharfbuzz-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygharfbuzz-0.dll" v0.0 ts=2014-01-09 07:36
   10k 2014/01/09 C:\cygwin\bin\cygharfbuzz-icu-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygharfbuzz-icu-0.dll" v0.0 ts=2014-01-09 07:36
 2651k 2012/12/06 C:\cygwin\bin\cyghdf5-7.dll - os=4.0 img=1.0 sys=4.0
                  "cyghdf5-7.dll" v0.0 ts=2012-12-05 16:49
  294k 2012/12/06 C:\cygwin\bin\cyghdf5_cpp-7.dll - os=4.0 img=1.0 sys=4.0
                  "cyghdf5_cpp-7.dll" v0.0 ts=2012-12-05 16:57
  114k 2012/12/06 C:\cygwin\bin\cyghdf5_hl-7.dll - os=4.0 img=1.0 sys=4.0
                  "cyghdf5_hl-7.dll" v0.0 ts=2012-12-05 16:57
   13k 2012/12/06 C:\cygwin\bin\cyghdf5_hl_cpp-7.dll - os=4.0 img=1.0 sys=4.0
                  "cyghdf5_hl_cpp-7.dll" v0.0 ts=2012-12-05 16:58
   14k 2014/03/23 C:\cygwin\bin\cygheimbase-1.dll - os=4.0 img=1.0 sys=4.0
                  "cygheimbase-1.dll" v0.0 ts=2014-03-23 22:59
   24k 2014/03/23 C:\cygwin\bin\cygheimntlm-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygheimntlm-0.dll" v0.0 ts=2014-03-23 23:14
   24k 2009/06/23 C:\cygwin\bin\cyghistory6.dll - os=4.0 img=1.0 sys=4.0
                  "cyghistory6.dll" v0.0 ts=2009-06-23 13:20
   25k 2012/05/04 C:\cygwin\bin\cyghistory7.dll - os=4.0 img=1.0 sys=4.0
                  "cyghistory7.dll" v0.0 ts=2012-05-04 22:07
  156k 2013/05/14 C:\cygwin\bin\cyghogweed-2.dll - os=4.0 img=1.0 sys=4.0
                  "cyghogweed-2.dll" v0.0 ts=2013-05-14 07:27
  246k 2014/03/23 C:\cygwin\bin\cyghx509-5.dll - os=4.0 img=1.0 sys=4.0
                  "cyghx509-5.dll" v0.0 ts=2014-03-23 23:05
   74k 2012/03/12 C:\cygwin\bin\cygICE-6.dll - os=4.0 img=1.0 sys=4.0
                  "cygICE-6.dll" v0.0 ts=2012-03-12 10:30
  985k 2011/10/16 C:\cygwin\bin\cygiconv-2.dll - os=4.0 img=1.0 sys=4.0
                  "cygiconv-2.dll" v0.0 ts=2011-10-16 18:01
    0k 2014/01/20 C:\cygwin\bin\cygicudata.dll (symlink to cygicudata48.dll)
17852k 2011/07/26 C:\cygwin\bin\cygicudata48.dll - os=4.0 img=1.0 sys=4.0
                  "cygicudata48.dll" v0.0 ts=2011-07-26 12:36
    0k 2014/01/20 C:\cygwin\bin\cygicui18n.dll (symlink to cygicui18n48.dll)
 1809k 2011/07/26 C:\cygwin\bin\cygicui18n48.dll - os=4.0 img=1.0 sys=4.0
                  "cygicui18n48.dll" v0.0 ts=2011-07-26 11:53
    0k 2014/01/20 C:\cygwin\bin\cygicuio.dll (symlink to cygicuio48.dll)
   35k 2011/07/26 C:\cygwin\bin\cygicuio48.dll - os=4.0 img=1.0 sys=4.0
                  "cygicuio48.dll" v0.0 ts=2011-07-26 11:56
    0k 2014/01/20 C:\cygwin\bin\cygicule.dll (symlink to cygicule48.dll)
  233k 2011/07/26 C:\cygwin\bin\cygicule48.dll - os=4.0 img=1.0 sys=4.0
                  "cygicule48.dll" v0.0 ts=2011-07-26 11:53
    0k 2014/01/20 C:\cygwin\bin\cygiculx.dll (symlink to cygiculx48.dll)
   42k 2011/07/26 C:\cygwin\bin\cygiculx48.dll - os=4.0 img=1.0 sys=4.0
                  "cygiculx48.dll" v0.0 ts=2011-07-26 11:54
    0k 2014/01/20 C:\cygwin\bin\cygicutest.dll (symlink to cygicutest48.dll)
   51k 2011/07/26 C:\cygwin\bin\cygicutest48.dll - os=4.0 img=1.0 sys=4.0
                  "cygicutest48.dll" v0.0 ts=2011-07-26 11:54
    0k 2014/01/20 C:\cygwin\bin\cygicuuc.dll (symlink to cygicuuc48.dll)
 1238k 2011/07/26 C:\cygwin\bin\cygicuuc48.dll - os=4.0 img=1.0 sys=4.0
                  "cygicuuc48.dll" v0.0 ts=2011-07-26 11:50
  192k 2013/04/05 C:\cygwin\bin\cygidn-11.dll - os=4.0 img=1.0 sys=4.0
                  "cygidn-11.dll" v0.0 ts=2013-04-05 09:35
   31k 2005/11/20 C:\cygwin\bin\cygintl-3.dll - os=4.0 img=1.0 sys=4.0
                  "cygintl-3.dll" v0.0 ts=2005-11-20 02:04
   40k 2014/06/16 C:\cygwin\bin\cygintl-8.dll - os=4.0 img=1.0 sys=4.0
                  "cygintl-8.dll" v0.0 ts=1970-01-01 00:00
  989k 2013/05/09 C:\cygwin\bin\cygisl-10.dll - os=4.0 img=1.0 sys=4.0
                  "cygisl-10.dll" v0.0 ts=2013-05-09 08:14
  242k 2012/02/03 C:\cygwin\bin\cygjasper-1.dll - os=4.0 img=1.0 sys=4.0
                  "cygjasper-1.dll" v0.0 ts=2012-02-03 14:31
   47k 2014/06/17 C:\cygwin\bin\cygjbig-2.dll - os=4.0 img=1.0 sys=4.0
                  "cygjbig-2.dll" v0.0 ts=1970-01-01 00:00
   20k 2014/06/17 C:\cygwin\bin\cygjbig85-2.dll - os=4.0 img=1.0 sys=4.0
                  "cygjbig85-2.dll" v0.0 ts=1970-01-01 00:00
  280k 2014/05/27 C:\cygwin\bin\cygjpeg-8.dll - os=4.0 img=1.0 sys=4.0
                  "cygjpeg-8.dll" v0.0 ts=1970-01-01 00:00
  191k 2014/05/23 C:\cygwin\bin\cygk5crypto-3.dll - os=4.0 img=1.0 sys=4.0
                  "cygk5crypto-3.dll" v0.0 ts=1970-01-01 00:00
   23k 2014/03/23 C:\cygwin\bin\cygkafs-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygkafs-0.dll" v0.0 ts=2014-03-23 23:14
   90k 2014/06/17 C:\cygwin\bin\cygkpathsea-6.dll - os=4.0 img=1.0 sys=4.0
                  "cygkpathsea-6.dll" v0.0 ts=1970-01-01 00:00
  438k 2014/03/23 C:\cygwin\bin\cygkrb5-26.dll - os=4.0 img=1.0 sys=4.0
                  "cygkrb5-26.dll" v0.0 ts=2014-03-23 23:11
  718k 2014/05/23 C:\cygwin\bin\cygkrb5-3.dll - os=4.0 img=1.0 sys=4.0
                  "cygkrb5-3.dll" v0.0 ts=1970-01-01 00:00
   40k 2014/05/23 C:\cygwin\bin\cygkrb5support-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygkrb5support-0.dll" v0.0 ts=1970-01-01 00:00
   40k 2013/06/17 C:\cygwin\bin\cyglber-2-4-2.dll - os=4.0 img=1.0 sys=4.0
                  "cyglber-2-4-2.dll" v0.0 ts=2013-06-17 19:02
  294k 2013/09/03 C:\cygwin\bin\cyglcms2-2.dll - os=4.0 img=1.0 sys=4.0
                  "cyglcms2-2.dll" v0.0 ts=2013-09-03 13:45
  230k 2013/06/17 C:\cygwin\bin\cygldap-2-4-2.dll - os=4.0 img=1.0 sys=4.0
                  "cygldap-2-4-2.dll" v0.0 ts=2013-06-17 19:03
  244k 2013/06/17 C:\cygwin\bin\cygldap_r-2-4-2.dll - os=4.0 img=1.0 sys=4.0
                  "cygldap_r-2-4-2.dll" v0.0 ts=2013-06-17 19:04
18935k 2013/01/15 C:\cygwin\bin\cygLLVM-3.1.dll - os=4.0 img=1.0 sys=4.0
                  "cygLLVM-3.1.dll" v0.0 ts=2013-01-15 06:27
17799k 2014/07/28 C:\cygwin\bin\cygLLVM-3.4.dll - os=4.0 img=1.0 sys=4.0
                  "cygLLVM-3.4.dll" v0.0 ts=1970-01-01 00:00
    5k 2014/07/25 C:\cygwin\bin\cyglsa.dll - os=4.0 img=1.0 sys=4.0
                  "cyglsa.dll" v0.0 ts=2014-07-25 10:08
    6k 2014/07/25 C:\cygwin\bin\cyglsa64.dll (not x86 dll)
   36k 2014/06/22 C:\cygwin\bin\cygltdl-7.dll - os=4.0 img=1.0 sys=4.0
                  "cygltdl-7.dll" v0.0 ts=1970-01-01 00:00
  156k 2013/05/14 C:\cygwin\bin\cyglua-5.1.dll - os=4.0 img=1.0 sys=4.0
                  "cyglua-5.1.dll" v0.0 ts=2013-05-14 02:47
  143k 2014/05/30 C:\cygwin\bin\cyglzma-5.dll - os=4.0 img=1.0 sys=4.0
                  "cyglzma-5.dll" v0.0 ts=1970-01-01 00:00
  116k 2011/11/16 C:\cygwin\bin\cyglzo2-2.dll - os=4.0 img=1.0 sys=4.0
                  "cyglzo2-2.dll" v0.0 ts=2011-11-16 22:27
  116k 2014/07/01 C:\cygwin\bin\cygmagic-1.dll - os=4.0 img=1.0 sys=4.0
                  "cygmagic-1.dll" v0.0 ts=1970-01-01 00:00
  161k 2014/06/04 C:\cygwin\bin\cygman-2-6-7.dll - os=4.0 img=1.0 sys=4.0
                  "cygman-2-6-7.dll" v0.0 ts=1970-01-01 00:00
  133k 2014/01/21 C:\cygwin\bin\cygmcpp-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygmcpp-0.dll" v0.0 ts=2014-01-21 19:06
   30k 2014/05/26 C:\cygwin\bin\cygmenu-10.dll - os=4.0 img=1.0 sys=4.0
                  "cygmenu-10.dll" v0.0 ts=1970-01-01 00:00
   25k 2009/11/20 C:\cygwin\bin\cygmenu-9.dll - os=4.0 img=1.0 sys=4.0
                  "cygmenu-9.dll" v0.0 ts=2009-11-20 19:13
   31k 2014/05/26 C:\cygwin\bin\cygmenuw-10.dll - os=4.0 img=1.0 sys=4.0
                  "cygmenuw-10.dll" v0.0 ts=1970-01-01 00:00
   35k 2012/11/22 C:\cygwin\bin\cygmetalink-3.dll - os=4.0 img=1.0 sys=4.0
                  "cygmetalink-3.dll" v0.0 ts=2012-11-22 04:34
  366k 2013/07/04 C:\cygwin\bin\cygmetis-0.dll - os=4.0 img=0.0 sys=4.0
                  "cygmetis-0.dll" v0.0 ts=2013-07-04 23:05
  213k 2011/07/31 C:\cygwin\bin\cygmp-3.dll - os=4.0 img=1.0 sys=4.0
                  "cygmp-3.dll" v0.0 ts=2011-07-31 06:12
   64k 2009/11/09 C:\cygwin\bin\cygmpc-1.dll - os=4.0 img=1.0 sys=4.0
                  "cygmpc-1.dll" v0.0 ts=2009-11-09 01:21
   93k 2014/04/05 C:\cygwin\bin\cygmpc-3.dll - os=4.0 img=1.0 sys=4.0
                  "cygmpc-3.dll" v0.0 ts=1970-01-01 00:00
  269k 2009/06/07 C:\cygwin\bin\cygmpfr-1.dll - os=4.0 img=1.0 sys=4.0
                  "cygmpfr-1.dll" v0.0 ts=2009-06-07 22:10
  344k 2013/04/11 C:\cygwin\bin\cygmpfr-4.dll - os=4.0 img=1.0 sys=4.0
                  "cygmpfr-4.dll" v0.0 ts=2013-04-11 19:07
  456k 2014/07/18 C:\cygwin\bin\cygnativeGLthunk.dll - os=4.0 img=1.0 sys=4.0
                  "cygnativeGLthunk.dll" v0.0 ts=1970-01-01 00:00
   56k 2014/05/26 C:\cygwin\bin\cygncurses++-10.dll - os=4.0 img=1.0 sys=4.0
                  "cygncurses++-10.dll" v0.0 ts=1970-01-01 00:00
   63k 2009/11/20 C:\cygwin\bin\cygncurses++-9.dll - os=4.0 img=1.0 sys=4.0
                  "cygncurses++-9.dll" v0.0 ts=2009-11-20 19:25
   56k 2014/05/26 C:\cygwin\bin\cygncurses++w-10.dll - os=4.0 img=1.0 sys=4.0
                  "cygncurses++w-10.dll" v0.0 ts=1970-01-01 00:00
  249k 2014/05/26 C:\cygwin\bin\cygncurses-10.dll - os=4.0 img=1.0 sys=4.0
                  "cygncurses-10.dll" v0.0 ts=1970-01-01 00:00
  198k 2009/11/20 C:\cygwin\bin\cygncurses-9.dll - os=4.0 img=1.0 sys=4.0
                  "cygncurses-9.dll" v0.0 ts=2009-11-20 19:10
  318k 2014/05/26 C:\cygwin\bin\cygncursesw-10.dll - os=4.0 img=1.0 sys=4.0
                  "cygncursesw-10.dll" v0.0 ts=1970-01-01 00:00
  175k 2013/05/14 C:\cygwin\bin\cygnettle-4.dll - os=4.0 img=1.0 sys=4.0
                  "cygnettle-4.dll" v0.0 ts=2013-05-14 07:27
  127k 2014/01/31 C:\cygwin\bin\cygopenjpeg-1.dll - os=4.0 img=1.5 sys=4.0
                  "cygopenjpeg-1.dll" v0.0 ts=2014-01-31 05:08
  214k 2014/03/13 C:\cygwin\bin\cygp11-kit-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygp11-kit-0.dll" v0.0 ts=2014-03-13 03:54
   15k 2014/05/26 C:\cygwin\bin\cygpanel-10.dll - os=4.0 img=1.0 sys=4.0
                  "cygpanel-10.dll" v0.0 ts=1970-01-01 00:00
   13k 2009/11/20 C:\cygwin\bin\cygpanel-9.dll - os=4.0 img=1.0 sys=4.0
                  "cygpanel-9.dll" v0.0 ts=2009-11-20 19:12
   15k 2014/05/26 C:\cygwin\bin\cygpanelw-10.dll - os=4.0 img=1.0 sys=4.0
                  "cygpanelw-10.dll" v0.0 ts=1970-01-01 00:00
  272k 2014/03/21 C:\cygwin\bin\cygpango-1.0-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygpango-1.0-0.dll" v0.0 ts=2014-03-21 22:17
   42k 2014/03/21 C:\cygwin\bin\cygpangocairo-1.0-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygpangocairo-1.0-0.dll" v0.0 ts=2014-03-21 22:17
   72k 2014/03/21 C:\cygwin\bin\cygpangoft2-1.0-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygpangoft2-1.0-0.dll" v0.0 ts=2014-03-21 22:17
   27k 2014/03/21 C:\cygwin\bin\cygpangoxft-1.0-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygpangoxft-1.0-0.dll" v0.0 ts=2014-03-21 22:17
   11k 2013/07/23 C:\cygwin\bin\cygpaper-1.dll - os=4.0 img=1.0 sys=4.0
                  "cygpaper-1.dll" v0.0 ts=2013-07-23 21:23
  255k 2012/02/10 C:\cygwin\bin\cygpcre-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygpcre-0.dll" v0.0 ts=2012-02-10 10:24
  268k 2014/03/12 C:\cygwin\bin\cygpcre-1.dll - os=4.0 img=1.0 sys=4.0
                  "cygpcre-1.dll" v0.0 ts=2014-03-12 02:55
 1628k 2012/07/12 C:\cygwin\bin\cygperl5_14.dll - os=4.0 img=1.0 sys=4.0
                  "cygperl5_14.dll" v0.0 ts=2012-07-12 20:17
   40k 2014/05/12 C:\cygwin\bin\cygpipeline-1.dll - os=4.0 img=1.0 sys=4.0
                  "cygpipeline-1.dll" v0.0 ts=1970-01-01 00:00
  652k 2014/01/10 C:\cygwin\bin\cygpixman-1-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygpixman-1-0.dll" v0.0 ts=2014-01-10 04:14
  127k 2012/08/22 C:\cygwin\bin\cygpng14-14.dll - os=4.0 img=1.0 sys=4.0
                  "cygpng14-14.dll" v0.0 ts=2012-08-22 05:29
  160k 2014/05/26 C:\cygwin\bin\cygpng15-15.dll - os=4.0 img=1.0 sys=4.0
                  "cygpng15-15.dll" v0.0 ts=1970-01-01 00:00
 1657k 2012/10/26 C:\cygwin\bin\cygpoppler-28.dll - os=4.0 img=1.0 sys=4.0
                  "cygpoppler-28.dll" v0.0 ts=2012-10-26 06:48
 1881k 2014/02/23 C:\cygwin\bin\cygpoppler-44.dll - os=4.0 img=1.0 sys=4.0
                  "cygpoppler-44.dll" v0.0 ts=2014-02-23 21:02
   41k 2013/10/21 C:\cygwin\bin\cygpopt-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygpopt-0.dll" v0.0 ts=2013-10-21 21:52
  695k 2009/04/18 C:\cygwin\bin\cygppl-7.dll - os=4.0 img=1.0 sys=4.0
                  "cygppl-7.dll" v0.0 ts=2009-04-18 13:44
  897k 2013/04/11 C:\cygwin\bin\cygppl-9.dll - os=4.0 img=1.0 sys=4.0
                  "cygppl-9.dll" v0.0 ts=2013-04-11 19:35
 2481k 2009/04/18 C:\cygwin\bin\cygppl_c-2.dll - os=4.0 img=1.0 sys=4.0
                  "cygppl_c-2.dll" v0.0 ts=2009-04-18 13:47
 3092k 2013/04/11 C:\cygwin\bin\cygppl_c-4.dll - os=4.0 img=1.0 sys=4.0
                  "cygppl_c-4.dll" v0.0 ts=2013-04-11 19:36
   38k 2014/06/17 C:\cygwin\bin\cygptexenc-1.dll - os=4.0 img=1.0 sys=4.0
                  "cygptexenc-1.dll" v0.0 ts=1970-01-01 00:00
   18k 2009/04/18 C:\cygwin\bin\cygpwl-4.dll - os=4.0 img=1.0 sys=4.0
                  "cygpwl-4.dll" v0.0 ts=2009-04-18 13:44
   14k 2013/04/11 C:\cygwin\bin\cygpwl-5.dll - os=4.0 img=1.0 sys=4.0
                  "cygpwl-5.dll" v0.0 ts=2013-04-11 19:35
   15k 2013/10/24 C:\cygwin\bin\cygpyglib-2.0-python2.7-0.dll - os=4.0
img=1.0 sys=4.0
                  "cygpyglib-2.0-python2.7-0.dll" v0.0 ts=2013-10-24 21:18
  337k 2012/02/26 C:\cygwin\bin\cygqhull-6.dll - os=4.0 img=0.0 sys=4.0
                  "cygqhull-6.dll" v0.0 ts=2012-02-26 04:49
  343k 2012/02/26 C:\cygwin\bin\cygqhull_p-6.dll - os=4.0 img=0.0 sys=4.0
                  "cygqhull_p-6.dll" v0.0 ts=2012-02-26 04:49
   73k 2012/02/07 C:\cygwin\bin\cygqrupdate-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygqrupdate-0.dll" v0.0 ts=2012-02-07 21:25
  421k 2014/07/22 C:\cygwin\bin\cygquadmath-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygquadmath-0.dll" v0.0 ts=1970-01-01 00:00
  155k 2009/06/23 C:\cygwin\bin\cygreadline6.dll - os=4.0 img=1.0 sys=4.0
                  "cygreadline6.dll" v0.0 ts=2009-06-23 13:20
  162k 2012/05/04 C:\cygwin\bin\cygreadline7.dll - os=4.0 img=1.0 sys=4.0
                  "cygreadline7.dll" v0.0 ts=2012-05-04 22:07
   62k 2014/03/23 C:\cygwin\bin\cygroken-18.dll - os=4.0 img=1.0 sys=4.0
                  "cygroken-18.dll" v0.0 ts=2014-03-23 23:00
  103k 2014/05/26 C:\cygwin\bin\cygsasl2-3.dll - os=4.0 img=1.0 sys=4.0
                  "cygsasl2-3.dll" v0.0 ts=1970-01-01 00:00
   28k 2014/01/14 C:\cygwin\bin\cygSM-6.dll - os=4.0 img=1.0 sys=4.0
                  "cygSM-6.dll" v0.0 ts=2014-01-14 23:54
  764k 2014/06/06 C:\cygwin\bin\cygsqlite3-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygsqlite3-0.dll" v0.0 ts=1970-01-01 00:00
  131k 2012/05/21 C:\cygwin\bin\cygssh2-1.dll - os=4.0 img=1.0 sys=4.0
                  "cygssh2-1.dll" v0.0 ts=2012-05-21 05:57
  335k 2014/06/06 C:\cygwin\bin\cygssl-0.9.8.dll - os=4.0 img=1.0 sys=4.0
                  "cygssl-0.9.8.dll" v0.0 ts=1970-01-01 00:00
  378k 2014/06/06 C:\cygwin\bin\cygssl-1.0.0.dll - os=4.0 img=1.0 sys=4.0
                  "cygssl-1.0.0.dll" v0.0 ts=1970-01-01 00:00
   12k 2014/07/22 C:\cygwin\bin\cygssp-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygssp-0.dll" v0.0 ts=1970-01-01 00:00
  895k 2014/07/22 C:\cygwin\bin\cygstdc++-6.dll - os=4.0 img=1.0 sys=4.0
                  "cygstdc++-6.dll" v0.0 ts=1970-01-01 00:00
    6k 2013/07/13 C:\cygwin\bin\cygsuitesparseconfig-0.dll - os=4.0
img=1.0 sys=4.0
                  "cygsuitesparseconfig-0.dll" v0.0 ts=2013-07-13 18:33
  229k 2013/04/25 C:\cygwin\bin\cygt1-5.dll - os=4.0 img=1.0 sys=4.0
                  "cygt1-5.dll" v0.0 ts=2013-04-25 17:20
   66k 2013/04/24 C:\cygwin\bin\cygtasn1-6.dll - os=4.0 img=1.0 sys=4.0
                  "cygtasn1-6.dll" v0.0 ts=2013-04-24 10:25
   27k 2013/04/12 C:\cygwin\bin\cygthai-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygthai-0.dll" v0.0 ts=2013-04-12 12:18
   54k 2014/05/26 C:\cygwin\bin\cygtic-10.dll - os=4.0 img=1.0 sys=4.0
                  "cygtic-10.dll" v0.0 ts=1970-01-01 00:00
   48k 2009/11/20 C:\cygwin\bin\cygtic-9.dll - os=4.0 img=1.0 sys=4.0
                  "cygtic-9.dll" v0.0 ts=2009-11-20 19:10
   54k 2014/05/26 C:\cygwin\bin\cygticw-10.dll - os=4.0 img=1.0 sys=4.0
                  "cygticw-10.dll" v0.0 ts=1970-01-01 00:00
  378k 2014/05/15 C:\cygwin\bin\cygtiff-5.dll - os=4.0 img=1.0 sys=4.0
                  "cygtiff-5.dll" v0.0 ts=1970-01-01 00:00
   13k 2014/05/15 C:\cygwin\bin\cygtiffxx-5.dll - os=4.0 img=1.0 sys=4.0
                  "cygtiffxx-5.dll" v0.0 ts=1970-01-01 00:00
  694k 2013/07/13 C:\cygwin\bin\cygumfpack-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygumfpack-0.dll" v0.0 ts=2013-07-13 21:36
   15k 2014/07/09 C:\cygwin\bin\cyguuid-1.dll - os=4.0 img=1.0 sys=4.0
                  "cyguuid-1.dll" v0.0 ts=1970-01-01 00:00
  160k 2014/03/23 C:\cygwin\bin\cygwind-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygwind-0.dll" v0.0 ts=2014-03-23 23:01
  289k 2012/09/05 C:\cygwin\bin\cygwmf-0-2-7.dll - os=4.0 img=1.0 sys=4.0
                  "cygwmf-0-2-7.dll" v0.0 ts=2012-09-05 09:43
   95k 2012/09/05 C:\cygwin\bin\cygwmflite-0-2-7.dll - os=4.0 img=1.0 sys=4.0
                  "cygwmflite-0-2-7.dll" v0.0 ts=2012-09-05 09:43
   30k 2013/11/15 C:\cygwin\bin\cygwrap-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygwrap-0.dll" v0.0 ts=2013-11-15 20:13
 1153k 2014/01/10 C:\cygwin\bin\cygX11-6.dll - os=4.0 img=1.0 sys=4.0
                  "cygX11-6.dll" v0.0 ts=2014-01-10 01:36
    7k 2014/01/10 C:\cygwin\bin\cygX11-xcb-1.dll - os=4.0 img=1.0 sys=4.0
                  "cygX11-xcb-1.dll" v0.0 ts=2014-01-10 01:37
   10k 2013/06/06 C:\cygwin\bin\cygXau-6.dll - os=4.0 img=1.0 sys=4.0
                  "cygXau-6.dll" v0.0 ts=2013-06-06 06:29
  378k 2014/01/15 C:\cygwin\bin\cygXaw-7.dll - os=4.0 img=1.0 sys=4.0
                  "cygXaw-7.dll" v0.0 ts=2014-01-15 03:07
  102k 2014/07/17 C:\cygwin\bin\cygxcb-1.dll - os=4.0 img=1.0 sys=4.0
                  "cygxcb-1.dll" v0.0 ts=1970-01-01 00:00
   72k 2014/07/17 C:\cygwin\bin\cygxcb-glx-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygxcb-glx-0.dll" v0.0 ts=1970-01-01 00:00
   15k 2012/09/28 C:\cygwin\bin\cygxcb-icccm-4.dll - os=4.0 img=1.0 sys=4.0
                  "cygxcb-icccm-4.dll" v0.0 ts=2012-09-28 18:13
   14k 2012/09/28 C:\cygwin\bin\cygxcb-image-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygxcb-image-0.dll" v0.0 ts=2012-09-28 17:59
   31k 2014/07/17 C:\cygwin\bin\cygxcb-render-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygxcb-render-0.dll" v0.0 ts=1970-01-01 00:00
   12k 2014/07/17 C:\cygwin\bin\cygxcb-shm-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygxcb-shm-0.dll" v0.0 ts=1970-01-01 00:00
   14k 2012/09/28 C:\cygwin\bin\cygxcb-util-1.dll - os=4.0 img=1.0 sys=4.0
                  "cygxcb-util-1.dll" v0.0 ts=2012-09-28 17:51
   17k 2012/03/12 C:\cygwin\bin\cygXdmcp-6.dll - os=4.0 img=1.0 sys=4.0
                  "cygXdmcp-6.dll" v0.0 ts=2012-03-12 10:52
   61k 2013/06/06 C:\cygwin\bin\cygXext-6.dll - os=4.0 img=1.0 sys=4.0
                  "cygXext-6.dll" v0.0 ts=2013-06-06 10:06
   19k 2013/06/06 C:\cygwin\bin\cygXfixes-3.dll - os=4.0 img=1.0 sys=4.0
                  "cygXfixes-3.dll" v0.0 ts=2013-06-06 20:37
  217k 2014/05/16 C:\cygwin\bin\cygXfont-1.dll - os=4.0 img=1.0 sys=4.0
                  "cygXfont-1.dll" v0.0 ts=1970-01-01 00:00
   66k 2012/06/14 C:\cygwin\bin\cygXft-2.dll - os=4.0 img=1.0 sys=4.0
                  "cygXft-2.dll" v0.0 ts=2012-06-14 19:13
   56k 2013/07/29 C:\cygwin\bin\cygXi-6.dll - os=4.0 img=1.0 sys=4.0
                  "cygXi-6.dll" v0.0 ts=2013-07-29 07:35
    9k 2013/06/06 C:\cygwin\bin\cygXinerama-1.dll - os=4.0 img=1.0 sys=4.0
                  "cygXinerama-1.dll" v0.0 ts=2013-06-06 21:38
  119k 2012/05/23 C:\cygwin\bin\cygxkbfile-1.dll - os=4.0 img=1.0 sys=4.0
                  "cygxkbfile-1.dll" v0.0 ts=2012-05-23 05:41
 1235k 2013/04/21 C:\cygwin\bin\cygxml2-2.dll - os=4.0 img=1.0 sys=4.0
                  "cygxml2-2.dll" v0.0 ts=2013-04-21 05:37
   88k 2014/01/15 C:\cygwin\bin\cygXmu-6.dll - os=4.0 img=1.0 sys=4.0
                  "cygXmu-6.dll" v0.0 ts=2014-01-15 02:52
   12k 2014/01/15 C:\cygwin\bin\cygXmuu-1.dll - os=4.0 img=1.0 sys=4.0
                  "cygXmuu-1.dll" v0.0 ts=2014-01-15 02:52
   60k 2014/01/15 C:\cygwin\bin\cygXpm-4.dll - os=4.0 img=1.0 sys=4.0
                  "cygXpm-4.dll" v0.0 ts=2014-01-15 02:25
   35k 2013/06/14 C:\cygwin\bin\cygXrender-1.dll - os=4.0 img=1.0 sys=4.0
                  "cygXrender-1.dll" v0.0 ts=2013-06-14 10:01
  318k 2013/06/06 C:\cygwin\bin\cygXt-6.dll - os=4.0 img=1.0 sys=4.0
                  "cygXt-6.dll" v0.0 ts=2013-06-06 21:17
   73k 2013/05/09 C:\cygwin\bin\cygz.dll - os=4.0 img=1.0 sys=4.0
                  "cygz.dll" v0.0 ts=2013-05-09 22:21
   25k 2013/05/30 C:\cygwin\bin\cygzzip-0-13.dll - os=4.0 img=1.0 sys=4.0
                  "cygzzip-0-13.dll" v0.0 ts=2013-05-30 03:44
   12k 2013/05/30 C:\cygwin\bin\cygzzipfseeko-0-13.dll - os=4.0 img=1.0 sys=4.0
                  "cygzzipfseeko-0-13.dll" v0.0 ts=2013-05-30 03:44
   14k 2013/05/30 C:\cygwin\bin\cygzzipmmapped-0-13.dll - os=4.0 img=1.0 sys=4.0
                  "cygzzipmmapped-0-13.dll" v0.0 ts=2013-05-30 03:44
    8k 2013/05/30 C:\cygwin\bin\cygzzipwrap-0-13.dll - os=4.0 img=1.0 sys=4.0
                  "cygzzipwrap-0-13.dll" v0.0 ts=2013-05-30 03:44
 3121k 2014/07/25 C:\cygwin\bin\cygwin1.dll - os=4.0 img=1.0 sys=4.0
                  "cygwin1.dll" v0.0 ts=1970-01-01 00:00
    Cygwin DLL version info:
        DLL version: 1.7.31
        DLL epoch: 19
        DLL old termios: 5
        DLL malloc env: 28
        Cygwin conv: 181
        API major: 0
        API minor: 272
        Shared data: 5
        DLL identifier: cygwin1
        Mount registry: 3
        Cygwin registry name: Cygwin
        Program options name: Program Options
        Installations name: Installations
        Cygdrive default prefix:
        Build date:
        Shared id: cygwin1S5

  403k 2013/11/17 C:\cygwin\lib\lapack\cygblas-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygblas-0.dll" v0.0 ts=2013-11-17 10:24
 5296k 2013/11/17 C:\cygwin\lib\lapack\cyglapack-0.dll - os=4.0 img=1.0 sys=4.0
                  "cyglapack-0.dll" v0.0 ts=2013-11-17 10:24

No Cygwin services found.


Cygwin Package Information
Last downloaded files to: C:\Users\Peter\Downloads
Last downloaded files from:
http://www.mirrorservice.org/sites/sourceware.org/pub/cygwin/

Package                   Version            Status
_autorebase               000593-1           OK
_update-info-dir          01253-1            OK
alternatives              1.3.30c-10         OK
base-cygwin               3.3-1              OK
base-files                4.2-3              OK
bash                      4.1.10-4           OK
binutils                  2.24.51-4          OK
bzip2                     1.0.6-2            OK
ca-certificates           1.97-1             OK
cmake                     2.8.9-2            OK
coreutils                 8.15-1             OK
cpio                      2.11-2             OK
crypt                     1.2-1              OK
csih                      0.9.7-1            OK
ctags                     5.8-1              OK
curl                      7.37.0-1           OK
cvs                       1.12.13-10         OK
cvsps                     2.2b1-1            OK
cygrunsrv                 1.50-1             OK
cygutils                  1.4.14-1           OK
cygwin                    1.7.31-3           OK
cygwin-doc                1.7-1              OK
dash                      0.5.7-1            OK
dbus                      1.6.18-1           OK
desktop-file-utils        0.21-1             OK
dialog                    1.2-20140112-1     OK
diffutils                 3.2-1              OK
dos2unix                  6.0.5-1            OK
dri-drivers               10.2.4-1           OK
ed                        1.9-1              OK
editrights                1.01-2             OK
emacs                     24.3-2             OK
file                      5.19-1             OK
findutils                 4.5.12-1           OK
font-adobe-dpi75          1.0.2-1            OK
font-alias                1.0.3-1            OK
font-bh-dpi100            1.0.2-1            OK
font-encodings            1.0.4-1            OK
font-misc-misc            1.1.1-1            OK
font-sun-misc             1.0.2-1            OK
fontconfig                2.11.1-1           OK
gamin                     0.1.10-14          OK
gawk                      4.1.1-1            OK
gcc-core                  4.8.3-2            OK
gcc-g++                   4.8.3-2            OK
gcc-mingw-core            20050522-3         OK
Empty package gcc-mingw-g++
gcc-mingw-g++             4.5.2-1            OK
gcc4-core                 4.7.3-2            OK
gcc4-g++                  4.7.3-2            OK
gdb                       7.6.50-4           OK
getent                    2.18.90-2          OK
gettext                   0.18.3.2-2         OK
ghostscript               9.10-1             OK
ghostscript-fonts-other   6.0-1              OK
ghostscript-fonts-std     8.11-1             OK
git                       1.7.9-1            OK
gmp                       6.0.0a-1           OK
gnuplot                   4.6.3-1            OK
grep                      2.16-1             OK
groff                     1.22.2-2           OK
gsettings-desktop-schemas 3.10.1-1           OK
guile                     1.8.7-2            OK
gzip                      1.4-1              OK
hexedit                   1.2.13-1           OK
ipc-utils                 1.0-1              OK
less                      444-1              OK
libamd0                   2.3.1-2            OK
libargp                   20110921-2         OK
libarpack0                3.1.4-1            OK
libasn1_8                 1.5.3-1            OK
libatomic1                4.8.3-2            OK
libattr1                  2.4.46-1           OK
libblkid1                 2.24.2-1           OK
libbz2_1                  1.0.6-2            OK
libcairo2                 1.12.16-1          OK
libcamd0                  2.3.1-2            OK
libccolamd0               2.8.0-2            OK
libcharset1               1.14-2             OK
libcholmod0               2.1.2-1            OK
libcloog-isl4             0.18.0-2           OK
libcloog0                 0.15.11-1          OK
libcolamd0                2.8.0-2            OK
libcom_err2               1.42.10-1          OK
libcurl4                  7.37.0-1           OK
libcxsparse0              3.1.2-1            OK
libdatrie1                0.2.6-1            OK
libdb4.5                  4.5.20.2-3         OK
libdb4.8                  4.8.30-1           OK
libdbus1_3                1.6.18-1           OK
libdialog11               1.2-20140112-1     OK
libedit0                  20130712-1         OK
libexpat1                 2.1.0-3            OK
libfam0                   0.1.10-14          OK
libffi4                   4.5.3-3            OK
libffi6                   3.0.13-1           OK
libfftw3_3                3.3.4-1            OK
libfltk1.3                1.3.2.9965-1       OK
libfontconfig1            2.11.1-1           OK
libfontenc1               1.1.2-1            OK
libfreetype6              2.5.3-1            OK
libgcc1                   4.8.3-2            OK
libgd2                    2.0.36RC1-13       OK
libgdbm4                  1.8.3-20           OK
libgfortran3              4.8.3-2            OK
libggi2                   2.2.2-3            OK
libggiwmh0                0.3.2-3            OK
libgii1                   1.0.2-3            OK
libGL1                    10.2.4-1           OK
libglapi0                 10.2.4-1           OK
libglib2.0_0              2.38.2-3           OK
libglpk33                 4.48-1             OK
libGLU1                   9.0.0-1            OK
libgmp10                  6.0.0a-1           OK
libgmp3                   4.3.2-1            OK
libgmpxx4                 6.0.0a-1           OK
libgnutls28               3.2.4-1            OK
libgomp1                  4.8.3-2            OK
libGraphicsMagick3        1.3.19-2           OK
libgraphite2_3            1.2.3-1            OK
libgs9                    9.10-1             OK
libgssapi3                1.5.3-1            OK
libgssapi_krb5_2          1.12.1-2           OK
libguile12                1.6.7-4            OK
libguile17                1.8.7-2            OK
libharfbuzz0              0.9.25-1           OK
libhdf5_7                 1.8.10-1           OK
libheimbase1              1.5.3-1            OK
libheimntlm0              1.5.3-1            OK
libhogweed2               2.7-1              OK
libhx509_5                1.5.3-1            OK
libICE6                   1.0.8-1            OK
libiconv                  1.14-2             OK
libiconv2                 1.14-2             OK
libicu48                  4.8.1-1            OK
libidn11                  1.26-1             OK
libintl3                  0.14.5-1           OK
libintl8                  0.18.3.2-2         OK
libisl10                  0.11.1-2           OK
libjasper1                1.900.1-12         OK
libjbig2                  2.0-14             OK
libjpeg8                  1.3.1-1            OK
libk5crypto3              1.12.1-2           OK
libkafs0                  1.5.3-1            OK
libkpathsea6              20140523-1         OK
libkrb5_26                1.5.3-1            OK
libkrb5_3                 1.12.1-2           OK
libkrb5support0           1.12.1-2           OK
liblapack0                3.5.0-2            OK
liblcms2_2                2.5-1              OK
libllvm3.1                3.1-3              OK
libllvm3.4                3.4.2-3            OK
libltdl7                  2.4.2-5            OK
liblzma5                  5.0.5-1            OK
liblzo2_2                 2.06-1             OK
libmcpp0                  2.7.2-2            OK
libmetalink3              0.1.2-1            OK
libmetis0                 5.1.0-1            OK
libmpc1                   0.8-1              OK
libmpc3                   1.0.2-1            OK
libmpfr1                  2.4.1-4            OK
libmpfr4                  3.1.2-1            OK
libncurses10              5.9-20140524-1     OK
libncurses9               5.7-16             OK
libncursesw10             5.9-20140524-1     OK
libnettle4                2.7-1              OK
libopenjpeg1              1.5.1-3            OK
libopenldap2_4_2          2.4.35-2           OK
libopenssl098             0.9.8za-1          OK
libopenssl100             1.0.1h-1           OK
libp11-kit0               0.20.2-1           OK
libpango1.0_0             1.36.3-1           OK
libpaper-common           1.1.24-2           OK
libpaper1                 1.1.24-2           OK
libpcre0                  8.21-2             OK
libpcre1                  8.34-1             OK
libpipeline1              1.3.0-3            OK
libpixman1_0              0.32.4-1           OK
libpng14                  1.4.12-3           OK
libpng15                  1.5.18-1           OK
libpoppler28              0.20.5-2           OK
libpoppler44              0.24.5-1           OK
Empty package libpopt0
libpopt0                  1.16-1             OK
libppl                    0.10.2-1           OK
libppl9                   0.11.2-1           OK
libppl_c4                 0.11.2-1           OK
libptexenc1               20140523-1         OK
libpwl5                   0.11.2-1           OK
libqhull_6                2012.1-2           OK
libqrupdate0              1.1.2-1            OK
libquadmath0              4.8.3-2            OK
libreadline6              5.2.14-12          OK
libreadline7              6.1.2-3            OK
libroken18                1.5.3-1            OK
libsasl2_3                2.1.26-7           OK
libSM6                    1.2.2-1            OK
libsqlite3_0              3.8.5-1            OK
libssh2_1                 1.4.2-1            OK
libssp0                   4.8.3-2            OK
libstdc++6                4.8.3-2            OK
Empty package libstdc++6-devel
libstdc++6-devel          4.8.3-2            OK
libsuitesparseconfig0     4.2.1-1            OK
libtasn1_6                3.3-1              OK
libthai0                  0.1.19-1           OK
libtiff5                  3.9.7-4            OK
libtool                   2.4.2-5            OK
libumfpack0               5.6.2-1            OK
libuuid1                  2.24.2-1           OK
libwind0                  1.5.3-1            OK
libwmf027                 0.2.8.4-11         OK
libwrap0                  7.6-22             OK
libX11-xcb1               1.6.2-1            OK
libX11_6                  1.6.2-1            OK
libXau6                   1.0.8-1            OK
libXaw7                   1.0.12-1           OK
libxcb-glx0               1.10-1             OK
libxcb-icccm4             0.3.9-1            OK
libxcb-image0             0.3.9-1            OK
libxcb-render0            1.10-1             OK
libxcb-shm0               1.10-1             OK
libxcb-util1              0.3.9-1            OK
libxcb1                   1.10-1             OK
libXdmcp6                 1.1.1-1            OK
libXext6                  1.3.2-1            OK
libXfixes3                5.0.1-1            OK
libXfont1                 1.4.8-1            OK
libXft2                   2.3.1-1            OK
libXi6                    1.7.2-1            OK
libXinerama1              1.1.3-1            OK
libxkbfile1               1.0.8-1            OK
libxml2                   2.9.1-1            OK
libXmu6                   1.1.2-1            OK
libXmuu1                  1.1.2-1            OK
libXpm4                   3.5.11-1           OK
libXrender1               0.9.8-1            OK
libXt6                    1.1.4-1            OK
libzzip0.13               0.13.62-1          OK
login                     1.10-10            OK
lua                       5.1.5-1            OK
luit                      20130217-1         OK
lynx                      2.8.7-1            OK
make                      4.0-2              OK
Empty package man
man                       2.6.7-1            OK
man-db                    2.6.7-1            OK
mcpp                      2.7.2-2            OK
mercurial                 3.0.1-1            OK
mingw-binutils            2.23.1-1           OK
mingw-gcc-core            4.7.3-1            OK
mingw-gcc-g++             4.7.3-1            OK
mingw-pthreads            20110507-2         OK
mingw-runtime             4.0-1              OK
mingw-w32api              4.0-1              OK
mintty                    1.1.3-1            OK
mkfontdir                 1.0.7-1            OK
mkfontscale               1.1.1-1            OK
nc                        1.107-3            OK
openssh                   6.6.1p1-3          OK
openssl                   1.0.1h-1           OK
p11-kit                   0.20.2-1           OK
p11-kit-trust             0.20.2-1           OK
perl                      5.14.2-3           OK
perl-Error                0.17016-1          OK
perl_vendor               5.14.2-3           OK
poppler-data              0.4.6-1            OK
popt                      1.16-1             OK
python                    2.7.8-1            OK
python-gobject            2.28.6-5           OK
python-numpy              1.7.2-1            OK
python-pyrex              0.9.9-3            OK
python-setuptools         0.6.34-1           OK
rebase                    4.4.1-1            OK
rsync                     3.1.0-1            OK
run                       1.3.1-1            OK
screen                    4.2.1-2            OK
sed                       4.2.2-3            OK
shared-mime-info          1.3-1              OK
t1lib5                    5.1.2-12           OK
tar                       1.27.1-1           OK
terminfo                  5.9-20140524-1     OK
terminfo-extra            5.9-20140524-1     OK
texinfo                   5.2-1              OK
texlive                   20140523-1         OK
texlive-collection-basic  20140523-1         OK
tzcode                    2013d-1            OK
unzip                     6.0-10             OK
util-linux                2.24.2-1           OK
vim                       7.4.335-1          OK
vim-common                7.4.335-1          OK
vim-minimal               7.4.335-1          OK
Empty package w32api
w32api                    9999-1             OK
w32api-headers            3.1.0-2            OK
w32api-runtime            3.1.0-1            OK
which                     2.20-2             OK
windows-default-manifest  6.3-1              OK
xauth                     1.0.8-1            OK
xclock                    1.0.7-1            OK
xcursor-themes            1.0.4-1            OK
xemacs-emacs-common       21.4.22-1          OK
xf86-video-dummy          0.3.7-1            OK
xf86-video-nested         0.1.0-4            OK
xinit                     1.3.2-1            OK
xkbcomp                   1.2.4-1            OK
xkeyboard-config          2.11-1             OK
xmodmap                   1.0.8-1            OK
xorg-server               1.15.1-4           OK
xorg-server-common        1.15.1-4           OK
xrdb                      1.1.0-1            OK
xterm                     308-1              OK
xxd                       7.4.335-1          OK
xz                        5.0.5-1            OK
zip                       3.0-12             OK
zlib-devel                1.2.8-1            OK
zlib0                     1.2.8-1            OK
Use -h to see help about each section

--
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] 84+ messages in thread

* Re: (call-process ...) hangs in emacs
  2014-07-31 14:51 Peter Hull
@ 2014-07-31 17:35 ` Ken Brown
  2014-08-01  7:36 ` Peter Hull
  2014-08-01 10:22 ` Katsumi Yamaoka
  2 siblings, 0 replies; 84+ messages in thread
From: Ken Brown @ 2014-07-31 17:35 UTC (permalink / raw)
  To: cygwin

On 7/31/2014 10:51 AM, Peter Hull wrote:
> VC integration in emacs has stopped working for me in the past few
> days. Using emacs debugger I found the last function call was to
> call-process which never returns.
>
> I can reproduce this by evaluating in Lisp Interaction mode (using ^J)
> (call-process "pwd" nil t)
> I would expect to see the PWD and exit code but instead it just hangs
> until I Quit it (^G)
>
> I am using GNU Emacs 24.3.1 and confirmed cygwin and all packages up
> to date. (cygwin DLL 1.7.31)

I can't reproduce this.  I tested both emacs-X11 and emacs-w32, on both 
32-bit Cygwin and 64-bit Cygwin.  Can you think of anything on your 
system that has changed in the last few days?  And have you tried 
starting emacs with the '-Q' option to rule out a problem in your 
initialization files?

You should also attach cygcheck output, as suggested at 
http://cygwin.com/problems.html.

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] 84+ messages in thread

* (call-process ...) hangs in emacs
@ 2014-07-31 14:51 Peter Hull
  2014-07-31 17:35 ` Ken Brown
                   ` (2 more replies)
  0 siblings, 3 replies; 84+ messages in thread
From: Peter Hull @ 2014-07-31 14:51 UTC (permalink / raw)
  To: cygwin

VC integration in emacs has stopped working for me in the past few
days. Using emacs debugger I found the last function call was to
call-process which never returns.

I can reproduce this by evaluating in Lisp Interaction mode (using ^J)
(call-process "pwd" nil t)
I would expect to see the PWD and exit code but instead it just hangs
until I Quit it (^G)

I am using GNU Emacs 24.3.1 and confirmed cygwin and all packages up
to date. (cygwin DLL 1.7.31)

Thanks.
Peter

--
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] 84+ messages in thread

end of thread, other threads:[~2014-09-03 17:59 UTC | newest]

Thread overview: 84+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-01 12:51 (call-process ...) hangs in emacs Angelo Graziosi
2014-08-01 13:17 ` Peter Hull
2014-08-01 13:32   ` Corinna Vinschen
2014-08-04  1:03     ` Ken Brown
2014-08-04  8:00       ` Corinna Vinschen
2014-08-04 13:34         ` Ken Brown
2014-08-04 13:45           ` Corinna Vinschen
2014-08-05 12:21             ` Ken Brown
2014-08-05 13:33               ` Peter Hull
2014-08-05 13:59                 ` Peter Hull
2014-08-05 13:58               ` Corinna Vinschen
2014-08-05 17:55                 ` Ken Brown
2014-08-05 18:40                   ` Corinna Vinschen
2014-08-07 11:52                     ` Ken Brown
2014-08-07 12:51                       ` Corinna Vinschen
2014-08-07 18:54                         ` Ken Brown
2014-08-07 15:30                       ` Eric Blake
2014-08-07 18:54                         ` Ken Brown
2014-08-07 21:42                           ` Eric Blake
2014-08-08 13:27                             ` Ken Brown
2014-08-08 15:39                               ` Peter Hull
2014-08-09  1:38                                 ` Ken Brown
2014-08-18 12:28                               ` Ken Brown
2014-08-18 14:58                                 ` Peter Hull
2014-08-18 15:03                                   ` Larry Hall (Cygwin)
2014-08-25 19:00                                 ` Ken Brown
2014-08-26  9:13                                   ` Peter Hull
2014-08-26 18:55                                   ` Achim Gratz
2014-08-26 22:13                                     ` Ken Brown
2014-08-27  8:42                                       ` Corinna Vinschen
2014-08-27 12:53                                         ` Ken Brown
2014-08-27 13:47                                           ` Corinna Vinschen
2014-08-27 14:40                                             ` Eric Blake
2014-08-27 17:15                                               ` Ken Brown
2014-08-27 15:15                                           ` Achim Gratz
2014-08-28  7:25                                             ` Achim Gratz
2014-08-28  9:55                                               ` Corinna Vinschen
2014-08-28 13:18                                                 ` Corinna Vinschen
2014-08-28 15:04                                                   ` Achim Gratz
2014-08-28 15:10                                                     ` Corinna Vinschen
2014-08-28 15:27                                                   ` Achim Gratz
2014-08-29  9:59                                                     ` Achim Gratz
2014-08-29 11:09                                                       ` Corinna Vinschen
2014-08-29 18:08                                                         ` Ken Brown
2014-08-29 19:23                                                           ` Achim Gratz
2014-08-29 19:36                                                             ` Ken Brown
2014-08-29 20:00                                                               ` Achim Gratz
2014-08-29 21:38                                                                 ` Ken Brown
2014-08-29 20:05                                                               ` Andrey Repin
2014-08-29 21:43                                                               ` Corinna Vinschen
2014-08-29 23:35                                                                 ` Andrey Repin
2014-09-01 11:47                                                                   ` Corinna Vinschen
2014-09-01 11:57                                                       ` Corinna Vinschen
2014-09-01 17:38                                                         ` Achim Gratz
2014-09-02  8:32                                                           ` Corinna Vinschen
2014-09-02 17:29                                                             ` Achim Gratz
2014-09-02 19:19                                                               ` Corinna Vinschen
2014-09-02 19:42                                                                 ` Achim Gratz
2014-09-02 20:09                                                                   ` Corinna Vinschen
2014-09-02 20:23                                                                     ` Achim Gratz
2014-09-03 13:04                                                                       ` Corinna Vinschen
2014-09-03 17:59                                                                         ` Achim Gratz
2014-08-28 10:34                                             ` Eric Blake
2014-08-27 21:05                                         ` Andrey Repin
2014-08-28 10:01                                           ` Corinna Vinschen
2014-08-28 13:35                                             ` Andrey Repin
2014-08-28 14:10                                               ` Corinna Vinschen
2014-08-28 17:05                                                 ` ACL behavior in Cygwin // " Andrey Repin
2014-08-28 18:29                                                   ` Achim Gratz
2014-08-29  8:29                                                   ` Corinna Vinschen
2014-08-28 18:38                                                 ` Achim Gratz
2014-08-28 19:50                                                   ` Andrey Repin
2014-08-06  2:30                   ` Katsumi Yamaoka
2014-08-06  8:48                     ` Corinna Vinschen
2014-08-06 23:41                       ` Katsumi Yamaoka
2014-08-07  0:35                         ` Andrey Repin
2014-08-04  8:05       ` Peter Hull
2014-08-04 13:36         ` Ken Brown
  -- strict thread matches above, loose matches on Subject: below --
2014-08-06  0:15 Angelo Graziosi
2014-07-31 14:51 Peter Hull
2014-07-31 17:35 ` Ken Brown
2014-08-01  7:36 ` Peter Hull
2014-08-01 10:22 ` Katsumi Yamaoka
2014-08-01 11:33   ` Peter Hull

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