This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Need tech info on need_invisible() and CreateWindowStation


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

http://cygwin.com/acronyms/#PCYMTWLL - your email was just awful to read
(go look at http://cygwin.com/ml/cygwin/2006-03/msg00402.html to see why
we ask for some common sense netiquette - wrapping at 76 characters is
typical)

>
> My first question, is can you explain exactly me regarding the code
> when/in which condition exactly with an example (bash calling make & for
> example make calling sh as sub process), when this code is called ? I
> did not exactly understand when ?

You've already taken the first step of looking at the code.  The joy of
open source is that you can now compile your own version of cygwin1.dll
with debugging information, and instrument it to print a message when it
is used, or put a breakpoint in the debugger, or many other options.  The
best way for you to understand what the code is doing is dive in and learn
it yourself.

>
> How is shared this Window station between all cygwin programs ?
> I saw that you call the GetProcessWindowStation &
> GetUserObjectInformation & finally check the WSF_VISIBLE flag to see if
> you need to create one CygWinInvisible non interactive window station &
> at the end a default non interactive desktop. So, If running multiples
> instances of cygwin programs even if these instances are not some child
> instances of others cygwin programs, they will be attached to the
> already existing CygWinInvisible window station. But.... My concern here
> is when you have multiple isntances of cygwin program started in
> parallel for multi processing tools for example... Can these instances
> meet a race/concurrent/conflict access to this part of code & detecting
> together that there is no cygwininvisible winstation created & so
> calling together CreateWindowStation (or there are maybe somewere above
> int he code/call stack some semaphore managed not for encountering a
> race condition in this code ?) ?

If you can generate a simple test case that shows an actual bug, or
produce a patch with good explanation of why it is needed, it will be
appreciated.  Otherwise, assume that cgf knew what he was doing when he
wrote that code, and that any races are unintentional.

>
> Also, looking into the Cygwin code, there is no cygwininvisible
> winstation created (check on check the WSF_VISIBLE ) when it is already
> started from a non interactive desktop like a service (with the interact
> with desktop nt service checkbox unchecked), & so the cygwin process
> uses the winstation where it is running, am i right ?
>
> If cygwin programs run under an interactive winstation & this code is so
> called, all cygwin programs running in this winstation will be
> automatically attached to the cygwininvisible winstation...
> In this case, if having in an interactive session, lot of cygwin
> process, they will fill the cygwininvisible & could overflow/saturate it
> ?
> So, I think a similar issue could no appears in my environment as cygwin
> already run under an invisible winstation... ?
> Why these two last questions ? because as we run lot & lot of child
> programs, our parent/root win32 program automatically create an
> invisibile winstation+its desktop for attaching each child process tree.
> in this manner of managing windows limitation, we have to find the
> correct sharedsection value for allowing all child programs tree to
> run+creating a specific number of winstation+desktop (for example ten
> winstation+its desktop & one child process tree under its of these).
> that's the only way (from my point of view;) )actually as workaround to
> manage the computer load under win32 :(

Since you already seem to know a lot about the semantics of invisible
windows stations, you may already have a headstart on writing any patches
to cygwin's usage of them.

>
> I know that you will redirect me to the "how to report a cygwin problem"
> document but these questions are to increase my knowledges & so if
> needed, to report my future requests with the best details ;)
> Also, as running strace to find exactly where cygwin process lock/hang
> on our architecture is really complex, this why I also investigating on
> this way.
>
> I also saw that (If i looked in the correct version), that Cygwin
> allocate at the end of the dll segment a block of memory for exchanging
> data with the child cygwin programs & that sometimes (if i understoound
> everything) due to dlls reallocation, this shared segment could be not
> allocated correctly... can this generate hanging/locking process ?

If cygwin cannot allocate shared memory as desired, that process dies with
an error message.  It should be a quick death; if a process hangs then
there is some other issue at play.

>
> Just a last question (I know that my mail is already big), but Why
> sometime, cygwin also try to impersonate child processes ?

Because that is how cygwin emulates POSIX semantics.

>
> Thank's very a lot for your contributions ;) This will really help me to
> troubleshoot my issue in our system/configuration if not linked & due by
> cygwin ;)
> Louis

- --
Life is short - so eat dessert first!

Eric Blake             ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEGO4u84KuGfSFAYARAsF8AKClcFQ3ddCa371QuBzH/QqxhaXJwwCgidGi
7+J2EqFrjnKBekX78dtqKCU=
=PNUD
-----END PGP SIGNATURE-----

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]