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

[2.0.x] Model Cache #10252

Closed
sergeyklay opened this issue May 5, 2015 · 7 comments
Closed

[2.0.x] Model Cache #10252

sergeyklay opened this issue May 5, 2015 · 7 comments

Comments

@sergeyklay
Copy link
Contributor

Hi!

It seems Model Cache with \Phalcon\Cache\Backend\Memory is broken.

How to reproduce:

  1. Install new Phalcon from 2.0.x branch (sha 1dd968e).
  2. Clone simple Cli App (I created it right now for this issue)
  3. Import to db test data: schema.sql
  4. Configure your db connection in services.php
  5. Run from terminal ./run

After Robot: 24 I always see Segmentation fault (core dumped).

You can change models cache from \Phalcon\Cache\Backend\Memory to \Phalcon\Cache\Backend\Memcache in service.php. In this case all works fine.

I not tested other adapters, only Memory and Memcache.

@sergeyklay sergeyklay mentioned this issue May 5, 2015
@sergeyklay
Copy link
Contributor Author

$ zephir version
0.6.2a
$ php -v
PHP 5.5.9-1ubuntu4.9 (cli) (built: Apr 17 2015 11:44:57) 
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
    with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies
$ phpize -v
Configuring for:
PHP Api Version:         20121113
Zend Module Api No:      20121212
Zend Extension Api No:   220121212
$ php -m
[PHP Modules]
apc
apcu
bcmath
bz2
calendar
Core
ctype
curl
date
dba
dom
ereg
exif
fileinfo
filter
ftp
gd
gearman
geoip
gettext
gmp
gnupg
hash
iconv
imagick
imap
intl
json
libxml
MapScript
mbstring
mcrypt
memcache
memcached
mhash
mongo
mysql
mysqli
OAuth
odbc
openssl
pcntl
pcre
PDO
pdo_mysql
PDO_ODBC
pdo_pgsql
pdo_sqlite
pgsql
phalcon
Phar
posix
readline
redis
Reflection
sasl
session
shmop
SimpleXML
soap
sockets
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tidy
tokenizer
wddx
xml
xmlreader
xmlrpc
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache
$ lsb_release --all
LSB Version:    core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-amd64:core-4.0-noarch:core-4.1-amd64:core-4.1-noarch:security-4.0-amd64:security-4.0-noarch:security-4.1-amd64:security-4.1-noarch
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.2 LTS
Release:    14.04
Codename:   trusty
$ gcc --version
gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ re2c --version
re2c 0.13.5
$ make --version
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for x86_64-pc-linux-gnu
$ clang --version
Ubuntu clang version 3.4-1ubuntu3 (tags/RELEASE_34/final) (based on LLVM 3.4)
Target: x86_64-pc-linux-gnu
Thread model: posix
$ autoconf --version
autoconf (GNU Autoconf) 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+/Autoconf: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>, <http://gnu.org/licenses/exceptions.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by David J. MacKenzie and Akim Demaille.
$ automake --version
automake (GNU automake) 1.14.1
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl-2.0.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Tom Tromey <tromey@redhat.com>
       and Alexandre Duret-Lutz <adl@gnu.org>.
$ aptitude search libpcre3 | grep 'i ' | awk -F'- ' '{print $1}'
i   libpcre3                        
i A libpcre3:i386                   
i   libpcre3-dev        

@sergeyklay
Copy link
Contributor Author

@andresgutierrez After running ./run 20 times. I see

Sorry, the program "php5" closed unexpectedly
Your computer does not have enough free memory to automatically analyze the problem and send a report to the developers

16 GB

default

@patrick-zippenfenig
Copy link
Contributor

Could you submit a full backtrace on a debug build?

@sergeyklay
Copy link
Contributor Author

@patrick-zippenfenig Unfortunately I don't know how to get dumps files and where they is located for php-cli

andresgutierrez added a commit that referenced this issue May 6, 2015
@patrick-zippenfenig
Copy link
Contributor

@sergeyklay Example backtrace from cli:

$ gdb --args /usr/bin/php /home/vagrant/.phpstorm_helpers/phpunit.php --configuration /var/www/tests/phpunit.xml
(gdb) run
(gdb) bt ful

output ommited

@sergeyklay
Copy link
Contributor Author

@patrick-zippenfenig Thanks

@sergeyklay
Copy link
Contributor Author

I testes new revision from db09235
Bug fixed.

@andresgutierrez Thanks

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