Bug 402242 - Automatic tab unload
Summary: Automatic tab unload
Status: REPORTED
Alias: None
Product: Falkon
Classification: Applications
Component: extensions (show other bugs)
Version: unspecified
Platform: Other Unspecified
: NOR wishlist
Target Milestone: ---
Assignee: David Rosca
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-17 15:23 UTC by Matthias
Modified: 2021-03-09 17:51 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias 2018-12-17 15:23:26 UTC
SUMMARY

Firefox provides a tool, that offers automatic tab unloading. 
Due that, I had 700 tabs open, before I switched to Falkon. 
All worked fine. In Falkon, my desktop machine freeze at ~ 20 


STEPS TO REPRODUCE
1. Implement a mechanism that automatically unloads unused tabs. 

OBSERVED RESULT

Freezing computer

EXPECTED RESULT

love this one: https://addons.mozilla.org/en-US/firefox/addon/auto-tab-discard/

SOFTWARE/OS VERSIONS

KaOS

KDE Plasma Version: 5.14.4
KDE Frameworks Version: 5.53.0
Qt Version: 5.12.0
Comment 1 Juraj 2019-05-28 20:06:02 UTC
Hello,

I put together a simple prototype (Python extension)
https://www.pling.com/p/1307514/

To report an issue with it please use GitHub:
https://github.com/SGOrava/Unloader
Comment 2 vialav 2019-06-01 11:33:43 UTC
@Juraj
I've tried your extension (Unloader) on my bleeding-edge compiled Falkon 3.1.0 (65259cb0), and it crashed my browser. The extension was installed through the Install link with ocs-url. 

BTW, in general, it would be nice if Falkon respected Ctrl+Tab behaviour for the last tab, but it's the subject for another ticket.
Comment 3 Juraj 2019-06-01 14:58:27 UTC
Hello, Thank you for your report.
Can you be more precise about the crash?

What Falkon version did you use? (Check in Menu > Help > About Falkon > Application version)

Was there any message or it just crashed ?
It is working fine for me here, no crash what so ever, so I would be grateful for a feedback.

The problem can also be caused by broken python support on your side, check if other python extensions can run (Run Action, Hello Python)

PS:
> on my bleeding-edge compiled Falkon 3.1.0 (65259cb0)
Sorry, I am unable to find commit with such id
I also use use development version: Application version 3.1.99 (fbf7f956)
Comment 4 vialav 2019-06-01 15:13:43 UTC
Hi, Juraj, 

Mine was rather the (unhelpful) ID of my local merge commit, sorry. It was shown in 'About'…

You reply gives me a hope, that a number of thing might, actually, work. Among which are also non-working 'Actions', and python[3] plugins giving me strange b'b'' -encodings (YouTube and friends). I had very limited time to investigate those. 

I've compiled Falkon with IntelMKL and -O3 -mtune-native optimization. Running Falkon crash through gdb it gives me only (srry for possibly unhelpful a long listing):

─── Output/messages ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
libpng warning: iCCP: known incorrect sRGB profile

Thread 1 "falkon" received signal SIGSEGV, Segmentation fault.
PyObject_Free (p=0xffffffffffffffff) at ../Objects/obmalloc.c:1013
1013	../Objects/obmalloc.c: No such file or directory.
─── Assembly ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
0x00007fff4e6f8223 PyObject_Free+3  je     0x7fff4e6f8270 <PyObject_Free+80>
0x00007fff4e6f8225 PyObject_Free+5  mov    %rdi,%rdx
0x00007fff4e6f8228 PyObject_Free+8  and    $0xfffffffffffff000,%rdx
0x00007fff4e6f822f PyObject_Free+15 mov    0x20(%rdx),%eax
0x00007fff4e6f8232 PyObject_Free+18 cmp    %eax,0x447390(%rip)        # 0x7fff4eb3f5c8 <maxarenas>
0x00007fff4e6f8238 PyObject_Free+24 jbe    0x7fff4e6f8261 <PyObject_Free+65>
0x00007fff4e6f823a PyObject_Free+26 mov    0x44737f(%rip),%rcx        # 0x7fff4eb3f5c0 <arenas>
─── Expressions ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─── History ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─── Memory ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─── Registers ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   rax 0x00007fff4eb0a5a0    rbx 0x00007fff344d5078    rcx 0x00007fff344d7078    rdx 0xfffffffffffff000    rsi 0x00007fff344d50b8    rdi 0xffffffffffffffff    rbp 0x00007fff4e5896c0    rsp 0x00007fffffff93e8
    r8 0x00007fff344d4158     r9 0x000000000000000f    r10 0x00007fff344d7068    r11 0x00007ffff7cf7c00    r12 0x00007fff344d2080    r13 0x00007fff344d4048    r14 0x0000555555eaa308    r15 0x00007fff9c06d800
   rip 0x00007fff4e6f822f eflags [ PF SF IF RF ]        cs 0x00000033             ss 0x0000002b             ds 0x00000000             es 0x00000000             fs 0x00000000             gs 0x00000000        
─── Source ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Cannot display "./build-shared/../Objects/obmalloc.c" ([Errno 2] No such file or directory: './build-shared/../Objects/obmalloc.c')
─── Stack ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
[0] from 0x00007fff4e6f822f in PyObject_Free+15 at ../Objects/obmalloc.c:1013
arg p = 0xffffffffffffffff
[1] from 0x00007fff4e6dd9d9 in unicode_dealloc.lto_priv.472 at ../Objects/unicodeobject.c:394
arg unicode = <error reading variable: Cannot access memory at address 0xffffffffffffffff>
arg unicode = <optimised out>
[+]
─── Threads ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
[36] id 6702 name Thread (pooled) from 0x00007ffff65c4916 in futex_reltimed_wait_cancelable+29 at ../sysdeps/unix/sysv/linux/futex-internal.h:142
[35] id 6701 name Thread (pooled) from 0x00007ffff65c4916 in futex_reltimed_wait_cancelable+29 at ../sysdeps/unix/sysv/linux/futex-internal.h:142
[32] id 6380 name CachePoolWorker from 0x00007ffff65c43bb in futex_wait_cancelable+27 at ../sysdeps/unix/sysv/linux/futex-internal.h:88
[31] id 6379 name CachePoolWorker from 0x00007ffff65c43bb in futex_wait_cancelable+27 at ../sysdeps/unix/sysv/linux/futex-internal.h:88
[30] id 6373 name BrowserBlocking from 0x00007ffff65c4916 in futex_reltimed_wait_cancelable+29 at ../sysdeps/unix/sysv/linux/futex-internal.h:142
[29] id 6368 name Thread (pooled) from 0x00007ffff65c4916 in futex_reltimed_wait_cancelable+29 at ../sysdeps/unix/sysv/linux/futex-internal.h:142
[28] id 6367 name Thread (pooled) from 0x00007ffff65c4916 in futex_reltimed_wait_cancelable+29 at ../sysdeps/unix/sysv/linux/futex-internal.h:142
[27] id 6366 name QNetworkAccessM from 0x00007ffff7c50ba9 in __GI___poll+73 at ../sysdeps/unix/sysv/linux/poll.c:29
[26] id 6365 name Qt bearer threa from 0x00007ffff7c50ba9 in __GI___poll+73 at ../sysdeps/unix/sysv/linux/poll.c:29
[25] id 6364 name threaded-ml from 0x00007ffff7c50ba9 in __GI___poll+73 at ../sysdeps/unix/sysv/linux/poll.c:29
[24] id 6363 name Chrome_ChildIOT from 0x00007ffff7c5d2cf in epoll_wait+79 at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
[23] id 6362 name Chrome_InProcGp from 0x00007ffff65c4916 in futex_reltimed_wait_cancelable+29 at ../sysdeps/unix/sysv/linux/futex-internal.h:142
[22] id 6361 name AudioThread from 0x00007ffff65c4916 in futex_reltimed_wait_cancelable+29 at ../sysdeps/unix/sysv/linux/futex-internal.h:142
[21] id 6360 name CompositorTileW from 0x00007ffff65c43bb in futex_wait_cancelable+27 at ../sysdeps/unix/sysv/linux/futex-internal.h:88
[20] id 6359 name BrowserBlocking from 0x00007ffff65c4916 in futex_reltimed_wait_cancelable+29 at ../sysdeps/unix/sysv/linux/futex-internal.h:142
[19] id 6358 name IndexedDB from 0x00007ffff65c43bb in futex_wait_cancelable+27 at ../sysdeps/unix/sysv/linux/futex-internal.h:88
[18] id 6357 name Chrome_IOThread from 0x00007ffff7c5d2cf in epoll_wait+79 at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
[17] id 6356 name Chrome_CacheThr from 0x00007ffff65c4916 in futex_reltimed_wait_cancelable+29 at ../sysdeps/unix/sysv/linux/futex-internal.h:142
[16] id 6355 name Chrome_ProcessL from 0x00007ffff65c43bb in futex_wait_cancelable+27 at ../sysdeps/unix/sysv/linux/futex-internal.h:88
[15] id 6354 name Chrome_FileUser from 0x00007ffff65c43bb in futex_wait_cancelable+27 at ../sysdeps/unix/sysv/linux/futex-internal.h:88
[14] id 6353 name Chrome_FileThre from 0x00007ffff7c5d2cf in epoll_wait+79 at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
[13] id 6352 name Chrome_DBThread from 0x00007ffff65c43bb in futex_wait_cancelable+27 at ../sysdeps/unix/sysv/linux/futex-internal.h:88
[12] id 6351 name WorkerPool/6351 from 0x00007ffff65c4916 in futex_reltimed_wait_cancelable+29 at ../sysdeps/unix/sysv/linux/futex-internal.h:142
[11] id 6350 name WorkerPool/6350 from 0x00007ffff65c4916 in futex_reltimed_wait_cancelable+29 at ../sysdeps/unix/sysv/linux/futex-internal.h:142
[10] id 6349 name inotify_reader from 0x00007ffff7c534c7 in __GI___select+87 at ../sysdeps/unix/sysv/linux/select.c:41
[9] id 6348 name NetworkChangeNo from 0x00007ffff7c5d2cf in epoll_wait+79 at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
[8] id 6347 name falkon from 0x00007ffff7c2055a in __GI___waitpid+74 at ../sysdeps/unix/sysv/linux/waitpid.c:30
[7] id 6342 name sandbox_ipc_thr from 0x00007ffff7c50ba9 in __GI___poll+73 at ../sysdeps/unix/sysv/linux/poll.c:29
[6] id 6341 name falkon:disk$0 from 0x00007ffff65c43bb in futex_wait_cancelable+27 at ../sysdeps/unix/sysv/linux/futex-internal.h:88
[5] id 6339 name QDBusConnection from 0x00007ffff7c50ba9 in __GI___poll+73 at ../sysdeps/unix/sysv/linux/poll.c:29
[4] id 6338 name gdbus from 0x00007ffff7c50ba9 in __GI___poll+73 at ../sysdeps/unix/sysv/linux/poll.c:29
[3] id 6337 name gmain from 0x00007ffff7c50ba9 in __GI___poll+73 at ../sysdeps/unix/sysv/linux/poll.c:29
[2] id 6336 name QXcbEventReader from 0x00007ffff7c50ba9 in __GI___poll+73 at ../sysdeps/unix/sysv/linux/poll.c:29
[1] id 6332 name falkon from 0x00007fff4e6f822f in PyObject_Free+15 at ../Objects/obmalloc.c:1013
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
>>>
Comment 5 vialav 2019-06-01 15:15:12 UTC
So here is my Falkon version, it was compiled from a commit of May 20.

$ dpkg -l falkon
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version                              Architecture Description
+++-==============-====================================-============-=============================================
ii  falkon         3.1.0+git20190520-0ubuntu1+mkl~18.04 amd64        lightweight web browser based on Qt WebEngine
Comment 6 Matthias 2019-06-03 07:07:52 UTC
WOW, super! Thanks for developing it