Liu Xiao
2018-07-30 03:15:21 UTC
There is always a crash triggered by CHECK_EQ in
ProfileDestroyer::~ProfileDestroyer when our team run our autotest program
for a long time.
However, as normally used chrome to browse, we find
ProfileDestroyer::~ProfileDestroyer can be not called, and not crash
triggered by it.
I want to kown what is the scene for this crash.
I have got some clues from the code and comment, but I don't kown the
exactly reason.
Could you help me?
https://cs.chromium.org/chromium/src/chrome/browser/profiles/profile_destroyer.cc?q=ProfileDestroyer::~ProfileDestroyer&sq=package:chromium&g=0&l=154
*ProfileDestroyer <https://cs.chromium.org/chromium/src/chrome/browser/profiles/profile_destroyer.h?l=25&ct=xref_jump_to_def&gsn=ProfileDestroyer>::~ProfileDestroyer <https://cs.chromium.org/chromium/src/chrome/browser/profiles/profile_destroyer.cc?l=145&gs=kythe%253A%252F%252Fchromium%253Flang%253Dc%25252B%25252B%253Fpath%253Dsrc%252Fchrome%252Fbrowser%252Fprofiles%252Fprofile_destroyer.cc%253Froot%253Dchromium-android%2523KHaSwwnEsZTjJZieX4vTiHbG0QsY6HfgrVKLXYEai2s%25253D&gsn=~ProfileDestroyer&ct=xref_usages>*() {
// Check again, in case other render hosts were added while we were
// waiting for the previous ones to go away...
if (profile_ <https://cs.chromium.org/chromium/src/chrome/browser/profiles/profile_destroyer.h?l=59&ct=xref_jump_to_def&gsn=profile_>)
DestroyProfileWhenAppropriate <https://cs.chromium.org/chromium/src/chrome/browser/profiles/profile_destroyer.cc?l=33&ct=xref_jump_to_def&gsn=DestroyProfileWhenAppropriate>(profile_ <https://cs.chromium.org/chromium/src/chrome/browser/profiles/profile_destroyer.h?l=59&ct=xref_jump_to_def&gsn=profile_>);
#ifdef NDEBUG
// Don't wait for pending registrations, if any, these hosts are buggy.
// Note: this can happen, but if so, it's better to crash here than wait
// for the host to dereference a deleted Profile. http://crbug.com/248625 <https://www.google.com/url?q=http://crbug.com/248625>
CHECK_EQ(0U, num_hosts_) << "Some render process hosts were not "
<< "destroyed early enough!";
#endif // NDEBUG
DCHECK <https://cs.chromium.org/chromium/src/base/logging.h?l=879&ct=xref_jump_to_def&gsn=DCHECK>(pending_destroyers_ <https://cs.chromium.org/chromium/src/chrome/browser/profiles/profile_destroyer.cc?l=30&ct=xref_jump_to_def&gsn=pending_destroyers_> != NULL <https://cs.chromium.org/chromium/kythe_builtins/include/stddef.h?l=100&ct=xref_jump_to_def&gsn=NULL>);
DestroyerSet <https://cs.chromium.org/chromium/src/chrome/browser/profiles/profile_destroyer.h?l=32&ct=xref_jump_to_def&gsn=DestroyerSet>::iterator <https://cs.chromium.org/chromium/src/third_party/android_ndk/sources/cxx-stl/llvm-libc%2B%2B/include/set?l=427&ct=xref_jump_to_def&gsn=iterator> iter <https://cs.chromium.org/chromium/src/chrome/browser/profiles/profile_destroyer.cc?l=159&gs=kythe%253A%252F%252Fchromium%253Flang%253Dc%25252B%25252B%253Fpath%253Dsrc%252Fchrome%252Fbrowser%252Fprofiles%252Fprofile_destroyer.cc%253Froot%253Dchromium-android%2523fptDPL6Qj913xgEy8W6MCqZKOS%25252Fw3ZhiZPO8j1lFDr0%25253D&gsn=iter&ct=xref_usages> = pending_destroyers_ <https://cs.chromium.org/chromium/src/chrome/browser/profiles/profile_destroyer.cc?l=30&ct=xref_jump_to_def&gsn=pending_destroyers_>->find <https://cs.chromium.org/chromium/src/third_party/android_ndk/sources/cxx-stl/llvm-libc%2B%2B/include/set?l=650&ct=xref_jump_to_def&gsn=find>(this);
DCHECK <https://cs.chromium.org/chromium/src/base/logging.h?l=879&ct=xref_jump_to_def&gsn=DCHECK>(iter <https://cs.chromium.org/chromium/src/chrome/browser/profiles/profile_destroyer.cc?l=159&ct=xref_jump_to_def&gsn=iter> != <https://cs.chromium.org/chromium/src/third_party/android_ndk/sources/cxx-stl/llvm-libc%2B%2B/include/__tree?l=944&ct=xref_jump_to_def&gsn=!%3D> pending_destroyers_ <https://cs.chromium.org/chromium/src/chrome/browser/profiles/profile_destroyer.cc?l=30&ct=xref_jump_to_def&gsn=pending_destroyers_>->end <https://cs.chromium.org/chromium/src/third_party/android_ndk/sources/cxx-stl/llvm-libc%2B%2B/include/set?l=552&ct=xref_jump_to_def&gsn=end>());
pending_destroyers_ <https://cs.chromium.org/chromium/src/chrome/browser/profiles/profile_destroyer.cc?l=30&ct=xref_jump_to_def&gsn=pending_destroyers_>->erase <https://cs.chromium.org/chromium/src/third_party/android_ndk/sources/cxx-stl/llvm-libc%2B%2B/include/set?l=627&ct=xref_jump_to_def&gsn=erase>(iter <https://cs.chromium.org/chromium/src/chrome/browser/profiles/profile_destroyer.cc?l=159&ct=xref_jump_to_def&gsn=iter>);
if (pending_destroyers_ <https://cs.chromium.org/chromium/src/chrome/browser/profiles/profile_destroyer.cc?l=30&ct=xref_jump_to_def&gsn=pending_destroyers_>->empty <https://cs.chromium.org/chromium/src/third_party/android_ndk/sources/cxx-stl/llvm-libc%2B%2B/include/set?l=579&ct=xref_jump_to_def&gsn=empty>()) {
delete pending_destroyers_ <https://cs.chromium.org/chromium/src/chrome/browser/profiles/profile_destroyer.cc?l=30&ct=xref_jump_to_def&gsn=pending_destroyers_>;
pending_destroyers_ <https://cs.chromium.org/chromium/src/chrome/browser/profiles/profile_destroyer.cc?l=30&ct=xref_jump_to_def&gsn=pending_destroyers_> = NULL <https://cs.chromium.org/chromium/kythe_builtins/include/stddef.h?l=100&ct=xref_jump_to_def&gsn=NULL>;
}
}
ProfileDestroyer::~ProfileDestroyer when our team run our autotest program
for a long time.
However, as normally used chrome to browse, we find
ProfileDestroyer::~ProfileDestroyer can be not called, and not crash
triggered by it.
I want to kown what is the scene for this crash.
I have got some clues from the code and comment, but I don't kown the
exactly reason.
Could you help me?
https://cs.chromium.org/chromium/src/chrome/browser/profiles/profile_destroyer.cc?q=ProfileDestroyer::~ProfileDestroyer&sq=package:chromium&g=0&l=154
*ProfileDestroyer <https://cs.chromium.org/chromium/src/chrome/browser/profiles/profile_destroyer.h?l=25&ct=xref_jump_to_def&gsn=ProfileDestroyer>::~ProfileDestroyer <https://cs.chromium.org/chromium/src/chrome/browser/profiles/profile_destroyer.cc?l=145&gs=kythe%253A%252F%252Fchromium%253Flang%253Dc%25252B%25252B%253Fpath%253Dsrc%252Fchrome%252Fbrowser%252Fprofiles%252Fprofile_destroyer.cc%253Froot%253Dchromium-android%2523KHaSwwnEsZTjJZieX4vTiHbG0QsY6HfgrVKLXYEai2s%25253D&gsn=~ProfileDestroyer&ct=xref_usages>*() {
// Check again, in case other render hosts were added while we were
// waiting for the previous ones to go away...
if (profile_ <https://cs.chromium.org/chromium/src/chrome/browser/profiles/profile_destroyer.h?l=59&ct=xref_jump_to_def&gsn=profile_>)
DestroyProfileWhenAppropriate <https://cs.chromium.org/chromium/src/chrome/browser/profiles/profile_destroyer.cc?l=33&ct=xref_jump_to_def&gsn=DestroyProfileWhenAppropriate>(profile_ <https://cs.chromium.org/chromium/src/chrome/browser/profiles/profile_destroyer.h?l=59&ct=xref_jump_to_def&gsn=profile_>);
#ifdef NDEBUG
// Don't wait for pending registrations, if any, these hosts are buggy.
// Note: this can happen, but if so, it's better to crash here than wait
// for the host to dereference a deleted Profile. http://crbug.com/248625 <https://www.google.com/url?q=http://crbug.com/248625>
CHECK_EQ(0U, num_hosts_) << "Some render process hosts were not "
<< "destroyed early enough!";
#endif // NDEBUG
DCHECK <https://cs.chromium.org/chromium/src/base/logging.h?l=879&ct=xref_jump_to_def&gsn=DCHECK>(pending_destroyers_ <https://cs.chromium.org/chromium/src/chrome/browser/profiles/profile_destroyer.cc?l=30&ct=xref_jump_to_def&gsn=pending_destroyers_> != NULL <https://cs.chromium.org/chromium/kythe_builtins/include/stddef.h?l=100&ct=xref_jump_to_def&gsn=NULL>);
DestroyerSet <https://cs.chromium.org/chromium/src/chrome/browser/profiles/profile_destroyer.h?l=32&ct=xref_jump_to_def&gsn=DestroyerSet>::iterator <https://cs.chromium.org/chromium/src/third_party/android_ndk/sources/cxx-stl/llvm-libc%2B%2B/include/set?l=427&ct=xref_jump_to_def&gsn=iterator> iter <https://cs.chromium.org/chromium/src/chrome/browser/profiles/profile_destroyer.cc?l=159&gs=kythe%253A%252F%252Fchromium%253Flang%253Dc%25252B%25252B%253Fpath%253Dsrc%252Fchrome%252Fbrowser%252Fprofiles%252Fprofile_destroyer.cc%253Froot%253Dchromium-android%2523fptDPL6Qj913xgEy8W6MCqZKOS%25252Fw3ZhiZPO8j1lFDr0%25253D&gsn=iter&ct=xref_usages> = pending_destroyers_ <https://cs.chromium.org/chromium/src/chrome/browser/profiles/profile_destroyer.cc?l=30&ct=xref_jump_to_def&gsn=pending_destroyers_>->find <https://cs.chromium.org/chromium/src/third_party/android_ndk/sources/cxx-stl/llvm-libc%2B%2B/include/set?l=650&ct=xref_jump_to_def&gsn=find>(this);
DCHECK <https://cs.chromium.org/chromium/src/base/logging.h?l=879&ct=xref_jump_to_def&gsn=DCHECK>(iter <https://cs.chromium.org/chromium/src/chrome/browser/profiles/profile_destroyer.cc?l=159&ct=xref_jump_to_def&gsn=iter> != <https://cs.chromium.org/chromium/src/third_party/android_ndk/sources/cxx-stl/llvm-libc%2B%2B/include/__tree?l=944&ct=xref_jump_to_def&gsn=!%3D> pending_destroyers_ <https://cs.chromium.org/chromium/src/chrome/browser/profiles/profile_destroyer.cc?l=30&ct=xref_jump_to_def&gsn=pending_destroyers_>->end <https://cs.chromium.org/chromium/src/third_party/android_ndk/sources/cxx-stl/llvm-libc%2B%2B/include/set?l=552&ct=xref_jump_to_def&gsn=end>());
pending_destroyers_ <https://cs.chromium.org/chromium/src/chrome/browser/profiles/profile_destroyer.cc?l=30&ct=xref_jump_to_def&gsn=pending_destroyers_>->erase <https://cs.chromium.org/chromium/src/third_party/android_ndk/sources/cxx-stl/llvm-libc%2B%2B/include/set?l=627&ct=xref_jump_to_def&gsn=erase>(iter <https://cs.chromium.org/chromium/src/chrome/browser/profiles/profile_destroyer.cc?l=159&ct=xref_jump_to_def&gsn=iter>);
if (pending_destroyers_ <https://cs.chromium.org/chromium/src/chrome/browser/profiles/profile_destroyer.cc?l=30&ct=xref_jump_to_def&gsn=pending_destroyers_>->empty <https://cs.chromium.org/chromium/src/third_party/android_ndk/sources/cxx-stl/llvm-libc%2B%2B/include/set?l=579&ct=xref_jump_to_def&gsn=empty>()) {
delete pending_destroyers_ <https://cs.chromium.org/chromium/src/chrome/browser/profiles/profile_destroyer.cc?l=30&ct=xref_jump_to_def&gsn=pending_destroyers_>;
pending_destroyers_ <https://cs.chromium.org/chromium/src/chrome/browser/profiles/profile_destroyer.cc?l=30&ct=xref_jump_to_def&gsn=pending_destroyers_> = NULL <https://cs.chromium.org/chromium/kythe_builtins/include/stddef.h?l=100&ct=xref_jump_to_def&gsn=NULL>;
}
}
--
--
Chromium Discussion mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss
---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+***@chromium.org.
--
Chromium Discussion mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss
---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+***@chromium.org.