Closed uazo closed 10 months ago
[ ] With v118.0.5993.71-002dc9166f20c34dc2ea87004712725e9e4bc3b0 (https://github.com/uazo/cromite/issues/388#issuecomment-1759462578) reverify the presence of the crash in windows and the absence in android.
crash on windows 3c84787d-e8dc-41b7-bee1-9c6747a6264d.zip with 118
dumped in android
165e0341-a9f1-4bea-9d73-552055684d80.zip ~but file is in \data\data\org.cromite.cromite\cache\Crashpad\pending
not in UI~ in UI after restart
```
chrome_elf.dll!00007ff9ef830be7()
chrome.dll!base::debug::DumpWithoutCrashing(class base::Location const &,class base::TimeDelta)
chrome.dll!base::debug::win::TerminateWithControlFlowViolation(void)
chrome.dll!base::internal::Invoker
```
Operating system: Android
5.10.136 Must use __system_property_read_callback() to read -android12-9-00005-gf9a66cbe7091-ab9177899 #1 SMP PREEMPT Fri Oct 14 05:14:18 UTC 2022 x86_64
CPU: amd64
family 6 model 165 stepping 2
4 CPUs
GPU: UNKNOWN
Crash reason: DUMP_REQUESTED
Crash address: 0x0
Process uptime: 72 seconds
Thread 0 (crashed)
0 libchrome.so!crash_reporter::DumpWithoutCrashing() [crashpad_android.cc : 654 + 0x0]
Found by: given as instruction pointer in context
1 libchrome.so!base::debug::DumpWithoutCrashing(base::Location const&, base::TimeDelta) [dump_without_crashing.cc : 94 + 0x6]
Found by: call frame info
2 libchrome.so!base::allocator::UnretainedDanglingRawPtrDetectedDumpWithoutCrashing(unsigned long) [partition_alloc_support.cc : 675 + 0x8]
Found by: call frame info
3 libchrome.so!base::internal::Invoker
launched 118 build https://github.com/uazo/cromite/actions/runs/6768790411 commit https://github.com/uazo/cromite/commit/002dc9166f20c34dc2ea87004712725e9e4bc3b0, I need symbols
branch https://github.com/uazo/cromite/pull/508 to test 118 https://github.com/uazo/cromite/commit/002dc9166f20c34dc2ea87004712725e9e4bc3b0 with gwp asan enabled
a few updates. tried the version with the patch in release mode, no visible change in the log but at least I know that the patch does not crash the browser at startup. next step, integrate the example code and check what happens
next step, integrate the example code and check what happen
also tried this, nothing goes. it needs to be investigated further.
ah, that's incredible. gwp asan will be active by default in v121. https://chromium-review.googlesource.com/c/chromium/src/+/5038919
I have checked, my code is identical to theirs, but I cannot generate a crash with that code.
what a strange thing... could it be that android:gwpAsanMode
is only active if the target is level 30?
is only active if the target is level 30?
is already so, I don't understand..
got it!
[0112/112950.680905:ERROR:crash_handler.cc(101)]
Detected GWP-ASan crash for allocation at 0x3c7600332fe0 (malloc) of type heap-use-after-free
that example code is not complete
I don't know who reads but I need advice:
gwpasan seems to have an impact on performance, and is made active on the processes according to the formula:
active if (base::RandDouble() < process_sampling_probability)
process_sampling_probability
by default it is 0.015
, so it takes 1,5% of the active processes.
I imagine that for chrome it is sufficient, given the amount of installations present, but in cromite I would like to increase that value to 50%.
The problem is that currently the value can only be changed with field trials and I do not have the infrastructure to manage them.
what should be done? ideas are welcome.
The problem is that currently the value can only be changed with field trials
You can always hardcode it, but…
process_sampling_probability by default it is 0.015, so it takes 1,5% of the active processes. I imagine that for chrome it is sufficient, given the amount of installations
Are you sure it considers installation? Maybe it triggers for 1,5% of processes started by Chromium and not installations?
https://chromium.googlesource.com/chromium/src/+/master/docs/asan.md Some relevant information in master docs asan.
Are you sure it considers installation?
no, I mean active processes. but if you multiply 0.15% by the number of active processes on all installations, the value is large.
You can always hardcode it, but…
I guess that's the only way.
so in the end I did this:
it might happen that the test fails (browser not crash) because not all threads are checked (precisely 'only' 50%). it is not possible for me to insert flags or changes to parameters via ui since memory management is active before anything. the hope is that performance will not drop too much.
available for those who would like to tell me if it has an impact on performance
Personally, I am not detecting any impact on performance, neither in android, nor in windows (although for the latter my machine is noticeably fast). I think I'm going to release.
Preliminary checklist
Is your feature request related to privacy?
Yes
Is there a patch available for this feature somewhere?
No.
Describe the solution you would like
To understand whether it is possible to enable GWP Asan in android. Currently in Windows it is active but in Android is not. More than privacy you can think about security in general and for me to understand if potentially my code introduces security bugs. in A13+ you can opt-in to the one built into the os
refs:
Describe alternatives you have considered
n/a