Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

thumbnails: Segmentation fault #1433

Closed
bartlibert opened this issue Apr 22, 2015 · 16 comments
Closed

thumbnails: Segmentation fault #1433

bartlibert opened this issue Apr 22, 2015 · 16 comments
Assignees
Labels
bug bugs that are confirmed and actionable

Comments

@bartlibert
Copy link

Hi, I often see a segmentation fault when importing. I can't completely confirm, but I have the impression it happens when I get a prompt ("Apply, More candidates,...") and don't respond immediately.
I enabled the following plugins: fetchart embedart chroma discogs mbsync duplicates missing random thumbnails replaygain

Thread 0x00007fccf1ffb700 (most recent call first):
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/audioread/ffdec.py", line 65 in run
File "/usr/lib/python2.7/threading.py", line 810 in __bootstrap_inner
File "/usr/lib/python2.7/threading.py", line 783 in __bootstrap

Current thread 0x00007fccf2ffd700 (most recent call first):
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beetsplug/thumbnails.py", line 268 in uri
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beetsplug/thumbnails.py", line 164 in thumbnail_file_name
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beetsplug/thumbnails.py", line 143 in make_cover_thumbnail
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beetsplug/thumbnails.py", line 131 in process_album
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/plugins.py", line 123 in wrapper
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/plugins.py", line 455 in send
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/library.py", line 1069 in set_art
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beetsplug/fetchart.py", line 362 in assign_art
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/plugins.py", line 123 in wrapper
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/plugins.py", line 455 in send
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/importer.py", line 661 in manipulate_files
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/importer.py", line 1366 in manipulate_files
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/util/pipeline.py", line 160 in coro
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/util/pipeline.py", line 347 in run
File "/usr/lib/python2.7/threading.py", line 810 in __bootstrap_inner
File "/usr/lib/python2.7/threading.py", line 783 in __bootstrap

Thread 0x00007fccf37fe700 (most recent call first):
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/dbcore/db.py", line 651 in query
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/dbcore/db.py", line 551 in _make_model
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/dbcore/db.py", line 522 in _get_objects
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/dbcore/db.py", line 609 in get
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/dbcore/db.py", line 823 in _get
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/dbcore/db.py", line 384 in load
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/importer.py", line 759 in reload
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/importer.py", line 1348 in plugin_stage
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/util/pipeline.py", line 183 in coro
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/util/pipeline.py", line 301 in run
File "/usr/lib/python2.7/threading.py", line 810 in __bootstrap_inner
File "/usr/lib/python2.7/threading.py", line 783 in __bootstrap

Thread 0x00007fccf3fff700 (most recent call first):
File "/usr/lib/python2.7/socket.py", line 387 in read
File "/usr/lib/python2.7/httplib.py", line 573 in read
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/requests/packages/urllib3/response.py", line 186 in read
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/requests/packages/urllib3/response.py", line 256 in stream
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/requests/models.py", line 655 in generate
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beetsplug/fetchart.py", line 397 in _fetch_image
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beetsplug/fetchart.py", line 442 in art_for_album
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beetsplug/fetchart.py", line 348 in fetch_art
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/plugins.py", line 123 in wrapper
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/importer.py", line 1343 in plugin_stage
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/util/pipeline.py", line 183 in coro
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/util/pipeline.py", line 301 in run
File "/usr/lib/python2.7/threading.py", line 810 in __bootstrap_inner
File "/usr/lib/python2.7/threading.py", line 783 in __bootstrap

Thread 0x00007fcd00b35700 (most recent call first):
File "/usr/lib/python2.7/threading.py", line 340 in wait
File "/usr/lib/python2.7/Queue.py", line 168 in get
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/util/pipeline.py", line 292 in run
File "/usr/lib/python2.7/threading.py", line 810 in __bootstrap_inner
File "/usr/lib/python2.7/threading.py", line 783 in __bootstrap

Thread 0x00007fcd01336700 (most recent call first):
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/ui/init.py", line 156 in input_
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/ui/init.py", line 292 in input_options
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/ui/commands.py", line 643 in choose_candidate
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/ui/commands.py", line 707 in choose_match
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/importer.py", line 751 in choose_match
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/importer.py", line 1257 in user_query
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/util/pipeline.py", line 160 in coro
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/util/pipeline.py", line 301 in run
File "/usr/lib/python2.7/threading.py", line 810 in __bootstrap_inner
File "/usr/lib/python2.7/threading.py", line 783 in __bootstrap

Thread 0x00007fcd01b37700 (most recent call first):
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/audioread/ffdec.py", line 134 in _get_info
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/audioread/ffdec.py", line 90 in init
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/audioread/init.py", line 91 in audio_open
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/acoustid.py", line 262 in _fingerprint_file_audioread
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/acoustid.py", line 321 in fingerprint_file
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beetsplug/chroma.py", line 65 in acoustid_match
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beetsplug/chroma.py", line 213 in fingerprint_task
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beetsplug/chroma.py", line 143 in fingerprint_task
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/plugins.py", line 123 in wrapper
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/plugins.py", line 455 in send
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/importer.py", line 1234 in lookup_candidates
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/util/pipeline.py", line 183 in coro
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/util/pipeline.py", line 301 in run
File "/usr/lib/python2.7/threading.py", line 810 in __bootstrap_inner
File "/usr/lib/python2.7/threading.py", line 783 in __bootstrap

Thread 0x00007fcd0dc76700 (most recent call first):
File "/usr/lib/python2.7/threading.py", line 359 in wait
File "/usr/lib/python2.7/threading.py", line 960 in join
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/util/pipeline.py", line 415 in run_parallel
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/importer.py", line 316 in run
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/ui/commands.py", line 870 in import_files
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/ui/commands.py", line 893 in import_func
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/ui/init.py", line 1094 in _raw_main
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/ui/init.py", line 1104 in main
File "/home/bart/.virtualenv/beets/bin/beet", line 11 in
[1] 1054 segmentation fault beet import J

@sampsyo
Copy link
Member

sampsyo commented Apr 22, 2015

Wow, that looks bad. Can you please try narrowing this down in two dimensions?

  • Is a specific file causing the crash? (Import one at a time to check.)
  • is a specific plugin the cause? (Disable plugins selectively to eliminate some.)

Also, can you please describe your system setup?

@sampsyo sampsyo added the needinfo We need more details or follow-up from the filer before this can be tagged "bug" or "feature." label Apr 22, 2015
@bartlibert
Copy link
Author

Hi,

I haven't had a lot of time to try and narrow it down, but I found I could consistently reproduce it with one folder (although I think I also had the issue with other folders before). When I disable all plugins, the issue goes away. It does not seem related to fetchart, embedart, chroma, discogs, mbsync, duplicates or replaygain

My setup:

  • debian testing (jessie)
  • beets 1.3.12 in a python 2.7.9 virtual environment
  • replaygain configured to use aacgain
  • music is on an NFS mounted drive

Please let me know if you need more info about my system. I'll try to test all plugins as quickly as possible.

@sampsyo
Copy link
Member

sampsyo commented Apr 24, 2015

Thanks for the additional information. From your lists, are you saying that the crash does appear when you only have these plugins enabled: random thumbnails missing? If so, I'm inclined to guess it's the thumbnails plugin—especially since that traceback blames a call into native code inside the plugin!

Is there any chance you can get the verbose output for one of these crashes?

And in the mean time, @brunal, any ideas about why this ctypes call in the thumbnails plugin would segfault?

uri = ctypes.c_char_p(uri_ptr).value

I see there's a null check for that pointer just above, so it must somehow be the case that we're getting an invalid but non-null pointer from g_file_get_uri. 😱

@bartlibert
Copy link
Author

I can confirm the minimal configuration that reproduces this is thumbnails and fetchart.

The verbose log is below:

beet -v import Smoking\ Monkey
user configuration: /home/bart/.config/beets/config.yaml
data directory: /home/bart/.config/beets
plugin paths:
Sending event: pluginload
artresizer: method is (2, (6, 8, 9))
thumbnails: using IM to write metadata
thumbnails: using GIO to compute URIs
library database: /files/musiclibrary.db
library directory: /files/Music
Sending event: library_opened
Sending event: import_begin
Sending event: import_task_created
Sending event: import_task_start
Looking up: /files/Music_old/J/Jonathan Coulton/Smoking Monkey
Tagging Jonathan Coulton - Smoking Monkey
Searching for discovered album ID: dfb4af73-1c60-4392-ac6a-4c86ee8ac408
Candidate: Jonathan Coulton - Smoking Monkey
Success. Distance: 0.00
Album ID match recommendation is Recommendation.strong
ID match.
/files/Music_old/J/Jonathan Coulton/Smoking Monkey (12 items)
Tagging:
Jonathan Coulton - Smoking Monkey
URL:
http://musicbrainz.org/release/dfb4af73-1c60-4392-ac6a-4c86ee8ac408
(Similarity: 100.0%) (Digital Media, 2003, XW)
Sending event: import_task_choice
This album is already in the library!
could not get filesize: [Errno 2] No such file or directory: '/files/Music/J/Jonathan Coulton/Smoking Monkey/[01] Jonathan Coulton - I_m Having a Party.mp3'
could not get filesize: [Errno 2] No such file or directory: '/files/Music/J/Jonathan Coulton/Smoking Monkey/[02] Jonathan Coulton - Bozo_s Lament.mp3'
could not get filesize: [Errno 2] No such file or directory: '/files/Music/J/Jonathan Coulton/Smoking Monkey/[03] Jonathan Coulton - Kenesaw Mountain Landis.mp3'
could not get filesize: [Errno 2] No such file or directory: '/files/Music/J/Jonathan Coulton/Smoking Monkey/[04] Jonathan Coulton - Ikea.mp3'
could not get filesize: [Errno 2] No such file or directory: '/files/Music/J/Jonathan Coulton/Smoking Monkey/[05] Jonathan Coulton - I Hate California.mp3'
could not get filesize: [Errno 2] No such file or directory: '/files/Music/J/Jonathan Coulton/Smoking Monkey/[06] Jonathan Coulton - Christmas Is Interesting.mp3'
could not get filesize: [Errno 2] No such file or directory: '/files/Music/J/Jonathan Coulton/Smoking Monkey/[07] Jonathan Coulton - Over There.mp3'
could not get filesize: [Errno 2] No such file or directory: '/files/Music/J/Jonathan Coulton/Smoking Monkey/[08] Jonathan Coulton - Millionaire Girlfriend.mp3'
could not get filesize: [Errno 2] No such file or directory: '/files/Music/J/Jonathan Coulton/Smoking Monkey/[09] Jonathan Coulton - First of May.mp3'
could not get filesize: [Errno 2] No such file or directory: '/files/Music/J/Jonathan Coulton/Smoking Monkey/[10] Jonathan Coulton - De-Evolving.mp3'
could not get filesize: [Errno 2] No such file or directory: '/files/Music/J/Jonathan Coulton/Smoking Monkey/[11] Jonathan Coulton - I_m a Mason Now.mp3'
could not get filesize: [Errno 2] No such file or directory: '/files/Music/J/Jonathan Coulton/Smoking Monkey/[12] Jonathan Coulton - Overhead.mp3'
Old: 12 items, MP3, 254kbps, 42:10, 0.0 B
New: 12 items, MP3, 254kbps, 42:10, 86.2 MB
[S]kip new, Keep both, Remove old? R
Sending event: import_task_apply
0 of 12 items replaced
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
removing 12 old duplicated items
Sending event: database_change
Sending event: item_removed
deleting duplicate /files/Music/J/Jonathan Coulton/Smoking Monkey/[01] Jonathan Coulton - I_m Having a Party.mp3
Sending event: database_change
Sending event: item_removed
deleting duplicate /files/Music/J/Jonathan Coulton/Smoking Monkey/[02] Jonathan Coulton - Bozo_s Lament.mp3
Sending event: database_change
Sending event: item_removed
deleting duplicate /files/Music/J/Jonathan Coulton/Smoking Monkey/[03] Jonathan Coulton - Kenesaw Mountain Landis.mp3
Sending event: database_change
Sending event: item_removed
deleting duplicate /files/Music/J/Jonathan Coulton/Smoking Monkey/[04] Jonathan Coulton - Ikea.mp3
Sending event: database_change
Sending event: item_removed
deleting duplicate /files/Music/J/Jonathan Coulton/Smoking Monkey/[05] Jonathan Coulton - I Hate California.mp3
Sending event: database_change
Sending event: item_removed
deleting duplicate /files/Music/J/Jonathan Coulton/Smoking Monkey/[06] Jonathan Coulton - Christmas Is Interesting.mp3
Sending event: database_change
Sending event: item_removed
deleting duplicate /files/Music/J/Jonathan Coulton/Smoking Monkey/[07] Jonathan Coulton - Over There.mp3
Sending event: database_change
Sending event: item_removed
deleting duplicate /files/Music/J/Jonathan Coulton/Smoking Monkey/[08] Jonathan Coulton - Millionaire Girlfriend.mp3
Sending event: database_change
Sending event: item_removed
deleting duplicate /files/Music/J/Jonathan Coulton/Smoking Monkey/[09] Jonathan Coulton - First of May.mp3
Sending event: database_change
Sending event: item_removed
deleting duplicate /files/Music/J/Jonathan Coulton/Smoking Monkey/[10] Jonathan Coulton - De-Evolving.mp3
Sending event: database_change
Sending event: item_removed
deleting duplicate /files/Music/J/Jonathan Coulton/Smoking Monkey/[11] Jonathan Coulton - I_m a Mason Now.mp3
Sending event: database_change
Sending event: database_change
Sending event: item_removed
deleting duplicate /files/Music/J/Jonathan Coulton/Smoking Monkey/[12] Jonathan Coulton - Overhead.mp3
Sending event: before_item_moved
Sending event: item_moved
Sending event: database_change
Sending event: database_change
Sending event: write
Sending event: after_write
Sending event: before_item_moved
Sending event: item_moved
Sending event: database_change
Sending event: database_change
Sending event: write
Sending event: after_write
Sending event: before_item_moved
Sending event: item_moved
Sending event: database_change
Sending event: database_change
Sending event: write
Sending event: after_write
Sending event: before_item_moved
Sending event: item_moved
Sending event: database_change
Sending event: database_change
Sending event: write
Sending event: after_write
Sending event: before_item_moved
Sending event: item_moved
Sending event: database_change
Sending event: database_change
Sending event: write
Sending event: after_write
Sending event: before_item_moved
Sending event: item_moved
Sending event: database_change
Sending event: database_change
Sending event: write
Sending event: after_write
Sending event: before_item_moved
Sending event: item_moved
Sending event: database_change
Sending event: database_change
Sending event: write
Sending event: after_write
Sending event: before_item_moved
Sending event: item_moved
Sending event: database_change
Sending event: database_change
Sending event: write
Sending event: after_write
Sending event: before_item_moved
Sending event: item_moved
Sending event: database_change
Sending event: database_change
Sending event: write
Sending event: after_write
Sending event: before_item_moved
Sending event: item_moved
Sending event: database_change
Sending event: database_change
Sending event: write
Sending event: after_write
Sending event: before_item_moved
Sending event: item_moved
Sending event: database_change
Sending event: database_change
Sending event: write
Sending event: after_write
Sending event: before_item_moved
Sending event: item_moved
Sending event: database_change
Sending event: database_change
Sending event: write
Sending event: after_write
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: import_task_files
Sending event: art_set
Fatal Python error: Segmentation fault

Current thread 0x00007f4733fff700 (most recent call first):
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beetsplug/thumbnails.py", line 268 in uri
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beetsplug/thumbnails.py", line 164 in thumbnail_file_name
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beetsplug/thumbnails.py", line 143 in make_cover_thumbnail
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beetsplug/thumbnails.py", line 131 in process_album
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/plugins.py", line 123 in wrapper
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/plugins.py", line 455 in send
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/library.py", line 1069 in set_art
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beetsplug/fetchart.py", line 362 in assign_art
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/plugins.py", line 123 in wrapper
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/plugins.py", line 455 in send
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/importer.py", line 661 in manipulate_files
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/importer.py", line 1366 in manipulate_files
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/util/pipeline.py", line 160 in coro
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/util/pipeline.py", line 347 in run
File "/usr/lib/python2.7/threading.py", line 810 in __bootstrap_inner
File "/usr/lib/python2.7/threading.py", line 783 in __bootstrap

Thread 0x00007f4750204700 (most recent call first):
File "/usr/lib/python2.7/threading.py", line 359 in wait
File "/usr/lib/python2.7/threading.py", line 960 in join
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/util/pipeline.py", line 415 in run_parallel
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/importer.py", line 316 in run
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/ui/commands.py", line 870 in import_files
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/ui/commands.py", line 893 in import_func
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/ui/init.py", line 1094 in _raw_main
File "/home/bart/.virtualenv/beets/local/lib/python2.7/site-packages/beets/ui/init.py", line 1104 in main
File "/home/bart/.virtualenv/beets/bin/beet", line 11 in
[1] 4507 segmentation fault beet -v import Smoking\ Monkey

@sampsyo sampsyo changed the title Segmentation fault on import thumbnails: Segmentation fault Apr 26, 2015
@sampsyo sampsyo added bug bugs that are confirmed and actionable and removed needinfo We need more details or follow-up from the filer before this can be tagged "bug" or "feature." labels Apr 26, 2015
@sampsyo
Copy link
Member

sampsyo commented Apr 26, 2015

Great; thanks! Since I don't currently have a system running with the appropriate Freedesktop libraries, I'll defer to @brunal here.

@brunal
Copy link
Collaborator

brunal commented Apr 29, 2015

Hi,
Since the types are set for ctypes call there shouldn't be a segfault. This is really strange.
I'm currently traveling around quite a lot so I'm note sure if I'll have time to look at it within the next 2 weeks.

@sampsyo
Copy link
Member

sampsyo commented Apr 29, 2015

It is strange indeed. We probably even shouldn't rule out a bug in the gio library.

Safe travels, @brunal! There's no hurry, of course.

@ghost
Copy link

ghost commented May 6, 2015

I can reproduce this on Fedora 21 also with glib 2.42.2

@Kernald
Copy link
Contributor

Kernald commented Aug 14, 2015

I have a probably related issue when issuing a direct call to the thumbnails plugin:

plugin paths: 
Sending event: pluginload
artresizer: method is (2, (6, 9, 1))
thumbnails: using IM to write metadata
thumbnails: using GIO to compute URIs
library database: /media/sao/Musique/beets.blb
library directory: /media/sao/Musique
Sending event: library_opened
thumbnails: using IM to write metadata
thumbnails: using GIO to compute URIs
thumbnails: generating thumbnail for 65daysofstatic - Hole
Erreur de segmentation (core dumped)

Beets is 1.3.14, glib library is 2.44.1, running on Archlinux.

@bcalou
Copy link

bcalou commented Oct 14, 2015

Hi,
It seems that this problem disappears when setting threaded: false in the config file.
Hope it helps !

@nurbo
Copy link

nurbo commented Nov 6, 2015

As requested by @sampsyo, I'm adding my bit of info about this issue:


I recently updated my Fedora 22 to 23. After the update, the thumbnails plugin segfaults. I have tested this issue in fresh VM installation of Fedora 22 and Fedora 23 – the same issue occurred on the newer OS.

Both VMs ran newest beets and had ImageMagick installed (6.8.8.10 on Fedora 22, 6.9.1.3 on Fedora 23):

[bruno@localhost ~]$ beet version
beets version 1.3.15
plugins: embedart, fetchart, fuzzy, thumbnails

…and the same config (output of beet config:

fetchart:
    cautious: yes
    sources: coverart albumart google
    auto: no
    minwidth: 0
    maxwidth: 0
    cover_names:
    - cover
    - front
    - art
    - album
    - folder
    remote_priority: no
    enforce_ratio: no
thumbnails:
    auto: no
    dolphin: no
    force: no
embedart:
    auto: no
    compare_threshold: 0
    ifempty: no
    remove_art_file: no
    maxwidth: 0

plugins: fuzzy fetchart embedart thumbnails
fuzzy:
    threshold: 0.7
    prefix: '~'

On Fedora 22 the thumbnails plugin works correctly and the folder thumbnails are present in Nautilus:

[bruno@fedora22 ~]$ beet -vv thumbnails -f
user configuration: /home/bruno/.config/beets/config.yaml
data directory: /home/bruno/.config/beets
plugin paths: 
Sending event: pluginload
library database: /home/bruno/.config/beets/library.db
library directory: /home/bruno/Music
Sending event: library_opened
artresizer: method is (2, (6, 8, 8))
thumbnails: using IM to write metadata
thumbnails: using GIO to compute URIs
thumbnails: generating thumbnail for Wojciech Bąkowski - Kształt
thumbnails: found a suitable 256x256 thumbnail for Wojciech Bąkowski - Kształt, forcing regeneration
artresizer: ImageMagick resizing /home/bruno/Music/Wojciech Bąkowski/Kształt/cover.jpg to /home/bruno/.cache/thumbnails/large/76177378dc73dd856f8a83e758662b68.png
thumbnails: found a suitable 128x128 thumbnail for Wojciech Bąkowski - Kształt, forcing regeneration
artresizer: ImageMagick resizing /home/bruno/Music/Wojciech Bąkowski/Kształt/cover.jpg to /home/bruno/.cache/thumbnails/normal/76177378dc73dd856f8a83e758662b68.png
thumbnails: wrote thumbnail for Wojciech Bąkowski - Kształt
Sending event: cli_exit

On Fedora 23 the thumbnails plugin causes segmentation fault:

[bruno@fedora23 ~]$ beet -vv thumbnails -f
user configuration: /home/bruno/.config/beets/config.yaml
data directory: /home/bruno/.config/beets
plugin paths: 
Sending event: pluginload
library database: /home/bruno/.config/beets/library.db
library directory: /home/bruno/Music
Sending event: library_opened
artresizer: method is (2, (6, 9, 1))
thumbnails: using IM to write metadata
thumbnails: using GIO to compute URIs
thumbnails: generating thumbnail for Wojciech Bąkowski - Kształt
Segmentation fault (core dumped)

PIP version and installed packages on

  • Fedora 22:
[bruno@fedora22 ~]$ pip -V
pip 7.1.2 from /usr/lib/python2.7/site-packages (python 2.7)
[bruno@fedora22 ~]$ pip list
backports.ssl-match-hostname (3.4.0.2)
beets (1.3.15)
blivet (1.0.9)
chardet (2.2.1)
coverage (4.0a5)
decorator (3.4.0)
di (0.3)
dnf-langpacks (0.9.1)
enum34 (1.0.4)
iniparse (0.4)
initial-setup (0.3.31)
IPy (0.81)
jellyfish (0.5.1)
kitchen (1.2.1)
langtable (0.0.31)
munkres (1.0.7)
musicbrainzngs (0.5)
mutagen (1.31)
ntplib (0.3.2)
pathlib (1.0.1)
pexpect (3.1)
pip (7.1.2)
pwquality (1.2.4)
pycurl (7.19.5.1)
pygobject (3.16.1)
pygpgme (0.3)
PyIscsi (1.0)
pykickstart (1.99.66)
pyliblzma (0.5.3)
pyparted (3.10.3)
python-augeas (0.5.0)
python-dmidecode (3.10.13)
python-meh (0.38)
pytz (2012d)
pyudev (0.16.1)
pyxattr (0.5.3)
pyxdg (0.25)
PyYAML (3.11)
requests (2.6.2)
rpm-python (4.12.0.1)
setuptools (12.0.3)
six (1.9.0)
slip (0.6.1)
slip.dbus (0.6.1)
SSSDConfig (1.12.4)
Unidecode (0.4.18)
urlgrabber (3.10.1)
urllib3 (1.10.2)
yum-metadata-parser (1.1.4)
[bruno@localhost ~]$ 
  • Fedora 23:
[bruno@fedora23 ~]$ pip -V
pip 7.1.2 from /usr/lib/python2.7/site-packages (python 2.7)
[bruno@fedora23 ~]$ pip list
beets (1.3.15)
chardet (2.2.1)
enum34 (1.0.4)
iniparse (0.4)
jellyfish (0.5.1)
kitchen (1.2.1)
munkres (1.0.7)
musicbrainzngs (0.5)
mutagen (1.31)
pathlib (1.0.1)
pexpect (3.1)
pip (7.1.2)
pycurl (7.19.5.1)
pygobject (3.18.0)
pygpgme (0.3)
pyliblzma (0.5.3)
pyxattr (0.5.3)
pyxdg (0.25)
PyYAML (3.11)
requests (2.8.1)
rpm-python (4.13.0rc1)
setuptools (18.0.1)
six (1.9.0)
Unidecode (0.4.18)
urlgrabber (3.10.1)
yum-metadata-parser (1.1.4)

The core dump is available at https://www.dropbox.com/s/sl2i3hs62fx7gi1/beets-coredump.zip?dl=0 . Unfortunately, I don't have the experience to debug this myself. Could this be related to the migration to Python 3 as the default in the newest release?

@nurbo
Copy link

nurbo commented Nov 7, 2015

Unfortunately, the fix suggested by @bcalou did not work for me – thumbnails still segfaults after setting threaded to no.

sampsyo added a commit that referenced this issue Nov 20, 2015
Seems to address a segfault indicated in #1433, but there are still crashes
lurking.
sampsyo added a commit that referenced this issue Nov 20, 2015
@sampsyo
Copy link
Member

sampsyo commented Nov 20, 2015

I think I've found and fixed the problem. Could someone who experienced it in the wild please confirm that the crash is gone?

@Kernald
Copy link
Contributor

Kernald commented Nov 20, 2015

I don't have a Linux box to check that the thumbnail is here, but the crash is indeed gone 👍

@nurbo
Copy link

nurbo commented Nov 20, 2015

I installed the newest Beets using dnf install -U git+https://github.com/sampsyo/beets.git at commit 9702011 . I can confirm that the thumbnails plugin works now.

[bruno@localhost ~]$ beet -vv thumbnails
user configuration: /home/bruno/.config/beets/config.yaml
data directory: /home/bruno/.config/beets
plugin paths: 
Sending event: pluginload
library database: /home/bruno/.config/beets/library.db
library directory: /home/bruno/Music
Sending event: library_opened
artresizer: method is (2, (6, 9, 1))
thumbnails: using IM to write metadata
thumbnails: using GIO to compute URIs
thumbnails: generating thumbnail for Wojciech Bąkowski - Kształt
artresizer: ImageMagick resizing /home/bruno/Music/Wojciech Bąkowski/Kształt/cover.jpg to /home/bruno/.cache/thumbnails/large/76177378dc73dd856f8a83e758662b68.png
artresizer: ImageMagick resizing /home/bruno/Music/Wojciech Bąkowski/Kształt/cover.jpg to /home/bruno/.cache/thumbnails/normal/76177378dc73dd856f8a83e758662b68.png
thumbnails: wrote thumbnail for Wojciech Bąkowski - Kształt
Sending event: cli_exit

@sampsyo
Copy link
Member

sampsyo commented Nov 20, 2015

Woohoo! Great news.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs that are confirmed and actionable
Projects
None yet
Development

No branches or pull requests

6 participants