Bug #53632 [Asn]: PHP hangs on numeric value 2.2250738585072011e-308

From: Date: Tue, 04 Jan 2011 16:41:04 +0000
Subject: Bug #53632 [Asn]: PHP hangs on numeric value 2.2250738585072011e-308
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-157566@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=53632&edit=1

 ID:                 53632
 Updated by:         rasmus@php.net
 Reported by:        exploringbinary at gmail dot com
 Summary:            PHP hangs on numeric value 2.2250738585072011e-308
 Status:             Assigned
 Type:               Bug
 Package:            Math related
 PHP Version:        5.3.4
 Assigned To:        dmitry
 Block user comment: N
 Private report:     N

 New Comment:

This is an interesting bug.  How about we just mark these as volatile
doubles in 
that part of the code to make sure they don't end up in registers.  My
guess is 
that it would fix it.  Need to track down a 32-bit machine to test this
though.


Previous Comments:
------------------------------------------------------------------------
[2011-01-04 17:19:56] exploringbinary at gmail dot com

See

http://www.exploringbinary.com/php-hangs-on-numeric-value-2-2250738585072011e-308/
http://www.reddit.com/r/programming/comments/evtrq/php_hangs_on_numeric_value_22250738585072011e308/
http://news.ycombinator.com/item?id=2066084

for lots of additional comments on this issue.

------------------------------------------------------------------------
[2011-01-04 16:50:11] abowling1 at gmail dot com

Same problem on 2 systems (hangs with CPU pegged at 100%).

I have two CentOS 5.5 systems running i386 PHP packages:
PHP 5.3.2 (cli) (built: Mar  4 2010 21:52:46), Zend Engine v2.3.0, with
eAccelerator v0.9.6
CPU: 
processor       : 0 (and 1)
vendor_id       : GenuineIntel
cpu family      : 6
model           : 15
model name      : Intel(R) Core(TM)2 CPU          6420  @ 2.13GHz
stepping        : 6
cpu MHz         : 800.000
cache size      : 4096 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 2
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 10
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca
cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm
constant_tsc pni mon itor ds_cpl vmx est tm2 cx16 xtpr lahf_lm
bogomips        : 2139.82

AND

PHP 5.3.3 (cli) (built: Jul 22 2010 16:41:20), Zend Engine v2.3.0, with
eAccelerator v0.9.6

CPU:
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 2
model name      : Intel(R) Pentium(R) 4 CPU 2.00GHz
stepping        : 4
cpu MHz         : 1993.668
cache size      : 512 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca
cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm up
bogomips        : 3987.33

Package's build settings:
./configure --build=i686-redhat-linux-gnu --host=i686-redhat-linux-gnu
--target=i386-redhat-linux-gnu --program-prefix= --prefix=/usr
--exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin
--sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include
--libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var
--sharedstatedir=/usr/com --mandir=/usr/share/man
--infodir=/usr/share/info --cache-file=../config.cache --with-libdir=lib
--with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d
--disable-debug --with-pic --disable-rpath --without-pear --with-bz2
--with-exec-dir=/usr/bin --with-freetype-dir=/usr --with-png-dir=/usr
--with-xpm-dir=/usr --enable-gd-native-ttf --with-t1lib=/usr
--without-gdbm --with-gettext --with-gmp --with-iconv
--with-jpeg-dir=/usr --with-openssl --with-zlib --with-layout=GNU
--enable-exif --enable-ftp --enable-magic-quotes --enable-sockets
--enable-sysvsem --enable-sysvshm --enable-sysvmsg --with-kerberos
--enable-ucd-snmp-hack --enable-shmop --enable-calendar
--with-libxml-dir=/usr --enable-xml --with-system-tzdata
--with-apxs2=/usr/sbin/apxs --enable-maintainer-zts
--with-config-file-scan-dir=/etc/php-zts.d --enable-force-cgi-redirect
--enable-pcntl --with-imap=shared --with-imap-ssl
--enable-mbstring=shared --enable-mbregex --with-gd=shared
--enable-bcmath=shared --enable-dba=shared --with-db4=/usr
--with-xmlrpc=shared --with-ldap=shared --with-ldap-sasl
--with-mysql=shared,mysqlnd --with-mysqli=shared,mysqlnd
--enable-mysqlnd-threading
--with-oci8=shared,instantclient,/usr/lib/oracle/11.1.0.7/client/lib,11.1.0.7
--with-pdo-oci=shared,instantclient,/usr,11.1.0.7
--with-interbase=shared,/usr/lib/firebird
--with-pdo-firebird=shared,/usr/lib/firebird --enable-dom=shared
--with-pgsql=shared --enable-wddx=shared --with-snmp=shared,/usr
--enable-soap=shared --with-xsl=shared,/usr --enable-xmlreader=shared
--enable-xmlwriter=shared --with-curl=shared,/usr --enable-fastcgi
--enable-pdo=shared --with-pdo-odbc=shared,unixODBC,/usr
--with-pdo-mysql=shared,mysqlnd --with-pdo-pgsql=shared,/usr
--with-pdo-sqlite=shared,/usr --with-pdo-dblib=shared,/usr
--without-sqlite3 --with-sqlite=shared,/usr --enable-json=shared
--enable-zip=shared --without-readline --with-libedit
--with-pspell=shared --enable-phar=shared --with-mcrypt=shared,/usr
--with-tidy=shared,/usr --with-mssql=shared,/usr --enable-sysvmsg=shared
--enable-sysvshm=shared --enable-sysvsem=shared --enable-posix=shared
--with-unixODBC=shared,/usr --enable-fileinfo=shared
--enable-intl=shared --with-icu-dir=/usr --with-enchant=shared,/usr
--with-recode=shared,/usr

------------------------------------------------------------------------
[2011-01-04 16:08:46] brandonkirsch at hotmail dot com

Update:  PHP 5.2.6 is NOT affected by this bug on the same 32-bit
architecture as 
my previous post.

------------------------------------------------------------------------
[2011-01-04 14:36:28] brandonkirsch at hotmail dot com

I have the same problem on PHP 5.3.2 on 32-bit Linux.

Configure:

'./configure' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-
mssql=/usr/local/freetds' '--with-ldap' '--prefix=/usr/local/php5'
'--with-
config-file-path=/usr/local/php5/etc' '--enable-sockets' '--enable-soap'
'--
with-openssl' '--with-unixODBC=/usr' '--with-gd'
'--with-jpeg-dir=/usr/lib' '--
with-pdo-odbc=unixODBC,/usr' '--with-pdo-dblib=/usr/local/freetds'


uname -a:

Linux servername 2.6.16.60-0.42.5-default #1 Mon Aug 24 09:41:41 UTC
2009 i686 
i686 i386 GNU/Linux

------------------------------------------------------------------------
[2011-01-04 12:21:52] chx1975 at gmail dot com

Excellent analysis at http://news.ycombinator.com/item?id=2066084

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    http://bugs.php.net/bug.php?id=53632


-- 
Edit this bug report at http://bugs.php.net/bug.php?id=53632&edit=1


Thread (42 messages)

« previous php.bugs (#157566) next »