Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apache coredump when using phalcon 1.1.0 #687

Closed
guweigang opened this issue Jun 4, 2013 · 4 comments
Closed

apache coredump when using phalcon 1.1.0 #687

guweigang opened this issue Jun 4, 2013 · 4 comments

Comments

@guweigang
Copy link
Contributor

(gdb) bt
#0 0x00000000000648f6 in ?? ()
#1 0x0000002a9bf4078a in zm_deactivate_phalcon (type=Variable "type" is not available.

) at /home/work/git/cphalcon/ext/phalcon.c:685
#2 0x0000000000cc35d0 in ?? ()
#3 0x000000302af68bd6 in free () from /lib64/tls/libc.so.6
#4 0x0000002a95e73e85 in zend_hash_apply_deleter (ht=0x2a966d1de0, p=0x8bedf0) at /home/work/download/php-5.3.20/Zend/zend_hash.c:612
#5 0x0000002a95e74118 in zend_hash_graceful_reverse_destroy (ht=0x2a966d1de0) at /home/work/download/php-5.3.20/Zend/zend_hash.c:647
#6 0x0000002a95e683d5 in zend_shutdown () at /home/work/download/php-5.3.20/Zend/zend.c:759
#7 0x0000002a95e13d1d in php_module_shutdown () at /home/work/download/php-5.3.20/main/main.c:2194
#8 0x0000002a95e13dc9 in php_module_shutdown_wrapper (sapi_globals=Variable "sapi_globals" is not available.

) at /home/work/download/php-5.3.20/main/main.c:2162
#9 0x0000002a95ef0051 in php_apache_child_shutdown (tmp=Variable "tmp" is not available.

) at /home/work/download/php-5.3.20/sapi/apache2handler/sapi_apache2.c:399
#10 0x0000002a956984ee in apr_pool_destroy (pool=0xcc1358) at memory/unix/apr_pools.c:2352
#11 0x000000000049ad5e in clean_child_exit (code=0) at prefork.c:196
#12 0x000000000049b41b in just_die (sig=Variable "sig" is not available.

) at prefork.c:328
#13
#14 0x000000302afc72b9 in semop () from /lib64/tls/libc.so.6
#15 0x0000002a956971c0 in proc_mutex_sysv_acquire (mutex=0x7caf50) at locks/unix/proc_mutex.c:254
#16 0x000000000049afd2 in child_main (child_num_arg=Variable "child_num_arg" is not available.

) at prefork.c:205
#17 0x000000000049b3c4 in make_child (s=0x6f4890, slot=1) at prefork.c:768
#18 0x000000000049c017 in ap_mpm_run (_pconf=Variable "_pconf" is not available.

) at prefork.c:903
#19 0x000000000042c3f4 in main (argc=3, argv=0x7fbffff498) at main.c:753

(gdb) f 1
#1 0x0000002a9bf4078a in zm_deactivate_phalcon (type=Variable "type" is not available.

) at /home/work/git/cphalcon/ext/phalcon.c:685
685 zend_hash_destroy(PHALCON_GLOBAL(orm.parser_cache));
(gdb) l
680 FREE_HASHTABLE(PHALCON_GLOBAL(function_cache));
681 PHALCON_GLOBAL(function_cache) = NULL;
682 }
683
684 if (PHALCON_GLOBAL(orm.parser_cache) != NULL) {
685 zend_hash_destroy(PHALCON_GLOBAL(orm.parser_cache));
686 FREE_HASHTABLE(PHALCON_GLOBAL(orm.parser_cache));
687 PHALCON_GLOBAL(orm.parser_cache) = NULL;
688 }
689

@phalcon
Copy link
Collaborator

phalcon commented Jun 4, 2013

What code are you running to get this backtrace? Can you try using 1.2.0?

@guweigang
Copy link
Contributor Author

@phalcon codes like this:

    public function mainAction()
    {
        $manager = new \Phalcon\Mvc\Model\Transaction\Manager();
        $manager->setDbService("vs_common");
        $tran2 = $manager->get();
        $pointModel = new PointModel();
        $pointModel->setTransaction($tran2);
        var_dump($tran2->getConnection()->isUnderTransaction());

        $manager->setDbService("vs_hotel");
        $tran1 = $manager->get();
        var_dump($tran1->getConnection()->isUnderTransaction());

        var_dump($pointModel->getWriteConnection()->isUnderTransaction());

        $pointModel->name = "ttt";
        $pointModel->position = "[122, 3432]";
        $pointModel->city_id = 323;
        $pointModel->city_py = "hello";

        if($pointModel->save() == false) {
            foreach($pointModel->getMessages() as $message) {
                echo $message->__toString() . PHP_EOL;
            }
            $manager->rollback();
        }

        $eqsModel = new EQSModel();
        $eqsModel->setTransaction($tran1);
        $eqsModel->out_id = "343";
        $eqsModel->entity_id = 3343;
        if($eqsModel->save() == false) {
            foreach($eqsModel->getMessages() as $message) {
                echo $message->__toString() . PHP_EOL;
            }
            echo "=====------======\n";
            $manager->rollback();
            $tran2->rollback();
        }
        $manager->commit();
    }

@phalcon
Copy link
Collaborator

phalcon commented Jun 5, 2013

Can you please create a gist (https://gist.github.com/) with all the code/tables necessary to see the problem in my machine?

@guweigang
Copy link
Contributor Author

@phalcon Maybe is the Apache Server MPM ...

Server version: Apache/2.2.23 (Unix)
Server built: Dec 17 2012 13:18:31
Server's Module Magic Number: 20051115:31
Server loaded: APR 1.4.6, APR-Util 1.5.1
Compiled using: APR 1.4.6, APR-Util 1.5.1
Architecture: 64-bit
Server MPM: Prefork

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant