Closed Bug 1854000 Opened 1 year ago Closed 7 months ago

Extension Causes IndexDB Corruption

Categories

(WebExtensions :: Developer Outreach, task, P3)

Firefox 117
task

Tracking

(Not tracked)

RESOLVED MOVED

People

(Reporter: bugzilla, Unassigned)

Details

Steps to reproduce:

  1. Install Port Authority https://addons.mozilla.org/en-US/firefox/addon/port-authority/
  2. After a while it will randomly crash causing Firefox to be unusable. This is very hard to reproduce but has happened to lots of people.

Actual results:

Firefox will bootloop infinitely and the only way to fix it is to boot into Firefox safemode and delete Port Authority and reinstall it. Interestingly, after reinstalling it will no longer bootloop.

Related Issues Opened:
https://github.com/ACK-J/Port_Authority/issues/18
https://github.com/ACK-J/Port_Authority/issues/19
https://github.com/ACK-J/Port_Authority/issues/20 (Firefox Crash Report)
https://github.com/ACK-J/Port_Authority/issues/22 (Supplied Corrupted Files)

Issue 20 supplied their firefox crash report within the issue which could be useful. Issue 22 has debugged this the furthest finding that:
"In the user profile folder, there are two files in the IndexedDB storage that cause a crash when they are present in the directory
%USERPROFILE%\AppData\Roaming\Mozilla\Firefox\Profiles\l7oajxa5.nightly\storage\default\moz-extension+++0e9f146b-ad34-4208-bd97-b2042b1fa6d4^userContextId=4294967295\idb\3647222921wleabcEoxlt-eengsairo.files The files are named "14 and "15" which contain binary data that seems like Snappy compressed JSON containing the strings "blocked ports" and "blocked hosts" respectively. When these files are transferred between profiles, they consistently cause Firefox to crash. When deleted, the issue is fixed. I've uploaded these two files for debugging purposes: corrupt data.zip

I don't know how these files got there or how they became corrupted, but it may indicate an issue with Firefox itself rather than the add-on. From some brief digging, this directory should not be accessible to extensions at all(https://www.reddit.com/r/firefox/comments/b47uur/comment/ej6x2bh/?context=3), and WebExtensions should not be able to crash Firefox anyways."

I thought I found the solution when there was a stringify issue causing the extension to run out of RAM (https://github.com/ACK-J/Port_Authority/issues/27). However, after I fixed that a user still reported their Firefox crashing (https://github.com/ACK-J/Port_Authority/issues/27)

Expected results:

It shouldn't crash :)

The Bugbug bot thinks this bug should belong to the 'WebExtensions::Untriaged' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Product: Firefox → WebExtensions

Hello,

I did not manage to reproduce the issue on my end on the latest Release (117.0.1/20230912013654) under Windows 10 x64.

I’ve tried both simply installing the extension and waiting for the crash to occur and using the corrupted data files mentioned at https://github.com/ACK-J/Port_Authority/issues/22.
Throughout both cases above I also restarted the browser multiple times, as from reading through the linked issues the crash occurred for some users on browser start.

Overall, there were no crashes on my end.

From the linked issue https://github.com/ACK-J/Port_Authority/issues/27 it looks like some looping or recursive behavior is stringifying JSON repeatedly (resulting repeated escaping in \\\\\\\\\\\\\\\"), so Firefox is probably just running out of memory after a while because of bad behavior from the extension. Moving to dev outreach, unless they someone can provide a reliable STR that shows an issue with Firefox.

Severity: -- → N/A
Type: defect → task
Component: Untriaged → Developer Outreach
Priority: -- → P3

Reached out to the developer via AMO

Status: UNCONFIRMED → RESOLVED
Closed: 7 months ago
Resolution: --- → MOVED
You need to log in before you can comment on or make changes to this bug.