Skip to content
This repository has been archived by the owner on Nov 29, 2022. It is now read-only.

library instability #85

Open
pirate486743186 opened this issue Apr 20, 2019 · 16 comments
Open

library instability #85

pirate486743186 opened this issue Apr 20, 2019 · 16 comments

Comments

@pirate486743186
Copy link
Contributor

It's even worse now. It crashes now with:

**
Gtk:ERROR:../../../../gtk/gtkicontheme.c:4026:proxy_pixbuf_destroy: assertion failed: (icon_info->proxy_pixbuf != NULL)
Aborted (core dumped)
@pirate486743186
Copy link
Contributor Author

pirate486743186 commented Apr 21, 2019

it doesn't happen all the time...
A yea, it just now crashed with "Segmentation fault (core dumped)"
And once it froze with CPU going to 100%.....
And one time out of two, all the books disappear....
(all this by switching tabs in the library)

This is objectively... not good. :D
Maybe if you reverted that commit and put it in a branch for now?

@multiSnow
Copy link
Owner

0405a23 tried to fix this issue.

@pirate486743186
Copy link
Contributor Author

after a bit of testing.

This is definitely an improvement.
Thumbnails don't vanish anymore. This was the worse problem.

I got just one crash so far. Same error message as the first message here. (low probability)

Gtk:ERROR:../../../../gtk/gtkicontheme.c:4026:proxy_pixbuf_destroy: assertion failed: (icon_info->proxy_pixbuf != NULL)
Aborted (core dumped)

and got some of these errors, with no visible practical problem.

(mcomixstarter.py:6823): Gtk-CRITICAL **: 18:08:37.206: gtk_list_store_set_value: assertion 'iter_is_valid (iter, list_store)' failed
(they could be GTK bugs)

@epsilon-0
Copy link

Confirming, this is happening on my Gentoo machine as well.
error log:

/usr/lib/python3.7/site-packages/mcomix/library/book_area.py:469: Warning: g_object_ref: assertion 'old_val > 0' failed
  book_pixbuf = self.render_icon(Gtk.STOCK_APPLY, Gtk.IconSize.LARGE_TOOLBAR)

(mcomix:21404): Gtk-WARNING **: 19:04:00.751: Error loading theme icon 'gtk-apply' for stock: 
**
Gtk:ERROR:/var/tmp/portage/x11-libs/gtk+-3.24.22/work/gtk+-3.24.22/gtk/gtkicontheme.c:4047:proxy_pixbuf_destroy: assertion failed: (icon_info->proxy_pixbuf != NULL)
Bail out! Gtk:ERROR:/var/tmp/portage/x11-libs/gtk+-3.24.22/work/gtk+-3.24.22/gtk/gtkicontheme.c:4047:proxy_pixbuf_destroy: assertion failed: (icon_info->proxy_pixbuf != NULL)
[1]    21404 IOT instruction  mcomix

@epsilon-0
Copy link

Some more error logs

(mcomix:28798): Gdk-CRITICAL **: 19:11:17.369: gdk_wayland_window_handle_configure_popup: assertion 'impl->transient_for' failed
Gdk-Message: 19:11:23.798: Window 0x556f3ffb6200 is a temporary window without parent, application will not be able to position it on screen.

(mcomix:28798): Gdk-CRITICAL **: 19:11:23.801: gdk_wayland_window_handle_configure_popup: assertion 'impl->transient_for' failed
19:12:48 [Thread-30] ERROR: ! Extraction error: Bad magic number for file header
**
Gtk:ERROR:/var/tmp/portage/x11-libs/gtk+-3.24.22/work/gtk+-3.24.22/gtk/gtkicontheme.c:4047:proxy_pixbuf_destroy: assertion failed: (icon_info->proxy_pixbuf != NULL)
Bail out! Gtk:ERROR:/var/tmp/portage/x11-libs/gtk+-3.24.22/work/gtk+-3.24.22/gtk/gtkicontheme.c:4047:proxy_pixbuf_destroy: assertion failed: (icon_info->proxy_pixbuf != NULL)
[1]    28798 IOT instruction  mcomix

@cdglitch
Copy link

cdglitch commented Feb 2, 2021

This still happens with the arch linux build, usually from scrolling through library too fast

** Gtk:ERROR:../gtk/gtk/gtkicontheme.c:4047:proxy_pixbuf_destroy: assertion failed: (icon_info->proxy_pixbuf != NULL) Bail out! Gtk:ERROR:../gtk/gtk/gtkicontheme.c:4047:proxy_pixbuf_destroy: assertion failed: (icon_info->proxy_pixbuf != NULL) Aborted (core dumped)

@epsilon-0
Copy link

Yes, same error when scrolling fast through the library.

@cdglitch
Copy link

Interesting development - I found a solution to the instability: Put everything in the library on an SSD. It seems that theres a relation between how long the spinup on my old mechanical drive takes to start feeding data and crashes in the library view.

Since moving everything to an SSD, not only do I not get random hangs in library view but I have been completely crash free. Even when scrolling very fast which used to be a guaranteed crash.

@epsilon-0
Copy link

@cdglitch Can't confirm the solution, I'm on an SSD and still getting crashes.

@cdglitch
Copy link

@epsilon-0 right you are, I had a crash earlier today. It has however gone from happening like 95% I used the library view to like 5% for me though

@pirate486743186
Copy link
Contributor Author

@multiSnow
And now, it's reproducible...
Put the library on a hard drive.
Old hardware or a VM might trigger it too.

The bug is in the multi-threaded code that handles the library. There's indeed some race condition going on.

@cdglitch
Copy link

cdglitch commented Mar 6, 2021

Found in the preferences one option relating to threads: "Maximum number of concurrent extraction threads". Setting this to 1 (or zero, it sets itself back to 1) does not fix things.

I also found a way of reproducing the issue very quickly: Make a few collections with maybe 5-10 archives each and then rapidly click between them. On my old SATA SSD I can make it like 10 clicks tops before it locks up for a second and dies.

@multiSnow
Copy link
Owner

Please try https://github.com/multiSnow/mcomix3/tree/slowdown and see whether everything goes well.

@epsilon-0
Copy link

I just tested and I am still getting crashes

**
Gtk:ERROR:../../gtk+-3.24.26/gtk/gtkicontheme.c:4047:proxy_pixbuf_destroy: assertion failed: (icon_info->proxy_pixbuf != NULL)
Bail out! Gtk:ERROR:../../gtk+-3.24.26/gtk/gtkicontheme.c:4047:proxy_pixbuf_destroy: assertion failed: (icon_info->proxy_pixbuf != NULL)
Aborted

@multiSnow
Copy link
Owner

branch https://github.com/multiSnow/mcomix3/tree/slowdown try to fix this issue.
Since I still could not reproduce such Gtk error, I guess it appeared when pixbuf set after widget destroy, and will try to do somthing with such thought.

You can also subscribe https://github.com/multiSnow/mcomix3/commits/slowdown.atom to see new commit.

@cdglitch
Copy link

cdglitch commented Apr 4, 2021

Ive been getting it happening more frequently again for some reason so loaded up the python fault handler. The only thing that seems to be consistently doing anything with pixbufs is this

Thread 0x00007f2830ff9640 (most recent call first):
  File "/usr/lib/python3.9/site-packages/PIL/ImageFile.py", line 265 in load
  File "/usr/share/mcomix/mcomix/image_tools.py", line 434 in load_pixbuf
  File "/usr/share/mcomix/mcomix/thumbnail_tools.py", line 85 in thumbnail
  File "/usr/share/mcomix/mcomix/library/backend.py", line 168 in get_book_thumbnail
  File "/usr/share/mcomix/mcomix/library/book_area.py", line 439 in _get_pixbuf
  File "/usr/share/mcomix/mcomix/thumbnail_view.py", line 97 in _pixbuf_worker
  File "/usr/share/mcomix/mcomix/lib/mt.py", line 137 in _caller
  File "/usr/lib/python3.9/multiprocessing/pool.py", line 125 in worker
  File "/usr/lib/python3.9/threading.py", line 892 in run
  File "/usr/lib/python3.9/threading.py", line 954 in _bootstrap_inner
  File "/usr/lib/python3.9/threading.py", line 912 in _bootstrap

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants