[php-maint] Bug#493045: Segmentation Fault in cron console PHP Job

Timo Kirst tkirst at hot-chilli.net
Wed Jul 30 23:24:10 UTC 2008


Package: php5
Version: 5.2.6-2

Hi there,

exactly since we upgraded to this package we get intermittent
Segmentation Faults from two cron jobs each running a php skript every 5 minutes.

During the last 7 days this happened 20 times. The scripts have not
changed for months now and they ran without any problem at all.

One example (content of the cron status mail):

/bin/sh: line 1: 13954 Segmentation fault      /sbin/mailbox_watcher >>/var/log/mailbox_watcher.log

This mailbox watcher does some checks on a mysql DB and synchronizes
possible changes with the filesystem on the harddrive. Nothing special
and it seems that most of the time (99%) everything runs fine. What is
also confirmed is that it does not depend on the code cases that are
executed, this means it does not depend whether the check skript
returns without having to synchronize or after doing so.

I am simply not able to reproduce it. Although it keeps happening.

Any thoughts on that? If you see any procedure, logs, etc I could try to narrow
the problem down with, pls let me know.

One word about the complexity of the two skripts. They are totally
different. The one is just a "dirty" procedural code, the other is
more object oriented with a class defined.

See the first lines of this skript below:

> #!/usr/bin/php5
> <?php
>
> define('_UNDEFINED',0);
> define('_FATAL',1);
> define('_CRITICAL',2);
> define('_WARNING',3);
> define('_INFO',4);
>
> define('_EXITTHRESHOLD',2);
>
> define('_CRLF',"\n");
>
> class checkAuthDB {
>
>     var $ident;
>     var $conf;
>     var $dblinks;
>     var $lastrun;
>     var $user;
>     var $logIsOpen;
>     var $logfp;
>
>     function __construct($ident) {
>
> (...)

Ok, and here the first lines of the mailbox_watcher

> #!/usr/bin/php5
> <?php
>
> // initialising some variables...
>
>         // mysql connect information (if needed)
>         $db_host="...";
>         $db_user="...";
>         $db_password="...";
>         $db_name="...";
>
>         $output_init=false;
>
>         // registering needed functions...
>
>         function insdate() {
>
> (...)


Thanks in advance for all your efforts!!

-- 
Regards,

Timo Kirst






More information about the pkg-php-maint mailing list