Typical local log now. Note the xpcom-will-shutdown notification at the top. ``` 1:43.17 GECKO(195723) 1605327166749 Marionette TRACE Received observer notification xpcom-will-shutdown 1:43.17 GECKO(195723) 1605327166750 Marionette INFO Stopped listening on port 2828 1:43.17 GECKO(195723) 1605327166751 Marionette DEBUG Marionette stopped listening 1:43.17 GECKO(195723) [195723, Main Thread] WARNING: NS_ENSURE_TRUE(!mHasOrHasHadOwnerWindow || mOwnerWindow) failed: file /NEW-SSD/NREF-COMM-CENTRAL/mozilla/dom/events/DOMEventTargetHelper.cpp:291 1:43.17 GECKO(195723) [195723, Main Thread] WARNING: NS_ENSURE_TRUE(!mHasOrHasHadOwnerWindow || mOwnerWindow) failed: file /NEW-SSD/NREF-COMM-CENTRAL/mozilla/dom/events/DOMEventTargetHelper.cpp:291 1:43.17 GECKO(195723) ~nsMsgDatabase(): closing database /COMM-CENTRAL/TMP-DIR/tmp219v2et6.mozrunner/Mail/Local Folders/Sample.msf 1:43.17 GECKO(195723) Not calling RemoveFromCache(this), this = 0x6140002a0c40 1:43.17 GECKO(195723) [195723, Main Thread] WARNING: some msg dbs left open: '!m_dbCache.Length()', file /NEW-SSD/NREF-COMM-CENTRAL/mozilla/comm/mailnews/db/msgdb/src/nsMsgDatabase.cpp:80 1:43.17 GECKO(195723) db left open pMessageDB=0x6140002a0c40, ================================================================= 1:43.17 GECKO(195723) ==195723==ERROR: AddressSanitizer: heap-use-after-free on address 0x6140002a0cc8 at pc 0x7fa55eb6c3c3 bp 0x7ffe11136550 sp 0x7ffe11136548 1:43.17 GECKO(195723) READ of size 8 at 0x6140002a0cc8 thread T0 1:43.17 GECKO(195723) error: address range table at offset 0xd50 has an invalid tuple (length = 0) at offset 0xd60 1:43.17 GECKO(195723) ==195723==ERROR: AddressSanitizer: heap-use-after-free on address 0x6140002a0cc8 at pc 0x7fa55eb6c3c3 bp 0x7ffe11136550 sp 0x7ffe11136548 1:43.17 GECKO(195723) #0 0x7fa55eb6c3c2 in get /NEW-SSD/ASAN-OBJ-DIR/objdir-tb3/dist/include/nsCOMPtr.h:856:48 1:43.17 GECKO(195723) #1 0x7fa55eb6c3c2 in operator nsIFile * /NEW-SSD/ASAN-OBJ-DIR/objdir-tb3/dist/include/nsCOMPtr.h:864:33 1:43.17 GECKO(195723) #2 0x7fa55eb6c3c2 in nsMsgDBService::~nsMsgDBService() /NEW-SSD/NREF-COMM-CENTRAL/mozilla/comm/mailnews/db/msgdb/src/nsMsgDatabase.cpp:94:43 1:43.17 GECKO(195723) #3 0x7fa55eb6bc88 in nsMsgDBService::Release() /NEW-SSD/NREF-COMM-CENTRAL/mozilla/comm/mailnews/db/msgdb/src/nsMsgDatabase.cpp:72:1 ``` 1:43.17 GECKO(195723) Not calling RemoveFromCache(this), this = 0x6140002a0c40 This means that pointer to the to-be-released structure remains in m_dbCache. Sure enough this pointer is referenced in ~nsMsgDBService::~nsMsgDBService(). So we may want to remove this pointer from the cache somehow. I wonder how. That will remove this pesky warning that has bothered me for a long time. ``` 1:43.17 GECKO(195723) [195723, Main Thread] WARNING: some msg dbs left open: '!m_dbCache.Length()', file /NEW-SSD/NREF-COMM-CENTRAL/mozilla/comm/mailnews/db/msgdb/src/nsMsgDatabase.cpp:80 ```
Bug 1677202 Comment 6 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
Typical local log now. Note the xpcom-will-shutdown notification at the top. ``` 1:43.17 GECKO(195723) 1605327166749 Marionette TRACE Received observer notification xpcom-will-shutdown 1:43.17 GECKO(195723) 1605327166750 Marionette INFO Stopped listening on port 2828 1:43.17 GECKO(195723) 1605327166751 Marionette DEBUG Marionette stopped listening 1:43.17 GECKO(195723) [195723, Main Thread] WARNING: NS_ENSURE_TRUE(!mHasOrHasHadOwnerWindow || mOwnerWindow) failed: file /NEW-SSD/NREF-COMM-CENTRAL/mozilla/dom/events/DOMEventTargetHelper.cpp:291 1:43.17 GECKO(195723) [195723, Main Thread] WARNING: NS_ENSURE_TRUE(!mHasOrHasHadOwnerWindow || mOwnerWindow) failed: file /NEW-SSD/NREF-COMM-CENTRAL/mozilla/dom/events/DOMEventTargetHelper.cpp:291 1:43.17 GECKO(195723) ~nsMsgDatabase(): closing database /COMM-CENTRAL/TMP-DIR/tmp219v2et6.mozrunner/Mail/Local Folders/Sample.msf 1:43.17 GECKO(195723) Not calling RemoveFromCache(this), this = 0x6140002a0c40 1:43.17 GECKO(195723) [195723, Main Thread] WARNING: some msg dbs left open: '!m_dbCache.Length()', file /NEW-SSD/NREF-COMM-CENTRAL/mozilla/comm/mailnews/db/msgdb/src/nsMsgDatabase.cpp:80 1:43.17 GECKO(195723) db left open pMessageDB=0x6140002a0c40, ================================================================= 1:43.17 GECKO(195723) ==195723==ERROR: AddressSanitizer: heap-use-after-free on address 0x6140002a0cc8 at pc 0x7fa55eb6c3c3 bp 0x7ffe11136550 sp 0x7ffe11136548 1:43.17 GECKO(195723) READ of size 8 at 0x6140002a0cc8 thread T0 1:43.17 GECKO(195723) error: address range table at offset 0xd50 has an invalid tuple (length = 0) at offset 0xd60 1:43.17 GECKO(195723) ==195723==ERROR: AddressSanitizer: heap-use-after-free on address 0x6140002a0cc8 at pc 0x7fa55eb6c3c3 bp 0x7ffe11136550 sp 0x7ffe11136548 1:43.17 GECKO(195723) #0 0x7fa55eb6c3c2 in get /NEW-SSD/ASAN-OBJ-DIR/objdir-tb3/dist/include/nsCOMPtr.h:856:48 1:43.17 GECKO(195723) #1 0x7fa55eb6c3c2 in operator nsIFile * /NEW-SSD/ASAN-OBJ-DIR/objdir-tb3/dist/include/nsCOMPtr.h:864:33 1:43.17 GECKO(195723) #2 0x7fa55eb6c3c2 in nsMsgDBService::~nsMsgDBService() /NEW-SSD/NREF-COMM-CENTRAL/mozilla/comm/mailnews/db/msgdb/src/nsMsgDatabase.cpp:94:43 1:43.17 GECKO(195723) #3 0x7fa55eb6bc88 in nsMsgDBService::Release() /NEW-SSD/NREF-COMM-CENTRAL/mozilla/comm/mailnews/db/msgdb/src/nsMsgDatabase.cpp:72:1 ``` 1:43.17 GECKO(195723) Not calling RemoveFromCache(this), this = 0x6140002a0c40 This means that pointer to the to-be-released structure remains in m_dbCache. Sure enough this pointer is referenced in nsMsgDBService::~nsMsgDBService(). So we may want to remove this pointer from the cache somehow. I wonder how. That will remove this pesky warning that has bothered me for a long time. ``` 1:43.17 GECKO(195723) [195723, Main Thread] WARNING: some msg dbs left open: '!m_dbCache.Length()', file /NEW-SSD/NREF-COMM-CENTRAL/mozilla/comm/mailnews/db/msgdb/src/nsMsgDatabase.cpp:80 ```