You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2010/10/28 04:47:46 UTC
DO NOT REPLY [Bug 50168] New: destory method is called twice while
the child is destoryed directly
https://issues.apache.org/bugzilla/show_bug.cgi?id=50168
Summary: destory method is called twice while the child is
destoryed directly
Product: Tomcat 7
Version: 7.0.4
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: xhhsld@gmail.com
While calling the method destory() on the StandardContext directly, it seems
that the method destoryInternal() is called twice in the LifecycleMBeanBase,
the two stacktraces are below :
a. LifecycleMBeanBase.unregister(ObjectName) line: 191
LifecycleMBeanBase.destroyInternal() line: 73
ContainerBase.destroyInternal() line: 1109
StandardContext.destroyInternal() line: 5114
LifecycleBase.destroy() line: 271
ContainerBase.removeChild(Container) line: 963
ContainerBase.destroyInternal() line: 1106
StandardContext.destroyInternal() line: 5114
LifecycleBase.destroy() line: 271
...
b. LifecycleMBeanBase.unregister(ObjectName) line: 191
LifecycleMBeanBase.destroyInternal() line: 73
ContainerBase.destroyInternal() line: 1109
StandardContext.destroyInternal() line: 5114
LifecycleBase.destroy() line: 271
...
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 50168] destory method is called twice while the
child is destoryed directly
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50168
--- Comment #5 from Tim Funk <fu...@apache.org> 2010-11-02 15:17:10 EDT ---
I don't think the patch works.
What I (think I) notice is StandardWrapperValve being destroyed for each
servlet in the webapp.
By default there is the default servlet and jsp servlet. If you enable ssi and
cgi, I think you will see the call being done 4 times.
Why? TBD.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 50168] destory method is called twice while the
child is destoryed directly
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50168
--- Comment #3 from Ivan <xh...@gmail.com> 2010-11-01 22:08:52 EDT ---
(In reply to comment #1)
> When StandardContext is destroyed is destroys assets is manages which also have
> their own lifecycle. So you might be seeing those log messages. (Most likely
> StandardManager)
>
> Please reopen with more proof if this diagnosis is wrong.
Not sure I understand your comments clearly. From the stack trace, while
destorying the standcontext directly, it will check check whether its parent is
null, if not, it will call the parent.removeChild() method, but removeChild
method also try to destory the child. (As it does not known who calls the
method).
I will reopen the it, and try to attach a patch file.
thanks.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 50168] destory method is called twice while the
child is destoryed directly
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50168
--- Comment #6 from Ivan <xh...@gmail.com> 2010-11-03 22:19:21 EDT ---
(In reply to comment #5)
> I don't think the patch works.
>
> What I (think I) notice is StandardWrapperValve being destroyed for each
> servlet in the webapp.
>
> By default there is the default servlet and jsp servlet. If you enable ssi and
> cgi, I think you will see the call being done 4 times.
>
> Why? TBD.
Hmmm, the problem is not how many times the call is been done, currently, what
I found is that the call is done on the same Context for more than more time.
thanks.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 50168] destory method is called twice while the
child is destoryed directly
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50168
--- Comment #4 from Ivan <xh...@gmail.com> 2010-11-01 22:11:16 EDT ---
Created an attachment (id=26248)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=26248)
Simple patch
Try to provide a patch for it. Might not be proper, but it should be helpful to
find what happens.
Exception for the issue about double destory invocation, also, seems that
Mapper.unregister action occurs before its internal destory (e.g. remove
welcome resources).
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 50168] destory method is called twice while the
child is destoryed directly
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50168
Tim Funk <fu...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
--- Comment #1 from Tim Funk <fu...@apache.org> 2010-11-01 18:08:06 EDT ---
When StandardContext is destroyed is destroys assets is manages which also have
their own lifecycle. So you might be seeing those log messages. (Most likely
StandardManager)
Please reopen with more proof if this diagnosis is wrong.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 50168] destory method is called twice while the
child is destoryed directly
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50168
Pid <bu...@pidster.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|INVALID |
--- Comment #2 from Pid <bu...@pidster.com> 2010-11-01 20:42:06 EDT ---
(In reply to comment #1)
> When StandardContext is destroyed is destroys assets is manages which also have
> their own lifecycle. So you might be seeing those log messages. (Most likely
> StandardManager)
>
> Please reopen with more proof if this diagnosis is wrong.
I'm also seeing this on undeploying any app via the Manager application.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 50168] destory method is called twice while the
child is destoryed directly
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50168
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |FIXED
--- Comment #7 from Mark Thomas <ma...@apache.org> 2010-11-04 19:04:31 EDT ---
Fixed in trunk and will be included in 7.0.5 onwards.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org