QAT_Engine icon indicating copy to clipboard operation
QAT_Engine copied to clipboard

openssl engine -t -c -vvvv qat: DSO support routines:dlfcn_load:could not load the shared library:crypto/dso/dso_dlfcn.c:118:filename(/usr/local/ssl/lib/engines-1.1/qat.so): /usr/local/ssl/lib/engines-1.1/qat.so: undefined symbol: qat_ioctl

Open jxhecong opened this issue 6 years ago • 4 comments

CentOS Linux release 7.2.1511 (Core) qatmux.l.2.6.0-60 with QAT.L.R2.6.0-60.patch , QAT1.6 There is 4 acceleration device(s) in the system: icp_dev0 - type=dh895xcc, inst_id=0, node_id=0, bdf=3d:00:0, #accel=6, #engines=12, state=up icp_dev1 - type=dh895xcc, inst_id=1, node_id=1, bdf=88:00:0, #accel=6, #engines=12, state=up icp_dev2 - type=dh895xcc, inst_id=2, node_id=1, bdf=b1:00:0, #accel=6, #engines=12, state=up icp_dev3 - type=dh895xcc, inst_id=3, node_id=1, bdf=da:00:0, #accel=6, #engines=12, state=up openssl-1.1.1d , ./config --prefix=/usr/local/ssl -Wl,-rpath,/usr/local/ssl/lib QAT Engine 0.5.42 , ./configure --with-qat_dir=/root/hecong/qatmux.l.2.6.0-60/QAT1.6 --with-openssl_dir=/root/hecong/openssl-1.1.1d --with-openssl_install_dir=/usr/local/ssl --enable-multi_thread --with-qat_install_dir=/usr/lib64

./openssl engine -t -c -vvvv qat, get errors below: 140391366149952:error:25066067:DSO support routines:dlfcn_load:could not load the shared library:crypto/dso/dso_dlfcn.c:118:filename(/usr/local/ssl/lib/engines-1.1/qat.so): /usr/local/ssl/lib/engines-1.1/qat.so: undefined symbol: qat_ioctl 140391366149952:error:25070067:DSO support routines:DSO_load:could not load the shared library:crypto/dso/dso_lib.c:162: 140391366149952:error:260B6084:engine routines:dynamic_load:dso not found:crypto/engine/eng_dyn.c:414: 140391366149952:error:2606A074:engine routines:ENGINE_by_id:no such engine:crypto/engine/eng_list.c:334:id=qat

if build QAT Engine without '--enable-multi_thread', ./openssl engine -t -c -vvvv qat can run without error

jxhecong avatar Dec 25 '19 03:12 jxhecong

Hi I cannot say I have run the QAT engine with the --enable-multi_thread option. I will try and reproduce the problem next week at which point I may be more helpful. I have noted that the README.md file says that this option : - is an alternative way of managing within userspace the pinned contiguous memory allocated by the qat_contig_mem driver.

In the meantime here are some checkpoints: - The qat contig mem driver kernel module is definitely loaded? Have you tried this with an older version of OpenSSL, suggest 1.1.1c?

paulturx avatar Jan 03 '20 11:01 paulturx

I'm pretty sure qat_contig_mem module has been loaded. I donot have tried openssl-1.1.1c, the problem seems more likely that functions in qat_sys_call.c have not been defined. when i use system calls rather then the packaging functions defined in qat_sys_call.c, everything seems fine.

jxhecong avatar Jan 06 '20 08:01 jxhecong

Hi This is to let you know that we have a fix for the issue which will be incorporated in the next QAT Engine release. Thanks.

paulturx avatar Jan 28 '20 15:01 paulturx

@jxhecong, would you mind sharing a diff with how you used system calls rather than packaging functions as I run into the same problem?

Cheers

Update: I did sed -i 's/qat_munmap/munmap/' qae_mem_utils.c etc for all syscalls and C files (except qat_sys_call.[hc] itself). But no luck so far. And this is master from 2020 Dec 11.

DanielJanzon avatar Mar 19 '21 17:03 DanielJanzon