RE: SIGSEGV issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



David Sayada writes:
 > 
 
 > I hope I am not top posting now :-)    

Apparently not.  You need to look at your quoting, but keep it up.  :-)

 > I think I have identified what can be the source of the problem. Please look
 > at the following scheme:
 > 
 > This is the infinite loop of one my threads:
 > 
 >         while (true)
 >         {
 >             try
 >             {
 >                 selectEventLoop();
 >             }
 >             catch (Exception e)
 >             {
 >                 Logger.logPrintln( e );
 >             }
 >         } // of select loop
 > 
 > And this is the way the selectEventLoop is implemented:
 > 
 > void selectEventLoop() throws Exception
 >     {
 >         int nNumSelected = 0;
 > 
 >         while ( nNumSelected == 0 )
 >         {
 >             signalSendChannels();
 > 
 >             //Logger.logPrintln( "XXXXXXXXX Before select" );
 >             nNumSelected = m_selector.select();
 >             //Logger.logPrintln( "XXXXXXXXX After select" );
 >         }
 > 
 >         Set readyKeys = m_selector.selectedKeys();
 >         Iterator iterator = readyKeys.iterator();
 > 
 >         while (iterator.hasNext())
 >         {
 >             SelectionKey key = (SelectionKey) iterator.next();
 >             iterator.remove();
 >             try
 >             {
 > 		.......
 >             }
 >             catch (IOException ex)
 >             {
 >                 Logger.logPrintln( ex );
 >                 closeChannel( key );
 >             }
 >         } // of selected keys iterator
 >     }
 > 
 > May the parts of this function which are not under try and catch be
 > problematic? Should the exception thrown in this area not be caught by the
 > try and catch of the upper layer inside the infinite loop?

There's nothing I can see that should cause any trouble, but I suppose
the problem is that becasue stack traces on your version of gcj aren't
working you have no way to know where the problem is?

Andrew.


[Index of Archives]     [Linux Kernel]     [Linux Cryptography]     [Fedora]     [Fedora Directory]     [Red Hat Development]

  Powered by Linux