← Back to team overview

ius-coredev team mailing list archive

[Bug 1446633] Re: Infinit loop with PHP 5.6.7/8 and Horde_Imap_Client 2.27.0

 

Hi Daniel,

thanks for looking into it :-)

I'm communicating with Ben from IUS via Launchpad:
 
    https://bugs.launchpad.net/bugs/1446633

He reported some interesting findings, why my script works for Remi's
packages in Fedora, but not for theirs or Mac Ports.

I'll try to add Launchpad bug email address to this conversation.

Ralf

Am 23.04.15 um 06:11 schrieb Daniel Lowrey:
> It turns out I didn't look closely enough at the issue originally and
> thought it was the same as a separate non-blocking timeout issue. This
> meant the commit I first linked as the "fix" actually didn't address
> your problem.
>
> I spent the last couple of hours trying to isolate the source of the
> problem tonight and I think I'm closing in on it ... There's
> definitely something strange going on. I won't give you the full
> rundown of things right now but I wanted to update you before calling
> it a night since I said earlier that I would.
>
> I'll continue working on this tomorrow and will update you as I know more.
>
>
> On Wed, Apr 22, 2015 at 11:45 AM Daniel Lowrey <rdlowrey@xxxxxxx
> <mailto:rdlowrey@xxxxxxx>> wrote:
>
>     Sure. I'm out of the office for the next couple of hours. I'll try
>     out the attached repro script later and get back to you.
>
>     On Apr 22, 2015 11:30 AM, "Ralf Becker" <rb@xxxxxxxxxx
>     <mailto:rb@xxxxxxxxxx>> wrote:
>
>         Hi Daniel,
>
>         Ben Harper from IUS  did a test-build of their PHP 5.6.8 package
>         including your commit as patch and reported it makes things
>         worse :-(
>
>         Can you run my example script against the imap server
>         specified there
>         with your current sources?
>         Just to be sure it is really fixed and not just a similar issue.
>
>         Ralf
>
>         Am 21.04.15 um 19:18 schrieb Daniel Lowrey:
>         > No problem. The issue was addressed by
>         http://git.php.net/?p=php-src.git;a=blobdiff;f=ext/openssl/xp_ssl.c;h=e24d32cd45a8ff429e852eb6f1a8f4e7b437ac8f;hp=adef9120d614985d9593dc1411fab262f1a05cbc;hb=81f356b4aea79cd8f86e16096c7ccfbc455bfc3c;hpb=ed7e6d4758b8a8999b5e29e144e394782d473654
>         >
>         > There were some long-standing bugs (like 7+ years old)
>         related to
>         stream timeouts not being observed on encrypted streams that
>         were fixed
>         in 5.5.23 and 5.6.7 ... however there were a couple of hiccups
>         (like
>         this one) from those fixes. As far as I can tell these have
>         all been
>         corrected upstream and those changes will be reflected in the
>         next set
>         of bugfix releases.
>         >
>         >
>         >
>         > On Tue, Apr 21, 2015 at 11:34 AM Remi Collet
>         <remi@xxxxxxxxxxxxxxxxx <mailto:remi@xxxxxxxxxxxxxxxxx>
>         <mailto:remi@xxxxxxxxxxxxxxxxx
>         <mailto:remi@xxxxxxxxxxxxxxxxx>>> wrote:
>         >
>         > Le 21/04/2015 16:43, Ralf Becker a écrit :
>         > > Can you name the commit with the fix.
>         >
>         > I think :
>         >
>         >
>         http://git.php.net/?p=php-src.git;a=commitdiff;h=601d60a978b9e053ab8e6dc
>         > 0f12ff850fc642ced
>         >
>         <http://git.php.net/?p=php-src.git;a=commitdiff;h=601d60a978b9e053ab8e6dc0f12ff850fc642ced>
>         >
>         > https://bugs.php.net/69402
>         >
>         >
>         > Remi
>         >
>
>         --
>         Ralf Becker
>         Director Software Development
>
>         Stylite AG
>
>         Morschheimer Strasse 15 | Tel. +49 6352 70629 0
>         <tel:%2B49%206352%2070629%200>
>         D-67292 Kirchheimbolanden | Fax. +49 6352 70629 30
>         <tel:%2B49%206352%2070629%2030>
>
>         Email: rb@xxxxxxxxxx <mailto:rb@xxxxxxxxxx>
>
>         www.stylite.de <http://www.stylite.de> | www.egroupware.org
>         <http://www.egroupware.org>
>
>         Managing Directors: Andre Keller | Ralf Becker | Gudrun Mueller
>         Chairman of the supervisory board: Prof. Dr. Birger Leon
>         Kropshofer
>
>         VAT DE214280951 | Registered HRB 31158 Kaiserslautern Germany
>


-- 
Ralf Becker
Director Software Development

Stylite AG

Morschheimer Strasse 15 | Tel. +49 6352 70629 0
D-67292 Kirchheimbolanden | Fax. +49 6352 70629 30

Email: rb@xxxxxxxxxx

www.stylite.de | www.egroupware.org

Managing Directors: Andre Keller | Ralf Becker | Gudrun Mueller
Chairman of the supervisory board: Prof. Dr. Birger Leon Kropshofer

VAT DE214280951 | Registered HRB 31158 Kaiserslautern Germany

-- 
You received this bug notification because you are a member of IUS Core
Development, which is subscribed to IUS Community Project.
https://bugs.launchpad.net/bugs/1446633

Title:
  SSL problem with PHP 5.6.7&.8 and Horde_Imap_Client

Status in IUS Community Project:
  New

Bug description:
  I created a simple example code reproducing the problem Horde or
  EGroupware:

  <?php
  $timeout = 30;
  $context = array(
      'ssl' => array(
          'verify_peer' => false,
          'verify_peer_name' => false
      )
  );
  if (($fp = stream_socket_client(
          $conn='ssl://imap.ikmj.com:993',
          $errno,
          $errstr,
          $timeout,
          STREAM_CLIENT_CONNECT,
          stream_context_create($context)
      )))
  {
      echo "Connected to $conn\n";
      echo fgets($fp);

      echo "1 CAPABILITY\n";
      fwrite($fp, "1 CAPABILITY\n");
      echo fgets($fp);
      echo "2 LOGOUT\n";
      fwrite($fp, "2 LOGOUT\n");
  }
  else var_dump($errno, $errstr);

  Running it on various IUS PHP versions gives following results:
  [root@lighttpd ~]# php -v
  PHP 5.4.39 (cli) (built: Mar 20 2015 08:10:43)
  Copyright (c) 1997-2014 The PHP Group
  Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
  [root@lighttpd ~]# php imaps_php56.php
  Connected to ssl://imap.ikmj.com:993
  * OK ikmj-serwer.home.pl IdeaImapServer v0.80 ready
  1 CAPABILITY
  * CAPABILITY IMAP4rev1 LITERAL+ CHILDREN I18NLEVEL=1 IDLE SORT UIDPLUS
  UNSELECT XLIST AUTH=PLAIN AUTH=LOGIN
  2 LOGOUT

  [root@fpm60 ~]# php -v
  PHP 5.5.23 (cli) (built: Mar 20 2015 08:29:54)
  Copyright (c) 1997-2015 The PHP Group
  Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
      with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2015, by Zend
  Technologies
  [root@fpm60 ~]# php imaps_php56.php
  Connected to ssl://imap.ikmj.com:993
  * OK ikmj-serwer.home.pl IdeaImapServer v0.80 ready
  1 CAPABILITY
  * CAPABILITY IMAP4rev1 LITERAL+ CHILDREN I18NLEVEL=1 IDLE SORT UIDPLUS
  UNSELECT XLIST AUTH=PLAIN AUTH=LOGIN
  2 LOGOUT

  [dev@coreos-control ~]$ php -v
  PHP 5.6.7 (cli) (built: Mar 25 2015 13:08:46) 
  Copyright (c) 1997-2015 The PHP Group
  Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
      with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2015, by Zend Technologies
  [dev@coreos-control ~]$ php imaps_php56.php 
  Connected to ssl://imap.ikmj.com:993
  * OK ikmj-serwer.home.pl IdeaImapServer v0.80 ready
  1 CAPABILITY
  ^C
  Hangs until I hit ^C.

  [dev@coreos-control ~]$ php -v
  PHP 5.6.8 (cli) (built: Apr 16 2015 20:02:05) 
  Copyright (c) 1997-2015 The PHP Group
  Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
      with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2015, by Zend Technologies
  [dev@coreos-control ~]$ php imaps_php56.php 
  Connected to ssl://imap.ikmj.com:993
  * OK ikmj-serwer.home.pl IdeaImapServer v0.80 ready
  1 CAPABILITY
  ^C
  Hangs until I hit ^C.

  While I first suspected a further case of SSL timeout bug we had in 5.5 and 5.6 a couple of packages back, I also talked to Remi Collet who reported the previous problem to php internals ML and maintains PHP in Fedora. 
  Hi could NOT reproduce it on various PHP & Fedora versions:

  $ php56 /tmp/foo.php
  Running PHP 5.6.8
  Connected to ssl://imap.ikmj.com:993
  * OK ikmj-serwer.home.pl IdeaImapServer v0.80 ready
  1 CAPABILITY
  * CAPABILITY IMAP4rev1 LITERAL+ CHILDREN I18NLEVEL=1 IDLE SORT UIDPLUS
  UNSELECT XLIST AUTH=PLAIN AUTH=LOGIN
  2 LOGOUT

  Hi just run more tests
  - Fedora 21 and openssl 1.0.1k
  - RHEL-6 and RHEL-7, openssl 1.0.1e
  - PHP 5.4.40, 5.5.24, 5.6.8 and 7.0.0-dev (20150418)

  So it appears to me that there must be some difference in patches or
  spec file or IUS and Fedora which causes the problem with IUS PHP 5.6
  packages.

  Ralf

To manage notifications about this bug go to:
https://bugs.launchpad.net/ius/+bug/1446633/+subscriptions


Follow ups

References