#45239 [NEW]: Hang (99.9%CPU) when encoding_translation is on
From: pumuckel at metropolis dot de
Operating system: Linux
PHP version: 5.2.6
PHP Bug Type: mbstring related
Bug description: Hang (99.9%CPU) when encoding_translation is on
Description:
------------
When mbstring.encoding_translation is set to on, and passing a variable
like x=%FC (ISO 'ü' character) the mb lib is hanging in itself.
Following settings are applyied (internal encoding is ISO):
Multibyte Support enabled
Multibyte string engine libmbfl
HTTP input encoding translation enabled
Multibyte (japanese) regex support enabled
Multibyte regex (oniguruma) version 4.4.4
Multibyte regex (oniguruma) backtrack check On
mbstring extension makes use of "streamable kanji code filter and
converter", which is distributed under the GNU Lesser General Public
License version 2.1.
Directive Local Value Master Value
mbstring.detect_order auto no value
mbstring.encoding_translation On Off
mbstring.func_overload 0 0
mbstring.http_input UTF-8,ISO-8859-15 pass
mbstring.http_output ISO-8859-15 pass
mbstring.internal_encoding ISO-8859-15 no value
mbstring.language neutral neutral
mbstring.strict_detection On Off
mbstring.substitute_character no value no value
Also not working with these settings (internal UTF8)
mbstring.detect_order auto auto
mbstring.encoding_translation On On
mbstring.func_overload 0 7
mbstring.http_input UTF-8,ISO-8859-15 auto
mbstring.http_output UTF-8 UTF-8
mbstring.internal_encoding UTF-8 UTF-8
mbstring.language neutral neutral
mbstring.strict_detection On Off
mbstring.substitute_character no value no value
Reproduce code:
---------------
Pass a ?x=%FC as a parameter. When followed by other parameters, it is
working again.
Expected result:
----------------
No hang.
Actual result:
--------------
Hang (99.9% CPU usage). As a result the script will be aborted later on
with "Max execution time exceeded". The first line of PHP Code itself is
never called.
GDB Info:
(gdb) where
#0 0xb752e9d5 in mbfl_encoding_detector_judge () from
/usr/lib/apache2/modules/libphp5.so
#1 0xb753c93e in _php_mb_encoding_handler_ex () from
/usr/lib/apache2/modules/libphp5.so
#2 0xbffd34ec in ?? ()
--
Edit bug report at http://bugs.php.net/?id=45239&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45239&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45239&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45239&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=45239&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=45239&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=45239&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=45239&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=45239&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=45239&r=support
Expected behavior: http://bugs.php.net/fix.php?id=45239&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=45239&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=45239&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=45239&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45239&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=45239&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=45239&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=45239&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=45239&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=45239&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=45239&r=mysqlcfg
Thread (5 messages)
- pumuckel at metropolis dot de