public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Shaddy Baddah <lithium-cygwin@shaddybaddah.name>
To: cygwin@cygwin.com
Subject: Re: Odd hang of cc1.exe *resolved. /tmp/cygwin1.dll. Apologies * cpp/gcc
Date: Thu, 7 May 2020 19:34:36 +1000	[thread overview]
Message-ID: <78b5c27c-57de-1941-20b7-a9c61e2ec4a8@shaddybaddah.name> (raw)
In-Reply-To: <7b4feea3-8294-de15-1fdf-0a7095b69d75@shaddybaddah.name>

Hi,

On 7/5/20 1:44 pm, Shaddy Baddah wrote:
> Thanks. Yes, I am mapping my directory outside the cygwin directory
> tree, via /etc/fstab.
> 
> I will certainly check the perms and see if they make a
> difference. However, you must admit, it is weird that running as.exe
> with path /usr/bin/as.exe does not break like running the same exe
> with path /usr/x86_64-pc-cygwin/bin/as.exe, out of the same /tmp
> directory, is inexplicable.
> 
> And even if perms are involved, it's quite unexpected that spawning a
> Cygwin executable would behave in a very undesirable way. Whilst I am
> able to recover the situation with ctrl-d or ctrl-c in a console
> window (command prompt or ConEmu), under mintty, I get a total lock
> up if I try ctrl-d or ctrl-c. I can only recover my mintty session by
> avoiding ctrl-d/c and selectively killing processes via taskmgr (I
> think child of bash first, then the hung /usr/x86_64-pc-cygwin/bin/
> process).
> 
> I'll accept that my experience must be accounted for as an extreme
> corner case. But I feel satsified that I have documented it here, in
> case some silent observers have been experiencing like issues, and not
> reporting them. On the face of it, those users might have thought it
> was a problem with mintty, which I don't believe it is.
> 
> And I want to clarify, I don't think Cygwin's DLL code is at fault at
> all. If my understanding is correct, there are all sorts of code
> segments in the DLL where an adjustment has to be made because a
> Windows API function does not behave consistently, or as per its
> documentation. I suspect this is an unidentified equivalent.

I apologise if I've wasted anyone's time on this. I tried resetting the
permissions on /tmp, and then on a hunch that some file in /tmp might be
inducing the *alleged* (frivolously on my part) issue with Windows, I
started removing files one by one. Eventually I noticed a copy of an old
cygwin1.dll (actually a custom build of 2.10.0) and that of course was
the culprit.

And it makes sense now of course. /usr/bin/as (and cc1) are going to
load cygwin1.dll in /usr/bin, which is consistent with bash/mintty etc,
because it exists in the same directory as the executable.

And of course, /tmp/cygwin1.dll was loaded as it was in the current
directory, and the executable not being in /usr/bin meant that Windows
wasn't using the colocated DLL as the first search result.

I'm really sorry Cygwin community. I'll store this one in my memory
banks, and hope there is no next time.


-- 
Embarrassedly yours,
Shaddy

      reply	other threads:[~2020-05-07  9:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-27  6:54 Odd hang of cc1.exe, when invoking cpp/gcc Shaddy Baddah
2020-04-28  5:23 ` Odd hang of cc1.exe *now isolated somewhat* cpp/gcc Shaddy Baddah
2020-04-28 12:46   ` Eliot Moss
2020-04-29  4:06     ` Odd hang of cc1.exe *now further isolated, potential console issues* cpp/gcc Shaddy Baddah
2020-04-29  4:55       ` Marco Atzeri
2020-04-29 12:38       ` Odd hang of cc1.exe *now further isolated, back to a fork issue* cpp/gcc Shaddy Baddah
2020-05-06 14:29         ` Odd hang of cc1.exe *now isolated to /tmp weirdness* cpp/gcc Shaddy Baddah
2020-05-07  1:19           ` Doug Henderson
2020-05-07  3:44             ` Shaddy Baddah
2020-05-07  9:34               ` Shaddy Baddah [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=78b5c27c-57de-1941-20b7-a9c61e2ec4a8@shaddybaddah.name \
    --to=lithium-cygwin@shaddybaddah.name \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).