Cygwin & MingW: Ressources of sh.exe arent freed after running

2008-06-15 Thread Chris

I just tumpled over a problem with MingW and Cygwin.

I tried to compile a new version of gcc and got an error that was saying 
me that no more processes can be started. So I looked into the 
taskmanager and saw that I had too high PIDs (>260.000) and that my RAM 
was full and also the pagefile.


Then I made a restart and tried a configure and saw that the RAM was 
going down and the PIDs were growing up as were the pagefile.


The same thing happend when I compiled Bochs. So the ressources gcc used 
ared freed, too (I think so).

Cygwin Configuration Diagnostics
Current System Time: Sun Jun 15 18:53:01 2008

Windows XP Professional Ver 5.1 Build 2600 Service Pack 2

Path:   C:\cygwin\usr\local\bin
C:\cygwin\bin
C:\cygwin\bin
C:\cygwin\usr\X11R6\bin
c:\WINDOWS\system32
c:\WINDOWS
c:\WINDOWS\System32\Wbem
c:\Programme\ATI Technologies\ATI.ACE\Core-Static
c:\Projects
c:\Programme\Gemeinsame Dateien\Ulead Systems\MPEG
C:\cygwin\usr\cross\bin
c:\PROGRA~1\Tcl\bin
c:\Programme\Haskell\bin
c:\ghc\ghc-6.8.2\bin
c:\Programme\CVSNT\
c:\Programme\MKVtoolnix

Output from C:\cygwin\bin\id.exe (nontsec)
UID: 1003(FlashBurn) GID: 513(Kein)
0(root)  513(Kein)544(Administratoren)
545(Benutzer)

Output from C:\cygwin\bin\id.exe (ntsec)
UID: 1003(FlashBurn) GID: 513(Kein)
0(root)  513(Kein)544(Administratoren)
545(Benutzer)

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

USER = 'FlashBurn'
PWD = '/cygdrive/c/temp'
HOME = '/home/FlashBurn'
MAKE_MODE = 'unix'

HOMEPATH = '\Dokumente und Einstellungen\FlashBurn'
MANPATH = '/usr/local/man:/usr/share/man:/usr/man::/usr/ssl/man'
APPDATA = 'C:\Dokumente und Einstellungen\FlashBurn\Anwendungsdaten'
HOSTNAME = 'server'
TERM = 'cygwin'
PROCESSOR_IDENTIFIER = 'x86 Family 6 Model 15 Stepping 6, GenuineIntel'
WINDIR = 'C:\WINDOWS'
QTDIR = '/usr/lib/qt3'
OLDPWD = '/home/FlashBurn'
USERDOMAIN = 'SERVER'
OS = 'Windows_NT'
ALLUSERSPROFILE = 'C:\Dokumente und Einstellungen\All Users'
!:: = '::\'
TEMP = '/cygdrive/c/DOKUME~1/FLASHB~1/LOKALE~1/Temp'
COMMONPROGRAMFILES = 'C:\Programme\Gemeinsame Dateien'
USERNAME = 'FlashBurn'
PROCESSOR_LEVEL = '6'
FP_NO_HOST_CHECK = 'NO'
SYSTEMDRIVE = 'C:'
__COMPAT_LAYER = 'EnableNXShowUI '
USERPROFILE = 'C:\Dokumente und Einstellungen\FlashBurn'
CLIENTNAME = 'Console'
QMAKESPEC = '/usr/lib/qt3/mkspecs/cygwin-g++'
PS1 = '\[\e]0;[EMAIL PROTECTED] \[\e[33m\]\w\[\e[0m\]\n\$ '
LOGONSERVER = '\\SERVER'
PROCESSOR_ARCHITECTURE = 'x86'
!C: = 'C:\cygwin\bin'
SHLVL = '1'
PATHEXT = '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH'
HOMEDRIVE = 'C:'
PROMPT = '$P$G'
COMSPEC = 'C:\WINDOWS\system32\cmd.exe'
TMP = '/cygdrive/c/DOKUME~1/FLASHB~1/LOKALE~1/Temp'
SYSTEMROOT = 'C:\WINDOWS'
PRINTER = 'Brother DCP-7010 USB Printer'
CVS_RSH = '/bin/ssh'
PROCESSOR_REVISION = '0f06'
PKG_CONFIG_PATH = '/usr/X11R6/lib/pkgconfig'
INFOPATH = '/usr/local/info:/usr/share/info:/usr/info:'
PROGRAMFILES = 'C:\Programme'
NUMBER_OF_PROCESSORS = '2'
SESSIONNAME = 'Console'
COMPUTERNAME = 'SERVER'
_ = '/usr/bin/cygcheck'

HKEY_CURRENT_USER\Software\Cygnus Solutions
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\Program Options
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2
  (default) = '/cygdrive'
  cygdrive flags = 0x0022
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/
  (default) = 'C:\cygwin'
  flags = 0x000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/bin
  (default) = 'C:\cygwin/bin'
  flags = 0x000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/lib
  (default) = 'C:\cygwin/lib'
  flags = 0x000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\Program Options

a:  fd N/AN/A
c:  hd  NTFS305234Mb  88% CP CS UN PA FC WinXP
d:  hd  NTFS715402Mb  90% CP CS UN PA FC Externe Daten 2
e:  hd  NTFS305242Mb  89% CP CS UN PA FC Daten
f:  cd N/AN/A
g:  cd  CDFS   653Mb 100%CS UN   MP3´s
j:  cd N/AN/A

C:\cygwin  /  system  binmode
C:\cygwin/bin  /usr/bin   system  binmode
C:\cygwin/lib  /usr/lib   system  binmode
..  /cygdrive  system  binmode,cygdrive

Found: C:\cygwin\bin\awk.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:\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.e

Re: Cygwin & MingW: Ressources of sh.exe arent freed after running

2008-06-15 Thread Mark Geisert
Chris writes:
> I tried to compile a new version of gcc and got an error that was saying 
> me that no more processes can be started. So I looked into the 
> taskmanager and saw that I had too high PIDs (>260.000) and that my RAM 
> was full and also the pagefile.

This topic has come up numerous times in the past.  See the archives.  At one 
time even I thought there was a Cygwin problem being discovered here.  I was 
wrong.  In my case, and in the case of most (all?) other folks seeing this, the 
real problem was BLODA.
See  for more.

(Was that two separate copies of 'cygcheck' output?  Please *attach* just one 
next time rather than sending as part of the email body.)
Hope this helps,

..mark


--
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: Passing file descriptors and ssh ControlMaster

2008-06-15 Thread Stefanos Makris
Hi Corinna,

I'm sorry to ask such a basic question, but id there somewhere where I can
get information around these plans? I would like to give it a try if I can.

--Stefanos.


-Original Message-
From: Corinna Vinschen [mailto:[EMAIL PROTECTED] 
Sent: Saturday, June 14, 2008 1:51 AM
To: cygwin@cygwin.com
Subject: Re: Passing file descriptors and ssh ControlMaster

On Jun 13 12:38, Stefanos Makris wrote:
>
> After looking through the list archives, I am a little puzzled as to the 
> current state of implementing the necessary functionality that will enable

> the file descriptor passing between processes (which according to my 
> understanding is required for a functioning ControlMaster behavior of
ssh).
>
> Are there any plans / updates on this?

Plans, yes, for a long time.  Updates, no.


Corinna

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


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



start ssh port forwarding at boot time

2008-06-15 Thread Matthias Meyer
Hello,

I try to start port forwarding shortly after boot by using cygrunsrv.

$ cygrunsrv -Q forward5729
Service : forward5729
Current State   : Stopped
Command : /usr/bin/ssh -v -f -2 -N -L 5729:localhost:5729 [EMAIL 
PROTECTED]

Unfortunately this will not work for me:

[EMAIL PROTECTED] ~
$ tail /var/log/forward5729.log
:
debug1: Connection established.
debug1: identity file /.ssh/id_rsa type -1
debug1: identity file /.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3
debug1: match: OpenSSH_4.3 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.0
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: read_passphrase: can't open /dev/tty: No such device or address
Host key verification failed.

If I start it in a terminal, it will work:
[EMAIL PROTECTED] ~
$ /usr/bin/ssh -v -f -2 -N -L 5729:localhost:5729 [EMAIL PROTECTED]
:
debug1: Connection established.
debug1: identity file /home/root/.ssh/id_rsa type 1
debug1: identity file /home/root/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3
debug1: match: OpenSSH_4.3 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.0
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'athlux.homelinux.org' is known and matches the RSA host key.
debug1: Found key in /home/root/.ssh/known_hosts:2
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
:

What should I do?

Thanks in advance
Matthias
-- 
Don't Panic

--
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: start ssh port forwarding at boot time

2008-06-15 Thread René Berber

Matthias Meyer wrote:


I try to start port forwarding shortly after boot by using cygrunsrv.

$ cygrunsrv -Q forward5729
Service : forward5729
Current State   : Stopped
Command : /usr/bin/ssh -v -f -2 -N -L 5729:localhost:5729 [EMAIL 
PROTECTED]

[snip]

What should I do?


Run the service as your user so it can use your keys :

  -u, --user Optional user name to start service as.
Defaults to SYSTEM account.
  -w, --passwdOptional password for user. Only needed
if a user is given. If a user has an empty
password, enter `-w '. If a user is given but
no password, cygrunsrv will ask for a password
interactively.

--
René Berber


--
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: start ssh port forwarding at boot time

2008-06-15 Thread Matthias Meyer
Am Sonntag 15 Juni 2008 schrieb René Berber:
> Matthias Meyer wrote:
> 
> > I try to start port forwarding shortly after boot by using cygrunsrv.
> > 
> > $ cygrunsrv -Q forward5729
> > Service : forward5729
> > Current State   : Stopped
> > Command : /usr/bin/ssh -v -f -2 -N -L 5729:localhost:5729 
> > [EMAIL PROTECTED]
> [snip]
> > What should I do?
> 
> Run the service as your user so it can use your keys :
> 
>-u, --user Optional user name to start service as.
>  Defaults to SYSTEM account.
>-w, --passwdOptional password for user. Only needed
>  if a user is given. If a user has an empty
>  password, enter `-w '. If a user is given but
>  no password, cygrunsrv will ask for a password
>  interactively.
> 
> -- 
> René Berber
[EMAIL PROTECTED] ~
$ cygrunsrv -I forward -p /usr/bin/ssh -a "-v -f -2 -N -L 5729:localhost:5729 
[EMAIL PROTECTED]" -u root -w password
$ cygrunsrv -S forward
cygrunsrv: Error starting a service: StartService:  Win32 error 1069:
Der Dienst konnte wegen einer fehlerhaften Anmeldung nicht gestartet werden.

which means in english:
The service could not be started because of an incorrect registration.
But I'm sure. Username and password are correct.

Nothing will be written in /var/log/forward.log.

Thanks
Matthias
-- 
Don't Panic

--
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: start ssh port forwarding at boot time

2008-06-15 Thread René Berber

Matthias Meyer wrote:

[snip]

$ cygrunsrv -I forward -p /usr/bin/ssh -a "-v -f -2 -N -L 5729:localhost:5729 [EMAIL 
PROTECTED]" -u root -w password
$ cygrunsrv -S forward
cygrunsrv: Error starting a service: StartService:  Win32 error 1069:
Der Dienst konnte wegen einer fehlerhaften Anmeldung nicht gestartet werden.

which means in english:
The service could not be started because of an incorrect registration.
But I'm sure. Username and password are correct.


User means Windows user, not root.

Actually there is another way to do the same, instead of running the 
service as your Windows user (the one that has ~/.ssh/), you 
can pass the -i /path/to/your/home/.ssh/id_dsa (or id_rsa) to ssh.


Snippet from man ssh:

 -i identity_file
 Selects a file from which the identity (private key) for 
RSA or
 DSA authentication is read.  The default is 
~/.ssh/identity for
 protocol version 1, and ~/.ssh/id_rsa and ~/.ssh/id_dsa 
for pro-
 tocol version 2.  Identity files may also be specified on 
a per-

 host basis in the configuration file.  It is possible to have
 multiple -i options (and multiple identities specified in 
config-

 uration files).

--
René Berber


--
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: start ssh port forwarding at boot time

2008-06-15 Thread René Berber

Matthias Meyer wrote:

[snip]

$ cygrunsrv -I forward -p /usr/bin/ssh -a "-v -f -2 -N -L 5729:localhost:5729 [EMAIL 
PROTECTED]" -u root -w password
$ cygrunsrv -S forward
cygrunsrv: Error starting a service: StartService:  Win32 error 1069:
Der Dienst konnte wegen einer fehlerhaften Anmeldung nicht gestartet werden.

which means in english:
The service could not be started because of an incorrect registration.
But I'm sure. Username and password are correct.


The message in english:

$ net helpmsg 1069

The service did not start due to a logon failure.

Sorry I didn't realize your user name is "root", seems that cygrunsrv is 
not able to change users which is a Windows capability option.


You can use the other alternative (ssh -i ...) or add the required 
rights or capabilities, or use stunnel instead of ssh.

--
René Berber


--
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: start ssh port forwarding at boot time

2008-06-15 Thread Brian Dessent
René Berber wrote:

> Sorry I didn't realize your user name is "root", seems that cygrunsrv is
> not able to change users which is a Windows capability option.

Cygrunsrv does not require the ability to change users as sshd does. 
The service is configured to run as a given user in the service control
manager, and cygrunsrv is simply setting those options in the registry. 
This works fully.

I still think you were right in that the OP was incorrectly using their
ssh username/password when they should be using their Windows username
and password.

Brian

--
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: start ssh port forwarding at boot time

2008-06-15 Thread Brian Dessent
Brian Dessent wrote:

> I still think you were right in that the OP was incorrectly using their
> ssh username/password when they should be using their Windows username
> and password.

Oh, and on the topic of automatically setting up ssh port forwarding as
a service: OP should definitely use autossh.  This will keep the
connection alive if it drops, automatically restarting it as necessary. 
Otherwise, the first time it dies the service will stop and the user
must manually restart it again.

I've been doing this (autossh port forwarding) for years and it's
fantastically convenient.

Brian

--
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: Bug in ping? ICMP Sequence Number octets are reversed

2008-06-15 Thread Christopher Faylor
On Fri, Jun 13, 2008 at 10:10:53AM -0700, Gary Johnson wrote:
>> However, I think it's possible to get equivalent behavior
>> from Windows ping if you give it the right command line parameters.
>
>The feature of Cygwin's (Unix's) ping that I found particularly 
>useful in my testing was the printing of the sequence numbers.  I 
>couldn't find a way to make the Windows version do that.

Ok, then, nevermind.  I can confirm that the sequence numbers don't
seem to be available from windows ping.  Oh well.

cgf

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



Fork: Resource temporarily unavailable

2008-06-15 Thread Adam Thompson
Dear all,

We have several sshd installations based on Cygwin, running on Server
2003 SP1 (and also SP2).

Over the last 12 months or so, there seems to have been a lot of
problems with sshd - the eventlogs cite a fork: resource temporarily
unavailable - error.

I've checked the obvious (ie port 22/tcp isn't already bound
elsewhere, ran filemon/regmon) but failed to find the reason.  Is
there a way of logging _which_ resource is temporarily (or rather,
persistently) unavailable?

There seems to be a higher occurrence of this issue on Citrix PS
4.0/4.5 presentation servers, but after ruling out various memory and
cpu optimisations (eg DLL rebasing - I've tried the rebaseall script
and confirmed that none of the sshd or cygrunsrv dependencies have
been touched by Citrix MPS), I can't pin it down to a specific patch
level or configuration.

I've seen various other threads relating to this issue, but no
solution.  I'd like to find the solution, but I seem to be missing
some vital pieces of the puzzle.

I have a nasty feeling this is going to involve learning a bit more
about understanding the drwtsn32.exe crashdumps (manually attaching
the debugger, as crashdumps aren't a symptom of this issue).

Thanks in advance - for any pointers/hints,

-- 
AdamT
"At times one remains faithful to a cause only because its opponents
do not cease to be insipid." - Nietzsche

--
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: Fork: Resource temporarily unavailable

2008-06-15 Thread Larry Hall (Cygwin)

Adam Thompson wrote:

Dear all,

We have several sshd installations based on Cygwin, running on Server
2003 SP1 (and also SP2).

Over the last 12 months or so, there seems to have been a lot of
problems with sshd - the eventlogs cite a fork: resource temporarily
unavailable - error.

I've checked the obvious (ie port 22/tcp isn't already bound
elsewhere, ran filemon/regmon) but failed to find the reason.  Is
there a way of logging _which_ resource is temporarily (or rather,
persistently) unavailable?

There seems to be a higher occurrence of this issue on Citrix PS
4.0/4.5 presentation servers, but after ruling out various memory and
cpu optimisations (eg DLL rebasing - I've tried the rebaseall script
and confirmed that none of the sshd or cygrunsrv dependencies have
been touched by Citrix MPS), I can't pin it down to a specific patch
level or configuration.

I've seen various other threads relating to this issue, but no
solution.  I'd like to find the solution, but I seem to be missing
some vital pieces of the puzzle.

I have a nasty feeling this is going to involve learning a bit more
about understanding the drwtsn32.exe crashdumps (manually attaching
the debugger, as crashdumps aren't a symptom of this issue).

Thanks in advance - for any pointers/hints,



A common reason for this kind of message is also
.  Check it out if you haven't
already.


--
Larry Hall  http://www.rfk.com
RFK Partners, Inc.  (508) 893-9779 - RFK Office
216 Dalton Rd.  (508) 893-9889 - FAX
Holliston, MA 01746

_

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

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