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]

cygrunsrv will not start services most of the time


One of the first things I do on a new computer is install cygwin and openssh to get sshd access to it. (setting it up with "ssh-host-config -y").

Unfortunately, I seem to have a problem with cygrunsrv (version 1.34-1).  Most of the time (say, 7 out of 10 times), it will not start the service. When I issue the "net start sshd" command, it hangs, then eventually gives the error:
"A system error has occurred.
System error 1067 has occurred."

If the service *does* start, it seems to work.  I haven't done long term testing.

Most of the time upon failure of the service to start, I do not get any error messages in the Windows event log.  Very, very rarely I get an error in the Windows Application event log: "Starting service 'sshd' failed: fork: 11, Resource temporarily unavailable".

After failing to start, two cygrunsrv processes are visible in the task manager (I guess cygrunsrv forks a child?).  "net stop sshd" doesn't kill them; I have to manually kill them.

I've used the sysinternals "Process Explorer (procexp.exe)" to look at the stack for the child process cygrunsrv.exe:
ntkrnlpa.exe!KiUnexpectedInterrupt+0x121
ntkrnlpa.exe!ZwYieldExecution+0x1c8e
ntkrnlpa.exe!ZwYieldExecution+0x2570
ntkrnlpa.exe!NtWaitForSingleObject+0x9a
ntkrnlpa.exe!KeReleaseInStackQueuedSpinLockFromDpcLevel+0xb74
ntdll.dll!KiFastSystemCall+0x3
ntkrnlpa.exe!KiDispatchInterrupt+0x72e
ntdll.dll!KiFastSystemCallRet
ntdll.dll!NtWaitForSingleObject+0xc
kernel32.dll!WaitForSingleObjectEx+0xa8


Things that I have tried to resolve this:

1.  rebaseall  (both with the default base, and bases of 0x68000000 and 0x72000000).  Sometimes the service will start the first time after rebase-ing, but only once.
2.  Uninstalling McAfee (and rebooting of course)
3.  Reinstalling cygwin
4.  Manually specifying the PATH environment for the service as "usr/local/bin:/usr/bin:/bin"
     a.  Also tried editing the WINDOWS PATH to only include C:\WINDOWS\... folders
5.  Setting up "inetd" as the service instead of "sshd".  On the rare occassions inetd starts, connecting via SSH works, but inetd doesn't start any better than sshd (it still fails most of the time).
6.  Installing an older version of cygrunsrv (1.30-1)
7.  Killing unnecessary Windows processes and services.
8.  Using "cygrunsrv -S" instead of "net start" to start services.

If I run cygwin as SYSTEM, and run /usr/sbin/sshd -D, sshd works fine.

What other things can I do to narrow down the problem?  I haven't tried an older version of cygwin (currently using 1.5.25-15) because I assume the latest is the greatest...

I hope the information I've provide is complete.  If I can add anything, please let me know.

--
Rob

Attachment: cygcheck.out
Description: cygcheck.out

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