Code Monkey home page Code Monkey logo

Comments (7)

marc-mabe avatar marc-mabe commented on June 14, 2024

The segfault happens on trying to store a NULL value and it has been fixed in redis-2.2.7 which was released in 2015-03-03

The problem here is that most distros are shipping an older version.

I see the following possibilities:

  • Mark as wontfix
  • increase minimum required redis extension version to 2.2.7
  • check redis extension version and define the capability supported data types accordingly
  • manually cast to NULL to string as this is what the current capability supported data types defines

@weierophinney @Maks3w @Ocramius @kynx Thoughts ?

from zend-cache.

Maks3w avatar Maks3w commented on June 14, 2024
  1. Does this affect to production code or only to tests?
  2. What redis extension version is distributed by those distributions?
  3. Is that version branch still supported by the vendor?

About to transform null in a different type, definitely no as it breaks forward compatibility and breaks the developer expectations.

If we conclude we can't raise the minimum version then we should throw Exception if null data type and bugged extension are used at the sametime. The exception should indicate how to fix the problem: update the extension, avoid to write null values or replace null values with any other value like string, integer, etc

from zend-cache.

kynx avatar kynx commented on June 14, 2024

Of the distros I've got running:

  • RHEL 5 (via EPEL): doesn't ship extension
  • RHEL 6 & 7 (via EPEL): 2.2.7
  • Ubuntu 14.04.4: 2.2.4
  • Brew: 2.2.7

Would bumping the minimum version mean tests won't run in travis? That would be a pain.

from zend-cache.

Maks3w avatar Maks3w commented on June 14, 2024

IIRC there is a setting for use a most recent version of Ubuntu.

As far as I see only current Ubuntu LTS ship an older version. But Ubuntu has a large userbase and the jump to versions greater than 14.1 is not easy.

An alternative is ask to Ubuntu if they want to upgrade the version or backport the fix.

from zend-cache.

marc-mabe avatar marc-mabe commented on June 14, 2024
  • debian jessie = 2.2.5
  • debian sid (unstable) = 2.2.7

from zend-cache.

marc-mabe avatar marc-mabe commented on June 14, 2024

Because (currently) this adapter only supports string defined by our own capabilities I think the simplest fix would be to cast every input into a string before calling writing functions to redis.

As far as I can see in the redis source code it already supports serializing data into strings but for zend-cache this is a new future we can add this functionality in a future release that than needs to proper handle different versions of the installed redis extension.

from zend-cache.

marc-mabe avatar marc-mabe commented on June 14, 2024

mh forget about my last comment this is more complicated:

Currently the capabilities describes that the redis adapter casts everything into strings.
This is not true!

In fact the adapter itself doesn't cast anything and gives the values as-is to the extension.
The extension does support serializing values but it needs to be configured to use a serializer.
By default no serializer is configured and yes in this case every value shoiuld be cast to a string by the extension but with the edge case that on storing NULL a segmentation fault happens in version 2.2.5.

I have a working PR #89 which fixes both because I'm sure if we blindly cast everything into a string only because the supported datatypes capability tells that it's still a BC break as it was working before.

from zend-cache.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.