Bug 450993 - crond crashing repeatedly
crond crashing repeatedly
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: cronie (Show other bugs)
rawhide
All Linux
low Severity urgent
: ---
: ---
Assigned To: Marcela Mašláňová
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-06-12 01:16 EDT by Jonathan Kamens
Modified: 2008-07-01 20:19 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-07-01 20:19:39 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jonathan Kamens 2008-06-12 01:16:00 EDT
From /var/log/messages:

Jun  4 21:48:02 jik2 kernel:<6>crond[2461]: segfault at 0 ip 04c63ad8 sp
bfe06f4c error 4 in libc-2.8.90.so[4bed000+16d000]
Jun 11 17:47:01 jik2 kernel:<6>crond[2522]: segfault at 88 ip 0804a303 sp
bfe00220 error 4 in crond[8047000+e000]

The first crash shown above occurred after crond was started at Jun  3 16:56:00,
i.e., after a little more than a day of uptime.  I didn't notice the crash until
June 11, at which point I restarted crond at 02:08:28, and then it crashed as
shown above, less than a day later.

Here's what crond reports in /var/log/cron when it crashes:

Jun 11 17:47:01 jik2 crond[2522]: CRON: select failed: Inappropriate ioctl for
device

I can't find a core file anywhere.

I updated cronie to 1.1-1.fc10.i386 on January 3, so I assume that's the
problem.  I upgraded to 1.1-2.fc10 on January 11 before the most recent restart,
and that apparently did not solve the problem.
Comment 1 Marcela Mašláňová 2008-06-12 04:07:53 EDT
I run into this problem once at F-8 machine, but I couldn't reproduce it again
anywhere else.

In January was released cronie-1.0, which doesn't use 'select'. I suppose you
have problem with cronie-1.1 which was released 28 May. New release is using
inotify for checking the jobs. Please, could you tell me more about your system?
uname -a
grep inotify /proc/filesystems
Comment 2 Marcela Mašláňová 2008-06-12 04:47:49 EDT
It will be really helpful, if you can generate core file.

service crond stop
ulimit -c unlimited
/usr/sbin/crond -n

Core file should be in /var/spool/.
Comment 3 Jonathan Kamens 2008-06-13 06:30:53 EDT
I got a core dump, but I'm not sure it's the one that was causing the problem
before:

Thread 1 (process 10410):
#0  env_get (name=0x8052417 "CRON_TZ", envp=0x0) at env.c:243
#1  0x0804a32b in find_jobs (vtime=<value optimized out>, db=0xbfc1a28c,
doWild=1, doNonWild=1) at cron.c:430
#2  0x0804ae5d in main (argc=Cannot access memory at address 0x5b005a54
) at cron.c:340

It looks like a memory corruption problem.  In frame 1:

(gdb) up
#1  0x0804a32b in find_jobs (vtime=<value optimized out>, db=0xbfc1a28c,
doWild=1, doNonWild=1) at cron.c:430
(gdb) p *e
$6 = {next = 0x81f0e40, pwd = 0x4002f3d, envp = 0x0, cmd = 0x19 <Address 0x19
out of bounds>, minute = "\200ÑÕ\004H<\037\b", hour = "\000>\037", dom =
"\b\230\005\037", month = "\b\030", dow = "", flags = 32}

Let me know when you've fixed this issue and I'll try the new version to see if
I can get it to crash.
Comment 4 Marcela Mašláňová 2008-06-13 06:56:03 EDT
I believe inotify is the problem. Try my testing packages without inotify
support, if you can crash it:
http://mmaslano.fedorapeople.org/cronie/F-10/withoutinotify/cronie-1.1-3.fc10.i386.rpm

I'll be working on your core file. Thank you.
Comment 5 Marcela Mašláňová 2008-06-13 08:08:28 EDT
Please ignore the previous rpm.

This second crash looks like cron couldn't figure out, which time zone you have
on your computer. Time zones are needed only in case you are setting time zone
in cron table so it should be reported in log and work as usual.

http://mmaslano.fedorapeople.org/cronie/F-10/withinotify/cronie-1.1-3.fc10.i386.rpm
Comment 6 Jonathan Kamens 2008-06-16 15:57:54 EDT
The RPM you told me to try doesn't disable inotify.  It still claims to be 
using inotify when it starts up:

Jun 13 08:11:07 jik2 crond[3931]: (CRON) STARTUP INOTIFY (1.1)

and it still crashes the same way:

Jun 14 14:48:01 jik2 crond[3931]: CRON: select failed: Inappropriate ioctl for 
device
Comment 7 Tomas Mraz 2008-06-18 17:35:10 EDT
Please try cronie-1.1-3.fc10 from the next day rawhide or download it directly
from koji here:
http://koji.fedoraproject.org/koji/taskinfo?taskID=669493

The inotify support was substantially changed/fixed and there was one memory
corruption bug which I have fixed.

Does it work for you better?
Comment 8 Jonathan Kamens 2008-07-01 20:19:39 EDT
I've been running that version of cronie since June 24 and have encountered no 
issues, so I think the problem is fixed.

Note You need to log in before you can comment on or make changes to this bug.