X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=4.0 required=5.0 	tests=AWL,BAYES_00,BOTNET,SPF_NEUTRAL
X-Spam-Check-By: sourceware.org
Message-id: <0KMH00DD7V23SNXD@vms173001.mailsrvcs.net>
Date: Wed, 08 Jul 2009 23:00:53 -0400
To: Rajiv Garg <rajiv@rajivgarg.com>
From: "Pierre A. Humblet" <Pierre.Humblet@ieee.org>
Subject: Re: Intermittent Cron Errors
Cc: cygwin@cygwin.com
In-reply-to: <581621.34500.qm@web1106.biz.mail.sk1.yahoo.com>
References: <24395640.post@talk.nabble.com>  <002301ca000f$242cb6a0$8e0410ac@wirelessworld.airvananet.com>  <786453.44646.qm@web1111.biz.mail.sk1.yahoo.com>  <005101ca001b$9587c360$8e0410ac@wirelessworld.airvananet.com>  <581621.34500.qm@web1106.biz.mail.sk1.yahoo.com>
MIME-version: 1.0
Content-type: text/plain; charset=us-ascii; format=flowed
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com


>At 07:17 PM 7/8/2009, Rajiv Garg wrote:
>
>Compiled and ran -- here's the output:
>
>$>/tmp/testcron.exe
>name orderworker uid 11130 gid 10513
>0
>256
>512
>768
>1024
>1280
>1536
>1792
>2048
>2304
>2560
>
>I killed it at this point.  No initgroups() or setuid() failures in 
>2500 tries.  Let me know your thoughts.

I am baffled. The log starts on 3/18. There were no incidents until 
4/17, then 5/8 (3x) but since 5/11 they happen several times a day. 
On 6/22 at 05:05:01 and 06/23 at 23:03:11 two jobs were started at 
the same time and both failed.

So my hunch is still that it's a problem with a PDC connection, but I 
can't explain the exact sequence. After all if the call to initgroups 
fails, the groups of the daemon will be inherited by the job and that 
should not cause a setuid failure. On the other hand if setuid tries 
to create a token when the uid doesn't change, it must be a group issue.

If you end up bypassing the call to setuid when the uids match, 
please log the non-zero return value of initgroups (in the interest 
of science).
You can look at the cron events by typing "cronevents" in a shell.
Let me know if you need more help.

Pierre 


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

