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: Can't start cron daemon in Cygwin 1.5.23 under WinXP SP2


[Did we make each other's acquaintance @ MIT LIDS in the 1980's?]

>Date: Tue, 23 Jan 2007 10:26:20 -0500
>From: "Pierre A dot  Humblet" <Pierre dot Humblet at ieee dot org>
>
>It's not clear if the problem is in cron, cygrunsrv, cygwin  or your XP setup.
>So here are two suggestions:
>1) run cron as yourself (answer yes in cron-config).
>    This tends  to work around security issues

I tried this; didn't work for complicated reasons (can't log in as a
service, password changes every couple weeks).  But see below for some
progress with your other suggestion:

>2) create a /usr/sbin/cron script  readable and writable by all (leave /usr/sbin/cron.exe alone)
>    with something like
>
>#! /bin/sh
>id
>env
>sleep 10
>id > c:/id.out
>
> That should produce output in /var/log/cron.log and c:/id.out
> ps -a (within 10 sec)  should show cygrunsrv, sh and sleep
> The Windows event log should have two entries about the service starting and stopping.
> Hopefully some clue will emerge....

Another good suggestion.  I created the script as above, and made sure
about permissions & ownerships:

>$ ls -l cron*
>-rwxrwxrwx+ 1 nm67644 Users    41 Jan 23 10:54 cron
>-rwxrwxrwx+ 1 nm67644 Users 24576 Jan 31  2005 cron.exe

Then I tried cron-config again, using your "Potemkin" cron, under the
SYSTEM account:

>Do you want to start the cron daemon as a service now? (yes/no) yes
>cygrunsrv: Error starting a service: QueryServiceStatus:  Win32 error 1053:
>The service did not respond to the start or control request in a timely fashion.

The file c:\id.out did not appear, nothing appeared in /var/log/, and
so on.  We're apparently stuck in cygrunsrv, never getting as far as
executing cron itself, perhaps?

So I cleared the System, Security, and Application logs in the event
viewer and tried again just to see EXACTLY what the new events were.
First do this to remove any zombies:

> $ cygrunsrv --stop cron && cygrunsrv --remove cron

Then do cron-config, which resulted in the same problem:

>cygrunsrv: Error starting a service: QueryServiceStatus:  Win32 error 1053:
>The service did not respond to the start or control request in a timely fashion.

* The file c:\id.out did not appear
* No files appeared in /var/log
* HOWEVER -- and this is why your suggestion was cool -- 3 System
  events DID appear.  One of them, in particular, indicated that
  Microsoft Windows Defender (their new spyware system) was happily
  throttling cygrunsrv:

  >Event Type:	Warning
  >Event Source:	WinDefend
  >Event Category:	None
  >Event ID:	3004
  >Date:		1/23/2007
  >Time:		11:14:09 AM
  >User:		N/A
  >Computer:	CBDWB00033
  >Description:
  >Windows Defender Real-Time Protection agent has detected changes. Microsoft recommends you analyze the software that made these changes for potential risks. You can use information about how these programs operate to choose whether to allow them to run or remove them from your computer.  Allow changes only if you trust the program or the software publisher. Windows Defender can't undo changes that you allow.
  > For more information please see the following:
  >http://go.microsoft.com/fwlink/?linkid=74409
  > 	Scan ID: {75DB80D3-B5AB-425F-862F-3A2C6B5530D0}
  > 	User: PHARMA\nm67644
  > 	Name: Unknown
  > 	ID: 
  > 	Severity: Not Yet Classified
  > 	Category: Not Yet Classified
  > 	Path Found: service:cron;file:C:\packages\cygwin\bin\cygrunsrv.exe
  > 	Alert Type: Unclassified software
  > 	Detection Type: 
  >
  >For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

Since I have AdAware and Spybot Search & Destroy in place, I just
uninstalled Windows Defender and booted to make sure.  Perhaps
Cygwinners should make arrangements to get Microsoft to stop that...

Ok, with that uninstalled, I still have the problem:

* cron-config still can't launch the daemon

  >Do you want to start the cron daemon as a service now? (yes/no) yes
  >cygrunsrv: Error starting a service: QueryServiceStatus:  Win32 error 1053:
  >The service did not respond to the start or control request in a timely fashion.

* There's nothing in /var/log/

* There's no output which would have been generated by Pierre's script

* There are exactly 3 events in the Event Viewer:

  o A System event for the Service Control Manager claims (rather
     brashly) that: "The Cron daemon service was successfully sent a
     start control." 

  o A few minutes later, a System event for the Service Control Manager
    saying the Cron daemon service has unexpectedly shut down.

  o Then an Application event as previously reported: 
    >Event Type:	Error
    >Event Source:	cron
    >Event Category:	None
    >Event ID:	0
    >Date:		1/23/2007
    >Time:		2:58:53 PM
    >User:		NT AUTHORITY\SYSTEM
    >Computer:	CBDWB00033
    >Description:
    >The description for Event ID ( 0 ) in Source ( cron ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: cron: PID 4388: starting service `cron' failed: fork: 11, Resource temporarily unavailable.

It's starting to look to me as though the problem is either at the
cygrunsrv level or the WinXP level. 

So, any suggestions?  (And thanks for the help so far, btw.)
-- 
Steve Rowley <sgr@alum.mit.edu> http://alum.mit.edu/www/sgr/ Skype: sgr000
It is very dark & after 2000.  If you continue, you are likely to be eaten by a bleen.



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