swoole / swoole-src

🚀 Coroutine-based concurrency library for PHP
https://www.swoole.com
Apache License 2.0
18.25k stars 3.16k forks source link

error with soap #5268

Open parsibox opened 2 months ago

parsibox commented 2 months ago

hi i use php82 with centos 72 when i run 10-20 class with soapclient php exit with segmentation-fault this is my code my extention version is 5.1

            try {  

                $this->my_class = new SoapClient( base_dir_include.'include/lib_magfa/server_sms_ir.xml' , array(
                    'cache_wsdl' => 1,
                     'login' => $this->_username,'password' => $this->_password, // Credientials
                    'features' => SOAP_USE_XSI_ARRAY_TYPE ,  // Required
    'trace' =>1,
    'keep_alive' => false,
    'connection_timeout' => 50000,
    'exceptions' => false,

    ) );

    } 
    catch (SoapFault $E) {  
      print_r($E->faultstring) ;
      print_r($E->getMessage) ;
    } 

this is my debug info
Program received signal SIGSEGV, Segmentation fault.
0x00005555559b5975 in instanceof_function_slow ()
(gdb) bt
#0  0x00005555559b5975 in instanceof_function_slow ()
#1  0x00007fffe56635c7 in soap_real_error_handler () from /opt/remi/php82/root/usr/lib64/php/modules/soap.so
#2  0x0000555555772272 in zend_error_zstr_at ()
#3  0x0000555555772b63 in zend_error_zstr ()
#4  0x000055555576d83e in php_verror ()
#5  0x000055555576d95c in php_error_docref ()
#6  0x000055555576e58c in zif_ob_end_flush.cold ()
#7  0x0000555555a2a85f in execute_ex ()
#8  0x0000555555a2fb11 in zend_execute ()
#9  0x00005555559bf8a0 in zend_execute_scripts ()
#10 0x000055555595965e in php_execute_script ()
#11 0x0000555555aa4c66 in do_cli ()
#12 0x000055555578fe6c in main ()
parsibox commented 2 months ago

any suggestion?

NathanFreeman commented 2 months ago

Do you use coroutine?

parsibox commented 2 months ago

Do you use coroutine?


\Swoole\Coroutine::create(function () use ($argc) {
    CoroutineSendSms($argc);

});
NathanFreeman commented 2 months ago

The compatibility between soap and swoole in terms of coroutine has always been poor, probably due to some issues with a global variable. I need to take a look