Re: python3 3.9.18-1 hanging

2024-01-31 Thread Eliah Kagan via Cygwin

Hi,

The fastest way to produce the problem described in
https://cygwin.com/pipermail/cygwin/2024-January/255267.html and 
https://cygwin.com/pipermail/cygwin/2024-January/255273.html seems to be 
to run `pip install ...` on a version of `pip` that uses its vendored 
`rich` dependency to draw progress bars. (The hang reliably occurs at 0% 
on the *second* progress bar, and `--progress-bar off` avoids it.) 
Examining what `pip` is doing *may* be sufficient to investigate this.


However, I was able to make a *fairly* simple script that reliably 
produces it, at least on my machine (and on GitHub Actions runners). It 
seems to me that this script may give some insight. In case it's useful:


import hashlib
import threading
import time
t1 = threading.Thread(target=lambda: print("hello"))
t2 = threading.Thread(target=lambda: print("goodbye"))
t1.start()
time.sleep(1)
print("in between")
t2.start()
t1.join()
t2.join()

The interesting thing here is that the `hashlib` import is required. 
Even though that import is not used, the script does not trigger the 
problem if it is removed.


As discussed at
https://github.com/gitpython-developers/GitPython/pull/1814, this script 
is motivated by code in GitPython that produces the hang when unit tests 
are run. The script hangs when attempting to execute `t2.start()`. The 
effect appears specific to Python 3.9.18 on Cygwin. Running that script 
with Python 3.9.16 on Cygwin, or on either Python 3.9.16 or Python 
3.9.18 on either Ubuntu 22.04 LTS or macOS 13, does not produce the 
problem. (I don't have native Windows builds of those versions to test 
with at this time.)


`t1` can be joined before `t2` is started, and the problem still 
reliably occurs. If that is done, then the sleep can be omitted and the 
problem sometimes occurs. Running the statements in a REPL also produces 
the problem without requiring a sleep (presumably the delay of entering 
them is sufficient). The child threads and main thread don't have to 
print to produce the problem; I included that to make it clearer what's 
going on. I have not tested non-blocking delays.


I named that `simple.py` and ran it in various ways to verify that it 
triggers the problem, but I think the most important ways to report are:


/usr/bin/python3.9 simple.py

And:

strace -o strace.out /usr/bin/python3.9 simple.py

By the time I killed the process in the strace run, `strace.out` had 
grown to 1819328 lines, most of which were:


--- Process 25112 (pid: 20768), exception c005 at 

(This is the same pattern Daniel Abrahamsson reported when running
`pip install` with strace.)

I made a copy of the first 6610 lines as `truncated.out`, but even that 
is 828 KiB, so I've posted it here rather than attaching it:


https://gist.github.com/EliahKagan/04143302056426d72c7a617d65890dda

The last 8 lines of `truncated.out` are identical, and the original 
`strace.out` continued that way.


(Although the strace output shows that this was run from a directory 
related to GitPython, this was not done with any virtual environment 
activated, nothing from GitPython was imported or otherwise used, and 
neither GitPython nor its distinctive dependencies gitdb and smmap were 
installed in the global environment.)


That GitHub Gist also includes `simple.py` for convenience, and 
`cygcheck.out` in case that would somehow be useful.


-Eliah

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


Re: Eliminating -mno-cygwin from gcc.

2007-02-06 Thread Eliah Kagan

On 2/6/07, Frank Fesevur wrote:

If you want a use a popup, please make it aware of the --quiet option!

I run 'setup.exe --quiet' from a simple .bat script to update my
installation (first stopping and afterwards starting again my sshd). And
even that is not always free of popups (when files are still in use).

Therefore I can't do a fully automatic update. And I know setup.exe is
not designed for unattended usages, but with the current command line
options it can act like it and I do use it that way.

And could the 'file in use' message box also respect the --quiet option?

Regards,
Frank


Perhaps there could be a flag to cause setup.exe to succeed quietly in
spite of such warnings (update the package anyway), and another to
cause setup.exe to gracefully degrade quietly in the face of them
(continue but skip updating the package and skip other updates with
the updated version of the package as a dependency).

One of these flags could be --quiet, or the current behavior of
--quiet could be retained and two new flags such as --quietsucceed and
--quietfail could be added. Then --quiet would continue to behave as
people have learned it behaves. Perhaps it would even be useful to
have different flags to set the answer to the question of whether or
not to replace in-use files and to set the answer to the question of
whether or not to upgrade packages when there is a significant
change.

On the other hand, I suppose there is some question of whether or not
additional structure should be added to the calling syntax of
setup.exe until a silent mode is added whereby everything one can do
in the interactive mode one can do in the silent mode (e.g. specifying
packages and versions from the command line).

-Eliah

--
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/



Re: cygwin + make 10 time slower than equivalent linux make (same ifc compiler)

2006-12-03 Thread Eliah Kagan

On 12/2/06, Philippe Conraux wrote:

I have to build a large project on Windows.

Build libraries using Intel compilers needs 12 hours on cygwin
when same build needs 1 hour on Linux (same computer : dual boot, same
compilers ifc 9.1)


Do you need a feature that is specific to cygwin's make or the cygwin
environment?

If not, could you use the make that comes with MinGW
(http://www.mingw.org/)? If a POSIX-like environment is required,
would MSYS do the trick as well (http://www.mingw.org/msys.shtml)?

Alternatively, could you not simply cross-compile it for Windows on
the Linux system? You said the workstation is dual-boot. If you have
to be in Windows to perform other tasks while building it, perhaps you
could virtualize (not emulate) some Linux system and cross-compile it
that way.

Finally, are you sure the problem even has anything to do with cygwin
and cygwin's make? Perhaps ifc is slower on Windows than Linux for the
sort of thing that you are doing? (In that case using MinGW's make,
with or without MSYS, would probably not help.)

-Eliah

--
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/



Re: How to edit files owned by SYSTEM?

2006-09-30 Thread Eliah Kagan

According to Vinicius on 9/30/2006 5:59 AM:
 Hello,

 How to edit files owned by SYSTEM, please?


On 9/30/06, Eric Blake wrote:

chown them to someone else, or chmod them to be world writable, or become
SYSTEM yourself (search the archives for sysbash for this last trick).
Administrator accounts can generally chown a file to another user.


Yes, in other words, the same way you would edit them in native windows.

-Eliah

--
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/



Re: Free SFTP server for Windows?

2006-02-24 Thread Eliah Kagan
On 2/24/06, Angel Tsankov wrote:
 Can someone recommend a free SFTP server that has been ported to
 Windows?

Just go in Cygwin's setup.exe and select the package openssh to
install the cygwin port of OpenSSH (http://www.openssh.org/), which is
free as in speech and as in beer.

Should you require them, some pretty good, more detailed instructions
(IMHO) can be found here:

http://pigtail.net/LRP/printsrv/cygwin-sshd.html

-Eliah

--
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/



Re: port existing x windows application to win32

2005-11-10 Thread Eliah Kagan
On 11/10/05, Thomas Dickey wrote:
 On Thu, 10 Nov 2005, Michel Bardiaux wrote:

  Eliah Kagan wrote:
  There is of course a cygwin port of the X11 *client* libraries, but what if
  you cant put your app under GPL? Is there a pure mingw port of the X11 
  client
  lib?

 The X11 client libraries aren't GPL.

 --
 Thomas E. Dickey

For the record (especially since issues of attributed accuracy are
being raised later in the thread) I did not write the following:

  There is of course a cygwin port of the X11 *client* libraries, but what if
  you cant put your app under GPL? Is there a pure mingw port of the X11 
  client
  lib?

Thomas Dickey incorrectly quoted Michel Bardiaux as attributing that
to me, while in fact, the credit for the above quote is due to Michel
Bardiaux himself.

There's no serious issue here, but out of principle I don't want
something attributed to me that I did not, in fact, say.

-Eliah

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



Re: port existing x windows application to win32

2005-11-09 Thread Eliah Kagan
On 11/9/05, Mehnaz Farooqui wrote:
 Hi,

  can you pls tell me how I can port existing x windows
 application to win32? Is there any tool that does this
 or do I have to replace the X11 API with win32 API
 manually?


 Thanks,
 Mehnaz

Since there are X servers for Windows (like XFree86 on Cygwin), do you
need to change the X11 API calls at all?

-Eliah

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



Re: WINE on Cygwin

2005-11-03 Thread Eliah Kagan
On 11/3/05, Alexander Gottwald [EMAIL PROTECTED] wrote:
 On Thu, 2005-11-03 at 16:36 +, Andy Moreton wrote:

   Sometimes it's useful to have a separation between the program and
   windows. You could trace all registry or file access of a program. Wine
   would be useful for remote program usage since it exports the display
   via X11.
 
  This still sounds fairly pointless. the tools from sysinternals.com allow
  you to monitor all file and registry access from an application. A VNC
  client will solve your remote operation needs.
 
  So what is the real reason for wanting to do something so perverse ?

 Because it can be done!

 VNC is slow, there is no integration with the local desktop. You can't
 work without interfering with the local desktop. Using wine just to
 redirect the graphic display is overkill but unfortunatly the most
 promising solution.

 Separation is yet another reason.

Not only is VNC slow, but VNC only lets one user log on and run
graphical programs at a time on Windows. It is possible to have
multiple simultaneous Remote Desktop sessions, but only with Windows
Terminal Server, which is expensive and pay-per-license (you need a
license for each login slot), and only runs on Windows Server
operating systems, which are also expensive. It would be very, very
nice to be able to run graphical Windows programs remotely using ssh
-X.

Does anyone know if there any other way to do this, besides with Wine?
(Perhaps something more native?)

-Eliah

--
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/



Re: WINE on Cygwin

2005-11-03 Thread Eliah Kagan
On 11/3/05, Christopher Faylor [EMAIL PROTECTED] wrote:
 On Thu, Nov 03, 2005 at 05:20:57PM -0500, Eliah Kagan wrote:
 On 11/3/05, Alexander Gottwald [EMAIL PROTECTED] wrote:
 On Thu, 2005-11-03 at 16:36 +, Andy Moreton wrote:
 Sometimes it's useful to have a separation between the program and
 windows.  You could trace all registry or file access of a program.
 Wine would be useful for remote program usage since it exports the
 display via X11.
 
 This still sounds fairly pointless.  the tools from sysinternals.com
 allow you to monitor all file and registry access from an application.
 A VNC client will solve your remote operation needs.
 
 So what is the real reason for wanting to do something so perverse ?
 
 Because it can be done!
 
 VNC is slow, there is no integration with the local desktop.  You can't
 work without interfering with the local desktop.  Using wine just to
 redirect the graphic display is overkill but unfortunatly the most
 promising solution.
 
 Separation is yet another reason.
 
 Not only is VNC slow, but VNC only lets one user log on and run
 graphical programs at a time on Windows.  It is possible to have
 multiple simultaneous Remote Desktop sessions, but only with Windows
 Terminal Server, which is expensive and pay-per-license (you need a
 license for each login slot), and only runs on Windows Server
 operating systems, which are also expensive.  It would be very, very
 nice to be able to run graphical Windows programs remotely using ssh
 -X.
 
 Does anyone know if there any other way to do this, besides with Wine?
 (Perhaps something more native?)

 Since we seem to have gotten pretty far afield from anything
 cygwin-related (Corinna has already indicated that Cygwin doesn't do
 what was originally requested) maybe it would be best to take this to
 another forum.

 I do have to say that this may be the first time I've ever heard anyone
 indicate that they wanted to use cygwin because it gave them a speed
 advantage, though...

 cgf

cgf--

It would seem to me that making an arbitrary window application use
X11 to draw its windows would involve cygwin.

I recognize that as moderator, it's your call. If you say nothing more
on it, nor shall I.

Would it be appropriate to move this to the Cygwin-X list?

-Eliah

--
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/



Re: OpenSSH w/cygwin

2005-10-27 Thread Eliah Kagan
On 10/27/05, rogersbr wrote:
 I'm new to Cygwin, wanting to use it to connect to a Unix server
 using SSH.  I see that there is a package for OpenSSH, but don't find
 it in the setup.exe window or anywhere else.  Can someone please
 point me in the right direction and tell me how to install this
 package to an existing Cygwin install?

(You probably know this, but just in case...) You don't need anything
as awesome as Cygwin, if *all* you need is an ssh client for Windows.
You can use PuTTY, which is Windows-native (doesn't need cygwin1.dll
or anything of the sort), and can be run as a GUI application or a
command-line application, at your preference.

http://www.chiark.greenend.org.uk/~sgtatham/putty/

-Eliah

--
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/



Re: web browser for cgywin

2005-10-23 Thread Eliah Kagan
On 10/23/05, Reid Thompson [EMAIL PROTECTED] wrote:

 Charles Li wrote:

  Can someone recommend a decent, and easy to build, web
  browser for cgywinX?
 
  Thanks.

 dillo  graphical, small fast missing some features
 links  text
 elinks text
 links2   http://links.twibright.com/  graphical -- your best bet

Or, if you're willing to expend a bit more effort, you could compile
Firefox against cygwin.dll (this is supported).

But I'd go for links2.

-Eliah

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



Re: sshd refuses ssh connections

2005-10-20 Thread Eliah Kagan
On 10/20/05, Albert Lunde [EMAIL PROTECTED] wrote:
 On Wed, Oct 19, 2005 at 03:27:40PM -0700, Brian Dessent wrote:
   No, it's a red herring.  The host keys should be readable only by the
   process that runs sshd.  This must be SYSTEM in order for impersonation
   to work.  Thus they should be readable only by SYSTEM, and that is how
   ssh-host-config sets things up, correctly.  So if you try to run sshd as
   your normal user account, it will not work.  That's why it's a bad idea
   to mess around with running sshd from a regular prompt, because you will
   run into all kinds of permissions/ownership issues unless you know
   precisely what you're doing.
 
  The footnote to this is that if you obtain a shell as the SYSTEM user,
  you can run sshd from a prompt in debugging mode without any issues.
  There is a script somewhere in the mailing list archives, I think it's
  called sysbash, that achieves this.

 One can also do this with the commercial product Firedaemon

 http://www.firedaemon.com/

 which is a generic service control GUI.

Or with srvany.exe from Microsoft. See the Microsoft Knowledge Base
article How To Create a User-Defined Service:

http://support.microsoft.com/default.aspx?scid=kb;en-us;137890

That article is written for NT and 2000, but if you're running XP or
Server 2003 it works just as well--just get srvany.exe and instsrv.exe
from the free Windows Server 2003 Resource Kit Tools:

http://www.microsoft.com/downloads/details.aspx?displaylang=enfamilyid=9d467a69-57ff-4ae7-96ee-b18c4790cffd

(You may have to paste that link together.)

You could also use Sysinternals' psexec to execute an application as
SYSTEM on your own computer (if you have the File and Printer Sharing
service installed). This also works by installing a service that runs
the application.

http://www.sysinternals.com/Utilities/PsExec.html

-Eliah

--
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/