This patch looks good. I applied it. Also, just for good measure, I
added code to handle the other semaphore failures in the same method in
the same way.
I don't think waiting on sem(2) is an issue though, if a connection is
immediately available, then the listener will just hand off to it,
otherwise, it will fork a child to wait on sem(2) while it loops back to
handle more client connections.
Dave
On 06/28/2011 05:57 AM, Renat Sabitov wrote:
> Hi David,
>
> I am doing some sort of stability testing. What exactly I am doing is
> starting two dozens of sqlrelay clients constantly connecting,
> executing and disconnecting. Than I run
> killall -s 9 sqlr-connection-oracle8 several times to emulate abnormal
> exiting of connection processes.
>
> What I found is that sometimes a forked listener process can't get a
> connection and stopped waiting for sem(2) forever in getAConnection.
> Ok, not a big deal, the situation is quite synthetic and could be
> solved by starting new connection process.
>
> But then I tried to stop sqlrelay and found that some listener
> processes start runnig an infinite loop in getAConnection having
> wait() and signal() returning -1. Only the manual killing of this
> listeners helps.
>
> I think it would be a good idea to check semaphore access in this loop
> for errors. The patch is attached.
>
> What more, it might be meaningful to wait for some amount of time on
> sem(2), not forever. The main listener than could take another client
> and start more connections.
>
>
> ------------------------------------------------------------------------------
> All of the data generated in your IT infrastructure is seriously valuable.
> Why? It contains a definitive record of application performance, security
> threats, fraudulent activity, and more. Splunk takes this data and makes
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2d-c2
>
> _______________________________________________________
> Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting
> http://www.doteasy.com
>
>
> _______________________________________________
> Sqlrelay-discussion mailing list
> Sql...@li...
> https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion
>
>
> _______________________________________________________
> Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting
> http://www.doteasy.com
_______________________________________________________
Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting
http://www.doteasy.com |