Re: crash in openssl code
Duncan Grisby via omniORB-list <[email protected]> Sat, 24 Feb 2024 18:00:03 +0000
| Newsgroups | gmane.comp.corba.omniorb.user |
|---|---|
| Message-ID | <[email protected]> |
On Sat, 2024-02-24 at 18:42 +0100, Michael Teske wrote: > > That's good news. If I can be of any help let me know. From my > experience on Linux, a mutex is not very expensive if it is not > locked by another thread, but other systems may be different > (I know that at least a few years ago it was rather expensive on > OSX). > I'll try to write a small test program next week which triggers the > problem more often, so I can test more easily. That would be helpful. I have tried to reproduce the crash, but I haven't managed. I can see bidirectional GIOP causing it to call SSL_write while it's blocked in SSL_read, but it has not once crashed. This is with OpenSSL 3.1.1 on Fedora 39. My performance concern is not just the lock, but also the overhead of non-blocking sockets, which means it needs to call poll() or select() to see when the socket is available, and potentially makes multiple calls into OpenSSL instead of just one. A brief experiment that doesn't properly implement the solution but does try to simulate the overheads suggests that it is likely to add about 10% to the call times, so it is not a trivial cost. Duncan. -- Duncan Grisby <[email protected]>