Opened 5 years ago

Last modified 20 months ago

#12494 new defect

bundle 3.6.2_en-64bit opens too many files on Linux

Reported by: cypherpunks Owned by: tbb-team
Priority: Medium Milestone:
Component: Applications/Tor Browser Version:
Severity: Normal Keywords: needs-triage
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

After a while (if you visit many-many pages) the Tor browser starts misbehaving - can't save files, difficulties with loading/displaying pages, and eventually all fonts (i.e., all text) suddenly disappears from pages and menus as well (except for a leading underscore _). You get errors on console by some shm_*() function (cannot recall name correctly) complaining about too many open files and lsof indeed shows bazillion files for the Tor firefox in directory tor-browser_en-US/Data/Browser/profile.default/thumbnails/ mostly in deleted status. Clearly unexpected behavior.

One workaround is to sigterm the browser with kill + pid and when you restart recover all tabs etc. Firefox also has docs on disabling thumbnail collection or usage altogether which should work (have not tried it). I decided to replace the thumbnails directory with an immutable file and have not seen the bug since.

Saw this with the latest 3.6.2 but also with earlier ones.

Child Tickets

Attachments (1)

tbb_settings.png (92.4 KB) - added by cypherpunks 5 years ago.
TBB privacy settings

Download all attachments as: .zip

Change History (14)

comment:1 Changed 5 years ago by cypherpunks

One workaround is to sigterm the browser with kill + pid and when you restart recover all tabs etc.

Did you enable to record browsing history or how you gets tabs back?

comment:2 in reply to:  1 Changed 5 years ago by cypherpunks

Replying to cypherpunks:

One workaround is to sigterm the browser with kill + pid and when you restart recover all tabs etc.

Did you enable to record browsing history or how you gets tabs back?

Yes it was on 'custom settings' mainly so that I can recover accidentally closed tabs BUT browsing-and-download-history and search-and-form-history checkboxes were unmarked. Also had cookies enabled (with mild restrictions) but that is unlikely to be relevant.

comment:3 Changed 5 years ago by cypherpunks

unlikely to be relevant.

Try to test with default settings. By 'custom settings' you probably enabled to write thumbnails to disk.

Last edited 5 years ago by cypherpunks (previous) (diff)

comment:4 in reply to:  3 Changed 5 years ago by cypherpunks

Replying to cypherpunks:

unlikely to be relevant.

Try to test with default settings. By 'custom settings' you probably enabled to write thumbnails to disk.

Are you saying* that choosing 'Use custom settings for history' in the Privacy menu silently enables this setting?? I would find that strange but perhaps not unexpected since in some earlier bundle versions some of these settings did not work properly anyway (such as "When in location bar, suggest History" was using bookmarks too).

Anyway, even in that case saving thumbnails to disk should not hoard file descriptors.

[I uploaded a screenshot of those settings. Regarding submenus, there are no exceptions for cookies and upon exit the browser is instructed to clear everything.]

*UPDATE: or you mean that thumbnail collection is on by default but setting "Never remember history" overrides that?

Last edited 5 years ago by cypherpunks (previous) (diff)

Changed 5 years ago by cypherpunks

Attachment: tbb_settings.png added

TBB privacy settings

comment:5 Changed 5 years ago by cypherpunks

or you mean that thumbnail collection is on by default but setting "Never remember history" overrides that?

It's about private browsing mode probably. You disabled to store browsing history, but private browsing mode was disabled too by custom settings.

Anyway, even in that case saving thumbnails to disk should not hoard file descriptors.

Right. Only question where this bug from, TBB's patches or vanilla Firefox ESR itself, or something else.

comment:6 Changed 5 years ago by cypherpunks

Writing thumbnails to disk are reproducible with disabled private browsing mode (with or without remembering another stuff like history). It's default behavior for vanilla Firefox 24-ESR too.

Then browser delete thumbnails later (can't reliably reproduce steps for that) while keeps fd open, fd leak in result.

comment:7 Changed 5 years ago by cypherpunks

The same behavior reproducible for vanilla Firefox 24-ESR, with the same settings it unlinks thumbnails but keeps fds. If to enable history then it doesn't unlinks files but all fds still open while tabs closed, and seems like no limits, every new tab with different output will increase number of thumbnails files. Unless some limits actually exists, it proves again: Firefox was not designed for security and safety. Keep minimal number of tabs and do periodic restart. It's only solution.

Last edited 5 years ago by cypherpunks (previous) (diff)

comment:8 Changed 5 years ago by cypherpunks

Ok, this is confirmed. Disabling/preventing thumbnails should also work, will check back here in a week to tell.

comment:9 Changed 5 years ago by gk

Component: - Select a componentTor bundles/installation
Owner: set to erinn

comment:10 Changed 5 years ago by cypherpunks

OP here - confirming that mitigation I originally suggested indeed works. Have not had to restart the browser ever since I made the thumbnails directory impossible to write to (I replaced it with a file of same name).

Last edited 5 years ago by cypherpunks (previous) (diff)

comment:11 Changed 5 years ago by erinn

Keywords: needs-triage added

comment:12 Changed 4 years ago by cypherpunks

Component: Tor bundles/installationTor Browser
Owner: changed from erinn to tbb-team

comment:13 Changed 20 months ago by teor

Severity: Normal

Set all open tickets without a severity to "Normal"

Note: See TracTickets for help on using tickets.