[jboss-dev] Remoting behavior on error (Re: Possible blocker with jboss-cl 2.2.0.Alpha1)

Jaikiran Pai jpai at redhat.com
Tue Feb 16 07:44:44 EST 2010


Ron Sigal wrote:
> Yeah, Carlo also pointed out that NCDFE is a java.lang.Error, which, 
> as you note, is not caught.  I agree that if ServerThread is going to 
> terminate due to an error, then it should certainly close its socket, 
> so that's a bug (JBREM-1183 "ServerThread should catch 
> java.lang.Error").  But I have mixed feelings about terminating 
> ServerThread in this case.  Unlike, IOException, SocketException, 
> etc., the NoClassDefFoundError doesn't suggest that the socket is no 
> longer usable.  Maybe a better solution (along with fixing the 
> classloader problem, of course) is to use a positive timeout on the 
> client side.
I think some (sensible) default timeout needs to be added so that the 
client does not end up hung. Is this something that can be added to some 
*-jboss-beans.xml in the AS?

-Jaikiran
>
> -Ron
>
> Jaikiran Pai wrote:
>> The mailing list doesn't allow me to attach anything more than 500KB. So 
>> the log has been sent to Ron and the rest of the reply follows:
>>
>> I don't think it's going to be too useful because the log level is set 
>> to INFO and as i mentioned in the earlier part of the mail - the logging 
>> itself seems to be a bit messed up. I haven't yet been able to reproduce 
>> this locally. The test run on our build setup  reproduces this 
>> consistently, so we can enable DEBUG level logging of remoting, the next 
>> time we start the test run.
>>
>> One thing to note is that the ServerThread catches a "Exception" and 
>> later down the flow closes the socketwrapper:
>>
>> processInvocation(socketWrapper, inputStream, outputStream);
>>      }
>>      catch (Exception ex)
>>      {
>>         if (running)
>>         {
>>            log.error(this + " exception occurred during first 
>> invocation", ex);
>>            running = false;
>>         }
>>         else
>>         {
>>            log.debug(this + " exception occurred during first 
>> invocation", ex);
>>         }
>>      }
>> ....// some more code
>>
>> log.debug(this + " closed socketWrapper: " + desc);
>>
>>
>> The closing of the socketwrapper will be skipped in case of "Error" like 
>> the NCDFE.
>>
>> regards,
>> -Jaikiran
>>
>>
>>   
>>> Ron Sigal wrote:
>>>     
>>>> In fact, ServerThread should close the socket when the attempt to 
>>>> write generates an exception.
>>>>
>>>> Jaikiran, do you have a server.log?  It should have the output of
>>>>
>>>>    log.debug(this + " closed socketWrapper: " + desc);
>>>>
>>>> -Ron
>>>>
>>>> Carlo de Wolf wrote:
>>>>       
>>>>> I also want to raise how Remoting should behave when it encounters 
>>>>> such an error.
>>>>> I would like to see it close the socket outright, because now the 
>>>>> client goes into a hang state.
>>>>>
>>>>> Carlo
>>>>> _______________________________________________
>>>>> jboss-development mailing list
>>>>> jboss-development at lists.jboss.org
>>>>> https://lists.jboss.org/mailman/listinfo/jboss-development
>>>>>   
>>>>>         
>>
>> _______________________________________________
>> jboss-development mailing list
>> jboss-development at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/jboss-development
>>   




More information about the jboss-development mailing list