varietywalls / variety

Wallpaper downloader and manager for Linux systems
http://peterlevi.com/variety
GNU General Public License v3.0
1.2k stars 146 forks source link

Unsupported time format leading to "double free or corruption (out)" in ubuntu 18.04 #216

Closed georgekaf closed 5 years ago

georgekaf commented 5 years ago

Version

variety is already the newest version (0.7.1~git201810231556.944aa6d~ppa772~ubuntu18.04.1).

Error

user@station:~$ variety

** (variety:27499): WARNING **: 09:06:59.900: Unsupported time format

** (variety:27499): WARNING **: 09:06:59.958: Unsupported time format

double free or corruption (out)
Aborted (core dumped)

Logs

cat ~/.config/variety/variety.log
INFO: 2019-08-07 09:06:59,800: perform_upgrade() 'Last run version was 0.7.1 or earlier, current version is 0.7.1'
INFO: 2019-08-07 09:06:59,869: process_command() 'Received command: []'
INFO: 2019-08-07 09:06:59,876: load() 'Jumble loading'
INFO: 2019-08-07 09:06:59,876: _walk_modules() 'Jumble loading module in __init__ from /usr/share/variety/plugins/__init__.py'
INFO: 2019-08-07 09:06:59,877: _walk_modules() 'Jumble loading module in QuotationsPageSource from /usr/share/variety/plugins/quotes/QuotationsPageSource.py'
INFO: 2019-08-07 09:06:59,880: load() 'Jumble found plugin class: <class 'QuotationsPageSource.QuotationsPageSource'>: {'name': 'TheQuotationsPage.com', 'description': 'Fetches quotes from TheQuotationsPage.com', 'author': 'Peter Levi', 'version': '0.1'}'
INFO: 2019-08-07 09:06:59,880: _walk_modules() 'Jumble loading module in QuotesDaddySource from /usr/share/variety/plugins/quotes/QuotesDaddySource.py'
INFO: 2019-08-07 09:06:59,880: load() 'Jumble found plugin class: <class 'QuotesDaddySource.QuotesDaddySource'>: {'name': 'QuotesDaddy', 'description': "Fetches quotes from QuotesDaddy's daily quotes RSS feed.\nDoes not support searching by tags or authors.", 'author': 'Peter Levi', 'version': '0.1'}'
INFO: 2019-08-07 09:06:59,881: _walk_modules() 'Jumble loading module in __init__ from /usr/share/variety/plugins/quotes/__init__.py'
INFO: 2019-08-07 09:06:59,881: _walk_modules() 'Jumble loading module in LocalFilesSource from /usr/share/variety/plugins/quotes/LocalFilesSource.py'
INFO: 2019-08-07 09:06:59,881: load() 'Jumble found plugin class: <class 'LocalFilesSource.LocalFilesSource'>: {'name': 'Local text files', 'description': 'Displays quotes, defined in local text files.\nPut your own txt files in: ~/.config/variety/pluginconfig/quotes/.\nThe file format is:\n\nquote -- author\n.\nsecond quote -- another author\n.\netc...\n\nExample: http://rvelthuis.de/zips/quotes.txt', 'author': 'Peter Levi', 'version': '0.1'}'
INFO: 2019-08-07 09:06:59,881: _walk_modules() 'Jumble loading module in GoodreadsSource from /usr/share/variety/plugins/quotes/GoodreadsSource.py'
INFO: 2019-08-07 09:06:59,882: load() 'Jumble found plugin class: <class 'GoodreadsSource.GoodreadsSource'>: {'name': 'Goodreads', 'description': 'Fetches quotes from Goodreads.com', 'author': 'Peter Levi', 'version': '0.1'}'
INFO: 2019-08-07 09:06:59,884: reload_config() 'Creating new downloader for type 6, location Random wallpapers from Desktoppr.co'
INFO: 2019-08-07 09:06:59,884: reload_config() 'Creating new downloader for type 15, location Bing Photo of the Day'
INFO: 2019-08-07 09:06:59,884: reload_config() 'Creating new downloader for type 16, location High-resolution photos from Unsplash.com'
INFO: 2019-08-07 09:06:59,884: reload_config() 'Creating new downloader for type 8, location NASA's Astronomy Picture of the Day'
INFO: 2019-08-07 09:06:59,884: reload_config() 'Creating new downloader for type 11, location World Sunlight Map - live wallpaper from Die.net'
INFO: 2019-08-07 09:06:59,884: reload_config() 'Creating new downloader for type 7, location user:www.flickr.com/photos/peter-levi/;user_id:93647178@N00;'
INFO: 2019-08-07 09:06:59,884: log_options() 'Loaded options:'
INFO: 2019-08-07 09:06:59,884: log_options() 'change_enabled = True'
INFO: 2019-08-07 09:06:59,884: log_options() 'change_interval = 300'
INFO: 2019-08-07 09:06:59,884: log_options() 'change_on_start = True'
INFO: 2019-08-07 09:06:59,884: log_options() 'clipboard_enabled = False'
INFO: 2019-08-07 09:06:59,884: log_options() 'clipboard_hosts = ['wallhaven.cc', 'ns223506.ovh.net', 'wallpapers.net', 'flickr.com', 'imgur.com', 'deviantart.com', 'interfacelift.com', 'vladstudio.com', 'imageshack.us']'
INFO: 2019-08-07 09:06:59,884: log_options() 'clipboard_use_whitelist = True'
INFO: 2019-08-07 09:06:59,884: log_options() 'clock_date_font = Ubuntu Condensed, 30'
INFO: 2019-08-07 09:06:59,884: log_options() 'clock_enabled = False'
INFO: 2019-08-07 09:06:59,884: log_options() 'clock_filter = -density 100 -font `fc-match -f '%{file[0]}' '%CLOCK_FONT_NAME'` -pointsize %CLOCK_FONT_SIZE -gravity SouthEast -fill '#00000044' -annotate 0x0+[%HOFFSET+58]+[%VOFFSET+108] '%H:%M' -fill white -annotate 0x0+[%HOFFSET+60]+[%VOFFSET+110] '%H:%M' -font `fc-match -f '%{file[0]}' '%DATE_FONT_NAME'` -pointsize %DATE_FONT_SIZE -fill '#00000044' -annotate 0x0+[%HOFFSET+58]+[%VOFFSET+58] '%A, %B %d' -fill white -annotate 0x0+[%HOFFSET+60]+[%VOFFSET+60] '%A, %B %d''
INFO: 2019-08-07 09:06:59,884: log_options() 'clock_font = Ubuntu Condensed, 70'
INFO: 2019-08-07 09:06:59,884: log_options() 'configfile = /home/user/.config/variety/variety.conf'
INFO: 2019-08-07 09:06:59,884: log_options() 'copyto_enabled = False'
INFO: 2019-08-07 09:06:59,884: log_options() 'copyto_folder = Default'
INFO: 2019-08-07 09:06:59,885: log_options() 'desired_color = [160, 160, 160]'
INFO: 2019-08-07 09:06:59,885: log_options() 'desired_color_enabled = False'
INFO: 2019-08-07 09:06:59,885: log_options() 'download_enabled = True'
INFO: 2019-08-07 09:06:59,885: log_options() 'download_folder = /home/user/.config/variety/Downloaded'
INFO: 2019-08-07 09:06:59,885: log_options() 'download_interval = 600'
INFO: 2019-08-07 09:06:59,885: log_options() 'favorites_folder = /home/user/.config/variety/Favorites'
INFO: 2019-08-07 09:06:59,885: log_options() 'favorites_operations = [['Downloaded', 'Copy'], ['Fetched', 'Move'], ['Others', 'Copy']]'
INFO: 2019-08-07 09:06:59,885: log_options() 'fetched_folder = /home/user/.config/variety/Fetched'
INFO: 2019-08-07 09:06:59,885: log_options() 'filters = [[False, 'Keep original', ''], [False, 'Grayscale', '-type Grayscale'], [False, 'Heavy blur', '-blur 120x40'], [False, 'Soft blur', '-blur 20x7'], [False, 'Oil painting', '-paint 8'], [False, 'Pencil sketch', '-colorspace gray \\( +clone -tile ~/.config/variety/pencil_tile.png -draw "color 0,0 reset" +clone +swap -compose color_dodge -composite \\) -fx \'u*.2+v*.8\''], [False, 'Pointilism', '-spread 10 -noise 3'], [False, 'Pixellate', '-scale 3% -scale 3333%']]'
INFO: 2019-08-07 09:06:59,885: log_options() 'icon = Light'
INFO: 2019-08-07 09:06:59,885: log_options() 'lightness_enabled = False'
INFO: 2019-08-07 09:06:59,885: log_options() 'lightness_mode = 0'
INFO: 2019-08-07 09:06:59,885: log_options() 'min_rating = 4'
INFO: 2019-08-07 09:06:59,885: log_options() 'min_rating_enabled = False'
INFO: 2019-08-07 09:06:59,885: log_options() 'min_size = 80'
INFO: 2019-08-07 09:06:59,885: log_options() 'min_size_enabled = False'
INFO: 2019-08-07 09:06:59,885: log_options() 'quota_enabled = True'
INFO: 2019-08-07 09:06:59,885: log_options() 'quota_size = 500'
INFO: 2019-08-07 09:06:59,885: log_options() 'quotes_authors = '
INFO: 2019-08-07 09:06:59,885: log_options() 'quotes_bg_color = [80, 80, 80]'
INFO: 2019-08-07 09:06:59,885: log_options() 'quotes_bg_opacity = 55'
INFO: 2019-08-07 09:06:59,885: log_options() 'quotes_change_enabled = False'
INFO: 2019-08-07 09:06:59,885: log_options() 'quotes_change_interval = 300'
INFO: 2019-08-07 09:06:59,885: log_options() 'quotes_disabled_sources = ['QuotesDaddy']'
INFO: 2019-08-07 09:06:59,885: log_options() 'quotes_enabled = True'
INFO: 2019-08-07 09:06:59,885: log_options() 'quotes_favorites_file = /home/user/.config/variety/favorite_quotes.txt'
INFO: 2019-08-07 09:06:59,885: log_options() 'quotes_font = Bitstream Charter 30'
INFO: 2019-08-07 09:06:59,885: log_options() 'quotes_hpos = 100'
INFO: 2019-08-07 09:06:59,885: log_options() 'quotes_tags = '
INFO: 2019-08-07 09:06:59,885: log_options() 'quotes_text_color = [255, 255, 255]'
INFO: 2019-08-07 09:06:59,885: log_options() 'quotes_text_shadow = False'
INFO: 2019-08-07 09:06:59,885: log_options() 'quotes_vpos = 40'
INFO: 2019-08-07 09:06:59,885: log_options() 'quotes_width = 70'
INFO: 2019-08-07 09:06:59,885: log_options() 'safe_mode = False'
INFO: 2019-08-07 09:06:59,885: log_options() 'slideshow_custom_enabled = False'
INFO: 2019-08-07 09:06:59,885: log_options() 'slideshow_custom_folder = /home/user/Pictures'
INFO: 2019-08-07 09:06:59,885: log_options() 'slideshow_downloads_enabled = False'
INFO: 2019-08-07 09:06:59,886: log_options() 'slideshow_fade = 0.4'
INFO: 2019-08-07 09:06:59,886: log_options() 'slideshow_favorites_enabled = True'
INFO: 2019-08-07 09:06:59,886: log_options() 'slideshow_mode = Fullscreen'
INFO: 2019-08-07 09:06:59,886: log_options() 'slideshow_monitor = All'
INFO: 2019-08-07 09:06:59,886: log_options() 'slideshow_pan = 0.05'
INFO: 2019-08-07 09:06:59,886: log_options() 'slideshow_seconds = 6.0'
INFO: 2019-08-07 09:06:59,886: log_options() 'slideshow_sort_order = Random'
INFO: 2019-08-07 09:06:59,886: log_options() 'slideshow_sources_enabled = True'
INFO: 2019-08-07 09:06:59,886: log_options() 'slideshow_zoom = 0.2'
INFO: 2019-08-07 09:06:59,886: log_options() 'smart_enabled = False'
INFO: 2019-08-07 09:06:59,886: log_options() 'smart_notice_shown = False'
INFO: 2019-08-07 09:06:59,886: log_options() 'smart_register_shown = False'
INFO: 2019-08-07 09:06:59,886: log_options() 'sources = [[True, 3, 'The Favorites folder'], [True, 4, 'The Fetched folder'], [True, 2, '/usr/share/backgrounds'], [True, 6, 'Random wallpapers from Desktoppr.co'], [True, 15, 'Bing Photo of the Day'], [True, 16, 'High-resolution photos from Unsplash.com'], [True, 8, "NASA's Astronomy Picture of the Day"], [True, 11, 'World Sunlight Map - live wallpaper from Die.net'], [True, 7, 'user:www.flickr.com/photos/peter-levi/;user_id:93647178@N00;']]'
INFO: 2019-08-07 09:06:59,886: log_options() 'stats_enabled = True'
INFO: 2019-08-07 09:06:59,886: log_options() 'stats_notice_shown = False'
INFO: 2019-08-07 09:06:59,886: log_options() 'sync_enabled = True'
INFO: 2019-08-07 09:06:59,886: log_options() 'use_landscape_enabled = True'
INFO: 2019-08-07 09:06:59,886: reload_config() 'No need to clear prepared queue'
INFO: 2019-08-07 09:06:59,886: start() 'Starting QuotesEngine'
INFO: 2019-08-07 09:06:59,886: load() 'Loading quotes file /usr/share/variety/plugins/quotes/quotes.txt'
INFO: 2019-08-07 09:06:59,897: prepare_thread() 'Quotes prepare thread running'
INFO: 2019-08-07 09:06:59,897: prepare_thread() 'Quotes prepared buffer contains 0 quotes, fetching a quote'
INFO: 2019-08-07 09:06:59,897: get_for_keyword() 'Fetching quotes from Goodreads for keyword=depression'
INFO: 2019-08-07 09:06:59,899: regular_change_thread() 'Quotes regular change thread running'
INFO: 2019-08-07 09:06:59,899: on_options_updated() 'Quotes: clearing prepared and updating plugins'
INFO: 2019-08-07 09:06:59,900: load_last_change_time() 'Change interval < 6 hours, ignore persisted last_change_time, wait initially the whole interval: 300'
INFO: 2019-08-07 09:06:59,900: update_indicator() 'Setting file info to: /home/user/.config/variety/Downloaded/Desktoppr/20110430_634398018831122866.jpg'
INFO: 2019-08-07 09:06:59,901: regular_change_thread() 'regular_change thread running'
INFO: 2019-08-07 09:06:59,901: prepare_thread() 'Prepare thread running'
INFO: 2019-08-07 09:06:59,901: prepare_thread() 'Prepared buffer contains 0 images'
INFO: 2019-08-07 09:06:59,901: prepare_thread() 'Preparing some images'
INFO: 2019-08-07 09:06:59,902: update_indicator_icon() 'Creating indicator'
INFO: 2019-08-07 09:06:59,941: create_indicator() 'indicator backend: AyatanaAppIndicator3'
INFO: 2019-08-07 09:06:59,957: set_from_theme_icon() 'Showing indicator icon variety-indicator from GTK theme'
INFO: 2019-08-07 09:06:59,958: update_indicator() 'Setting file info to: /home/user/.config/variety/Downloaded/Desktoppr/20110430_634398018831122866.jpg'
jlu5 commented 5 years ago

What if you run Variety as python3 -q -X faulthandler /usr/bin/variety in a terminal? This will print the last bits of Python code that are executed before Python crashes, which should narrow down which exact calls are causing a crash.

georgekaf commented 5 years ago
user@station:~$ python3 -q -X faulthandler /usr/bin/variety

** (variety:14016): WARNING **: 20:40:48.689: Unsupported time format

Fatal Python error: Segmentation fault

Thread 0x00007f66daffd700 (most recent call first):
  File "/usr/lib/python3.6/threading.py", line 299 in wait
  File "/usr/lib/python3.6/threading.py", line 551 in wait
  File "/usr/lib/python3.6/threading.py", line 1180 in run
  File "/usr/lib/python3.6/threading.py", line 916 in _bootstrap_inner
  File "/usr/lib/python3.6/threading.py", line 884 in _bootstrap

Thread 0x00007f66db7fe700 (most recent call first):
  File "/usr/lib/python3.6/threading.py", line 295 in wait
  File "/usr/lib/python3.6/threading.py", line 551 in wait
  File "/usr/lib/python3/dist-packages/variety/QuotesEngine.py", line 178 in regular_change_thread
  File "/usr/lib/python3.6/threading.py", line 864 in run
  File "/usr/lib/python3.6/threading.py", line 916 in _bootstrap_inner
  File "/usr/lib/python3.6/threading.py", line 884 in _bootstrap

Thread 0x00007f66dbfff700 (most recent call first):
  File "/usr/lib/python3.6/socket.py", line 745 in getaddrinfo
  File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 60 in create_connection
  File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 141 in _new_conn
  File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 166 in connect
  File "/usr/lib/python3.6/http/client.py", line 964 in send
  File "/usr/lib/python3.6/http/client.py", line 1026 in _send_output
  File "/usr/lib/python3.6/http/client.py", line 1234 in endheaders
  File "/usr/lib/python3.6/http/client.py", line 1285 in _send_request
  File "/usr/lib/python3.6/http/client.py", line 1239 in request
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 357 in _make_request
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 601 in urlopen
  File "/usr/lib/python3/dist-packages/requests/adapters.py", line 440 in send
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 630 in send
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 520 in request
  File "/usr/lib/python3/dist-packages/requests/api.py", line 58 in request
  File "/usr/lib/python3/dist-packages/variety/Util.py", line 568 in request
  File "/usr/lib/python3/dist-packages/variety/Util.py", line 582 in fetch
  File "/usr/share/variety/plugins/quotes/QuotationsPageSource.py", line 93 in get_for_search_url
  File "/usr/share/variety/plugins/quotes/QuotationsPageSource.py", line 81 in get_random
  File "/usr/lib/python3/dist-packages/variety/QuotesEngine.py", line 268 in get_one_quote
  File "/usr/lib/python3/dist-packages/variety/QuotesEngine.py", line 198 in prepare_thread
  File "/usr/lib/python3.6/threading.py", line 864 in run
  File "/usr/lib/python3.6/threading.py", line 916 in _bootstrap_inner
  File "/usr/lib/python3.6/threading.py", line 884 in _bootstrap

Current thread 0x00007f66fc557740 (most recent call first):
  File "/usr/lib/python3/dist-packages/variety/Util.py", line 172 in __getitem__
  File "/usr/lib/python3/dist-packages/variety/Util.py", line 462 in read_metadata
  File "/usr/lib/python3/dist-packages/variety/VarietyWindow.py", line 663 in update_indicator
  File "/usr/lib/python3/dist-packages/variety/VarietyWindow.py", line 177 in start
  File "/usr/lib/python3/dist-packages/variety/__init__.py", line 198 in main
  File "/usr/bin/variety", line 39 in <module>
Segmentation fault (core dumped)
jlu5 commented 5 years ago

Duplicate of #152 (the crash is in the read_metadata thread)

Unfortunately this is a bug in one of the upstream libraries we use, and not something we can fix directly. Hopefully they can resolve it soon!