Closed Bug 1079393 Opened 10 years ago Closed 9 years ago

awesomebar doesn't always work

Categories

(Firefox :: Address Bar, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME
Tracking Status
e10s - ---

People

(Reporter: catlee, Unassigned)

References

Details

(Keywords: regression)

I've noticed that awesomebar has stopped being quite so awesome with e10s enabled.

For example, URLs I've visited recently aren't always available as suggestions in the awesomebar, nor are tabs that I actively have open. 

For example, I have this URL open in a tab: https://bugzilla.mozilla.org/show_bug.cgi?id=1078507, the title is "Increase the number of chunks for B2G debug mochitests"

If I enter "% bug b2g" in the awesomebar, I get no results. However, if I enter just "% bug", then the plain URL is suggested as a match, without the title however.
tracking-e10s: --- → ?
Chris, we think this might be happening on non-e10s mode as well, can you test for that?
Flags: needinfo?(catlee)
I've seen this happening from time to time without e10s too, but I can't reliably reproduce. If you can, can you test toggling browser.urlbar.unifiedcomplete to false and see if it fixes the problem?
Yes, this is also happening on non-e10s.

Setting browser.urlbar.unifiedcomplete to false doesn't fix it. Do I need to restart for that to take effect?
Flags: needinfo?(catlee)
It takes effect for new windows opened after the pref toggling, but not the already open windows
Flags: firefox-backlog?
Summary: [e10s] awesomebar doesn't always work → awesomebar doesn't always work
having reliable STR would greatly help.
I don't think E10s should have any effect on the awesomebar, fwiw.
Component: General → Location Bar
No longer blocks: e10s
Summary: awesomebar doesn't always work → [e10s] awesomebar doesn't always work
Need STR or more information for this to be actionable - Chris, can you let us know if flipping the unified pref helps (after restarting/opening new window)?
Flags: needinfo?(catlee)
Flags: firefox-backlog?
Flags: firefox-backlog-
Summary: [e10s] awesomebar doesn't always work → awesomebar doesn't always work
Flipping this pref doesn't seem to fix the issue.

Here are my STR:
1) open https://bugzilla.mozilla.org/show_bug.cgi?id=1073553. The title of this bug is "No well-defined or documented way to run unittests for build/tools repository locally".
2) open a new tab, start typing "no well" in the URL bar. no relevant results appear. once I get "no well-defined" typed, there are no results offered
3) clear URL bar, start typing "1073553". I'm offered the open tab as a suggestion, but without the title. e.g. https://www.dropbox.com/s/c8r4filn780hqvf/2014-10-15%2018.18.52.jpg?dl=0

It seems as if the titles aren't being considered.

4) close the tab opened in step 1.)
5) as 2). no results offered
6) as 3). no results offered
Flags: needinfo?(catlee)
changing blocked bug since unified doesn't seem to make a difference.

(In reply to Chris AtLee [:catlee] from comment #7)
> 1) open https://bugzilla.mozilla.org/show_bug.cgi?id=1073553. The title of
> this bug is "No well-defined or documented way to run unittests for
> build/tools repository locally".
> 2) open a new tab, start typing "no well" in the URL bar. no relevant
> results appear. once I get "no well-defined" typed, there are no results
> offered

Interesting, I see the result correctly, if I type "no well-defined" I get a switch-to-tab entry for the open tab.

3) clear URL bar, start typing "1073553". I'm offered the open tab as a suggestion, but without the title. e.g. https://www.dropbox.com/s/c8r4filn780hqvf/2014-10-15%2018.18.52.jpg?dl=0

I get an entry with a proper title...

Could you please check if any of the browser.urlbar prefs in about:config is set to a non-default value?

Do you have any add-on that interacts with the locationbar?

Could you please check your database with my maintenance add-on? https://addons.mozilla.org/en-US/firefox/addon/places-maintenance/
Blocks: 1071461
No longer blocks: UnifiedComplete
The only non-default config value I have set is the browser.urlbar.unifiedcomplete one.

I have whimsy installed (of course!), and that interacts with the locationbar.

Here's what your maintenance add-on reports:
> Integrity check
+ The database is sane
> Coherence check
+ The database is coherent
> Statistics
Database size is 71680 KiB
user_version is 24
page_size is 32768
cache_size is -2048
journal_mode is wal
synchronous is 1
History can store a maximum of 104858 unique pages
Table moz_places has 104850 records
Table moz_historyvisits has 209401 records
Table moz_inputhistory has 1593 records
Table moz_bookmarks has 843 records
Table moz_bookmarks_roots has 5 records
Table moz_keywords has 3 records
Table sqlite_sequence has 1 records
Table moz_favicons has 5065 records
Table moz_annos has 1297 records
Table moz_anno_attributes has 14 records
Table moz_items_annos has 69 records
Table sqlite_stat1 has 15 records
Table moz_hosts has 7961 records
Index sqlite_autoindex_moz_inputhistory_1
Index sqlite_autoindex_moz_bookmarks_roots_1
Index sqlite_autoindex_moz_keywords_1
Index sqlite_autoindex_moz_favicons_1
Index sqlite_autoindex_moz_anno_attributes_1
Index sqlite_autoindex_moz_hosts_1
Index moz_places_faviconindex
Index moz_places_hostindex
Index moz_places_visitcount
Index moz_places_frecencyindex
Index moz_places_lastvisitdateindex
Index moz_historyvisits_placedateindex
Index moz_historyvisits_fromindex
Index moz_historyvisits_dateindex
Index moz_bookmarks_itemindex
Index moz_bookmarks_parentindex
Index moz_bookmarks_itemlastmodifiedindex
Index moz_places_url_uniqueindex
Index moz_places_guid_uniqueindex
Index moz_bookmarks_guid_uniqueindex
Index moz_annos_placeattributeindex
Index moz_items_annos_itemattributeindex
Index moz_favicons_guid_uniqueindex
Any other information I can provide? This is really annoying, it seems like awesomebar isn't saving any recent data at all.
I have no great ideas so far :( I wonder if it's a Linux only problem, but still I would not be sure what would it be related to (there's not much platform related code in the locationbar).

any relevant prefs with non default value?
Any errors reported to the console that seem to originate from Sqlite/Places/Browser?

I wonder if this is another kind of database corruption that integrity_check cannot detect... Would you mind trying to follow the procedure I outlined in https://bugzilla.mozilla.org/show_bug.cgi?id=1085161#c3 and see if that helps at all?
I would still be surprised, cause you seem to point out that also switch to tab is affected and that data is not on disk at all. Maybe system sqlite of your distro is related, somehow.
Well, that's interesting. While running, I have these 3 files:
-rw-r--r-- 1 catlee catlee 73400320 Oct 29 17:47 places.sqlite
-rw-r--r-- 1 catlee catlee    32768 Oct 29 17:47 places.sqlite-shm
-rw-r--r-- 1 catlee catlee   491912 Oct 29 17:47 places.sqlite-wal

The -shm and -wal files do not go away after shutting down. I tried opening places.sqlite with the `sqlite3` binary, and the -wal file did not disappear.
the wal should be merged wen the last connection closes, opening and closing it should make it go away. The only case it shouldn't disappear IIRC is in case of a crash, in such a case it should be merged on the next opening (but it won't shrink cause wal file never shrinks).
So provided you closed Firefox and for whatever reason it crashed before proper shutdown, when you open the db with sqlite3 it should be ok.

Could be interesting to try a copy of that database in a debug build and see if on shutdown there's any warning spew from Storage. Since it's not normal that closing fails.

I'd try to proceed regardless with the .clone even if you still see the -wal file, provided you have a backup of the files somewhere (the .shm file is not needed).
I got some warnings when running the clone command:
sqlite> .clone places.sqlite
moz_places... done
moz_historyvisits... done
moz_inputhistory... done
moz_bookmarks... done
moz_bookmarks_roots... done
moz_keywords... done
sqlite_sequence... Error: object name reserved for internal use: sqlite_sequence
SQL: [CREATE TABLE sqlite_sequence(name,seq)]
done
moz_favicons... done
moz_annos... done
moz_anno_attributes... done
moz_items_annos... done
sqlite_stat1... Error: object name reserved for internal use: sqlite_stat1
SQL: [CREATE TABLE sqlite_stat1(tbl,idx,stat)]
Error 1: no such table: sqlite_stat1 on [SELECT * FROM "sqlite_stat1"]
done
moz_hosts... done
sqlite_autoindex_moz_inputhistory_1... done
sqlite_autoindex_moz_bookmarks_roots_1... done
sqlite_autoindex_moz_keywords_1... done
sqlite_autoindex_moz_favicons_1... done
sqlite_autoindex_moz_anno_attributes_1... done
sqlite_autoindex_moz_hosts_1... done
moz_places_faviconindex... done
moz_places_hostindex... done
moz_places_visitcount... done
moz_places_frecencyindex... done
moz_places_lastvisitdateindex... done
moz_historyvisits_placedateindex... done
moz_historyvisits_fromindex... done
moz_historyvisits_dateindex... done
moz_bookmarks_itemindex... done
moz_bookmarks_parentindex... done
moz_bookmarks_itemlastmodifiedindex... done
moz_places_url_uniqueindex... done
moz_places_guid_uniqueindex... done
moz_bookmarks_guid_uniqueindex... done
moz_annos_placeattributeindex... done
moz_items_annos_itemattributeindex... done
moz_favicons_guid_uniqueindex... done

My resulting places.sqlite is 10M while the original was 70M.

I'm still having the same problem though - I don't get results for active or recent tabs from the awesomebar.
(In reply to Chris AtLee [:catlee] from comment #14)
> My resulting places.sqlite is 10M while the original was 70M.

this is very surprising... 

> I'm still having the same problem though - I don't get results for active or
> recent tabs from the awesomebar.

I'm running out of ideas, must be something very specific on you distribution :(

Did you try to copy the same profile to a different machine (with a different distribution or OS) and see if the problem persists, so we can include/exclude a profile bug.

are all browser.urlbar prefs at default value?
Is this still happening in Nightly with UnifiedComplete?
Flags: needinfo?(catlee)
I pinged catlee on IRC and he said that this no longer reproduces, but he's hitting bug 1205735 now instead.
Status: NEW → RESOLVED
Closed: 9 years ago
Flags: needinfo?(catlee)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.