multiSnow / mcomix3

End of Fork
Other
97 stars 39 forks source link

library instability #85

Open pirate486743186 opened 5 years ago

pirate486743186 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

https://github.com/multiSnow/mcomix3/commit/0405a2304c123da5d60c0df7751fbbc9ca8cb169 tried to fix this issue.

pirate486743186 commented 5 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

Yes, same error when scrolling fast through the library.

cdglitch commented 3 years ago

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 commented 3 years ago

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

cdglitch commented 3 years ago

@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 commented 3 years ago

@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 commented 3 years ago

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 commented 3 years ago

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

epsilon-0 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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