To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=94471
                 Issue #|94471
                 Summary|soffice -accept=socket falls into an infinite loop wit
                        |h 100% CPU consumption
               Component|framework
                 Version|OOO300m4
                Platform|Unknown
                     URL|
              OS/Version|All
                  Status|NEW
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P3
            Subcomponent|code
             Assigned to|tm
             Reported by|tora





------- Additional comments from [EMAIL PROTECTED] Tue Sep 30 11:45:56 +0000 
2008 -------
This phenomenon might be well known since this has been observed with several 
versions of OpenOffice.org, e.g. 2.3.1, 2.4.1, OOO300_m4, ... 

Phenomenon
A process of soffice.bin becomes out-of-control with 100% CPU consumption. 

Reproduction
There are several ways to reproduce this phenomenon: 
 a) soffice "-accept=socket,host=1.1.1.1,port=8100;urp;"
    where the IP address does not belong to the machine. 

 b) soffice "-accept=socket,port=8100,tcpnodelay;urp;"
    where 'tcpnodelay' should be followed by '=' and a number.

 c) disabling DNS, which is required to solve an IP address of 'localhost,'
    and then soffice "-accept=socket,port=8100;urp;"

Quick investigation
The following stack trace shows the phenomenon caused by the type c) above.

#0  osl_psz_createHostAddrByName (pszHostname="localhost") at 
sal/osl/unx/socket.c
#1  osl_psz_resolveHostname (pszHostname="localhost")      at 
sal/osl/unx/socket.c
#2  osl_resolveHostname (ustrHostname)                     at 
sal/osl/unx/socket.c
#3  SocketAddr (this=, strAddrOrHostName=, nPort=8100)     at
solver/680/unxlngi6.pro/inc/osl/socket.hxx
#4  osl::SocketAddr::setHostname (this=, sDottedIpOrHostname=) at
solver/680/unxlngi6.pro/inc/osl/socket.hxx
#5  io_acceptor::SocketAcceptor::init (this=)                       at
io/source/acceptor/acc_socket.cxx
#6  io_acceptor::OAcceptor::accept (this=, sConnectionDescription=) at
io/source/acceptor/acceptor.cxx
#7  desktop::Acceptor::run (this=)   at desktop/source/offacc/acceptor.cxx
#8  workerfunc (acc=)                at desktop/source/offacc/acceptor.cxx
#9  osl_thread_start_Impl (pData=)   at sal/osl/unx/thread.c
#10 start_thread () from /lib/libpthread.so.0
#11 clone () from /lib/libc.so.6

1. Calling gethostbyname() in the method osl_psz_createHostAddrByName() of the 
file 
   sal/osl/unx/socket.c fails and returns 0 due to misconfiguration of the
resolver. 

2. Consequently, the method io_acceptor::SocketAcceptor::init() in the file  
   io/source/acceptor/acc_socket.cxx throws an exception. 

3. The exception will be caught in a while loop of the method Acceptor::run() 
   in the file desktop/source/offacc/acceptor.cxx

void SAL_CALL Acceptor::run()
{
        while ( m_rAcceptor.is() && m_rBridgeFactory.is()  )
        {
                RTL_LOGFILE_CONTEXT( aLog, "desktop (lo119109) Acceptor::run" );
                try
                {
                        ...(omitted)...

                        // accept connection
                        Reference< XConnection > rConnection = 
m_rAcceptor->accept( m_aConnectString );

                        ...(omitted)...

                } catch (Exception&) {
                        // connection failed...
                        // something went wrong during connection setup.
                        // just wait for a new connection to accept
                }
        }
}

4. Then, an attempt of 'accept connection' will be executed again in no time.

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to