Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-53559

Registering new channels during selector close causes race condition

    Details

      Description

      The failure is like this:
      https://test-1-4.liferay.com/job/test-portal-acceptance-pullrequest-backend%28master%29/group=27,label_exp=!test-1-4/73/testReport/junit/com.liferay.portal.kernel.nio.intraband.nonblocking/SelectorIntrabandTest/testRegisterChannelReadWrite/

      This is really a jdk bug:
      https://bugs.openjdk.java.net/browse/JDK-7191295

      However openjdk guys don't seem to take care of it, as they close it as "Incomplete", saying the error is impossible, but it indeed is possible and happening to us.

      The race condition roots from registering new channels during the selector close. Without changing jdk code, it is impossible to fix the root cause.

      But we can add one more layer synchronization to prevent registering new channel during the selector close. Theoretically we can avoid this from happening to us.

      While our CI constantly running this test, if this does not work, or there is more race condition, soon we will know.

      There is nothing for QA to manual test in this ticket.

        Attachments

          Activity

            People

            Assignee:
            brian.chan Brian Chan
            Reporter:
            shuyang.zhou Shuyang Zhou
            Participants of an Issue:
            Recent user:
            Esther Sanz
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              6 years, 36 weeks, 4 days ago

                Packages

                Version Package
                7.0.0 M4