You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Dag H. Wanvik (JIRA)" <ji...@apache.org> on 2010/11/09 17:31:11 UTC

[jira] Created: (DERBY-4895) Thread local TableDescriptor#referencedColumnMap is not set to null when connection closes.

Thread local TableDescriptor#referencedColumnMap is not set to null when connection closes.
-------------------------------------------------------------------------------------------

                 Key: DERBY-4895
                 URL: https://issues.apache.org/jira/browse/DERBY-4895
             Project: Derby
          Issue Type: Bug
          Components: SQL
    Affects Versions: 10.6.2.1, 10.6.1.0, 10.5.3.0, 10.5.2.0, 10.5.1.1
            Reporter: Dag H. Wanvik
            Priority: Minor


> This has been seen to cause error messages in TomCat, cf. this quote from a mail on derby-user:
> 
> http://mail-archives.apache.org/mod_mbox/db-derby-user/201011.mbox/%3C7800E37B639BC345BC2AB40980B7C529180FB525@MERCMBX03R.na.SAS.com%3E
> 
> SEVERE: The web application [/MyApp] created a ThreadLocal with key of type [org.apache.derby.iapi.sq\
> l.dictionary.TableDescriptor$1] (value [org.apache.derby.iapi.sql.dictionary.TableDescriptor$1@d133a3])\
>  and a value of type [java.util.WeakHashMap] (value [{={1, 2, 3, 4}, =null, =null}]) but failed to remo\
> ve it when the web application was stopped. This is very likely to create a memory leak.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-4895) Thread local TableDescriptor#referencedColumnMap is not set to null when connection closes.

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12930330#action_12930330 ] 

Dag H. Wanvik commented on DERBY-4895:
--------------------------------------

It seems that we could possibly ignore calls to td.referencedColumnMapPut(null) if there is no lcc yet, I'll run an experiment with an assert. If so, lcc might still be a workable solution. 

> Thread local TableDescriptor#referencedColumnMap is not set to null when connection closes.
> -------------------------------------------------------------------------------------------
>
>                 Key: DERBY-4895
>                 URL: https://issues.apache.org/jira/browse/DERBY-4895
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.5.1.1, 10.5.2.0, 10.5.3.0, 10.6.1.0, 10.6.2.1
>            Reporter: Dag H. Wanvik
>            Priority: Minor
>
> > This has been seen to cause error messages in TomCat, cf. this quote from a mail on derby-user:
> > 
> > http://mail-archives.apache.org/mod_mbox/db-derby-user/201011.mbox/%3C7800E37B639BC345BC2AB40980B7C529180FB525@MERCMBX03R.na.SAS.com%3E
> > 
> > SEVERE: The web application [/MyApp] created a ThreadLocal with key of type [org.apache.derby.iapi.sq\
> > l.dictionary.TableDescriptor$1] (value [org.apache.derby.iapi.sql.dictionary.TableDescriptor$1@d133a3])\
> >  and a value of type [java.util.WeakHashMap] (value [{={1, 2, 3, 4}, =null, =null}]) but failed to remo\
> > ve it when the web application was stopped. This is very likely to create a memory leak.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (DERBY-4895) Thread local TableDescriptor#referencedColumnMap is not set to null when connection closes.

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12930586#action_12930586 ] 

Dag H. Wanvik edited comment on DERBY-4895 at 11/10/10 7:50 AM:
----------------------------------------------------------------

Uploading a patch which replaces the thread local storage of the referencedColumnMap in favor of storing it in the lcc.  This should solve the problem seen by the user.
If several threads use the same connection, they will now share the referencedColumnMap, but the API calls are serialized at the JDBC level, so that's ok.
If a thread uses several connections, there will now be one map per connection, which is ok, too.

Regressions ran ok.


      was (Author: dagw):
    Uploading a patch which replaces the thread local storage of the referenceColumnMap in favor of storing it in the lcc.  This should solve the problem seen by the user.
If several threads use the same connection, they will now share the referenceColumnMap, but they API calls are serialized at the JDBC level, so that's ok.
If a thread uses several connections, there will now be one map per connection, which is ok, too.

Regressions ran ok.

  
> Thread local TableDescriptor#referencedColumnMap is not set to null when connection closes.
> -------------------------------------------------------------------------------------------
>
>                 Key: DERBY-4895
>                 URL: https://issues.apache.org/jira/browse/DERBY-4895
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.5.1.1, 10.5.2.0, 10.5.3.0, 10.6.1.0, 10.6.2.1
>            Reporter: Dag H. Wanvik
>            Assignee: Dag H. Wanvik
>            Priority: Minor
>         Attachments: derby-4895-a.diff, derby-4895-a.stat
>
>
> > This has been seen to cause error messages in TomCat, cf. this quote from a mail on derby-user:
> > 
> > http://mail-archives.apache.org/mod_mbox/db-derby-user/201011.mbox/%3C7800E37B639BC345BC2AB40980B7C529180FB525@MERCMBX03R.na.SAS.com%3E
> > 
> > SEVERE: The web application [/MyApp] created a ThreadLocal with key of type [org.apache.derby.iapi.sq\
> > l.dictionary.TableDescriptor$1] (value [org.apache.derby.iapi.sql.dictionary.TableDescriptor$1@d133a3])\
> >  and a value of type [java.util.WeakHashMap] (value [{={1, 2, 3, 4}, =null, =null}]) but failed to remo\
> > ve it when the web application was stopped. This is very likely to create a memory leak.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-4895) Thread local TableDescriptor#referencedColumnMap is not removed from app threads when Derby is shut down

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4895?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dag H. Wanvik updated DERBY-4895:
---------------------------------

    Issue & fix info: [Patch Available]
             Summary: Thread local TableDescriptor#referencedColumnMap is not removed from app threads when Derby is shut down  (was: Thread local TableDescriptor#referencedColumnMap is not set to null when connection closes.)

> Thread local TableDescriptor#referencedColumnMap is not removed from app threads when Derby is shut down
> --------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-4895
>                 URL: https://issues.apache.org/jira/browse/DERBY-4895
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.5.1.1, 10.5.2.0, 10.5.3.0, 10.6.1.0, 10.6.2.1
>            Reporter: Dag H. Wanvik
>            Assignee: Dag H. Wanvik
>            Priority: Minor
>         Attachments: derby-4895-a.diff, derby-4895-a.stat
>
>
> > This has been seen to cause error messages in TomCat, cf. this quote from a mail on derby-user:
> > 
> > http://mail-archives.apache.org/mod_mbox/db-derby-user/201011.mbox/%3C7800E37B639BC345BC2AB40980B7C529180FB525@MERCMBX03R.na.SAS.com%3E
> > 
> > SEVERE: The web application [/MyApp] created a ThreadLocal with key of type [org.apache.derby.iapi.sq\
> > l.dictionary.TableDescriptor$1] (value [org.apache.derby.iapi.sql.dictionary.TableDescriptor$1@d133a3])\
> >  and a value of type [java.util.WeakHashMap] (value [{={1, 2, 3, 4}, =null, =null}]) but failed to remo\
> > ve it when the web application was stopped. This is very likely to create a memory leak.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-4895) Thread local TableDescriptor#referencedColumnMap is not removed from app threads when Derby is shut down

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12930600#action_12930600 ] 

Knut Anders Hatlen commented on DERBY-4895:
-------------------------------------------

The patch looks good to me. It may be worth adding a comment explaining the assert in referencedColumnMapPut(), though. I tested the patch on Tomcat 7.0.4 and saw that the warning went away when the patch was applied.

> Thread local TableDescriptor#referencedColumnMap is not removed from app threads when Derby is shut down
> --------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-4895
>                 URL: https://issues.apache.org/jira/browse/DERBY-4895
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.5.1.1, 10.5.2.0, 10.5.3.0, 10.6.1.0, 10.6.2.1
>            Reporter: Dag H. Wanvik
>            Assignee: Dag H. Wanvik
>            Priority: Minor
>         Attachments: derby-4895-a.diff, derby-4895-a.stat
>
>
> > This has been seen to cause error messages in TomCat, cf. this quote from a mail on derby-user:
> > 
> > http://mail-archives.apache.org/mod_mbox/db-derby-user/201011.mbox/%3C7800E37B639BC345BC2AB40980B7C529180FB525@MERCMBX03R.na.SAS.com%3E
> > 
> > SEVERE: The web application [/MyApp] created a ThreadLocal with key of type [org.apache.derby.iapi.sq\
> > l.dictionary.TableDescriptor$1] (value [org.apache.derby.iapi.sql.dictionary.TableDescriptor$1@d133a3])\
> >  and a value of type [java.util.WeakHashMap] (value [{={1, 2, 3, 4}, =null, =null}]) but failed to remo\
> > ve it when the web application was stopped. This is very likely to create a memory leak.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (DERBY-4895) Thread local TableDescriptor#referencedColumnMap is not set to null when connection closes.

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4895?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dag H. Wanvik reassigned DERBY-4895:
------------------------------------

    Assignee: Dag H. Wanvik

> Thread local TableDescriptor#referencedColumnMap is not set to null when connection closes.
> -------------------------------------------------------------------------------------------
>
>                 Key: DERBY-4895
>                 URL: https://issues.apache.org/jira/browse/DERBY-4895
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.5.1.1, 10.5.2.0, 10.5.3.0, 10.6.1.0, 10.6.2.1
>            Reporter: Dag H. Wanvik
>            Assignee: Dag H. Wanvik
>            Priority: Minor
>         Attachments: derby-4895-a.diff, derby-4895-a.stat
>
>
> > This has been seen to cause error messages in TomCat, cf. this quote from a mail on derby-user:
> > 
> > http://mail-archives.apache.org/mod_mbox/db-derby-user/201011.mbox/%3C7800E37B639BC345BC2AB40980B7C529180FB525@MERCMBX03R.na.SAS.com%3E
> > 
> > SEVERE: The web application [/MyApp] created a ThreadLocal with key of type [org.apache.derby.iapi.sq\
> > l.dictionary.TableDescriptor$1] (value [org.apache.derby.iapi.sql.dictionary.TableDescriptor$1@d133a3])\
> >  and a value of type [java.util.WeakHashMap] (value [{={1, 2, 3, 4}, =null, =null}]) but failed to remo\
> > ve it when the web application was stopped. This is very likely to create a memory leak.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-4895) Thread local TableDescriptor#referencedColumnMap is not set to null when connection closes.

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12930282#action_12930282 ] 

Dag H. Wanvik commented on DERBY-4895:
--------------------------------------

Sadly, the lcc isn't necessarily available, cf this assert on finding an lcc from context:

Caused by: org.apache.derby.shared.common.sanity.AssertFailure: ASSERT FAILED
	at org.apache.derby.shared.common.sanity.SanityManager.ASSERT(SanityManager.java:98)
	at org.apache.derby.iapi.sql.dictionary.TableDescriptor.referencedColumnMapPut(TableDescriptor.java:144)
	at org.apache.derby.iapi.sql.dictionary.TableDescriptor.setReferencedColumnMap(TableDescriptor.java:375)
	at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getTableDescriptor(DataDictionaryImpl.java:2034)
	at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.faultInTabInfo(DataDictionaryImpl.java:9062)
	at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getNonCoreTI(DataDictionaryImpl.java:8865)
	at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.addDescriptor(DataDictionaryImpl.java:1840)
	at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.createSystemProcedureOrFunction(DataDictionaryImpl.java:9823)
	at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.createSystemProcedureOrFunction(DataDictionaryImpl.java:9879)
	at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.create_SYSIBM_procedures(DataDictionaryImpl.java:10584)
	at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.boot(DataDictionaryImpl.java:737)
	at org.apache.derby.impl.services.monitor.BaseMonitor.boot(BaseMonitor.java:1979)
	at org.apache.derby.impl.services.monitor.TopService.bootModule(TopService.java:333)
	at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(BaseMonitor.java:531)
	at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Monitor.java:427)
	at org.apache.derby.impl.db.BasicDatabase.boot(BasicDatabase.java:211)
	at org.apache.derby.impl.services.monitor.BaseMonitor.boot(BaseMonitor.java:1979)
	at org.apache.derby.impl.services.monitor.TopService.bootModule(TopService.java:333)
	at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(BaseMonitor.java:1816)
	at org.apache.derby.impl.services.monitor.BaseMonitor.createPersistentService(BaseMonitor.java:1002)
	at org.apache.derby.iapi.services.monitor.Monitor.createPersistentService(Monitor.java:596)
	at org.apache.derby.impl.jdbc.EmbedConnection.createDatabase(EmbedConnection.java:2528)


> Thread local TableDescriptor#referencedColumnMap is not set to null when connection closes.
> -------------------------------------------------------------------------------------------
>
>                 Key: DERBY-4895
>                 URL: https://issues.apache.org/jira/browse/DERBY-4895
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.5.1.1, 10.5.2.0, 10.5.3.0, 10.6.1.0, 10.6.2.1
>            Reporter: Dag H. Wanvik
>            Priority: Minor
>
> > This has been seen to cause error messages in TomCat, cf. this quote from a mail on derby-user:
> > 
> > http://mail-archives.apache.org/mod_mbox/db-derby-user/201011.mbox/%3C7800E37B639BC345BC2AB40980B7C529180FB525@MERCMBX03R.na.SAS.com%3E
> > 
> > SEVERE: The web application [/MyApp] created a ThreadLocal with key of type [org.apache.derby.iapi.sq\
> > l.dictionary.TableDescriptor$1] (value [org.apache.derby.iapi.sql.dictionary.TableDescriptor$1@d133a3])\
> >  and a value of type [java.util.WeakHashMap] (value [{={1, 2, 3, 4}, =null, =null}]) but failed to remo\
> > ve it when the web application was stopped. This is very likely to create a memory leak.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-4895) Thread local TableDescriptor#referencedColumnMap is not removed from app threads when Derby is shut down

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12930605#action_12930605 ] 

Dag H. Wanvik commented on DERBY-4895:
--------------------------------------

Thanks for the review, Knut. I added a comment in the commit as you suggested.


> Thread local TableDescriptor#referencedColumnMap is not removed from app threads when Derby is shut down
> --------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-4895
>                 URL: https://issues.apache.org/jira/browse/DERBY-4895
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.5.1.1, 10.5.2.0, 10.5.3.0, 10.6.1.0, 10.6.2.1
>            Reporter: Dag H. Wanvik
>            Assignee: Dag H. Wanvik
>            Priority: Minor
>             Fix For: 10.7.1.0
>
>         Attachments: derby-4895-a.diff, derby-4895-a.stat
>
>
> > This has been seen to cause error messages in TomCat, cf. this quote from a mail on derby-user:
> > 
> > http://mail-archives.apache.org/mod_mbox/db-derby-user/201011.mbox/%3C7800E37B639BC345BC2AB40980B7C529180FB525@MERCMBX03R.na.SAS.com%3E
> > 
> > SEVERE: The web application [/MyApp] created a ThreadLocal with key of type [org.apache.derby.iapi.sq\
> > l.dictionary.TableDescriptor$1] (value [org.apache.derby.iapi.sql.dictionary.TableDescriptor$1@d133a3])\
> >  and a value of type [java.util.WeakHashMap] (value [{={1, 2, 3, 4}, =null, =null}]) but failed to remo\
> > ve it when the web application was stopped. This is very likely to create a memory leak.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-4895) Thread local TableDescriptor#referencedColumnMap is not removed from app threads when Derby is shut down

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4895?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden updated DERBY-4895:
----------------------------------

    Attachment: DERBY-4895_10_5_diff.txt

Here is the 10.5 patch. Again some manual merge even merging from 10.6. Running tests now.

> Thread local TableDescriptor#referencedColumnMap is not removed from app threads when Derby is shut down
> --------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-4895
>                 URL: https://issues.apache.org/jira/browse/DERBY-4895
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.5.1.1, 10.5.2.0, 10.5.3.0, 10.6.1.0, 10.6.2.1
>            Reporter: Dag H. Wanvik
>            Assignee: Kathey Marsden
>            Priority: Minor
>             Fix For: 10.7.1.1
>
>         Attachments: DERBY-4895_10_5_diff.txt, derby-4895-a.diff, derby-4895-a.stat, derby-4895_10_6_diff.txt
>
>
> > This has been seen to cause error messages in TomCat, cf. this quote from a mail on derby-user:
> > 
> > http://mail-archives.apache.org/mod_mbox/db-derby-user/201011.mbox/%3C7800E37B639BC345BC2AB40980B7C529180FB525@MERCMBX03R.na.SAS.com%3E
> > 
> > SEVERE: The web application [/MyApp] created a ThreadLocal with key of type [org.apache.derby.iapi.sq\
> > l.dictionary.TableDescriptor$1] (value [org.apache.derby.iapi.sql.dictionary.TableDescriptor$1@d133a3])\
> >  and a value of type [java.util.WeakHashMap] (value [{={1, 2, 3, 4}, =null, =null}]) but failed to remo\
> > ve it when the web application was stopped. This is very likely to create a memory leak.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DERBY-4895) Thread local TableDescriptor#referencedColumnMap is not set to null when connection closes.

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12930185#action_12930185 ] 

Dag H. Wanvik commented on DERBY-4895:
--------------------------------------

Talked to Knut about this, we may possibly be able to move this map into lcc and avoid the thread local altogether.

> Thread local TableDescriptor#referencedColumnMap is not set to null when connection closes.
> -------------------------------------------------------------------------------------------
>
>                 Key: DERBY-4895
>                 URL: https://issues.apache.org/jira/browse/DERBY-4895
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.5.1.1, 10.5.2.0, 10.5.3.0, 10.6.1.0, 10.6.2.1
>            Reporter: Dag H. Wanvik
>            Priority: Minor
>
> > This has been seen to cause error messages in TomCat, cf. this quote from a mail on derby-user:
> > 
> > http://mail-archives.apache.org/mod_mbox/db-derby-user/201011.mbox/%3C7800E37B639BC345BC2AB40980B7C529180FB525@MERCMBX03R.na.SAS.com%3E
> > 
> > SEVERE: The web application [/MyApp] created a ThreadLocal with key of type [org.apache.derby.iapi.sq\
> > l.dictionary.TableDescriptor$1] (value [org.apache.derby.iapi.sql.dictionary.TableDescriptor$1@d133a3])\
> >  and a value of type [java.util.WeakHashMap] (value [{={1, 2, 3, 4}, =null, =null}]) but failed to remo\
> > ve it when the web application was stopped. This is very likely to create a memory leak.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-4895) Thread local TableDescriptor#referencedColumnMap is not removed from app threads when Derby is shut down

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4895?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden updated DERBY-4895:
----------------------------------

    Attachment: derby-4895_10_6_diff.txt

This one required some manual merge back to 10.6. Diff attached derby-4895_10_6_diff.txt


> Thread local TableDescriptor#referencedColumnMap is not removed from app threads when Derby is shut down
> --------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-4895
>                 URL: https://issues.apache.org/jira/browse/DERBY-4895
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.5.1.1, 10.5.2.0, 10.5.3.0, 10.6.1.0, 10.6.2.1
>            Reporter: Dag H. Wanvik
>            Assignee: Kathey Marsden
>            Priority: Minor
>             Fix For: 10.7.1.1
>
>         Attachments: derby-4895-a.diff, derby-4895-a.stat, derby-4895_10_6_diff.txt
>
>
> > This has been seen to cause error messages in TomCat, cf. this quote from a mail on derby-user:
> > 
> > http://mail-archives.apache.org/mod_mbox/db-derby-user/201011.mbox/%3C7800E37B639BC345BC2AB40980B7C529180FB525@MERCMBX03R.na.SAS.com%3E
> > 
> > SEVERE: The web application [/MyApp] created a ThreadLocal with key of type [org.apache.derby.iapi.sq\
> > l.dictionary.TableDescriptor$1] (value [org.apache.derby.iapi.sql.dictionary.TableDescriptor$1@d133a3])\
> >  and a value of type [java.util.WeakHashMap] (value [{={1, 2, 3, 4}, =null, =null}]) but failed to remo\
> > ve it when the web application was stopped. This is very likely to create a memory leak.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-4895) Thread local TableDescriptor#referencedColumnMap is not set to null when connection closes.

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4895?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dag H. Wanvik updated DERBY-4895:
---------------------------------

    Attachment: derby-4895-a.stat
                derby-4895-a.diff

Uploading a patch which replaces the thread local storage of the referenceColumnMap in favor of storing it in the lcc.  This should solve the problem seen by the user.
If several threads use the same connection, they will now share the referenceColumnMap, but they API calls are serialized at the JDBC level, so that's ok.
If a thread uses several connections, there will now be one map per connection, which is ok, too.

Regressions ran ok.


> Thread local TableDescriptor#referencedColumnMap is not set to null when connection closes.
> -------------------------------------------------------------------------------------------
>
>                 Key: DERBY-4895
>                 URL: https://issues.apache.org/jira/browse/DERBY-4895
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.5.1.1, 10.5.2.0, 10.5.3.0, 10.6.1.0, 10.6.2.1
>            Reporter: Dag H. Wanvik
>            Priority: Minor
>         Attachments: derby-4895-a.diff, derby-4895-a.stat
>
>
> > This has been seen to cause error messages in TomCat, cf. this quote from a mail on derby-user:
> > 
> > http://mail-archives.apache.org/mod_mbox/db-derby-user/201011.mbox/%3C7800E37B639BC345BC2AB40980B7C529180FB525@MERCMBX03R.na.SAS.com%3E
> > 
> > SEVERE: The web application [/MyApp] created a ThreadLocal with key of type [org.apache.derby.iapi.sq\
> > l.dictionary.TableDescriptor$1] (value [org.apache.derby.iapi.sql.dictionary.TableDescriptor$1@d133a3])\
> >  and a value of type [java.util.WeakHashMap] (value [{={1, 2, 3, 4}, =null, =null}]) but failed to remo\
> > ve it when the web application was stopped. This is very likely to create a memory leak.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (DERBY-4895) Thread local TableDescriptor#referencedColumnMap is not removed from app threads when Derby is shut down

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4895?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden closed DERBY-4895.
---------------------------------

       Resolution: Fixed
    Fix Version/s: 10.6.2.3
                   10.5.3.2
         Assignee: Dag H. Wanvik  (was: Kathey Marsden)

Ported fix to 10.6 and 10.5, reclosing issue.

> Thread local TableDescriptor#referencedColumnMap is not removed from app threads when Derby is shut down
> --------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-4895
>                 URL: https://issues.apache.org/jira/browse/DERBY-4895
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.5.1.1, 10.5.2.0, 10.5.3.0, 10.6.1.0, 10.6.2.1
>            Reporter: Dag H. Wanvik
>            Assignee: Dag H. Wanvik
>            Priority: Minor
>             Fix For: 10.5.3.2, 10.6.2.3, 10.7.1.1
>
>         Attachments: DERBY-4895_10_5_diff.txt, derby-4895-a.diff, derby-4895-a.stat, derby-4895_10_6_diff.txt
>
>
> > This has been seen to cause error messages in TomCat, cf. this quote from a mail on derby-user:
> > 
> > http://mail-archives.apache.org/mod_mbox/db-derby-user/201011.mbox/%3C7800E37B639BC345BC2AB40980B7C529180FB525@MERCMBX03R.na.SAS.com%3E
> > 
> > SEVERE: The web application [/MyApp] created a ThreadLocal with key of type [org.apache.derby.iapi.sq\
> > l.dictionary.TableDescriptor$1] (value [org.apache.derby.iapi.sql.dictionary.TableDescriptor$1@d133a3])\
> >  and a value of type [java.util.WeakHashMap] (value [{={1, 2, 3, 4}, =null, =null}]) but failed to remo\
> > ve it when the web application was stopped. This is very likely to create a memory leak.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (DERBY-4895) Thread local TableDescriptor#referencedColumnMap is not removed from app threads when Derby is shut down

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4895?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dag H. Wanvik closed DERBY-4895.
--------------------------------

    Resolution: Fixed

Closing, committed as svn 1033485. Candidate for back-port.

> Thread local TableDescriptor#referencedColumnMap is not removed from app threads when Derby is shut down
> --------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-4895
>                 URL: https://issues.apache.org/jira/browse/DERBY-4895
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.5.1.1, 10.5.2.0, 10.5.3.0, 10.6.1.0, 10.6.2.1
>            Reporter: Dag H. Wanvik
>            Assignee: Dag H. Wanvik
>            Priority: Minor
>         Attachments: derby-4895-a.diff, derby-4895-a.stat
>
>
> > This has been seen to cause error messages in TomCat, cf. this quote from a mail on derby-user:
> > 
> > http://mail-archives.apache.org/mod_mbox/db-derby-user/201011.mbox/%3C7800E37B639BC345BC2AB40980B7C529180FB525@MERCMBX03R.na.SAS.com%3E
> > 
> > SEVERE: The web application [/MyApp] created a ThreadLocal with key of type [org.apache.derby.iapi.sq\
> > l.dictionary.TableDescriptor$1] (value [org.apache.derby.iapi.sql.dictionary.TableDescriptor$1@d133a3])\
> >  and a value of type [java.util.WeakHashMap] (value [{={1, 2, 3, 4}, =null, =null}]) but failed to remo\
> > ve it when the web application was stopped. This is very likely to create a memory leak.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-4895) Thread local TableDescriptor#referencedColumnMap is not removed from app threads when Derby is shut down

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4895?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dag H. Wanvik updated DERBY-4895:
---------------------------------

    Issue & fix info:   (was: [Patch Available])
       Fix Version/s: 10.7.1.0

> Thread local TableDescriptor#referencedColumnMap is not removed from app threads when Derby is shut down
> --------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-4895
>                 URL: https://issues.apache.org/jira/browse/DERBY-4895
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.5.1.1, 10.5.2.0, 10.5.3.0, 10.6.1.0, 10.6.2.1
>            Reporter: Dag H. Wanvik
>            Assignee: Dag H. Wanvik
>            Priority: Minor
>             Fix For: 10.7.1.0
>
>         Attachments: derby-4895-a.diff, derby-4895-a.stat
>
>
> > This has been seen to cause error messages in TomCat, cf. this quote from a mail on derby-user:
> > 
> > http://mail-archives.apache.org/mod_mbox/db-derby-user/201011.mbox/%3C7800E37B639BC345BC2AB40980B7C529180FB525@MERCMBX03R.na.SAS.com%3E
> > 
> > SEVERE: The web application [/MyApp] created a ThreadLocal with key of type [org.apache.derby.iapi.sq\
> > l.dictionary.TableDescriptor$1] (value [org.apache.derby.iapi.sql.dictionary.TableDescriptor$1@d133a3])\
> >  and a value of type [java.util.WeakHashMap] (value [{={1, 2, 3, 4}, =null, =null}]) but failed to remo\
> > ve it when the web application was stopped. This is very likely to create a memory leak.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (DERBY-4895) Thread local TableDescriptor#referencedColumnMap is not removed from app threads when Derby is shut down

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4895?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden reassigned DERBY-4895:
-------------------------------------

    Assignee: Kathey Marsden  (was: Dag H. Wanvik)

Assigning to myself temporarily for port to 10.5


> Thread local TableDescriptor#referencedColumnMap is not removed from app threads when Derby is shut down
> --------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-4895
>                 URL: https://issues.apache.org/jira/browse/DERBY-4895
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.5.1.1, 10.5.2.0, 10.5.3.0, 10.6.1.0, 10.6.2.1
>            Reporter: Dag H. Wanvik
>            Assignee: Kathey Marsden
>            Priority: Minor
>             Fix For: 10.7.1.1
>
>         Attachments: derby-4895-a.diff, derby-4895-a.stat
>
>
> > This has been seen to cause error messages in TomCat, cf. this quote from a mail on derby-user:
> > 
> > http://mail-archives.apache.org/mod_mbox/db-derby-user/201011.mbox/%3C7800E37B639BC345BC2AB40980B7C529180FB525@MERCMBX03R.na.SAS.com%3E
> > 
> > SEVERE: The web application [/MyApp] created a ThreadLocal with key of type [org.apache.derby.iapi.sq\
> > l.dictionary.TableDescriptor$1] (value [org.apache.derby.iapi.sql.dictionary.TableDescriptor$1@d133a3])\
> >  and a value of type [java.util.WeakHashMap] (value [{={1, 2, 3, 4}, =null, =null}]) but failed to remo\
> > ve it when the web application was stopped. This is very likely to create a memory leak.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Reopened: (DERBY-4895) Thread local TableDescriptor#referencedColumnMap is not removed from app threads when Derby is shut down

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4895?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden reopened DERBY-4895:
-----------------------------------


Reopen for backport

> Thread local TableDescriptor#referencedColumnMap is not removed from app threads when Derby is shut down
> --------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-4895
>                 URL: https://issues.apache.org/jira/browse/DERBY-4895
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.5.1.1, 10.5.2.0, 10.5.3.0, 10.6.1.0, 10.6.2.1
>            Reporter: Dag H. Wanvik
>            Assignee: Dag H. Wanvik
>            Priority: Minor
>             Fix For: 10.7.1.1
>
>         Attachments: derby-4895-a.diff, derby-4895-a.stat
>
>
> > This has been seen to cause error messages in TomCat, cf. this quote from a mail on derby-user:
> > 
> > http://mail-archives.apache.org/mod_mbox/db-derby-user/201011.mbox/%3C7800E37B639BC345BC2AB40980B7C529180FB525@MERCMBX03R.na.SAS.com%3E
> > 
> > SEVERE: The web application [/MyApp] created a ThreadLocal with key of type [org.apache.derby.iapi.sq\
> > l.dictionary.TableDescriptor$1] (value [org.apache.derby.iapi.sql.dictionary.TableDescriptor$1@d133a3])\
> >  and a value of type [java.util.WeakHashMap] (value [{={1, 2, 3, 4}, =null, =null}]) but failed to remo\
> > ve it when the web application was stopped. This is very likely to create a memory leak.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira