Analyse crash report in chrome os - google-chrome-app

I've got a chrome os app crashing regularly and causing all other chrome processes to crash as well.
I'm seeing crash reports in chrome://crashes, but no way to see the details of the report. I also can't find any minidump files to analyse.
What is the way to get crash report internals in chrome os?

Try the solution in this SO post.
root#localhost:-$ mkdir /tmp/misc && chmod 777 /tmp/misc
root#localhost:-$ cd /tmp
root#localhost:-$ watch -n 1 'find . -mmin -1 -exec cp {} /tmp/misc/ \;'
Then, as a regular user (not root):
google-chrome --enable-logging --v=1
Once you see files created by the watch command, run:
root#localhost:-$ ls -l
-rw------- 1 root root 230432 Apr 16 09:06 chromium-renderer-minidump-2113a256de381bce.dmp
-rw------- 1 root root 230264 Apr 16 09:12 chromium-renderer-minidump-95889ebac3d8ac81.dmp
-rw------- 1 root root 231264 Apr 16 09:13 chromium-renderer-minidump-da0752adcba4e7ca.dmp
-rw------- 1 root root 236246 Apr 16 09:12 chromium-upload-56dc27ccc3570a10
-rw------- 1 root root 237247 Apr 16 09:13 chromium-upload-5cebb028232dd944
Now you can use breakpad to work on the *.dmp files.

You need to be in dev mode in order to access the crash reports. There's no way otherwise to access where the crashes are saved (system crashes under /var/spool/crash and browser/user crashes under /home/chronos/*/crash/).
However, if you're using official Chrome OS builds, we don't currently publish the symbols for the binaries, so it'll probably be a bit difficult to debug using those minidumps.

Related

Starting VS Code hangs with "GLIBCXX_3.4.20 not found", Can I point to a libstdc++.so.6 in a non-standard location?

Running RHEL 7.7 on the head node of a compute cluster. When I open VS Code 1.57.1 it hangs on the intro screen. Running with $ code --verbose, it shows the error: /usr/lib64/libstdc++.so.6: version GLIBCXX_3.4.20 not found. I have to kill -9 the hanging code process. Google tells me that the new version of VS Code uses Electron that requires the updated GLIBCXX version.
The installed version in /usr/lib64/libstdc++ is definitely out of date, and I can't update it. But I do have a newer version of GCC that is loaded by the $ module load gcc8/8.4.0 command that loads GCC from /cm/shared/apps/gcc8/8.4.0/. The library /cm/shared/apps/gcc8/8.4.0/lib64/libstdc++.so.6 has the requested version of GLIBCXX.
I have tried loading gcc8 before running code, but that doesn't change the error.
Is there a way to make VS Code use the alternative location for libstdc++.so.6? Is there an alternative to updating the system-wide libstdc++.so.6 library?
This is the full error message from --verbose:
Error: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /usr/share/code/resources/app/node_modules.asar.unpacked/spdlog/build/Release/spdlog.node)
at process.func [as dlopen] (electron/js2c/asar_bundle.js:5:1846)
This shows the out-of-date default version of libstdc++:
$ strings /usr/lib64/libstdc++.so.6 | grep GLIBCXX
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
...
GLIBCXX_3.4.18
GLIBCXX_3.4.19 <----Nope, this version is too old!
GLIBCXX_DEBUG_MESSAGE_LENGTH
This shows the other libstdc++ library has the required version:
$ strings /cm/shared/apps/gcc8/8.4.0/lib64/libstdc++.so.6 | grep GLIBCXX
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
...
GLIBCXX_3.4.19
GLIBCXX_3.4.20 <--- Here it is!
GLIBCXX_3.4.21
...
GLIBCXX_3.4.25
GLIBCXX_DEBUG_MESSAGE_LENGTH
Per scroveez's suggestion, the /usr/lib64/libstdc++.so.6 was indeed a symlink to the older version. To fix it I copied the 'new' version 25 library into /usr/lib64/ and changed the symlink to point to the newer version.
$ ll /usr/lib/libstdc++.so.*
lrwxrwxrwx 1 root root 18 Apr 30 2019 /usr/lib/libstdc++.so.5 -> libstdc++.so.5.0.7
-rwxr-xr-x 1 root root 739520 Nov 13 2014 /usr/lib/libstdc++.so.5.0.7
lrwxrwxrwx 1 root root 19 Jul 6 08:56 /usr/lib/libstdc++.so.6 -> libstdc++.so.6.0.25
-rwxr-xr-x 1 root root 934644 Mar 25 2020 /usr/lib/libstdc++.so.6.0.19
-rwxr-xr-x 1 root root 1570176 Jul 6 08:55 /usr/lib/libstdc++.so.6.0.25
$

Postgresql could not load library

after days of regular fight with postgis I stuck on this:
postgres=# CREATE EXTENSION postgis; ERROR: could not load library
"/usr/pgpro-9.6/lib/rtpostgis-2.4.so": libgdal.so.20: cannot open
shared object file: No such file or directory
and have no idea how to pass it, because library path is correct...
[combat#urpordfinal ~]$ ls -alt /usr/pgpro-9.6/lib/ total 13080
-rwxr-xr-x 1 root root 1440056 Apr 23 11:52 postgis_topology-2.4.so
drwxr-xr-x 5 root root 8192 Apr 23 11:52 .
-rwxr-xr-x 1 root root 1878728 Apr 23 11:52 rtpostgis-2.4.so
I'm running pgsql 9.6.8 and psotgis build from source
You have to make sure that libgdal.so.20 is on the shared library path.
Find out where the library is and add that directory to the shared library path.
On Linux, you would normally do that by adding the directory to /etc/ld.so.conf (or, better, to a PostGIS configuration file in /etc/ld.so.conf.d) and running ldconfig.

Perl: strange behaviour of glob with files greater than 2 GB

I'm simply trying to get a list of filenames given a path with wildcard.
my $path = "/foo/bar/*/*.txt";
my #file_list = glob($path);
foreach $current_file (#file_list) {
print "\n- $current_file";
}
Mostly this works perfectly, but if there's a file greater than 2GB, somewhere in one of the /foo/bar/* subpaths, the glob returns an empty array without any error or warning.
If I remove the file file or add a character/bracket sequence like this:
my $path = "/foo/bar/*[0-9]/*.txt";
or
my $path = "/foo/bar/*1/*.txt";
then the glob works again.
UPDATE:
Here's an example (for a matter of business policy I had to mask the pathname):
[root]/foo/bar # ls -lrt
drwxr-xr-x 2 root system 256 Oct 11 2006 lost+found
drwxr-xr-x 2 root system 256 Dec 27 2007 abc***
drwxr-xr-x 2 root system 256 Nov 12 15:32 cde***
-rw-r--r-- 1 root system 2734193149 Nov 15 05:07 archive1.tar.gz
-rw-r--r-- 1 root system 6913743 Nov 16 05:05 archive2.tar.gz
drwxr-xr-x 2 root system 256 Nov 16 10:00 fgh***
[root]/foo/bar # /home/user/test.pl
[root]/foo/bar #
Removing the >2GB file (or globbing with "/foo/bar/[acf]/" istead of "/foo/bar//")
[root]/foo/bar # ls -lrt
drwxr-xr-x 2 root system 256 Oct 11 2006 lost+found
drwxr-xr-x 2 root system 256 Dec 27 2007 abc***
drwxr-xr-x 2 root system 256 Nov 12 15:32 cde***
-rw-r--r-- 1 root system 6913743 Nov 16 05:05 archive2.tar.gz
drwxr-xr-x 2 root system 256 Nov 16 10:00 fgh***
[root]/foo/bar # /home/user/test.pl
- /foo/bar/abc***/heapdump.phd.gz
- /foo/bar/cde***/javacore.txt.gz
- /foo/bar/fgh***/stuff.txt
[root]/foo/bar #
Any suggestion?
I'm working with:
Perl 5.8.8
Aix 5.3
The filesystem is a local jfs.
In the absence of a proper answer you're going to want a work-around. I'm guessing you've hit some platform-specific bug in the glob() implementation of 5.8.8
I had a quick look at the source on CPAN but my C is too rusty to spot anything useful.
There have been lots of changes to that module though, so a bug may well have been reported and fixed. You're not even on the last release of 5.8 - there's a 5.8.9 out there which mentions updates to AIX compatibility and File::Glob.
I'd test this by installing local::lib if you haven't already and then perhaps cpanm and try updating File::Glob - see what that does. You might need to download the files by hand from e.g. here
If that solves the problem then you can either deploy updates to the required systems, or you'll have to re-implement the bits of glob() you want. Which is going to depend on how complex your patterns get.
If it doesn't solve the problem then at least you'll be able to stick some printf's into the code and see what it's doing.
Hopefully someone will post a real answer and make this redundant about 5 minutes after I click "Post Your Answer" though.
I've never used the new Glob function before, so i cant comment on benefits/problems, but it seems quite a lot of people have had issues using it: see => https://stackoverflow.com/search?q=perl+glob&submit=search for some questions and possible solutions.
IF you don't mind trying out something else:
Here is my tried and tested 'old school' perl solution i have used in countless projects:
my $path = "/foo/bar/";
my #result_array = qx(find $path -iname '*.txt'); #run the system find command
If you - for whatever reason prefer not to run a system command from within your script, then lookup the built in Find::Perl Module instead: http://search.cpan.org/~dom/perl-5.12.5/lib/File/Find.pm
good luck

Regarding Perl DBD::Oracle installation in local directory

I want to connect with the oracle database from a perl script in solaris servier. Able to see DBI is installed but not DBD::Oracle in the current perl version 5.8.4. I dont have root acess and working on my home user id. Download the DBD-Oracle-1.50 and unzipped in the local directory where my perl script exists. I want to copy the DBD Oracle library files into a custom directory and run the script since i dont have root acess. When i read the install script in the DBD-Oracle-1.50 it's says for manuall install i need to run the below scripts . Since i dont have root access i want to copy the library modules into the local directory. Not sure how to tell these scripts to install it in the local directory where my perl script exists.
Does installing DBI and DBD in a custom directory under my user id makes it work properly. Do those modules require root access to work properly? To use DBD::Oracle does oracle needs to be installed in server. My Understanding Oracle driver DBD::Oracle should take care of it.
perl Makefile.PL
make && make test
make install
> ls -tlr /usr/perl5/vendor_perl/5.8.4/sun4-solaris-64int total 956
> -rwxr-xr-x 1 root bin 15161 Mar 26 2005 Roadmap.pod
> -rwxr-xr-x 1 root bin 1048 Sep 5 2006 TASKS.pod
> -rwxr-xr-x 1 root bin 289343 Jun 26 2007 DBI.pm
> -rwxr-xr-x 1 root bin 4608 Jun 12 2008 goferperf.pl
> -rwxr-xr-x 1 root bin 1356 Jun 12 2008 dbixs_rev.pl
> -rwxr-xr-x 1 root bin 58386 Apr 3 2010 SNMP.pm drwxr-xr-x 3 root bin 7 Oct 13 2010 NetSNMP
> drwxr-xr-x 2 root bin 3 Oct 13 2010 Win32 drwxr-xr-x
> 8 root bin 19 Oct 13 2010 DBI drwxr-xr-x 2 root
> bin 4 Oct 13 2010 Bundle drwxr-xr-x 6 root other
> 6 Oct 13 2010 auto drwxr-xr-x 3 root bin 11 Oct 13
> 2010 DBD
>
> ls -ltr /usr/perl5/vendor_perl/5.8.4/sun4-solaris-64int/DBD total 543
> -rwxr-xr-x 1 root bin 111586 May 6 2006 Pg.pm
> -rwxr-xr-x 1 root bin 28785 Sep 27 2006 Proxy.pm
> -rwxr-xr-x 1 root bin 7937 Jan 25 2007 Sponge.pm
> -rwxr-xr-x 1 root bin 42836 Feb 6 2007 DBM.pm
> -rwxr-xr-x 1 root bin 19882 Mar 28 2007 File.pm
> -rwxr-xr-x 1 root bin 12051 May 10 2007 ExampleP.pm
> -rwxr-xr-x 1 root bin 43586 May 14 2007 Gofer.pm
> -rwxr-xr-x 1 root bin 3761 Jun 15 2007 NullP.pm drwxr-xr-x 4 root bin 4 Oct 13 2010 Gofer
If DBI is already installed, you should only need to install DBD::Oracle, though you might want to install a later version of DBI. You can install DBD::Oracle under your home directory, then set the PERL5LIB environment variable to that directory (or to include that directory). The long way to install is:
perl Makefile.PL PREFIX=~/perl #Or whatever sub-directory you like
make
make test
make install
Then include at least "~/perl/lib;~/perl/lib/site_perl" in PERL5LIB before running your programs (or include a 'use lib" in your programs).
You can also set certain environment variables like PERL_MM_OPT and PERL_MB_OPT so that you don't have to specify the PREFIX= on the command line (see docs for ExtUtils::MakeMaker and Module::Build). I also recommend cpanm and setting PERL_CPANM_HOME to something under your home directory.
Perl modules can be very well installed in a custom directory. This situation usually arises when you don't have root access to install the PM. Once you have installed DBI and DBD in your custom folder there are several different ways to make sure that perl is aware of this installation.
1. Set the environment variable PERL5LIB
Perl will look for modules in the directories specified in PERL5LIB environment variable before looking in the standard library and current directory, so you can set this variable to locate your modules.
The syntax is the same you use for the PATH environment variables, so you separate the directories with colons on unix and with a semicolon on Windows.
Example:
# unix, bourne shell
PERL5LIB=/home/path/lib:/usr/another/path/lib; export PERL5LIB
Be aware that scripts running with -T option (taint checks) do not use that variable, so in those cases this option won't work.
2. Use '-I' command line parameter
The syntax should be something like:
perl -I /home/path/lib -I /usr/another/lib script.pl
3. Add the library path in your script
The command for including the path in your script is: use lib "path".
Notice that this statement prepends "path" to the #INC array, so it's basically the same as unshift #INC, "path"
Example:
#!/usr/bin/perl
use lib "/home/path/lib";
use lib "/usr/another/lib";

iOS & XCode 4 Build Setting: Install Directory

When developing iOS apps with XCode, there is a build setting called Install Directory. Does XCode ignore this? I've changed it to /Applications and the app still gets installed in the sandbox. I'm using a jailbroken phone and would like my app to get installed in /Applications for system read privileges. The only other way, it seems, is to use SSH to drop the bundle in /Applications. Doing that forces me to build+archive, thus I can't use the debugger for console output.
Is there a solution to this problem? (I am a paid dev with a proper certificate, no hacks)
This setting is mainly for OSX apps, but I think it may also place the main executable inside that directory inside of the App bundle. So if you had Test.app, the executable binary file would be in Test.app/Applications/test. At least it did that for me a while back when I was messing around with different settings. It may have changed.
You can use the xcode 'Behaviors' settings to specify a script to run when a build succeeds, or you can set 'Pre-build' and 'Post-build' actions (can also run a custom script) for each scheme in your project. You could automate the process of SSH'ing and moving the bundle with a post-build script.
Edit:
I just tested changing this setting and building debug/release/test/etc versions of my project, and nothing changed about the bundle or archive that was build. Seems this setting has no effect on iOS apps.
Actually, after more testing it does change the directory inside a release archive. This is how the archive looks after changing that setting to ApplicationsTest:
[ 12:12 Jonathan#MacBookPro ~/Library/Developer/Xcode/Archives/2011-09-28 ]$ cd Universal\ 9-28-11\ 12.11\ PM.xcarchive/Products/
[ 12:12 Jonathan#MacBookPro ~/Library/Developer/Xcode/Archives/2011-09-28/Universal 9-28-11 12.11 PM.xcarchive/Products ]$ ll
total 0
drwxr-xr-x 3 Jonathan staff 102B Sep 28 12:11 ApplicationsTest
[ 12:12 Jonathan#MacBookPro ~/Library/Developer/Xcode/Archives/2011-09-28/Universal 9-28-11 12.11 PM.xcarchive/Products ]$ ll ApplicationsTest/
total 0
drwxr-xr-x 187 Jonathan staff 6.2K Sep 28 12:11 Universal.app
And changing it to SomethingElse:
[ 12:15 Jonathan#MacBookPro ~/Library/Developer/Xcode/Archives/2011-09-28/Universal 9-28-11 12.15 PM.xcarchive/Products ]$ pwd
/Users/Jonathan/Library/Developer/Xcode/Archives/2011-09-28/Universal 9-28-11 12.15 PM.xcarchive/Products
[ 12:15 Jonathan#MacBookPro ~/Library/Developer/Xcode/Archives/2011-09-28/Universal 9-28-11 12.15 PM.xcarchive/Products ]$ ll
total 0
drwxr-xr-x 3 Jonathan staff 102B Sep 28 12:14 SomethingElse
[ 12:15 Jonathan#MacBookPro ~/Library/Developer/Xcode/Archives/2011-09-28/Universal 9-28-11 12.15 PM.xcarchive/Products ]$ ll SomethingElse/
total 0
drwxr-xr-x 187 Jonathan staff 6.2K Sep 28 12:15 Universal.app