先说一下结论 无法复用ubuntu上面编译的二进制文件 无法直接使用docker官网下面的arm64的镜像运行 无法直接使用redis6.0.10最新版本编译运行 可以使用redis5.0.4 进行编译安装运行. redis5.0.4无法直接使用redis6.0.10的redis.conf配置文件, 参数不一样.
公司昨天新进了一台飞腾2000+的服务器, 昨天下午在上面安装了redis以及我们自己的应用软件
本来想复用之前的redis二进制文件, 但是发现不太行, 会报错如下:
<jemalloc>: Unsupported system page size
段错误 (核心已转储)
经过一番搜索发现一个简要的问题说明为 :
arm 架构上面: 在uos debian ubuntu 等操作系统 默认的pagesiz是4KB 但是在centos rhel 系列上面默认的pagesize 是 64KB 然后redis 使用的jemalloc 内存分配库 在编译时就需要严格确认内存pagesize大小. 所以在ubuntu 后者是银河麒麟4.0 上面编译的redis版本无法满足 银河麒麟v10服务器版本上面进行使用.
简单验证一下内存页面大小
银河麒麟v10的版本
[root@localhost src]# cat /etc/os-release NAME="Kylin Linux Advanced Server" VERSION="V10 (Tercel)" ID="kylin" VERSION_ID="V10" PRETTY_NAME="Kylin Linux Advanced Server V10 (Tercel)" ANSI_COLOR="0;31" [root@localhost src]# getconf PAGESIZE 65536 [root@localhost src]#
银河麒麟v4的参数
root@lccy-2321321:~# cat /etc/os-release NAME="Kylin" VERSION="4.0.2 (juniper)" ID=kylin ID_LIKE=debian PRETTY_NAME="Kylin 4.0.2" VERSION_ID="4.0.2" HOME_URL="http://www.kylinos.cn/" SUPPORT_URL="http://www.kylinos.cn/content/service/service.html" BUG_REPORT_URL="http://www.kylinos.cn/" UBUNTU_CODENAME=juniper root@lccy-2321321:~# getconf PAGESIZE 4096
然后只能重新编译处理
本来想着用一个最新版本的redis6.0.10 进行使用 但是发现还是存在问题:
最后面还是提示内存有问题详细信息为:
------ FAST MEMORY TEST ------ *** Preparing to test memory region 5e0000 (720896 bytes) *** Preparing to test memory region 19060000 (196608 bytes) *** Preparing to test memory region fffe60000000 (1073741824 bytes) .O.O.O Fast memory test PASSED, however your memory can still be broken. Please run a memory test for several hours if possible. ------ DUMPING CODE AROUND EIP ------ Symbol: _serverAssert (base: 0x478cc0) Module: ./redis-server 127.0.0.1:6388 (base 0x400000) $ xxd -r -p /tmp/dump.hex /tmp/dump.bin $ objdump --adjust-vma=0x478cc0 -D -b binary -m i386:x86-64 /tmp/dump.bin ------ 58161:M 21 Feb 2021 09:01:51.019 # dump of function (hexdump of 260 bytes): fd7bbda9fd030091f35301a9d30b00d063e23e91f55b02a9f60300aaf50301aaf403022a60e44db9400000358ffeff97600080520107009021801691b1e7fe97e40316aae303142ae20315aa600080520107009021001791aae7fe9762e23e9160008052010700902180179156e806f955ec06f954e00db9a2e7fe9700008092010f805201000039f35341a9f55b42a9fd7bc3a8c0035fd6fd7bb2a9c10b00f0fd030091f51300f9f50300aa209c4db90009003460008052010700902140189190e7fe97a25e40f9600080520107009021e018918be7fe97a00640f9020480d2a1030191af3b0194e20300aa01070090600080522140199182e7fe97a24a40b960008052 === REDIS BUG REPORT END. Make sure to include from START to END. === Please report the crash by opening an issue on github: http://github.com/redis/redis/issues Suspect RAM error? Use redis-server --test-memory to verify it. 段错误 (核心已转储)
没办法 换用之前下载的redis5.0.4
进行编译和安装发现没有问题