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

Martijn Grendelman martijn at pocos.nl
Thu Jul 31 07:04:17 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.

I experienced the same behaviour with my own backported PHP 5.2.6 on
Etch. IIRC it was only with the CLI version and not with the Apache module.

I didn't file a bug report, because I don't use testing or unstable.
However, the problem went away when I rebuilt PHP, linking against the
normal libmysqlclient, instead of libmysqlclient_r.

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


Best regards,

Martijn Grendelman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 2910 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.alioth.debian.org/pipermail/pkg-php-maint/attachments/20080731/1ed96975/attachment-0003.bin 


More information about the pkg-php-maint mailing list