You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openoffice.apache.org by bu...@apache.org on 2015/10/13 20:14:25 UTC

[Issue 126586] New: automation deadlock: osl_closeSocket() doesn't wake up thread stuck in accept()

https://bz.apache.org/ooo/show_bug.cgi?id=126586

          Issue ID: 126586
        Issue Type: DEFECT
           Summary: automation deadlock: osl_closeSocket() doesn't wake up
                    thread stuck in accept()
           Product: General
           Version: 4.1.1
          Hardware: All
                OS: FreeBSD
            Status: CONFIRMED
          Severity: normal
          Priority: P5
         Component: code
          Assignee: issues@openoffice.apache.org
          Reporter: damjan@apache.org

On FreeBSD (and I presume other *BSDs), when running the graphical tests (ie.
run "ant" in the aoo/tests directory), there are many test errors and after the
tests several instances of AOO are running in the background and need to be
killed.

I ran AOO exactly how the tests run it on Linux and on FreeBSD and compared the
difference:

"/AOO/main/instsetoo_native/unxfbsdx/Apache_OpenOffice/installed/install/en-US/openoffice4/program/soffice"
"-automationport=12479" "-enableautomation" "-86fe1abe16f242ccb73ee2bad8cbcffa"
"-nofirststartwizard" "-norestore" "-quickstart=no"

On Linux exiting by clicking the "X" in the top-right corner of the window
causes it to immediately exit and control to return to the command prompt. On
FreeBSD that doesn't happen: control doesn't return to the command prompt, AOO
is **DEADLOCKED**.

Running "thread apply all bt" in gdb shows why: in the main/automation module,
one thread closes a socket and is trying to join another, but that other is
still stuck in accept() on that closed socket, hopelessly waiting for clients
to connect. Digging deeper, I saw why: when one thread closes a socket, and
another thread is in accept() on that socket, that other thread doesn't return
from accept(). The socket code in main/sal/osl/unx has a workaround for this,
but it's "#if defined(LINUX)".

-- 
You are receiving this mail because:
You are the assignee for the issue.

[Issue 126586] automation deadlock: osl_closeSocket() doesn't wake up thread stuck in accept()

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126586

damjan@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.1.2
             Latest|---                         |4.1.2-dev
    Confirmation on|                            |
             Status|CONFIRMED                   |RESOLVED
         Resolution|---                         |FIXED
              Flags|                            |4.1.2_release_blocker?

--- Comment #1 from damjan@apache.org ---
I've committed a patch that generalizes the #if defined(LINUX) to FreeBSD and
(by extrapolation only) NetBSD, and not only gets AOO to exit when run with
automation enabled as described, but also gets all tests to run, and even gets
as many tests to pass on FreeBSD as pass on Linux (though different ones fail
and for different reasons lol).

I am thus proposing this fix as a 4.1.2 release blocker.

-- 
You are receiving this mail because:
You are the assignee for the issue.

[Issue 126586] automation deadlock: osl_closeSocket() doesn't wake up thread stuck in accept()

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126586

--- Comment #3 from damjan@apache.org ---
Hi Andrea, it's revisions 1708477 and 1708483, and yes only FreeBSD and NetBSD.

-- 
You are receiving this mail because:
You are the assignee for the issue.

4.1.2_release_blocker granted: [Issue 126586] automation deadlock: osl_closeSocket() doesn't wake up thread stuck in accept()

Posted by bu...@apache.org.
Andrea Pescetti <pe...@apache.org> has granted damjan@apache.org's request
for 4.1.2_release_blocker:
Issue 126586: automation deadlock: osl_closeSocket() doesn't wake up thread
stuck in accept()
https://bz.apache.org/ooo/show_bug.cgi?id=126586



--- Comment #4 from Andrea Pescetti <pe...@apache.org> ---
This is merged to AOO410 for OpenOffice 4.1.2-RC3.

[Issue 126586] automation deadlock: osl_closeSocket() doesn't wake up thread stuck in accept()

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126586

Kay <ks...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |CLOSED
                 CC|                            |kschenk@apache.org

--- Comment #6 from Kay <ks...@apache.org> ---
Closing.

-- 
You are receiving this mail because:
You are the assignee for the issue.

[Issue 126586] automation deadlock: osl_closeSocket() doesn't wake up thread stuck in accept()

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126586

--- Comment #5 from Andrea Pescetti <pe...@apache.org> ---
For reference, trunk revision 1708477 and trunk revision 1708483 were merged as
revision 1709400 on AOO410.

-- 
You are receiving this mail because:
You are the assignee for the issue.

[Issue 126586] automation deadlock: osl_closeSocket() doesn't wake up thread stuck in accept()

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126586

Andrea Pescetti <pe...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pescetti@apache.org

--- Comment #2 from Andrea Pescetti <pe...@apache.org> ---
@damjan: Do you have the revision number? SVN robot is apparently broken these
days. And, reading your description, the scope of this fix is limited to BSD,
right? Meaning that nothing changes for other platforms.

This is for properly evaluating impact of this bug and deciding whther to
include the fix if we go for a RC3. Thanks.

-- 
You are receiving this mail because:
You are the assignee for the issue.

4.1.2_release_blocker requested: [Issue 126586] automation deadlock: osl_closeSocket() doesn't wake up thread stuck in accept()

Posted by bu...@apache.org.
damjan@apache.org has asked  for 4.1.2_release_blocker:
Issue 126586: automation deadlock: osl_closeSocket() doesn't wake up thread
stuck in accept()
https://bz.apache.org/ooo/show_bug.cgi?id=126586



--- Comment #1 from damjan@apache.org ---
I've committed a patch that generalizes the #if defined(LINUX) to FreeBSD and
(by extrapolation only) NetBSD, and not only gets AOO to exit when run with
automation enabled as described, but also gets all tests to run, and even gets
as many tests to pass on FreeBSD as pass on Linux (though different ones fail
and for different reasons lol).

I am thus proposing this fix as a 4.1.2 release blocker.

[Issue 126586] automation deadlock: osl_closeSocket() doesn't wake up thread stuck in accept()

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126586

Andrea Pescetti <pe...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Flags|4.1.2_release_blocker?      |4.1.2_release_blocker+

--- Comment #4 from Andrea Pescetti <pe...@apache.org> ---
This is merged to AOO410 for OpenOffice 4.1.2-RC3.

-- 
You are receiving this mail because:
You are the assignee for the issue.