Open ghost opened 4 years ago
giving up for now, because I can't find a stacktrace(since it's run on a new thread as a job or something)
...
[1:1:0826/150829.837942:VERBOSE2:thread_state.cc(496)] [state:0x55bc2abbbea0] ScheduleGCIfNeeded
[2014:2062:0826/150829.911135:VERBOSE1:network_delegate.cc(33)] NetworkDelegate::NotifyBeforeURLRequest: https://aaaaaaaaaaaaaaadddddddddddd/
#0 0x55b2cdef9319 [1:1:0826/150829.916033:VERBOSE2:thread_state.cc(496)] [state:0x55bc2abbbea0] ScheduleGCIfNeeded
[1:1:0826/150829.916319:VERBOSE2:thread_state.cc(496)] [state:0x55bc2abbbea0] ScheduleGCIfNeeded
[1:1:0826/150829.916885:VERBOSE2:thread_state.cc(496)] [state:0x55bc2abbbea0] ScheduleGCIfNeeded
[1:1:0826/150829.917185:VERBOSE2:thread_state.cc(496)] [state:0x55bc2abbbea0] ScheduleGCIfNeeded
[1:1:0826/150829.917522:VERBOSE2:thread_state.cc(496)] [state:0x55bc2abbbea0] ScheduleGCIfNeeded
[1:1:0826/150829.919501:VERBOSE2:thread_state.cc(496)] [state:0x55bc2abbbea0] ScheduleGCIfNeeded
base::debug::CollectStackTrace()
[2014:2062:0826/150829.921245:VERBOSE1:network_delegate.cc(33)] NetworkDelegate::NotifyBeforeURLRequest: https://aaaaaaaaaaaaaaadddddddddddd/
#0 0x55b2cdef9319 [1:1:0826/150829.921054:VERBOSE2:thread_state.cc(496)] [state:0x55bc2abbbea0] ScheduleGCIfNeeded
[1:1:0826/150829.923842:VERBOSE2:thread_state.cc(496)] [state:0x55bc2abbbea0] ScheduleGCIfNeeded
base::debug::CollectStackTrace()
...
[1:1:0826/150830.027487:VERBOSE2:thread_state.cc(496)] [state:0x55bc2abbbea0] ScheduleGCIfNeeded
[2014:2062:0826/150830.038800:VERBOSE1:network_delegate.cc(33)] NetworkDelegate::NotifyBeforeURLRequest: https://duckduckgo.com/?q=aaaaaaaaaaaaaaadddddddddddd
#0 0x55b2cdef9319 base::debug::CollectStackTrace()
[2014:2062:0826/150830.048664:VERBOSE1:network_delegate.cc(33)] NetworkDelegate::NotifyBeforeURLRequest: https://duckduckgo.com/?q=aaaaaaaaaaaaaaadddddddddddd
#0 0x55b2cdef9319 base::debug::CollectStackTrace()
[1:1:0826/150830.088164:VERBOSE2:thread_state.cc(442)] [state:0x55bc2abbbea0] ScheduleV8FollowupGCIfNeeded: v8_gc_type=MinorGC
[1:1:0826/150830.106913:VERBOSE2:thread_state.cc(496)] [state:0x55bc2abbbea0] ScheduleGCIfNeeded
[1:1:0826/150830.118527:VERBOSE2:thread_state.cc(496)] [state:0x55bc2abbbea0] ScheduleGCIfNeeded
[1:1:0826/150830.120619:VERBOSE2:thread_state.cc(496)] [state:0x55bc2abbbea0] ScheduleGCIfNeeded
[1:1:0826/150830.153768:VERBOSE2:thread_state.cc(496)] [state:0x55bc2abbbea0] ScheduleGCIfNeeded
[1:1:0826/150830.155511:VERBOSE2:thread_state.cc(496)] [state:0x55bc2abbbea0] ScheduleGCIfNeeded
...
I think there was a way to emulate this behaviour in firefox (not just for single words?) but can't remember exactly how (maybe just disabling search?) // found it
What I've found out so far is that, if the DNS lookup succeeds, then the browser will connect to that keyword hostname. But I've yet to find a way to locally host a https server that shows me what the browser is sending, since the connection is apparently always https (not http!).
some resources: https://stackoverflow.com/questions/16646557/verify-incoming-ssl-using-openssl-s-server https://stackoverflow.com/questions/8169999/how-can-i-create-a-self-signed-cert-for-localhost
ah, yes, to emulate this in Firefox, one needs to about:config
browser.fixup.dns_first_for_single_words
to true
(but I haven't yet checked if firefox also attempts to https connect, if the DNS succeeds!)
fixed by:
https://github.com/Eloston/ungoogled-chromium/issues/814
it's a HEAD(instead of GET or POST) request for the single-word keyword that you typed(!) in the searchbar/omnibox/omnibar even if it autocompleted to something longer(only what you typed is getting looked up and if successfully connected to and HEAD requested), without any request content, just headers(seen via mitmproxy):
HEAD https://localhostd/
Host: localhostd
Connection: keep-alive
Sec-Fetch-Site: none
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9
No request content (press tab to view response)
ok if pressing 'z' to decode/encode content, getting two more fields:
content-length: 8
content-encoding: deflate
[decoded deflate] No content
Response(tab) is:
No response (that's from running 'sudo openssl s_server ...')
Detail:
Server Connection:
Address 127.0.0.1:443
Resolved Address 127.0.0.1:443
Server Certificate:
Type RSA, 2048 bits
SHA1 digest 24:1F:55:98:62:F6:1D:4F:97:08:34:C4:8E:95:9A:36:FB:57:1D:17
Valid to 2020-08-30 22:51:12
Valid from 2019-08-31 22:51:12
Serial 603546662908072705223238074548540983069975469728
Subject CN localhostd
Issuer CN localhostd
Client Connection:
Address 127.0.0.1:50904
HTTP Version HTTP/1.1
TLS Version TLSv1.3
Server Name Indication localhostd
Cipher Name TLS_AES_256_GCM_SHA384
ALPN http/1.1
Timing:
Client conn. established 2019-09-01 00:56:44.382
Server conn. initiated 2019-09-01 00:56:44.395
Server conn. TCP handshake 2019-09-01 00:56:44.396
Server conn. TLS handshake 2019-09-01 00:56:44.417
Client conn. TLS handshake 2019-09-01 00:56:44.435
First request byte 2019-09-01 00:56:44.437
Request complete 2019-09-01 00:56:44.447
(confirmed(via mitmproxy) that this patch gets rid of it)
--- a/chrome/browser/ui/omnibox/chrome_omnibox_navigation_observer.cc 2019-08-26 21:02:08.000000000 +0200
+++ b/chrome/browser/ui/omnibox/chrome_omnibox_navigation_observer.cc 2019-09-01 01:06:51.622685330 +0200
@@ -85,8 +85,8 @@ ChromeOmniboxNavigationObserver::ChromeO
shortcuts_backend_(ShortcutsBackendFactory::GetForProfile(profile)),
load_state_(LOAD_NOT_SEEN),
fetch_state_(FETCH_NOT_COMPLETE) {
- if (alternate_nav_match_.destination_url.is_valid())
- CreateLoader(alternate_nav_match_.destination_url);
+// if (alternate_nav_match_.destination_url.is_valid())
+// CreateLoader(alternate_nav_match_.destination_url);
// We need to start by listening to AllSources, since we don't know which tab
// the navigation might occur in.
@@ -286,7 +286,7 @@ void ChromeOmniboxNavigationObserver::On
delete this;
}
-void ChromeOmniboxNavigationObserver::CreateLoader(
+/*void ChromeOmniboxNavigationObserver::CreateLoader(
const GURL& destination_url) {
net::NetworkTrafficAnnotationTag traffic_annotation =
net::DefineNetworkTrafficAnnotation("omnibox_navigation_observer", R"(
@@ -327,4 +327,4 @@ void ChromeOmniboxNavigationObserver::Cr
loader_->SetAllowHttpErrorResults(true);
loader_->SetOnRedirectCallback(base::BindRepeating(
&ChromeOmniboxNavigationObserver::OnURLRedirect, base::Unretained(this)));
-}
+}*/
--- a/chrome/browser/ui/omnibox/chrome_omnibox_navigation_observer.h 2019-08-26 21:02:08.000000000 +0200
+++ b/chrome/browser/ui/omnibox/chrome_omnibox_navigation_observer.h 2019-09-01 01:09:20.710811038 +0200
@@ -126,7 +126,7 @@ class ChromeOmniboxNavigationObserver :
// Creates a URL loader for |destination_url| and stores it in |loader_|.
// Does not start the loader.
- void CreateLoader(const GURL& destination_url);
+ //void CreateLoader(const GURL& destination_url);
const base::string16 text_;
const AutocompleteMatch match_;
also note this bug: if what you're typing gets autocompleted(and you see that selected) then pressing Enter only dns looks up what you typed, unless you deselect that by pressing left/right arrows or home/end keys(for example)
in this above ^ picture, where
l
was typed and ocalhostd
was autocompleted and remains selected, pressing Enter at this point will only dns lookup l
. To cause it to lookup the whole word, just deselect the autocompleted stuff(as already mentioned).
With the above patch though, no dns-lookup and no HEAD connect is attempted! (I'd close this issue (just like I did that one ) but already deleted my OP account, oops; why close? because this patch(and the other one) seem to be out of the scope of ungoogling chromium, but privacy-minded individuals might want to apply both)
unrelated but while here, on the topic of omnibar searching, I might as well mention how annoying it is (to me) that there are only like 6
hints in the omnibar when I type something (those hints/suggestions from my history and bookmarks, as per my modified settings), and so if I want 26
listed things instead, here's the patch that I use(for 76.0.3809.132-1
(or .100-1
)):
--- a/components/omnibox/browser/autocomplete_result.cc 2019-08-09 16:47:46.000000000 +0200
+++ b/components/omnibox/browser/autocomplete_result.cc 2019-08-29 10:29:46.066398612 +0200
@@ -45,12 +45,13 @@ struct MatchGURLHash {
// static
size_t AutocompleteResult::GetMaxMatches() {
- constexpr size_t kDefaultMaxAutocompleteMatches = 6;
+ constexpr size_t kDefaultMaxAutocompleteMatches = 26; //was 6, this needs to be double the value of default_max_matches_per_provider from components/omnibox/browser/omnibox_field_trial.cc
- return base::GetFieldTrialParamByFeatureAsInt(
- omnibox::kUIExperimentMaxAutocompleteMatches,
- OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam,
- kDefaultMaxAutocompleteMatches);
+ return //base::GetFieldTrialParamByFeatureAsInt(
+// omnibox::kUIExperimentMaxAutocompleteMatches,
+// OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam,
+ kDefaultMaxAutocompleteMatches//);
+ ;
}
AutocompleteResult::AutocompleteResult() {
--- a/components/omnibox/browser/omnibox_field_trial.cc 2019-08-09 16:47:46.000000000 +0200
+++ b/components/omnibox/browser/omnibox_field_trial.cc 2019-08-29 10:30:37.455752560 +0200
@@ -352,7 +352,8 @@ void OmniboxFieldTrial::GetDemotionsByTy
size_t OmniboxFieldTrial::GetProviderMaxMatches(
AutocompleteProvider::Type provider) {
- size_t default_max_matches_per_provider = 3;
+ size_t default_max_matches_per_provider = 13; // was 3; this needs to be half the value of kDefaultMaxAutocompleteMatches from components/omnibox/browser/autocomplete_result.cc
+ return default_max_matches_per_provider;
std::string param_value = base::GetFieldTrialParamValueByFeature(
omnibox::kUIExperimentMaxAutocompleteMatches,
maybe someone will need/finduseful.
These are interesting changes; I wouldn't mind these changes behind flags.
maybe someone will need/finduseful.
I am triaging both patches for Bromite, but the only credits I could provide is the URL to the comments.
Describe the bug single-word searches from omnibox are being DNS looked up
To Reproduce Steps to reproduce the behavior:
/etc/chromium/policies/managed/policies.json
(and make sure no other files are in/etc/chromium/policies/managed/
dir, or they can overwrite policies, I think) (I'm on ArchLinux) (note: this step should be optional if you can disable all relevant options from Settings manually) (each policy is explained here, or seen inchrome://policy
and the url that looks likehttps://ch40m1um.qjz9zk/administrators/policy-list-3#AbusiveExperienceInterventionEnforce
would in reality need to behttps://www.chromium.org/administrators/policy-list-3#AbusiveExperienceInterventionEnforce
)gethostbyname2_r
(that'sREENTRANT_NAME
(as per glibc64:../sysdeps/posix/getaddrinfo.c:2201/getaddrinfo)Expected behavior no DNS lookups, because all the settings for predicting stuff and preloading and what not are off (due to policies).
Screenshots If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
Additional context I'm actually not using any DNS servers (ie.
/etc/resolv.conf
doesn't have anameserver 1.1.1.1
entry for example), so every host is already present in/etc/hosts
instead. I'm catching the DNS lookups by having patched glibc, however for anyone using DNS servers, I thinktcpdump
or wireshark should help to notice this! also chrome://net-export/I also have a bunch of extensions like uBlock Origin and uMatrix(with all blocked by default, whitelisting only what's needed), and some sites manage to sneak other DNS lookups when loaded, bypassing at least uBlock and I'm guessing if the DNS lookups wouldn't fail they would also actually load that content! But this should be a different issue.