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

Session\Bag()->destroy() - SIGILL, Illegal instruction #2593

Closed
skolman opened this issue Jul 4, 2014 · 2 comments
Closed

Session\Bag()->destroy() - SIGILL, Illegal instruction #2593

skolman opened this issue Jul 4, 2014 · 2 comments

Comments

@skolman
Copy link

skolman commented Jul 4, 2014

I have a problem with sessions.

$di = new \Phalcon\DI\FactoryDefault();

$di->set('session', function(){
    $session = new Phalcon\Session\Adapter\Files();
    $session->start();
    return $session;
});

$sessionBag = new \Phalcon\Session\Bag('abc');
$sessionBag->setDI($di);

//$sessionBag->d = '333'; // this works
//echo $value = $sessionBag->d; //  this works

$sessionBag->destroy(); // here is problem

// 2014/07/03 16:22:32 [error] 8231#0: *129 recv() failed (104: Connection reset by peer)

About my env:

Phalcon 1.3.2

PHP 5.4.4-14+deb7u11 (cli) (built: Jun 13 2014 13:53:15)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
with XCache v3.1.0, Copyright (c) 2005-2013, by mOo
with Xdebug v2.2.1, Copyright (c) 2002-2012, by Derick Rethans
with XCache Optimizer v3.1.0, Copyright (c) 2005-2013, by mOo
with XCache Cacher v3.1.0, Copyright (c) 2005-2013, by mOo
with XCache Coverager v3.1.0, Copyright (c) 2005-2013, by mOo

I use redis as a session handler:

session.save_handler = redis
session.save_path = "tcp://url.to.redis/?auth=qwerty"

gdb backtrace:

vagrant@syzyf:/project$ gdb --args php /home/virtual/syzyf/public/new.php
GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/php...(no debugging symbols found)...done.
(gdb) r
Starting program: /usr/bin/php /home/virtual/syzyf/public/new.php
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffed96c700 (LWP 11983)]
[Thread 0x7fffed96c700 (LWP 11983) exited]

Program received signal SIGILL, Illegal instruction.
0x00007fffedec2334 in phalcon_session_adapter_unset_property_internal () from /usr/lib/php5/20100525/phalcon.so
(gdb) bt
#0  0x00007fffedec2334 in phalcon_session_adapter_unset_property_internal () from /usr/lib/php5/20100525/phalcon.so
#1  0x00007fffedec2399 in zim_Phalcon_Session_Adapter_remove () from /usr/lib/php5/20100525/phalcon.so
#2  0x000000000069281d in zend_call_function ()
#3  0x00007fffeddee70a in phalcon_call_user_function () from /usr/lib/php5/20100525/phalcon.so
#4  0x00007fffeddef1c2 in phalcon_call_class_method_aparams () from /usr/lib/php5/20100525/phalcon.so
#5  0x00007fffedf92295 in zim_Phalcon_Session_Bag_destroy () from /usr/lib/php5/20100525/phalcon.so
#6  0x00007ffff41e8ec9 in xdebug_execute_internal (current_execute_data=0x7ffff7e44060, return_value_used=0) at /srv/debian_developer/xdebug/xdebug-2.2.1/build-php5/xdebug.c:1481
#7  0x000000000074800e in ?? ()
#8  0x0000000000701a27 in execute ()
#9  0x00007ffff41e8a81 in xdebug_execute (op_array=0x7ffff7e77d88) at /srv/debian_developer/xdebug/xdebug-2.2.1/build-php5/xdebug.c:1391
#10 0x00000000006a10ce in zend_execute_scripts ()
#11 0x0000000000640433 in php_execute_script ()
#12 0x000000000074a843 in ?? ()
#13 0x00000000004313ba in ?? ()
#14 0x00007ffff5162ead in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6
#15 0x000000000043144d in _start ()
(gdb)

Want to back this issue? Place a bounty on it! We accept bounties via Bountysource.

@pgasiorowski
Copy link
Contributor

Possibly related:
#2516

@phalcon
Copy link
Collaborator

phalcon commented Sep 2, 2014

Try compiling this way:

cd build/64bits
phpize
export CFLAGS="-O2 -g"
./configure 
make
sudo make install

@phalcon phalcon closed this as completed Nov 13, 2014
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

2 participants