php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26015 imap_thread Apache2 signal Segmentation fault
Submitted: 2003-10-28 00:52 UTC Modified: 2003-11-17 15:01 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: tirny at mail dot ru Assigned:
Status: Not a bug Package: IMAP related
PHP Version: 4.3.4RC3 OS: freeBSD 5.1p10
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: tirny at mail dot ru
New email:
PHP Version: OS:

 

 [2003-10-28 00:52 UTC] tirny at mail dot ru
Description:
------------
On RHL7.3 Apache2.0.44 PHP4.3.4 (cclient - do not remember version)- is work fine.
Changing OS & soft on freeBSD, Apache2.0.47, 4.3.4RC1, cclient-2002d,1 not work:
script terminated after 30s (in my news group 5 messages)
and in apache error log this:
child pid 21979 exit signal Segmentation fault (11)

Reproduce code:
---------------
<?php

  $nntp = imap_open("{news.mydomain.tld:119/nntp}newsgroup", "", "");

  $headers = imap_headers($nntp);
   
  $threads = imap_thread($nntp);
   
  while (list($key, $val) = each($threads)) {
    $tree = explode(".", $key);
    if ($tree[1] == "num") {
      print "<ul>\n<li>" . $headers[$val - 1] . "\n";
    }
    else if ($tree[1] == "branch") {
      print "</ul>\n";
    }
  }
  imap_close($nntp);

?>



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-10-28 03:57 UTC] sniper@php.net
1. You didn't read this: http://bugs.php.net/how-to-report.php
2. You didn't give your configure line for PHP
3. You didn't provide GDB backtrace

--> Bogus

(most likely bug in c-client, or you're trying to use it with threaded apache2)
 
 [2003-11-03 05:23 UTC] tirny at mail dot ru
configure line:
--exec-prefix=/usr/local/php --with-apxs2 --enable-debug --with-config-file-path=/usr/local/etc --with-imap

GDB backtrace:
#0  0x2859c7d3 in mail_thresd_references ()
   from /usr/local/lib/libc-client4.so.8
#1  0x2859bcf7 in mail_thread_msgs () from /usr/local/lib/libc-client4.so.8
#2  0x285ae7c5 in nntp_thread () from /usr/local/lib/libc-client4.so.8
#3  0x2859bc31 in mail_thread () from /usr/local/lib/libc-client4.so.8
#4  0x284161a6 in zif_mail_thread (ht=1, return_value=0x8172164, this_ptr=0x0,
    return_value_used=1) at /home/trn/php-4.3.4RC3/ext/imap/php_imap.c:3991
#5  0x2852361e in execute (op_array=0x816b424)
    at /home/trn/php-4.3.4RC3/Zend/zend_execute.c:1616
#6  0x28511ec1 in zend_execute_scripts (type=8, retval=0x0, file_count=3)
    at /home/trn/php-4.3.4RC3/Zend/zend.c:884
#7  0x284db443 in php_execute_script (primary_file=0xbfbff920)
    at /home/trn/php-4.3.4RC3/main/main.c:1729
#8  0x285295b6 in php_handler (r=0x8163050)
    at /home/trn/php-4.3.4RC3/sapi/apache2handler/sapi_apache2.c:537
#9  0x08065239 in ap_run_handler ()
#10 0x08065844 in ap_invoke_handler ()
#11 0x08062049 in ap_process_request ()
#12 0x0805d107 in ap_process_http_connection ()
#13 0x0806f1e9 in ap_run_process_connection ()
#14 0x0806f50e in ap_process_connection ()
#15 0x0806397b in child_main ()
#16 0x08063a4c in makr_child ()
#17 0x08063b92 in startup_children ()
#18 0x08063f66 in ap_mpm_run ()
#19 0x0806aa66 in main ()
#20 0x0805cc15 in _start ()
 [2003-11-03 09:27 UTC] kalowsky@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

Yeah not a PHP issue, note the breakage in the mail_* functions.  You might want to report this to the cclient authors and see if they have a solution for this, or are working upon one.
 [2003-11-12 05:04 UTC] tirny at mail dot ru
I think, but this bug in PHP.
I am try this action with any other version Apache (1.3.29, 2.0.48), UW IMAP, etc. The result is same.
It works on RHL8, Windows, bot doesnt work on FreeBSD 5.1.
CLI imap_thread works as it has to. But when call this function, and if PHP works as Apache2 module - Apache2 goes to core (child pid 43381 exit signal Segmentation fault (11)). Apache2 not threaded.
All is compiled using keys CFLAGS=-O -pipe, COPTFLAGS=-O -pipe
 [2003-11-17 06:14 UTC] tirny at mail dot ru
vot
 [2003-11-17 15:01 UTC] iliaa@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

The crash occures deep inside imap library, which means the bug is in IMAP and not PHP.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 13:01:30 2024 UTC