third-stats icon indicating copy to clipboard operation
third-stats copied to clipboard

Query never completes

Open RadxaYuntian opened this issue 11 months ago • 16 comments

Describe the bug

Similar to #19, the Mails total number stopped increasing and the progress bar is full. But the spinning wheel is still going and the graph is never shown on the page.

To Reproduce Steps to reproduce the behavior:

  1. Open stat page
  2. See error

Expected behavior

Data collection ends in reasonable amount of time with graphs.

Screenshots

Image

System (please complete the following information):

  • OS: Arch Linux (updated today)
  • Thunderbird Version: 128.5.2esr (64-bit)

Additional context Add any other context about the problem here.

RadxaYuntian avatar Jan 20 '25 07:01 RadxaYuntian

Thank you for this report! Can you please check the console if there are any errors thrown during the data processing?

devmount avatar Jan 20 '25 07:01 devmount

So one thing I'm not sure if you are aware is that there are 2 ThirdStats entries in the Debug menu. One listed under Tabs (since I do have the stat tab open and waiting for it to return), and one under Extensions. I tried a few commands in both and neither get me anything similar to what other people were posting, so I refrained posting this detail in the original report.

Can you tell me which context should I inspect into?

RadxaYuntian avatar Jan 20 '25 08:01 RadxaYuntian

That's weird, there should be only one, the one you installed from ATN. Can you show a screenshot of both entries?

This is how it looks on my end (sorry for the German screenshots):

Image

Image

devmount avatar Jan 20 '25 08:01 devmount

No worries. I can check there.

Here is the Tabs entry:

Image

RadxaYuntian avatar Jan 20 '25 08:01 RadxaYuntian

There is no error message when it reached this final state:

Image

RadxaYuntian avatar Jan 20 '25 08:01 RadxaYuntian

That is unfortunate, that there is no output at all. I'll work on a debug mode for ThirdStats (#447) to provide some more information, were the processing is stuck. Once that landed, you can test again and have some (hopefully) more useful information.

devmount avatar Jan 22 '25 20:01 devmount

I implemented the debug mode now and released ThirdStats 1.12.0 - you can wait until its approved on ATN or download the XPI file from the release and install it manually. Let me know if that was helpful in any way.

devmount avatar Jan 25 '25 23:01 devmount

This is the final state:

Image

Is it possible for a folder to contain a link to its ancestors? Since the stats (and the debug log) is only updated when a folder is counted, I feel the thread is stuck in an infinite loop.

It looks flat on my TB here, but I had misclicks before where some folders were moved under another folder, which I moved out later:

Image

It is also flat in my mail provider's web UI:

Image

RadxaYuntian avatar Feb 05 '25 08:02 RadxaYuntian

Is it possible for a folder to contain a link to its ancestors? Since the stats (and the debug log) is only updated when a folder is counted, I feel the thread is stuck in an infinite loop.

No, this shouldn't be possible. Looks more like there is an issue in your linux-netdev folder which leaves Thunderbird / ThirdStats stuck while processing.

Since we have a similar issue with #451 now: Do you have errors in your console, if you open the add-on popup (when on the main Thunderbird page, click the small ThirdStats icon on the top right)?

devmount avatar Feb 10 '25 21:02 devmount

No error here:

Image

RadxaYuntian avatar Feb 11 '25 04:02 RadxaYuntian

Ok, it might have something to do with special folders in Thunderbird. I released ThirdStats 1.12.1 which contains a fix to exclude all virtual folders from processing. Once it is approved on ATN please test if this changes anything on this issue.

devmount avatar Apr 13 '25 18:04 devmount

Seems to be the same as before. I'll let this run over the weekend to see if that changes anything.

Image

RadxaYuntian avatar Apr 18 '25 11:04 RadxaYuntian

I forgot about this and rebooted my machine today. Luckily I have TB in autostart, and it reopened ThirdStats as the previously opened tab. This has been running over 1 hour now and it is still not finished. Basically the above screenshot sans a few more mails during the weekend.

RadxaYuntian avatar Apr 21 '25 07:04 RadxaYuntian

Ok. Looks like I really need to think of a way to extend the debug mode. Like not only outputting stuff to the console, but more like running a test suite with some more useful information (folders or messages that cannot be processed for whatever reason) nicely shown in the add-on options (or a dedicated debug page). Created #462 for that.

And I should implement a timeout for folder processing. Like the processing of one single folder should never exceed e.g. 2 minutes. I have a folder having alone 16k messages, which only take a few seconds to process (on a mediocre laptop with an i5). This way, the processing should at least come to end and results should be shown to you, even if there might be messages or folders excluded for some reason. Created #463 for that.

But I also want to transparently set expectations here that those things take time to implement, which I only have so much available next to family and work 😇

devmount avatar May 02 '25 15:05 devmount

I'm reporting this issue because I'm loading 11.36 million messages and calculating statistics. My environment is Windows 11, Thunderbird 143.0.1, and ThirdStats 1.12.1. The debug message is as follows:

TypeError: can't access property Symbol.iterator, Startup.KeyShortcuts is undefined

Stacktrace _addWindowHostShortcuts@resource://devtools/client/framework/toolbox.js:1388:24 _addChromeEventHandlerEvents@resource://devtools/client/framework/toolbox.js:1210:10 open@resource://devtools/client/framework/toolbox.js:1029:12

Tamura-Teika avatar Sep 26 '25 07:09 Tamura-Teika

@Tamura-Teika Thanks for your report. I created #478 for it to keep this thread related to @RadxaYuntian's issue.

devmount avatar Sep 29 '25 15:09 devmount