NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

libssleay32.so cause cRIO crash

Solved!
Go to solution

Hi all,

 

I am trying to use the OpenSSL library on the cRIO RT.

 

I use "Call Library Function Node" to call "libssleay32.so" from the cRIO.

libssleay32.so is the natural openssl library on cRIO, located at

/usr/local/natinst/lib/libssleay32.so

 

I have no problem to load "libssleay32.so" and execute the methods

"SSL_library_init" and "TLSv1_2_method".

But the cRIO crashes every time when I execute the method "SSL_CTX_new"

I will lose the connection to the cRIO right away.

 

I tried CompactRIO driver v17.0, v18.0, v18.5 both on cRIO-9035 and cRIO-9045 and all have this problem

 

However, I can successfully use the openssl library (ssleay32.out) on cRIO-9024 which is VxWork system.

 

This is the error log I received 


####
#Date: Wed, Feb 20, 2019 02:35:42 PM
#Desc: LabVIEW caught fatal signal
18.0.1 - Received SIGSEGV
Reason: address not mapped to object
Attempt to reference address: 0x0x51af0de0
#RCS: unspecified
#OSName: Linux
#OSVers: 4.9.47-rt37-6.1.0f0
#OSBuild: 264495
#AppName: lvrt
#Version: 18.0.1
#AppKind: AppLib
#AppModDate:
0x00007FE4518CDA25 - SSL_CTX_new + A7
0x000000000233FFA0 - <unknown> + 0

 

 

I very appreciate to any possible solutions.

0 Kudos
Message 1 of 7
(3,219 Views)

Hi EpicJean,

 

From my understanding, there is a different implementation of the library on NI Linux Real-Time and VxWorks. That probably explains why you do not see the crash on VxWorks.

 

I do not have any recommendations for you, at the moment. If you give us a week or so, we can take another pass at this and, hopefully, provide some more information.

 

Thanks,

Andy

 

 

0 Kudos
Message 2 of 7
(3,190 Views)

Thank you so much! I am looking forward to it!

0 Kudos
Message 3 of 7
(3,187 Views)

Hey EpicJean,

 

As a follow up, is there specific NI functionality that is making these calls, or are you making these call via a CLFN in your application. The latter is technically not supported by NI, but we should be able to help with it. Also, what is your goal functionality from using this library?

 

Either way, this sounds like it may be a bug.

 

Thanks,

Andy

0 Kudos
Message 4 of 7
(3,176 Views)

Hi, Andy

 

Thanks a lots for the reply!

 

Yes I am making this call via CLFN.

I need to send my MQTT message with SSL to the server.

The libssleay32.so is the openssl library used in LabVIEW

See: https://forums.ni.com/t5/NI-Linux-Real-Time-Discussions/How-to-install-Open-SSL-on-RIO/m-p/3462008/h...

I believe LabVIEW calls it in some functions

 

Here I attached the simple code I am testing.

It works fine on Windows and cRIO-9024

on Windows :C:\Program Files (x86)\National Instruments\Shared\nissl\NIssleay32.dll

on VxWorks :c:\ni-rt\system\ssleay32.out

 libssleay.png

0 Kudos
Message 5 of 7
(3,166 Views)
Solution
Accepted by topic author EpicJean

Hi EpicJean,

 

I was able to see the exact same behavior. We have created Corrective Action Request (CAR) 730891 for this issue. I cannot promise a timeline for this to be investigated or fixed at this time.

 

Thanks,

Andy

0 Kudos
Message 6 of 7
(3,118 Views)

Hi, Andy

 

Thank you for the reply and spending time on this issue.

We will use the VxWorks cRIO as the temporal solution.

I believe there are many people just like me deeply hoping that seeing the native VIs of SSL functionality in LabVIEW soon.

 

Thanks again,

 

0 Kudos
Message 7 of 7
(3,101 Views)