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: cron error can't switch user context


On Fri 2010-04-16 16:15, Pierre A. Humblet wrote:
> I should perhaps modify cronbug to use "tail" with cronevents, but it's unusual to see
> a report that cron is broken yet there are 46000 lines in the log!

The 46000 lines came from running a script once a minute under Cygwin 1.5.  It stopped working once I migrated to Cygwin 1.7.
I agree that cronbug should tail cronevents.

> I assume cron used to work, then something happened and it stopped working.
> Or there is something special about the tschutter account.
> Can you identify the "something" ?
> Any difference between the lemon and the others?

There must be a difference, I just can't figure out what it is.

> It's  most likly not a cron problem, but something to do with cyglsa. I have never
> used it, don't have a system like yours to test and there is no such previous report.
> So not sure what to recommend.

I am suspecting cyglsa as well.

> Does password-less ssh work for tschutter ?

Yes.

> If you can't identify the "something", you could try to strace cron on the lemon
> and on another machine. Here is the recipe.
> 
> Stop the cron service.
> Use a simple crontab that runs every minute, for only one user.
> Using cygrunsrv, create a new service runing "strace" with argument "cron" under SYSTEM
> 1)  cygrunsrv -I trace_cron -p /usr/bin/strace -a /usr/sbin/cron
> 2)  cygrunsrv -S trace_cron
> 3)  Let this run for no more than 2 minutes, output will be in /var/log/trace_cron.log
>      You may have to use kill -9 to stop the service (kill the cron pid)
> 4)  Send the trace_cron.log file as an attachment.
> 5)  Remove the trace_cron service
> Restart cron

I have attached the first 1500 lines of a strace log on lemon and from another working machine.
I think the interesting part is at about line 1245 where you see the second occurrence of the string "lsaauth".
On lemon (cron broken) it appears that LsaLogonUser fails a windows error 87 (invalid parameter?).
On px03 (cron works) it appears that lsaauth() succeeds and that it then loads the tschutter registry_hive.

But now I know the difference between lemon and the rest of the machines.  lemon is running Cygwin 1.7.5.  px03 is running Cygwin 1.7.1.  I just upgraded another machine from 1.7.1 to 1.7.5 and cron is broken on that machine as well.

-- 
Tom Schutter
First American Spatial Solutions
303-440-7272 x6822
512-977-6822

Attachment: trace_cron-lemon.log
Description: trace_cron-lemon.log

Attachment: trace_cron-px03.log
Description: trace_cron-px03.log

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]