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

Laravel memory leak with memcached #202

Closed
tolson17 opened this issue Dec 21, 2018 · 4 comments
Closed

Laravel memory leak with memcached #202

tolson17 opened this issue Dec 21, 2018 · 4 comments
Labels
🐛 bug Something isn't working c-extension Apply this label to issues and prs related to the C-extension

Comments

@tolson17
Copy link

Hello, we are using the Laravel provider with the Memcached extension. When we are during a simple API request to retrieve 1 object it is causing a segmentation fault. For this request memcached would only be used for column type definitions and loaded once from memcached. We could not find anything unique with the data that is causing the issue but can provide the request data and expected response. We can also provide a core dump if needed. Let me know what information you need.

Request:

Request URL: https://test.com/beta/api/v1/employee/blocking-rules
Request Method: GET
Status Code: 200 OK
Remote Address: 216.211.141.33:443
Referrer Policy: no-referrer-when-downgrade

Accept: application/vnd.api+json
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9
Authorization: Bearer ************
Connection: keep-alive
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36
{
   "meta":{
      "page":{
         "current-page":1,
         "per-page":15,
         "from":1,
         "to":8,
         "total":8,
         "last-page":1
      }
   },
   "links":{
      "first":"https:\/\/test.com\/jsonapi\/api\/v1\/employee\/blocking-rules?page%5Bnumber%5D=1&page%5Bsize%5D=15",
      "last":"https:\/\/test.com\/jsonapi\/api\/v1\/employee\/blocking-rules?page%5Bnumber%5D=1&page%5Bsize%5D=15"
   },
   "data":[
      {
         "type":"blocking-rule",
         "id":"1",
         "attributes":{
            "resource_id":31,
            "resource_area_id":0,
            "block_resource_id":2,
            "block_resource_area_id":0
         },
         "relationships":{
            "blockingResource":[

            ],
            "blockingResourceArea":[

            ],
            "blockedResource":[

            ],
            "blockedResourceArea":[

            ]
         }
      },
      {
         "type":"blocking-rule",
         "id":"2",
         "attributes":{
            "resource_id":31,
            "resource_area_id":0,
            "block_resource_id":3,
            "block_resource_area_id":0
         },
         "relationships":{
            "blockingResource":[

            ],
            "blockingResourceArea":[

            ],
            "blockedResource":[

            ],
            "blockedResourceArea":[

            ]
         }
      },
      {
         "type":"blocking-rule",
         "id":"3",
         "attributes":{
            "resource_id":31,
            "resource_area_id":0,
            "block_resource_id":4,
            "block_resource_area_id":0
         },
         "relationships":{
            "blockingResource":[

            ],
            "blockingResourceArea":[

            ],
            "blockedResource":[

            ],
            "blockedResourceArea":[

            ]
         }
      },
      {
         "type":"blocking-rule",
         "id":"4",
         "attributes":{
            "resource_id":31,
            "resource_area_id":0,
            "block_resource_id":5,
            "block_resource_area_id":0
         },
         "relationships":{
            "blockingResource":[

            ],
            "blockingResourceArea":[

            ],
            "blockedResource":[

            ],
            "blockedResourceArea":[

            ]
         }
      },
      {
         "type":"blocking-rule",
         "id":"5",
         "attributes":{
            "resource_id":31,
            "resource_area_id":0,
            "block_resource_id":6,
            "block_resource_area_id":0
         },
         "relationships":{
            "blockingResource":[

            ],
            "blockingResourceArea":[

            ],
            "blockedResource":[

            ],
            "blockedResourceArea":[

            ]
         }
      },
      {
         "type":"blocking-rule",
         "id":"6",
         "attributes":{
            "resource_id":31,
            "resource_area_id":0,
            "block_resource_id":7,
            "block_resource_area_id":0
         },
         "relationships":{
            "blockingResource":[

            ],
            "blockingResourceArea":[

            ],
            "blockedResource":[

            ],
            "blockedResourceArea":[

            ]
         }
      },
      {
         "type":"blocking-rule",
         "id":"7",
         "attributes":{
            "resource_id":31,
            "resource_area_id":0,
            "block_resource_id":23,
            "block_resource_area_id":0
         },
         "relationships":{
            "blockingResource":[

            ],
            "blockingResourceArea":[

            ],
            "blockedResource":[

            ],
            "blockedResourceArea":[

            ]
         }
      },
      {
         "type":"blocking-rule",
         "id":"8",
         "attributes":{
            "resource_id":80,
            "resource_area_id":0,
            "block_resource_id":80,
            "block_resource_area_id":0
         },
         "relationships":{
            "blockingResource":[

            ],
            "blockingResourceArea":[

            ],
            "blockedResource":[

            ],
            "blockedResourceArea":[

            ]
         }
      }
   ]
}

expected response:

@labbati
Copy link
Member

labbati commented Dec 31, 2018

Hi @tolson17, sorry to hear if the issue you found with memcached. I would like to ask you a few more details to better understand the issue.

  • OS version
  • PHP version
  • list of loaded extensions: php -m
  • what type of data is expected to be at that key? int? (very long) string? serialized json object?

Thanks!

@tolson17
Copy link
Author

tolson17 commented Jan 2, 2019

@labbati Thanks for getting back to me! Sorry for the delay, here is the info:

OS version: Linux fenrir 4.9.0-8-amd64 #1 SMP Debian 4.9.130-2 (2018-10-27) x86_64
PHP Version: 7.0.33-0+deb9u1
PHP extensions:

[PHP Modules]
calendar
Core
ctype
curl
date
ddtrace
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
http
iconv
igbinary
imagick
json
libxml
mbstring
mcrypt
memcached
msgpack
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
propro
raphf
readline
Reflection
session
shmop
SimpleXML
sockets
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zlib
zmq

[Zend Modules]
Zend OPcache

what type of data is expected to be at that key? int? (very long) string? serialized json object?
:
A small key value array...less than 10 values

@labbati labbati added 🐛 bug Something isn't working c-extension Apply this label to issues and prs related to the C-extension labels Jan 3, 2019
@SammyK
Copy link
Contributor

SammyK commented Apr 26, 2019

Hey @tolson17! Are you are still experiencing a segfault with the PHP tracer after upgrading to the latest version. :)

@tolson17
Copy link
Author

@SammyK yes, it looks like it has been fixed! thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working c-extension Apply this label to issues and prs related to the C-extension
Projects
None yet
Development

No branches or pull requests

3 participants