RE: OpenSSL and kernel __read_nocancel() blocking under heavy network congestion

2009-05-27 Thread David Schwartz
> Hi Victor, > > One Linux is Fedora 5, the other is another embedded Linux > running on MIPS, > both are 2.6.x vintage and therefore may share the same networking stack > heritage. However, on both separate systems: > > App+gSoap+TCP/IP+50% packet loss congestion => works fine > > App+gSoap+Open

Re: OpenSSL and kernel __read_nocancel() blocking under heavy network congestion

2009-05-27 Thread Mark Laubach
Hi Victor, One Linux is Fedora 5, the other is another embedded Linux running on MIPS, both are 2.6.x vintage and therefore may share the same networking stack heritage. However, on both separate systems: App+gSoap+TCP/IP+50% packet loss congestion => works fine App+gSoap+OpenSSL+TCP/IP+50% pac

Re: OpenSSL and kernel __read_nocancel() blocking under heavy network congestion

2009-05-27 Thread Victor Duchovni
On Wed, May 27, 2009 at 02:35:23PM -0700, Mark Laubach wrote: > Thanks Victor and Kyle, > > The gSoap version being used implemented the fcntl() method. If a non-blocking file-descriptor blocks on a read(2) system call, you should be seeking help from the O/S vendor. OpenSSL is irrelevant in thi

Re: OpenSSL and kernel __read_nocancel() blocking under heavy network congestion

2009-05-27 Thread Mark Laubach
Thanks Victor and Kyle, The gSoap version being used implemented the fcntl() method. Mark On 5/27/09 1:40 PM, "Victor Duchovni" wrote: > On Wed, May 27, 2009 at 12:57:26PM -0700, Kyle Hamilton wrote: > >> Is it open()ed as O_NONBLOCK, or is it ioctl()'d to O_NONBLOCK? I >> believe it require

Re: OpenSSL and kernel __read_nocancel() blocking under heavy network congestion

2009-05-27 Thread Victor Duchovni
On Wed, May 27, 2009 at 12:57:26PM -0700, Kyle Hamilton wrote: > Is it open()ed as O_NONBLOCK, or is it ioctl()'d to O_NONBLOCK? I > believe it requires ioctl. I don't believe that socket(2) supports O_NONBLOCK. So generally sockets are born blocking, though accepted(2) sockets are born non-bloc

Re: OpenSSL and kernel __read_nocancel() blocking under heavy network congestion

2009-05-27 Thread Kyle Hamilton
Is it open()ed as O_NONBLOCK, or is it ioctl()'d to O_NONBLOCK? I believe it requires ioctl. -Kyle H On Wed, May 27, 2009 at 10:52 AM, Mark Laubach wrote: > On 5/26/09 9:40 PM, "David Schwartz" wrote: > >> Make sure the connections are in fact set non-blocking. Make sure you don't >> refuse t

Re: OpenSSL and kernel __read_nocancel() blocking under heavy network congestion

2009-05-27 Thread Mark Laubach
On 5/26/09 9:40 PM, "David Schwartz" wrote: > Make sure the connections are in fact set non-blocking. Make sure you don't > refuse to perform an operation unless the SSL state machine has specifically > directed you to do so. > > Note that you cannot, either with or without SSL, make a connectio

Re: OpenSSL and kernel __read_nocancel() blocking under heavy network congestion

2009-05-27 Thread Mark Laubach
On 5/26/09 7:43 PM, "Geoff Thorpe" wrote: > If the sockets aren't being set up correctly, it's likely to be the > layer above openssl - ie. gSoap. Perhaps run this issue by them? > > Regards, > Geoff Thanks Geoff, gSoap opens the connection as non-blocking. Having said that and the responses

RE: OpenSSL and kernel __read_nocancel() blocking under heavy network congestion

2009-05-26 Thread David Schwartz
Mark Laubach wrote: > Hi David, > > Thanks and yes, these are the conundrums I'm curious about: > 1) why does the process get hung on __read_nocancel (), when the > connection is set to non-blocking, and only under heavy congestion?, My bet is the connection is not actually being set non-blockin

Re: OpenSSL and kernel __read_nocancel() blocking under heavy network congestion

2009-05-26 Thread Geoff Thorpe
Hi Mark, Mark Laubach wrote: > Hi David, > > Thanks and yes, these are the conundrums I'm curious about: > 1) why does the process get hung on __read_nocancel (), when the > connection is set to non-blocking, and only under heavy congestion?, > and 2) if the connection did turn blocking, why aren

Re: OpenSSL and kernel __read_nocancel() blocking under heavy network congestion

2009-05-26 Thread Mark Laubach
Hi David, Thanks and yes, these are the conundrums I'm curious about: 1) why does the process get hung on __read_nocancel (), when the connection is set to non-blocking, and only under heavy congestion?, and 2) if the connection did turn blocking, why aren't the added timeouts working? I'll keep

RE: OpenSSL and kernel __read_nocancel() blocking under heavy network congestion

2009-05-25 Thread David Schwartz
> Background: the TR-069 client uses the gSoap system that in turn > calls OpenSSL. The communications to the server at HTTP/SOAP > based using SSL or non_SSL. The problems are being experienced in > Linux 2.6.x systems 32-bit and 64-bit, on MIPS and AMD processors; > i.e. both embedded Linux sys