On 21/05/2019 09:03, Keiichi Fujino wrote:
> 2019年5月16日(木) 21:55 <ma...@apache.org <mailto:ma...@apache.org>>:
> 
>     This is an automated email from the ASF dual-hosted git repository.
> 
>     markt pushed a commit to branch master
>     in repository https://gitbox.apache.org/repos/asf/tomcat.git
> 
>     commit ab70de3278d5e506661faeb5febf71a061b89179
>     Author: Mark Thomas <ma...@apache.org <mailto:ma...@apache.org>>
>     AuthorDate: Thu May 16 13:36:39 2019 +0100
> 
>         Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=62841 poss
>     deadlock
> 
>         Refactor the DeltaRequest serialization to reduce the window during
>         which the DeltaSession is locked and to remove a potential cause of
>         deadlocks during serialization.

<snip/>

> In DeltaManager#serializeDeltaRequest, the session lock has been is
> obtained.
> Do we need to remove it? or replace to deltaRequest.serialize();

You are correct. The deadlock is still going to occur. I think we need
to deprecate serializeDeltaRequest().

> Do you have any plan for applying this for using BackupManager ?
> There are similar codes in AbstractReplicatedMap#replicate.
> Do we need to apply a similar fix to AbstractReplicatedMap#replicate ?

Probably. I'll trace the call hierarchy back from
DeltaRequest.serialize() and ensure nothing is holding the session lock.

Thanks for the review.

Mark

> 
> 
>  
> 
>          // -------------------------------------------------
>     HttpSession Properties
> 
>     @@ -668,6 +688,8 @@ public class DeltaSession extends
>     StandardSession implements Externalizable,Clus
> 
>          public void setAttribute(String name, Object value, boolean
>     notify,boolean addDeltaRequest) {
> 
>     +        log.info <http://log.info>("setAttribute name [" + name +
>     ", value [" + value + "]");
>     +
>              // Name cannot be null
>              if (name == null) throw new
>     
> IllegalArgumentException(sm.getString("standardSession.setAttribute.namenull"));
> 
>     diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
>     index cfd34e2..c08fa7e 100644
>     --- a/webapps/docs/changelog.xml
>     +++ b/webapps/docs/changelog.xml
>     @@ -132,6 +132,12 @@
>        <subsection name="Cluster">
>          <changelog>
>            <fix>
>     +        <bug>62841</bug>: Refactor the <code>DeltaRequest</code>
>     serialization
>     +        to reduce the window during which the
>     <code>DeltaSession</code> is
>     +        locked and to remove a potential cause of deadlocks during
>     +        serialization. (markt)
>     +      </fix>
>     +      <fix>
>              <bug>63441</bug>: Further streamline the processing of
>     session creation
>              messages in the <code>DeltaManager</code> to reduce the
>     possibility of a
>              session update message being processed before the session
>     has been
> 
> 
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
>     <mailto:dev-unsubscr...@tomcat.apache.org>
>     For additional commands, e-mail: dev-h...@tomcat.apache.org
>     <mailto:dev-h...@tomcat.apache.org>
> 
> 
> 
> -- 
> Keiichi.Fujino


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to