Bug#945920: Random Chromium crashes

2020-01-13 Thread Jaap Joris Vens

Hi all,

The status so far is that we have a patch that solves the problem by
re-enabling [tracing][1], but the reason that tracing was disabled in the
first place is because it depends on minified javascript. You can recompile
chromium yourself but this is not a permanent solution.

It seems that nobody has started the effort of trying to write a new patch
that removes the tracing functionality from the upstream source code, or to
find the bug and fix the way it's removed now.

Dear maintainer, could you please chime in and let us know how we could
help?

Greetings,
JJ

[1]: https://www.chromium.org/developers/how-tos/trace-event-profiling-tool

On Mon, Jan 13, 2020 at 09:52:36AM -0500, Джонатан Вашингтон wrote:

Dear package maintainer(s),

In case it is useful information, this issue affects me as well, and
has for several weeks.  Chromium is usable for only a few minutes
before it crashes with a backtrace almost identical to those already
shared.  It does not seem to matter how many or what kind of pages are
open, or whether the browser is actively being used / receiving window
manager focus or not.

Please let me know if there is anything I can do to help identify the
problem or test a fix.

--
Jonathan

--
To unsubscribe, send mail to 945920-unsubscr...@bugs.debian.org.




Bug#945920: Random Chromium crashes

2020-01-13 Thread Джонатан Вашингтон
Dear package maintainer(s),

In case it is useful information, this issue affects me as well, and
has for several weeks.  Chromium is usable for only a few minutes
before it crashes with a backtrace almost identical to those already
shared.  It does not seem to matter how many or what kind of pages are
open, or whether the browser is actively being used / receiving window
manager focus or not.

Please let me know if there is anything I can do to help identify the
problem or test a fix.

--
Jonathan



Bug#945920: Random Chromium crashes

2020-01-10 Thread nozzy123nozzy
Tags: patch

Sorry for disturbing all of you, but the tag of this report didn't
become change. I'm not sure why.

This mail is the last trial sending command tag + patch. In this time,
I attach my patch (derived from Eloston's patch), which is the same as
I posted on 8th Jan.

Takahide Nojima

On Sat, 11 Jan 2020 12:20:40 +0900 nozzy123no...@gmail.com wrote:
> tag 945920 + patch
> thanks

diff -r -N -u a/debian/control b/debian/control
--- a/debian/control	2019-12-15 03:47:43.0 +0900
+++ b/debian/control	2020-01-05 23:10:06.035727253 +0900
@@ -82,6 +82,7 @@
  libgcrypt20-dev,
  fonts-ipafont-gothic,
  fonts-ipafont-mincho,
+ libx11-xcb-dev
 
 Package: chromium
 Architecture: i386 amd64 arm64 armhf
diff -r -N -u a/debian/copyright b/debian/copyright
--- a/debian/copyright	2019-12-15 03:47:43.0 +0900
+++ b/debian/copyright	2020-01-01 20:02:46.319322326 +0900
@@ -37,7 +37,6 @@
  chrome/installer/launcher_support
  chrome/common/extensions/docs
  chrome/common/safe_browsing/rar_analyzer.*
- chrome/browser/tracing
  chrome/browser/resources/chromeos
  chrome/browser/resources/default_apps
  chrome/test/data/android
@@ -45,7 +44,6 @@
  chrome/test/data/extensions
  chrome/test/data/webui/i18n_process_css_test.html
  chrome/chrome_cleaner/test/resources/signed_dll
- services/tracing
  tools/emacs
  tools/luci-go
  tools/android
@@ -116,7 +114,6 @@
  third_party/expat/src
  third_party/*rjsmin/bench
  third_party/unrar
- third_party/perfetto
  third_party/checkstyle
  third_party/swiftshader
  third_party/apache-win32
@@ -150,23 +147,6 @@
  third_party/devtools-node-modules
  third_party/blanketjs/src/blanket.js
  third_party/accessibility-audit/axs_testing.js
- third_party/catapult/tracing
- third_party/catapult/third_party/flot
- third_party/catapult/third_party/chai
- third_party/catapult/third_party/vinn
- third_party/catapult/third_party/mocha
- third_party/catapult/third_party/coverage
- third_party/catapult/third_party/polymer2
- third_party/catapult/third_party/polymer3
- third_party/catapult/third_party/polymer/components
- third_party/catapult/third_party/d3/d3.min.js
- third_party/catapult/third_party/redux/redux.min.js
- third_party/catapult/experimental/heatmap/power.js
- third_party/catapult/experimental/heatmap/smoothness.js
- third_party/catapult/experimental/trace_on_tap/third_party/pako/pako_deflate.min.js
- third_party/catapult/third_party/gsutil
- third_party/catapult/third_party/Paste/paste/evalexception/media/MochiKit.packed.js
- third_party/catapult/telemetry/telemetry/internal/testing/perf_report_output.txt
  third_party/webrtc/sdk
  third_party/webrtc/data
  third_party/webrtc/examples
diff -r -N -u a/debian/patches/series b/debian/patches/series
--- a/debian/patches/series	2019-12-15 03:47:43.0 +0900
+++ b/debian/patches/series	2020-01-02 17:32:16.998129815 +0900
@@ -39,11 +39,9 @@
 disable/signin.patch
 disable/android.patch
 disable/fuzzers.patch
-disable/tracing.patch
 disable/openh264.patch
 disable/buildbot.patch
 disable/chromeos.patch
-disable/perfetto.patch
 disable/installer.patch
 disable/font-tests.patch
 disable/swiftshader.patch
@@ -81,3 +79,4 @@
 
 buster/icu63.patch
 buster/vpx17.patch
+system/force_system_zlib.patch
diff -r -N -u a/debian/patches/system/force_system_zlib.patch b/debian/patches/system/force_system_zlib.patch
--- a/debian/patches/system/force_system_zlib.patch	1970-01-01 09:00:00.0 +0900
+++ b/debian/patches/system/force_system_zlib.patch	2020-01-02 17:37:30.344621702 +0900
@@ -0,0 +1,11 @@
+--- a/third_party/perfetto/gn/BUILD.gn
 b/third_party/perfetto/gn/BUILD.gn
+@@ -305,7 +305,7 @@
+ "//buildtools:zlib",
+   ]
+ } else {
+-  public_configs = [ "//third_party/zlib:zlib_config" ]
++  public_configs = [ "//third_party/zlib:system_zlib" ]
+   public_deps = [
+ "//third_party/zlib",
+   ]
diff -r -N -u a/debian/rules b/debian/rules
--- a/debian/rules	2019-12-15 03:47:43.0 +0900
+++ b/debian/rules	2020-01-01 20:02:46.319322326 +0900
@@ -199,16 +199,14 @@
 	patch -p1 < debian/scripts/mk-origtargz.patch
 	date +%s > $(seconds)
 	perl debian/scripts/mk-origtargz ../$(tarball) > $(removed)
+	echo $(extract)/third_party/perfetto/ui/src/gen >> $(removed)
 	echo $$(($$(date +%s) - $$(cat $(seconds seconds
 	test ! -e $(extract) || rm -rf $(extract)
 	tar xf ../$(tarball)
 	echo $$(($$(date +%s) - $$(cat $(seconds seconds
-	while read line; do rm -rf $$line; done < $(removed)
+	xargs rm -rf < $(removed)
 	cd $(extract) && ../debian/scripts/check-upstream
-	echo $$(($$(date +%s) - $$(cat $(seconds seconds
-	test ! -e $(origtxz) || rm -f $(origtxz)
-	tar cf - $(extract) | xz -6 -T $(njobs) - > $(origtxz)
-	echo $$(($$(date +%s) - $$(cat $(seconds seconds
-	rm -rf $(extract)
 	echo $$(($$(date +%s) - $$(cat $(seconds seconds | tee seconds
 	@mv -f seconds $(seconds)
+	test ! -e $(extract)/debian || rm -rf $(extract)/debian
+	cp -r debian $(extract)/.


Bug#945920: Random Chromium crashes

2020-01-10 Thread nozzy123nozzy
tag 945920 + patch
thanks



Bug#945920: Random Chromium crashes

2020-01-10 Thread nozzy123nozzy
tags 945920 + patch
thanks

Hi Maintainer,

I forgot to add tag of patch, then I added.
 
Additionally, I've been testing chromium 79.0.3945.79 which applied
Eloston's patch, it is still quite stable, no crash.

Takahide Nojima.


On Wed, 08 Jan 2020 02:28:51 +0900 nozzy123no...@gmail.com wrote:
> Hi Maintainer,
> 
>  A few days ago, I built chromium according to the way of Eloston's,
> too. But I also needed to slightly modify Eloston's patch to finish
to
> compile whole chromium source. I attached my version of the patch to
> this report.
> 
>  Until now, I'm testing this version of chromium by usual browsing,
but
> it seems to be highly stable than before! At least, it seems never to
> crash in my Debian box.
> 
>  Before Elostion's patch, in browsing some site, chromium almost
always
> crashed viewing within a few pages.
> 
>  I'm really looking forward to newer version of chromium package
> applied Eloston's patch.
> 
> Thank in advance,
> Takahide Nojima.



Bug#945920: Random Chromium crashes

2020-01-07 Thread nozzy123nozzy
Hi Maintainer,

 A few days ago, I built chromium according to the way of Eloston's,
too. But I also needed to slightly modify Eloston's patch to finish to
compile whole chromium source. I attached my version of the patch to
this report.

 Until now, I'm testing this version of chromium by usual browsing, but
it seems to be highly stable than before! At least, it seems never to
crash in my Debian box.

 Before Elostion's patch, in browsing some site, chromium almost always
crashed viewing within a few pages.

 I'm really looking forward to newer version of chromium package
applied Eloston's patch.

Thank in advance,
Takahide Nojima.

On Fri, 03 Jan 2020 22:40:44 -0800 David Booss 
wrote:
> 
> I'm not at all sure if this is the right way to do it, but I was able
to 
> build using the enable-tracing.patch from Eloston by commenting out
the 
> public_configs lines containing zlib_config in 
> third_party/perfetto/gn/BUILD.gn
> 
> Right now I am typing into my webmail client using Chromium from
that 
> build. I had to install libevent-2.1-6 before installing the
Chromium 
> packages. I installed the debug symbols and am running it under gdb
so 
> if it crashes I will report back with some output.
> 
> 
diff -r -N -u a/debian/control b/debian/control
--- a/debian/control	2019-12-15 03:47:43.0 +0900
+++ b/debian/control	2020-01-05 23:10:06.035727253 +0900
@@ -82,6 +82,7 @@
  libgcrypt20-dev,
  fonts-ipafont-gothic,
  fonts-ipafont-mincho,
+ libx11-xcb-dev
 
 Package: chromium
 Architecture: i386 amd64 arm64 armhf
diff -r -N -u a/debian/copyright b/debian/copyright
--- a/debian/copyright	2019-12-15 03:47:43.0 +0900
+++ b/debian/copyright	2020-01-01 20:02:46.319322326 +0900
@@ -37,7 +37,6 @@
  chrome/installer/launcher_support
  chrome/common/extensions/docs
  chrome/common/safe_browsing/rar_analyzer.*
- chrome/browser/tracing
  chrome/browser/resources/chromeos
  chrome/browser/resources/default_apps
  chrome/test/data/android
@@ -45,7 +44,6 @@
  chrome/test/data/extensions
  chrome/test/data/webui/i18n_process_css_test.html
  chrome/chrome_cleaner/test/resources/signed_dll
- services/tracing
  tools/emacs
  tools/luci-go
  tools/android
@@ -116,7 +114,6 @@
  third_party/expat/src
  third_party/*rjsmin/bench
  third_party/unrar
- third_party/perfetto
  third_party/checkstyle
  third_party/swiftshader
  third_party/apache-win32
@@ -150,23 +147,6 @@
  third_party/devtools-node-modules
  third_party/blanketjs/src/blanket.js
  third_party/accessibility-audit/axs_testing.js
- third_party/catapult/tracing
- third_party/catapult/third_party/flot
- third_party/catapult/third_party/chai
- third_party/catapult/third_party/vinn
- third_party/catapult/third_party/mocha
- third_party/catapult/third_party/coverage
- third_party/catapult/third_party/polymer2
- third_party/catapult/third_party/polymer3
- third_party/catapult/third_party/polymer/components
- third_party/catapult/third_party/d3/d3.min.js
- third_party/catapult/third_party/redux/redux.min.js
- third_party/catapult/experimental/heatmap/power.js
- third_party/catapult/experimental/heatmap/smoothness.js
- third_party/catapult/experimental/trace_on_tap/third_party/pako/pako_deflate.min.js
- third_party/catapult/third_party/gsutil
- third_party/catapult/third_party/Paste/paste/evalexception/media/MochiKit.packed.js
- third_party/catapult/telemetry/telemetry/internal/testing/perf_report_output.txt
  third_party/webrtc/sdk
  third_party/webrtc/data
  third_party/webrtc/examples
diff -r -N -u a/debian/patches/series b/debian/patches/series
--- a/debian/patches/series	2019-12-15 03:47:43.0 +0900
+++ b/debian/patches/series	2020-01-02 17:32:16.998129815 +0900
@@ -39,11 +39,9 @@
 disable/signin.patch
 disable/android.patch
 disable/fuzzers.patch
-disable/tracing.patch
 disable/openh264.patch
 disable/buildbot.patch
 disable/chromeos.patch
-disable/perfetto.patch
 disable/installer.patch
 disable/font-tests.patch
 disable/swiftshader.patch
@@ -81,3 +79,4 @@
 
 buster/icu63.patch
 buster/vpx17.patch
+system/force_system_zlib.patch
diff -r -N -u a/debian/patches/system/force_system_zlib.patch b/debian/patches/system/force_system_zlib.patch
--- a/debian/patches/system/force_system_zlib.patch	1970-01-01 09:00:00.0 +0900
+++ b/debian/patches/system/force_system_zlib.patch	2020-01-02 17:37:30.344621702 +0900
@@ -0,0 +1,11 @@
+--- a/third_party/perfetto/gn/BUILD.gn
 b/third_party/perfetto/gn/BUILD.gn
+@@ -305,7 +305,7 @@
+ "//buildtools:zlib",
+   ]
+ } else {
+-  public_configs = [ "//third_party/zlib:zlib_config" ]
++  public_configs = [ "//third_party/zlib:system_zlib" ]
+   public_deps = [
+ "//third_party/zlib",
+   ]
diff -r -N -u a/debian/rules b/debian/rules
--- a/debian/rules	2019-12-15 03:47:43.0 +0900
+++ b/debian/rules	2020-01-01 20:02:46.319322326 +0900
@@ -199,16 +199,14 @@
 	patch -p1 < debian/scripts/mk-origtargz.patch
 	date +%s > $(seconds)
 	perl debian/scripts/mk-origtargz 

Bug#945920: Random Chromium crashes

2020-01-04 Thread Jürgen Göricke
> I'm not at all sure if this is the right way to do it, but I was able to 
> build using the enable-tracing.patch from Eloston by commenting out the 
> public_configs lines containing zlib_config in 
> third_party/perfetto/gn/BUILD.gn

But why not package the new version, which probably already contains the patch?

> I installed the debug symbols and am running it under gdb so 
> if it crashes I will report back with some output.

I've already done the debugging, you look here:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=946648#40

This bug report is a duplicate, which is why both bug reports have been merged.

Chromium crashes primarily on multimedia content.
Tested in various media libraries and on youtube.


pgpV9_VE9Ckbt.pgp
Description: Digitale Signatur von OpenPGP


Bug#945920: Random Chromium crashes

2020-01-03 Thread David Booss



I'm not at all sure if this is the right way to do it, but I was able to 
build using the enable-tracing.patch from Eloston by commenting out the 
public_configs lines containing zlib_config in 
third_party/perfetto/gn/BUILD.gn


Right now I am typing into my webmail client using Chromium from that 
build. I had to install libevent-2.1-6 before installing the Chromium 
packages. I installed the debug symbols and am running it under gdb so 
if it crashes I will report back with some output.




Bug#945920: Random Chromium crashes

2020-01-03 Thread Jaap Joris Vens

Hi all,

I have tried building chromium after applying
[tracing.patch](https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=945920;filename=enable-tracing.patch;msg=14)

Unfortunately, it failed early in the build process with the following
error:

ERROR Unresolved dependencies.
//third_party/perfetto/gn:zlib(//build/toolchain/linux/unbundle:default)
  needs //third_party/zlib:zlib_config(//build/toolchain/linux/unbundle:default)

make[1]: *** [debian/rules:150: override_dh_auto_build-arch] Error 1
make[1]: Leaving directory '/home/jj/src/chromium-79.0.3945.79'
make: *** [debian/rules:133: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
debuild: fatal error at line 1182:
dpkg-buildpackage -us -uc -ui -b failed

Greetings,
JJ



Bug#945920: Random Chromium crashes

2020-01-02 Thread Christopher Obbard
Hi,
This is also occurring on two machines for me. The crashes are random
but will happen after about 10 minutes of use, quite annoying...

Thanks!
Chris

On Tue, 31 Dec 2019 18:27:13 +0100 (CET) Thorsten Bonow
 wrote:
> On Mon, 30 Dec 2019 13:50:36 -0800 Eloston 
> wrote:
>
> [...]
>
> > $ ./debian/rules get-orig-source
>
> Hi,
>
> this fails for me:
>
> [...]
> test ! -e debian || rm -rf debian
> cp -r ../debian ./
> cp: cannot stat '../debian': No such file or directory
> make: *** [debian/rules:212: get-orig-source] Error 1
> ./debian/rules get-orig-source  441.08s user 24.95s system 92% cpu
> 8:25.08 total
>
> Files and directories:
> $ ll
> total 12K
> drwxr-sr-x 50 toto staff 4.0K Dec 31 14:40 chromium-79.0.3945.79
> -rw-r--r--  1 toto staff 2.9K Dec 31 14:30
> chromium-build-deps_79.0.3945.79-1_all.deb
> -rw-r--r--  1 toto staff 3.6K Dec 31 12:28 enable-tracing.patch
> $ pwd
> /usr/local/src/chromium/chromium-c88b97a6dc183a6a7f8a05aee9e99957285a9371
>
>
> Regards,
> Toto
>
> --
> Sent from my GNU Emacs running on GNU/Linux
>
>



Bug#945920: Random Chromium crashes

2019-12-31 Thread Thorsten Bonow
On Mon, 30 Dec 2019 13:50:36 -0800 Eloston  
wrote:


[...]


$ ./debian/rules get-orig-source


Hi,

this fails for me:

[...]
test ! -e debian || rm -rf debian
cp -r ../debian ./
cp: cannot stat '../debian': No such file or directory
make: *** [debian/rules:212: get-orig-source] Error 1
./debian/rules get-orig-source  441.08s user 24.95s system 92% cpu 
8:25.08 total


Files and directories:
$ ll
total 12K
drwxr-sr-x 50 toto staff 4.0K Dec 31 14:40 chromium-79.0.3945.79
-rw-r--r--  1 toto staff 2.9K Dec 31 14:30 
chromium-build-deps_79.0.3945.79-1_all.deb

-rw-r--r--  1 toto staff 3.6K Dec 31 12:28 enable-tracing.patch
$ pwd
/usr/local/src/chromium/chromium-c88b97a6dc183a6a7f8a05aee9e99957285a9371


Regards,
Toto

--
Sent from my GNU Emacs running on GNU/Linux



Bug#945920: Random Chromium crashes

2019-12-30 Thread Eloston
Alright, here's a revised process to compile Chromium locally with tracing re-
enabled:

1. First, download the patch and save it as "enable-tracing.patch"
2. Run the following:

$ wget
https://salsa.debian.org/chromium-team/chromium/-/archive/c88b97a6dc183a6a7f8a05aee9e99957285a9371/chromium-c88b97a6dc183a6a7f8a05aee9e99957285a9371.tar.bz2
$ tar xf chromium-c88b97a6dc183a6a7f8a05aee9e99957285a9371.tar.bz2
$ cd chromium-c88b97a6dc183a6a7f8a05aee9e99957285a9371
$ patch -p1 < enable-tracing.patch
# mk-build-deps -i debian/control
$ ./debian/rules get-orig-source
$ cd chromium-79.0.3945.79
$ dpkg-buildpackage -b -uc

After several hours, packages should appear in chromium-
c88b97a6dc183a6a7f8a05aee9e99957285a9371

Regards,
Eloston
commit 9a07b14585c4948d3baf2763d0f71ac5b3af758c
Author: Eloston 
Date:   Mon Dec 30 21:34:23 2019 +

Revert disabling tracing

diff --git a/debian/copyright b/debian/copyright
index ef2174d..f81086c 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -37,7 +37,6 @@ Files-Excluded:
  chrome/installer/launcher_support
  chrome/common/extensions/docs
  chrome/common/safe_browsing/rar_analyzer.*
- chrome/browser/tracing
  chrome/browser/resources/chromeos
  chrome/browser/resources/default_apps
  chrome/test/data/android
@@ -45,7 +44,6 @@ Files-Excluded:
  chrome/test/data/extensions
  chrome/test/data/webui/i18n_process_css_test.html
  chrome/chrome_cleaner/test/resources/signed_dll
- services/tracing
  tools/emacs
  tools/luci-go
  tools/android
@@ -116,7 +114,6 @@ Files-Excluded:
  third_party/expat/src
  third_party/*rjsmin/bench
  third_party/unrar
- third_party/perfetto
  third_party/checkstyle
  third_party/swiftshader
  third_party/apache-win32
@@ -150,23 +147,6 @@ Files-Excluded:
  third_party/devtools-node-modules
  third_party/blanketjs/src/blanket.js
  third_party/accessibility-audit/axs_testing.js
- third_party/catapult/tracing
- third_party/catapult/third_party/flot
- third_party/catapult/third_party/chai
- third_party/catapult/third_party/vinn
- third_party/catapult/third_party/mocha
- third_party/catapult/third_party/coverage
- third_party/catapult/third_party/polymer2
- third_party/catapult/third_party/polymer3
- third_party/catapult/third_party/polymer/components
- third_party/catapult/third_party/d3/d3.min.js
- third_party/catapult/third_party/redux/redux.min.js
- third_party/catapult/experimental/heatmap/power.js
- third_party/catapult/experimental/heatmap/smoothness.js
- third_party/catapult/experimental/trace_on_tap/third_party/pako/pako_deflate.min.js
- third_party/catapult/third_party/gsutil
- third_party/catapult/third_party/Paste/paste/evalexception/media/MochiKit.packed.js
- third_party/catapult/telemetry/telemetry/internal/testing/perf_report_output.txt
  third_party/webrtc/sdk
  third_party/webrtc/data
  third_party/webrtc/examples
diff --git a/debian/patches/series b/debian/patches/series
index cc98644..42ca728 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -39,11 +39,9 @@ disable/owners.patch
 disable/signin.patch
 disable/android.patch
 disable/fuzzers.patch
-disable/tracing.patch
 disable/openh264.patch
 disable/buildbot.patch
 disable/chromeos.patch
-disable/perfetto.patch
 disable/installer.patch
 disable/font-tests.patch
 disable/swiftshader.patch
diff --git a/debian/rules b/debian/rules
index 59b541d..cafc753 100755
--- a/debian/rules
+++ b/debian/rules
@@ -199,16 +199,14 @@ get-orig-source:
 	patch -p1 < debian/scripts/mk-origtargz.patch
 	date +%s > $(seconds)
 	perl debian/scripts/mk-origtargz ../$(tarball) > $(removed)
+	echo $(extract)/third_party/perfetto/ui/src/gen >> $(removed)
 	echo $$(($$(date +%s) - $$(cat $(seconds seconds
 	test ! -e $(extract) || rm -rf $(extract)
 	tar xf ../$(tarball)
 	echo $$(($$(date +%s) - $$(cat $(seconds seconds
-	while read line; do rm -rf $$line; done < $(removed)
+	xargs rm -rf < $(removed)
 	cd $(extract) && ../debian/scripts/check-upstream
-	echo $$(($$(date +%s) - $$(cat $(seconds seconds
-	test ! -e $(origtxz) || rm -f $(origtxz)
-	tar cf - $(extract) | xz -6 -T $(njobs) - > $(origtxz)
-	echo $$(($$(date +%s) - $$(cat $(seconds seconds
-	rm -rf $(extract)
 	echo $$(($$(date +%s) - $$(cat $(seconds seconds | tee seconds
 	@mv -f seconds $(seconds)
+	test ! -e debian || rm -rf debian
+	cp -r ../debian ./


Bug#945920: Random Chromium crashes

2019-12-30 Thread Jaap Joris Vens

Hi Eloston,

Thanks for figuring out the cause of these random crashes! However, I was
unable to recompile chromium from source following your instructions. I got
the following error message at step 4b:

jj@telos:~/src/chromium-79.0.3945.79$ debian/rules get-orig-source
wget -nv --show-progress -c 
https://gsdview.appspot.com/chromium-browser-official/chromium-79.0.3945.79-lite.tar.xz
 -O ../chromium-79.0.3945.79-lite.tar.xz
../chromium-79.0.3945.79-lite 100%[>] 633.92M  10.5MB/sin 70s 
2019-12-30 18:22:47 URL:http://commondatastorage.googleapis.com/chromium-browser-official/chromium-79.0.3945.79-lite.tar.xz [664711308/664711308] -> "../chromium-79.0.3945.79-lite.tar.xz" [1]

cp /usr/share/perl5/Devscripts/MkOrigtargz.pm debian/scripts/mk-origtargz
patch -p1 < debian/scripts/mk-origtargz.patch
patching file debian/scripts/mk-origtargz
date +%s > ../chromium_79.0.3945.79.seconds
perl debian/scripts/mk-origtargz ../chromium-79.0.3945.79-lite.tar.xz > 
../chromium_79.0.3945.79.files-removed
mk-origtargz warn: No files matched excluded pattern as the last matching 
glob: *.elf
mk-origtargz warn: No files matched excluded pattern as the last matching 
glob: *.swf
mk-origtargz warn: No files matched excluded pattern as the last matching 
glob: *.orig
echo $(($(date +%s) - $(cat ../chromium_79.0.3945.79.seconds))) seconds
473 seconds
test ! -e chromium-79.0.3945.79 || rm -rf chromium-79.0.3945.79
tar xf ../chromium-79.0.3945.79-lite.tar.xz
echo $(($(date +%s) - $(cat ../chromium_79.0.3945.79.seconds))) seconds
609 seconds
while read line; do rm -rf $line; done < 
../chromium_79.0.3945.79.files-removed
cd chromium-79.0.3945.79 && ../debian/scripts/check-upstream
realpath: ./third_party/perfetto/ui/src/gen: No such file or directory
symlink links to nothing: ./third_party/perfetto/ui/src/gen ../dist/gen
make: *** [debian/rules:207: get-orig-source] Error 1

Greetings,
JJ



Bug#945920: Random Chromium crashes

2019-12-27 Thread Eloston
Hey all,

I highly suspect all of these crashes are due to disable/tracing.patch:
https://salsa.debian.org/chromium-team/chromium/blob/3bcbf4a32166e394c45caf66e1348127284f9094/debian/patches/disable/tracing.patch

Two reasons:

* It is the only patch that makes changes to memory_instrumentation.
* I am maintaining a fork of Debian's Chromium based on 79.0.3945.79 that does
not include disable/tracing.patch, and I don't have any of the segfaults
described in this issue. I've been running my fork daily for a little over a
week without problems.

I don't know why exactly the patch causes the segfault, but the safest solution
is to rebuild Chromium without the changes that disable tracing:

1. Download the debian/ directory from Salsa (above) or via "apt source
chromium". We don't want the orig tarball (we will need to re-generate it)
1. Remove disable/tracing.patch from debian/patches/series
2. Remove disable/perfetto.patch from debian/patches/series (not completely sure
this is necessary, but Catapult and Perfetto are both used in Chromium's
tracing)
3. Remove from debian/copyright's Files-Excluded section:
* Remove any path containing "tracing"
* Remove third_party/perfetto
* Remove third_party/catapult/*
4. Rebuild the browser with a new orig tarball:
a. Install dependencies: mk-build-deps -i debian/control
b. Make new orig tarball: ./debian/rules get-orig-source
c. Now just build normally, e.g. cd chromium-x.x.x.x && dpkg-buildpackage -b
-uc

NOTE: These changes will make the browser depend on minified javascript files
again, which was the original motivation for disabling tracing (as noted in the
header of disable/tracing.patch).

Hope that helps,
Eloston



Bug#945920: Random Chromium crashes

2019-12-27 Thread Michel Meyers

Hello,

Been running Chromium for the last 6 hours now, no crash since, so it 
looks like that last patch finally got it.


- Michel



Bug#945920: Random Chromium crashes

2019-12-27 Thread Stefan Bühler
Hi,

On Fri, 27 Dec 2019 15:31:13 +0100 Jaap Joris Vens  wrote:
> On Fri, Dec 27, 2019 at 01:29:13PM +0100, Stefan Bühler wrote:
> >Hi,
> >
> >yes, you are right, my patch only fixes the task manager crash.
> >
> >I now took a look at all backtraces, and all apart the first one
> >(probably older version?) seem to be the same "other" instance:
> >
> --- 8< ---
> 
> I am not quite following the intricacies of this crash anymore, but might
> this be something that we will need to report upstream?

Yes, that is how it looks to me (although I didn't take a look at the
debian patches and whether they have any impact on this). I don't quite
understand under which circumstances the MemoryInstrumentation
"singleton" instance is supposed to exist; but more importantly I
couldn't see any relation between the conditions when it gets created
and when it gets used.

Which imho means all uses need to check whether the instance actually
exists, or creating it automatically whenever it is requested.

Apart from that the singleton pointer is managed in a very dangerous
manner; the destructor will reset the singleton pointer, which makes it
look like that is supposed to do something meaningful, but in a
multi-threaded environment this simply can't go well imho; this probably
should use shared ownership and locking, or `call_once` and never
destroying it ever (and maybe calling abort in the destructor...).

cheers,
Stefan



Bug#945920: Random Chromium crashes

2019-12-27 Thread Jaap Joris Vens

On Fri, Dec 27, 2019 at 01:29:13PM +0100, Stefan Bühler wrote:

Hi,

yes, you are right, my patch only fixes the task manager crash.

I now took a look at all backtraces, and all apart the first one
(probably older version?) seem to be the same "other" instance:


--- 8< ---

I am not quite following the intricacies of this crash anymore, but might
this be something that we will need to report upstream?

Greetings,
JJ



Bug#945920: Random Chromium crashes

2019-12-27 Thread Stefan Bühler
Hi,

yes, you are right, my patch only fixes the task manager crash.

I now took a look at all backtraces, and all apart the first one 
(probably older version?) seem to be the same "other" instance:

---
#0  0x5a77cee7 in 
memory_instrumentation::MemoryInstrumentation::RequestGlobalDump(std::vector, std::allocator >, 
std::allocator, 
std::allocator > > > const&, base::OnceCallback >)>) ()
#1  0x58f8ddb0 in 
ProcessMemoryMetricsEmitter::FetchAndEmitProcessMemoryMetrics() ()
#2  0x58f85e82 in (anonymous namespace)::RecordMemoryMetrics() ()
#3  0x593b5165 in base::TaskAnnotator::RunTask(char const*, 
base::PendingTask*) ()
---

The underlying issue is the same: it crashes when dereferencing `this` 
(as it is NULL).

It gets started in `RecordMemoryMetricsAfterDelay`:

https://github.com/chromium/chromium/blob/07653652c58cc019af7f833bd63eb0c2eceaab5e/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc#L72-L90

The "time to live" (until the first actual call) is determined in 
`GetDelayForNextMemoryLog`:

https://github.com/chromium/chromium/blob/07653652c58cc019af7f833bd63eb0c2eceaab5e/services/resource_coordinator/public/cpp/memory_instrumentation/browser_metrics.cc#L52-L61

And `FetchAndEmitProcessMemoryMetrics` doesn't check the `GetInstance()` 
result either:

https://github.com/chromium/chromium/blob/07653652c58cc019af7f833bd63eb0c2eceaab5e/chrome/browser/metrics/process_memory_metrics_emitter.cc#L636-L642

I'm not quite sure about the consequences, for now I tried skipping 
`RecordMemoryMetrics` completely - we'll see how that goes..

So as additional patch I replaced 0x55 (`push %rbp`) at offset 
0x03a31e50 (start of `RecordMemoryMetrics`) with 0xc3 (`retq`):

$ xxd -s 0x3a31e50 -l 16 /usr/lib/chromium/chromium
03a31e50: 55bf 4000  4889 e541 5453 e8cf dd49  u...@...h..ats...I
$ printf '03a31e50: c3\n' | xxd -r -  /usr/lib/chromium/chromium
$ sha1sum /usr/lib/chromium/chromium* 
fbfb255a77f38b629c19eabddff577a1b26f4395  /usr/lib/chromium/chromium
5056c781602f4bbd41f06b3bd1940b6edbd7dc8c  /usr/lib/chromium/chromium-pre-patch

cheers,
Stefan



Bug#945920: Random Chromium crashes

2019-12-25 Thread Michel Meyers

Hello,

Same here unfortunately. It has fixed the SIGSEGV when opening the Task 
Manager, but as feared, that crash seems to be separate from the 
randomly occurring one.


- Michel