(cr) ((6759411...)) rbyers@rbyers-chrome ~/trunk/src/scripts $ armv7a-cros-linux-gnueabi-gdb /build/image-b1045/opt/google/chrome/chromeUnable to lstat() logging checkpoint parent directory: No such file or directory.GNU gdb (Gentoo 7.2 vanilla) 7.2-gg15Copyright (C) 2010 Free Software Foundation, Inc.License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>Type "show copying" and "show warranty" for licensing/warranty details.This GDB was configured as "--host=x86_64-pc-linux-gnu --target=armv7a-cros-linux-gnueabi".Hey, I'm GDB 7.x. Check me out! http://wiki/Main/Gdb7xBFD: /build/image-b1045/opt/google/chrome/chrome: warning: sh_link not set for section `.ARM.exidx'BFD: /build/image-b1045/opt/google/chrome/chrome: warning: sh_link not set for section `.ARM.exidx'Reading symbols from /build/image-b1045/opt/google/chrome/chrome...BFD: /build/image-b1045/opt/google/chrome/chrome.debug: warning: sh_link not set for section `.ARM.exidx'Reading symbols from /build/image-b1045/opt/google/chrome/chrome.debug...done.done.(gdb) set sysroot /build/image-b1045(gdb) target remote 172.23.176.80:1234Remote debugging using 172.23.176.80:12340x40c9ec76 in poll () from /build/image-b1045/lib/libc.so.6(gdb) info share
From To Syms Read Shared Object Library
0x401785a8 0x401ca7f0 Yes /build/image-b1045/usr/lib/libX11.so.60x40008920 0x400090e8 Yes (*) /build/image-b1045/lib/libdl.so.20x400852e8 0x40088d7c Yes /build/image-b1045/usr/lib/libXrender.so.1...
Any ideas?(gdb) bt#0 0x40c9ec76 in poll () from /build/image-b1045/lib/libc.so.6warning: (Internal error: pc 0xa7 in read in psymtab, but not in symtab.)warning: (Internal error: pc 0xa7 in read in psymtab, but not in symtab.)#1 0x000000a8 in ?? (warning: (Internal error: pc 0xa7 in read in psymtab, but not in symtab.)) at /usr/lib/gcc/armv7a-cros-linux-gnueabi/4.4.3/include/g++-v4.4.3/ext/new_allocator.h:86warning: (Internal error: pc 0xa7 in read in psymtab, but not in symtab.)warning: (Internal error: pc 0xa7 in read in psymtab, but not in symtab.)#2 0x000000a8 in ?? (warning: (Internal error: pc 0xa7 in read in psymtab, but not in symtab.)) at /usr/lib/gcc/armv7a-cros-linux-gnueabi/4.4.3/include/g++-v4.4.3/ext/new_allocator.h:86Backtrace stopped: previous frame identical to this frame (corrupt stack?)
Does the chrome for CrOS binary have a .gnu_debuglink? If so, you can
put chrome.debug in the same directory as chrome and gdb should find
it. If not, you can try adding it: objcopy
--add-gnu-debuglink=chrome.debug chrome
#0 BrowserInit::LaunchBrowser (this=0xbef21d08, command_line=..., profile=0x4a006108, cur_dir=..., process_startup=true, return_code=0xbef21d18)at chrome/browser/ui/browser_init.cc:549#1 0x00287772 in operator<< <std::char_traits<char> > (profile=0x4a006108, login_host=0x2b4e848)at /usr/lib/gcc/armv7a-cros-linux-gnueabi/4.4.3/include/g++-v4.4.3/ostream:510#2 chromeos::LoginUtils::DoBrowserLaunch (profile=0x4a006108, login_host=0x2b4e848) at chrome/browser/chromeos/login/login_utils.cc:1126#3 0x00281fa4 in _M_dispose (this=0x2b843e8, profile=<value optimized out>)at /usr/lib/gcc/armv7a-cros-linux-gnueabi/4.4.3/include/g++-v4.4.3/bits/basic_string.h:227#4 ~basic_string (this=0x2b843e8, profile=<value optimized out>) at /usr/lib/gcc/armv7a-cros-linux-gnueabi/4.4.3/include/g++-v4.4.3/bits/basic_string.h:498#5 chromeos::ExistingUserController::OnProfilePrepared (this=0x2b843e8, profile=<value optimized out>)at chrome/browser/chromeos/login/existing_user_controller.cc:419#6 0x002886ea in chromeos::LoginUtilsImpl::OnProfileCreated (this=0x2b936f8, user_profile=0x4a006108, status=<value optimized out>)at chrome/browser/chromeos/login/login_utils.cc:659#7 0x000d8e30 in ProfileManager::OnProfileCreated (this=<value optimized out>, profile=0x4a006108, success=<value optimized out>)at chrome/browser/profiles/profile_manager.cc:407#8 0x0040bda0 in ProfileImpl::DoFinalInit (this=0x4a006108) at chrome/browser/profiles/profile_impl.cc:460#9 0x0040c1aa in ProfileImpl::OnPrefsLoaded (this=0x4a006108, success=<value optimized out>) at chrome/browser/profiles/profile_impl.cc:990#10 0x0040c3e4 in Source (this=0x4a006108, type=<value optimized out>, source=..., details=<value optimized out>) at ./content/common/notification_source.h:46#11 ProfileImpl::Observe (this=0x4a006108, type=<value optimized out>, source=..., details=<value optimized out>)at chrome/browser/profiles/profile_impl.cc:1526#12 0x00c6812c in AsWeakPtr (this=0xbef23a28, type=4244033, source=..., details=<value optimized out>) at ./base/memory/weak_ptr.h:211#13 Iterator (this=0xbef23a28, type=4244033, source=..., details=<value optimized out>) at ./base/observer_list.h:88#14 NotificationService::Notify (this=0xbef23a28, type=4244033, source=..., details=<value optimized out>) at content/common/notification_service.cc:104#15 0x003f1346 in PrefNotifierImpl::OnInitializationCompleted (this=0xbef21d08, succeeded=112) at chrome/browser/prefs/pref_notifier_impl.cc:79#16 0x000c6400 in Release (this=0x4a047f10) at ./base/memory/ref_counted.h:95#17 ~scoped_refptr (this=0x4a047f10) at ./base/memory/ref_counted.h:241#18 PrefValueStore::CheckInitializationCompleted (this=0x4a047f10) at chrome/browser/prefs/pref_value_store.cc:270#19 0x000c6412 in PrefValueStore::CheckInitializationCompleted (this=0x0) at chrome/browser/prefs/pref_value_store.cc:276#20 0xbef23bfc in ?? ()Cannot access memory at address 0x1#21 0xbef23bfc in ?? ()Cannot access memory at address 0x1
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
In the first place, minidump-2 does not appear to be doing a very good
job of translating one format to the
other:
- in the ASCII output of minidump_dump
(/home/satorux/chromeos-debug-info/ascii), we have:
module[30]
MDRawModule
base_of_image = 0x72807000
size_of_image = 0x9f000
...
(code_file) = "/opt/google/chrome/chromeos/libcros.so"
(code_identifier) = "id"
(cv_record).cv_signature = 0x53445352
(cv_record).signature = 75476e6a-ee7a-bb9b-5346-34494f01c1ae
(cv_record).age = 0
(cv_record).pdb_file_name = "libcros.so"
(misc_record) = (null)
(debug_file) = "libcros.so"
(debug_identifier) = "75476E6AEE7ABB9B534634494F01C1AE0"
(version) = ""
But that PATH is not reflected in the core file:
strings -a core2 | grep libcros
/var/lib/breakpad/75476E6A-EE7A-BB9B-5346-34494F01C1AE-libcros.so
That might be the primary cause of GDB no seeing shared libraries.
A second problem seems to be a GDB bug:
gdb -q m//opt/google/chrome/chrome
Reading symbols from
/home/satorux/chromeos-debug-info/m/opt/google/chrome/chrome...done.
WARNING: no debugging symbols found in
/home/satorux/chromeos-debug-info/m/opt/google/chrome/chrome.
A third problem also seems to be a GDB bug:
(gdb) set sysroot m
(gdb) core core
[New Thread 5920]
...
warning: while parsing target library list: no element found
Core was generated by `/opt/google/chrome/chrome
--apps-gallery-title=Web Store --apps-gallery-url=htt'.
#0 0x78ba4780 in ?? () from m/lib/ld-linux.so.2
(gdb)
(gdb) add-symbol-file m/opt/google/chrome/chromeos/libcros.so
0x0001c910+0x72807000
add symbol table from file "m/opt/google/chrome/chromeos/libcros.so" at
.text_addr = 0x72823910
(gdb) bt 2
#0 0x78ba4780 in ?? () from m/lib/ld-linux.so.2
#1 0x7282afa0 in chromeos::CryptohomeSignalFilter(DBusConnection*,
DBusMessage*, void*) ()
(gdb) x/i 0x7282afa0
0x7282afa0
<_ZN8chromeos22CryptohomeSignalFilterEP14DBusConnectionP11DBusMessagePv+176>:
Cannot access memory at address 0x7282afa0
I will try to investigate these further and see if I can find/fix the
problems; it would help if you
could file these officially as bugs.
-- Caroline Tice
cmt...@chromium.org
On Fri, Sep 16, 2011 at 09:48, Caroline Tice <cmt...@google.com> wrote:
strings -a core2 | grep libcros
/var/lib/breakpad/75476E6A-EE7A-BB9B-5346-34494F01C1AE-libcros.so
This is intentional. For a lot of crash dumps, it is highly unlikely that the majority of the user's binaries will be natively installed on the computer of whoever is inspecting the crashes. For instance, it is not at all unlikely, that the developer is running Goobuntu, whereas the user might have been running some version of Fedora.
If you plan on looking at crash files, you need to go to the trouble of collecting the correct libraries that the user had on their system. The verbose output option of minidump-2-core might be helpful. All of these collected libraries should then go into /var/lib/breakpad and the filename must include the file's signature.I had always been planning on writing tools to make this task a little easier. But I have never really gotten around to it. Ideally, we should have script files that can be pointed at the FTP sites for common distributions in order to find all the missing libraries and install them into /var/lib/breakpad. Also, it would be extremely helpful if we could have a server that hosts an authoritative collection of commonly encountered libraries.Markus
I know that you have access to the libraries that Chrome OS uses. But are you actually doing all your development on a Chrome OS machine? Unless that's what you are doing, the your system libraries would still be different from the libraries that were loaded into Chrome, when the crash happened.
Markus
On Fri, Sep 16, 2011 at 11:37, Chris Masone <cma...@chromium.org> wrote:
On Fri, Sep 16, 2011 at 11:33 AM, Markus Gutschke <mar...@chromium.org> wrote:I know that you have access to the libraries that Chrome OS uses. But are you actually doing all your development on a Chrome OS machine? Unless that's what you are doing, the your system libraries would still be different from the libraries that were loaded into Chrome, when the crash happened.But doesn't the "sysroot" mechanism let you point gdb at (essentially) a root file system with all the appropriate libraries? We can do that, and that's what satoru was trying above.
Ah yes, I think that might work. In the majority of cases, where people need to look at crash dumps, having a full Linux distribution that matches the user's system is probably not viable. But I forgot that you guys might actually have a full chroot environment easily accessible.I wouldn't be opposed to a patch to minidump-2-core that optionally retains the original full paths instead of rewriting file names to point to /var/lib/breakpad. This should probably be behind a command line flag, though. Feel free to send me a codereview.
Markus
Yepp, those are typically the symptoms if libraries didn't load correctly or loaded to the wrong address. In that case, "gdb" can't unwind the stack correctly and you'll see funny little mistakes in the stack until "gdb" happens to resynchronize to the correct stack frame. Unfortunately, instead of reporting an actual error condition, "gdb" just does a best effort and silently computes garbage.If the core file contains all the data that "gdb" expects, and if all the correct dynamic libraries were loaded, you should no longer see this problem.It's been a good while since I looked into the debugging API for dynamically loaded code, and unfortunately almost all of it is completely undocumented. The current code in minidump-2-core is the result of reading through kernel, libc, dynamic loader, and gdb sources. When I last tried it, it seemed to fix all of the problems that we previously had with our core files; but it is quite possible that something has regressed since.Markus