Backport(バックポート) #1832
Segmentation fault occurs by openpne:migrate task (openpne:migrateタスクでセグメンテーション違反)
Start date:
2010-12-04
Due date:
% Done:
100%
Description
Overview¶
Segmentation fault occurs by openpne:migrate task (openpne:migrateタスクでセグメンテーション違反)
>> plugin installing plugin "opRankingPlugin" >> opPluginManager Plugin is already installed zsh: segmentation fault
$ php -v PHP 5.3.3-0.dotdeb.1 with Suhosin-Patch (cli) (built: Oct 1 2010 08:49:29) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologie
GDB debug trace
(gdb) file /usr/bin/php (gdb) run symfony openpne:migrate ... ... (gdb) bt #0 0x000000000075f6e2 in zend_hash_get_current_key_type_ex () #1 0x0000000000638b44 in ?? () #2 0x0000000000747950 in zend_call_function () #3 0x00000000007481e8 in zend_lookup_class_ex () #4 0x0000000000766198 in ?? () #5 0x00000000007a73ee in ?? () #6 0x0000000000782871 in execute () #7 0x0000000000753061 in zend_execute_scripts () #8 0x00000000006fc4a8 in php_execute_script () #9 0x00000000007e6d8b in ?? () #10 0x00007fd06cf7d1a6 in __libc_start_main () from /lib/libc.so.6 #11 0x0000000000430f09 in _start () (gdb) print (char *)executor_globals.active_op_array->filename $1 = 0x5cc7658 "/home/kawahara/dev/OpenPNE3/lib/vendor/PEAR/Net/UserAgent/Mobile.php" (gdb) print (char *)executor_globals.active_op_array->function_name $2 = 0x5d20f30 "factory"
Causes¶
This segmentation fault occurs by lib/vendor/PEAR/Net/UserAgent/Mobile.php line 158.
if (!class_exists($class)) {
I think that cause is auto-loader.
Way to fix¶
"lib/vendor/PEAR/Net/UserAgent/Mobile.php" is changed as follows as a temporary measure.
diff --git a/lib/vendor/PEAR/Net/UserAgent/Mobile.php b/lib/vendor/PEAR/Net/UserAgent/Mobile.php
index 51404d8..317a283 100644
--- a/lib/vendor/PEAR/Net/UserAgent/Mobile.php
+++ b/lib/vendor/PEAR/Net/UserAgent/Mobile.php
@@ -155,7 +155,7 @@ class Net_UserAgent_Mobile
$class = "Net_UserAgent_Mobile_$driver";
- if (!class_exists($class)) {
+ if (!class_exists($class, false)) {
$file = str_replace('_', '/', $class) . '.php';
if (!include_once $file) {
return PEAR::raiseError(null,
And opMobileUserAgent is changed as follows.
diff --git a/lib/util/opMobileUserAgent.class.php b/lib/util/opMobileUserAgent.class.php
index 95ce784..7277665 100644
--- a/lib/util/opMobileUserAgent.class.php
+++ b/lib/util/opMobileUserAgent.class.php
@@ -24,7 +24,8 @@ class opMobileUserAgent
protected function __construct()
{
require_once 'Net/UserAgent/Mobile.php';
-
+ require_once 'Net/UserAgent/Mobile/NonMobile.php';
+
self::$mobile = Net_UserAgent_Mobile::factory();
if (self::$mobile instanceof Net_UserAgent_Mobile_Error)
{
Related issues
Associated revisions
History
#1
Updated by Shogo Kawahara about 10 years ago
- Status changed from New(新規) to Pending Review(レビュー待ち)
- % Done changed from 0 to 50
更新履歴 153e6442ad77917f44127f134347de4d2f1d9e24 で適用されました。
#2
Updated by Kousuke Ebihara about 10 years ago
- Target version changed from OpenPNE 3.6beta7 to OpenPNE 3.6beta8
#3
Updated by Kousuke Ebihara about 10 years ago
- Target version changed from OpenPNE 3.6beta8 to OpenPNE3.6beta9
#4
Updated by Kousuke Ebihara almost 10 years ago
- Target version changed from OpenPNE3.6beta9 to OpenPNE3.6beta11
#5
Updated by Masato Nagasawa over 9 years ago
- Target version changed from OpenPNE3.6beta11 to OpenPNE 3.6.0
#6
Updated by Masato Nagasawa over 9 years ago
- Target version changed from OpenPNE 3.6.0 to OpenPNE3.6beta11
#7
Updated by Kousuke Ebihara over 9 years ago
- Target version changed from OpenPNE3.6beta11 to OpenPNE3.6beta12
親チケットが「テスト待ち」「完了」でないものをすべて beta12 以降での対応とします。
#8
Updated by Kousuke Ebihara over 9 years ago
- Status changed from Pending Review(レビュー待ち) to Pending Testing(テスト待ち)
- % Done changed from 50 to 70
#9
Updated by Shogo Kawahara over 9 years ago
- Status changed from Pending Testing(テスト待ち) to Pending Review(レビュー待ち)
- % Done changed from 70 to 50
更新履歴 db6e6a991708d53a23eded7ad4c1a3d4c02e6911 で適用されました。
#10
Updated by Kousuke Ebihara over 9 years ago
- Status changed from Pending Review(レビュー待ち) to Pending Testing(テスト待ち)
- % Done changed from 50 to 70
http://redmine.openpne.jp/issues/1832#note-9 のリリースブランチへの取り込みでステータスが「レビュー待ち」に巻き戻ってしまいましたので、もとに戻します。
#11
Updated by isao sano over 9 years ago
- Status changed from Pending Testing(テスト待ち) to Fixed(完了)
- % Done changed from 70 to 100
テスト完了しました。
問題は発見されませんでしたので、このチケットをFixed(完了)とします。