dkgroot / ast_redis

Redis driver for asterisk
10 stars 5 forks source link

hiredis isn't threadsafe #1

Open czuio opened 8 years ago

czuio commented 8 years ago

this code isn't safe for use, unfortunately hiredis isn't threadsafe and as such will cause asterisk to segfault eventually. you have been warned.

dkgroot commented 8 years ago

Hi Czuio, I already noticed as well, just need to find some time to fix it by not using hiredis any more. For low workloads it should work, but the more contention the sooner the segfault, allas. Thanks for reporting it though !

ovimp commented 8 years ago

my OS is centos6.5 x64 , why can not find 'hiredis' and 'libevent' ?

[root@da223:/tmp/ast_redis-master/build]#rpm -qa|grep hiredis hiredis-0.10.1-3.el6.x86_64 hiredis-devel-0.10.1-3.el6.x86_64 [root@da223:/tmp/ast_redis-master/build]# [root@da223:/tmp/ast_redis-master/build]#rpm -qa|grep libevent libevent-headers-1.4.13-4.el6.noarch libevent-1.4.13-4.el6.x86_64 libevent-doc-1.4.13-4.el6.noarch libevent-devel-1.4.13-4.el6.x86_64 [root@da223:/tmp/ast_redis-master/build]# [root@da223:/tmp/ast_redis-master/build]#/usr/local/bin/cmake .. -- checking for module 'hiredis' -- package 'hiredis' not found CMake Error at /usr/local/share/cmake-2.8/Modules/FindPkgConfig.cmake:279 (message): A required package was not found Call Stack (most recent call first): /usr/local/share/cmake-2.8/Modules/FindPkgConfig.cmake:333 (_pkg_check_modules_internal) CMakeLists.txt:26 (pkg_check_modules)

-- checking for module 'libevent' -- package 'libevent' not found CMake Error at /usr/local/share/cmake-2.8/Modules/FindPkgConfig.cmake:279 (message): A required package was not found Call Stack (most recent call first): /usr/local/share/cmake-2.8/Modules/FindPkgConfig.cmake:333 (_pkg_check_modules_internal) CMakeLists.txt:32 (pkg_check_modules)

CMake Error at CMakeModules/FindAsterisk.cmake:45 (MESSAGE): Build will fail, asterisk was not found Call Stack (most recent call first): CMakeLists.txt:38 (FIND_PACKAGE)

-- Configuring incomplete, errors occurred! [root@da223:/tmp/ast_redis-master/build]#

dkgroot commented 8 years ago

Hi wuhan,

Maybe you are missing pkgconfig or pkg-config, causing the search to fail

You can provide the path to the required libraries manually if required.

Do note that the ast_redis project currently is not threadsafe are and causes issues when used in high load situations. You might be better off using jabber or openais instead of this project.

Diederik