Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#5379 closed defect (cant-reproduce)

Crash upon adding an audio file

Reported by: kenrestivo Owned by:
Priority: major Milestone:
Component: programming Keywords: audio
Cc: Parent Tickets:

Description

I'm running the latest git 355d062dd4e35409af92e136666baf211161b7cb on an Ubuntu 14.04 server.

Uploading an audio file causes mediagoblin to crash. It appears to be crashing when generating the audiolab PNG. Here's the full stacktrace:

Using paster config: paste_local.ini
Using ./bin/paster
+ export CELERY_ALWAYS_EAGER=true
+ false
+ ./bin/paster serve paste_local.ini --server-name=broadcast --reload
/home/src/mediagoblin/local/lib/python2.7/site-packages/setuptools-3.3-py2.7.egg/pkg_resources.py:1031: UserWarning: /home/ken/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).
2015-12-21 18:22:20,925 INFO [mediagoblin.app] GNU MediaGoblin 0.8.0 main server starting
2015-12-21 18:22:21,317 INFO [mediagoblin.app] Setting up plugins.
2015-12-21 18:22:21,318 INFO [mediagoblin.init.plugins] Importing plugin module: mediagoblin.plugins.geolocation
2015-12-21 18:22:21,318 INFO [mediagoblin.init.plugins] Importing plugin module: mediagoblin.plugins.basic_auth
2015-12-21 18:22:21,318 INFO [mediagoblin.init.plugins] Importing plugin module: mediagoblin.media_types.image
2015-12-21 18:22:21,319 INFO [mediagoblin.init.plugins] Importing plugin module: mediagoblin.media_types.video
2015-12-21 18:22:21,319 INFO [mediagoblin.init.plugins] Importing plugin module: mediagoblin.media_types.audio
2015-12-21 18:22:21,400 INFO [mediagoblin.init.celery] Setting celery configuration from object "mediagoblin.init.celery.dummy_settings_module"
/home/src/mediagoblin/local/lib/python2.7/site-packages/SQLAlchemy-0.8.7-py2.7-linux-x86_64.egg/sqlalchemy/engine/default.py:459: SAWarning: Unicode type received non-unicode bind param value.
2015-12-21 18:22:44,656 INFO [mediagoblin.media_types] No plugins handled extension .mp3
2015-12-21 18:22:44,657 INFO [mediagoblin.media_types] No plugins using two-step checking found
2015-12-21 18:22:44,797 DEBUG [mediagoblin.processing.task] Processing <MediaEntry 5: twang>
2015-12-21 18:22:44,798 INFO [mediagoblin.media_types.audio.transcoders] Initializing AudioTranscoder
2015-12-21 18:22:44,800 INFO [mediagoblin.media_types.audio.transcoders] Initializing AudioThumbnailer
2015-12-21 18:22:44,810 INFO [mediagoblin.media_types.audio.transcoders] Transcoding /home/src/mediagoblin/user_dev/media/queue/media_entries/51da0f06-8981-4a27-8c46-972a8ef1477b/08_Twang_64kb.mp3 into /home/src/mediagoblin/user_dev/media/workbench/tmp6Lrm7I/08_Twang_64kb.mp3
2015-12-21 18:22:47,724 INFO [mediagoblin.media_types.audio.transcoders] 100% done...
2015-12-21 18:22:47,725 INFO [mediagoblin.media_types.audio.transcoders] Done
2015-12-21 18:22:47,730 INFO [mediagoblin.media_types.audio.transcoders] Quitting MainLoop gracefully...
2015-12-21 18:22:47,821 INFO [mediagoblin.media_types.audio.processing] Creating OGG source for spectrogram
2015-12-21 18:22:47,822 INFO [mediagoblin.media_types.audio.transcoders] Transcoding /home/src/mediagoblin/user_dev/media/queue/media_entries/51da0f06-8981-4a27-8c46-972a8ef1477b/08_Twang_64kb.mp3 into /home/src/mediagoblin/user_dev/media/workbench/tmp6Lrm7I/08_Twang_64kb.ogg
2015-12-21 18:22:50,582 INFO [mediagoblin.media_types.audio.transcoders] 100% done...
2015-12-21 18:22:50,583 INFO [mediagoblin.media_types.audio.transcoders] Done
2015-12-21 18:22:50,585 INFO [mediagoblin.media_types.audio.transcoders] Quitting MainLoop gracefully...
2015-12-21 18:22:50,811 ERROR [mediagoblin.processing.task] An unhandled exception was raised while processing <MediaEntry 5: twang>
2015-12-21 18:22:50,813 WARNING [mediagoblin.processing] No idea what happened here, but it failed: IndexError('axis 1 out of bounds [0, 1)',)
2015-12-21 18:22:50,829 WARNING [mediagoblin.processing] No idea what happened here, but it failed: IndexError('axis 1 out of bounds [0, 1)',)
Error - <type 'exceptions.IndexError'>: axis 1 out of bounds [0, 1)
URL: http://hub.spaz.org:6543/submit/
File '/home/src/mediagoblin/local/lib/python2.7/site-packages/Paste-1.7.5.1-py2.7.egg/paste/exceptions/errormiddleware.py', line 144 in call

app_iter = self.application(environ, sr_checker)

File '/home/src/mediagoblin/mediagoblin/app.py', line 342 in call

return self.call_backend(environ, start_response)

File '/home/src/mediagoblin/local/lib/python2.7/site-packages/Werkzeug-0.11.3-py2.7.egg/werkzeug/wsgi.py', line 599 in call

return self.app(environ, start_response)

File '/home/src/mediagoblin/mediagoblin/app.py', line 276 in call_backend

return self._finish_call_backend(request, environ, start_response)

File '/home/src/mediagoblin/mediagoblin/app.py', line 318 in _finish_call_backend

response = controller(request)

File '/home/src/mediagoblin/mediagoblin/decorators.py', line 46 in wrapper

return controller(request, *args, kwargs)

File '/home/src/mediagoblin/mediagoblin/decorators.py', line 73 in new_controller_func

return controller(request, *args, kwargs)

File '/home/src/mediagoblin/mediagoblin/decorators.py', line 46 in wrapper

return controller(request, *args, kwargs)

File '/home/src/mediagoblin/mediagoblin/decorators.py', line 73 in new_controller_func

return controller(request, *args, kwargs)

File '/home/src/mediagoblin/mediagoblin/decorators.py', line 102 in wrapper

return controller(request, *args, kwargs)

File '/home/src/mediagoblin/mediagoblin/submit/views.py', line 68 in submit_start

urlgen=request.urlgen)

File '/home/src/mediagoblin/mediagoblin/submit/lib.py', line 208 in submit_media

run_process_media(entry, feed_url)

File '/home/src/mediagoblin/mediagoblin/submit/lib.py', line 257 in run_process_media

task_id=entry.queued_task_id)

File '/home/src/mediagoblin/local/lib/python2.7/site-packages/celery-3.1.19-py2.7.egg/celery/app/task.py', line 552 in apply_async

link=link, link_error=link_error, options)

File '/home/src/mediagoblin/local/lib/python2.7/site-packages/celery-3.1.19-py2.7.egg/celery/app/task.py', line 749 in apply

request=request, propagate=throw)

File '/home/src/mediagoblin/local/lib/python2.7/site-packages/celery-3.1.19-py2.7.egg/celery/app/trace.py', line 355 in eager_trace_task

uuid, args, kwargs, request)

File '/home/src/mediagoblin/local/lib/python2.7/site-packages/celery-3.1.19-py2.7.egg/celery/app/trace.py', line 253 in trace_task

I, R, state, retval = on_error(task_request, exc, uuid)

File '/home/src/mediagoblin/local/lib/python2.7/site-packages/celery-3.1.19-py2.7.egg/celery/app/trace.py', line 240 in trace_task

R = retval = fun(*args, kwargs)

File '/home/src/mediagoblin/mediagoblin/processing/task.py', line 101 in run

processor.process(reprocess_info)

File '/home/src/mediagoblin/mediagoblin/media_types/audio/processing.py', line 260 in process

self.create_spectrogram(max_width=medium_width, fft_size=fft_size)

File '/home/src/mediagoblin/mediagoblin/media_types/audio/processing.py', line 158 in create_spectrogram

fft_size=fft_size)

File '/home/src/mediagoblin/mediagoblin/media_types/audio/transcoders.py', line 76 in spectrogram

seek_point)

File '/home/src/mediagoblin/mediagoblin/media_types/audio/audioprocessing.py', line 180 in spectral_centroid

samples = self.read(seek_point - self.fft_size/2, self.fft_size, True)

File '/home/src/mediagoblin/mediagoblin/media_types/audio/audioprocessing.py', line 168 in read

samples = numpy.concatenate((numpy.zeros(add_to_start), samples), axis=1)

IndexError: axis 1 out of bounds [0, 1)

CGI Variables


CONTENT_LENGTH: '725435'
CONTENT_TYPE: 'multipart/form-data; boundary=----WebKitFormBoundaryMwJkoGtaHB3FAnk8'
CSRF_TOKEN: u'5878169815720531094'
HTTP_ACCEPT: 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8'
HTTP_ACCEPT_ENCODING: 'gzip,deflate'
HTTP_ACCEPT_LANGUAGE: 'en-US,en;q=0.8'
HTTP_CACHE_CONTROL: 'max-age=0'
HTTP_CONNECTION: 'keep-alive'
HTTP_COOKIE: 'mediagoblin_csrftoken=5878169815720531094; PHPSESSID=h1giqmmj8rsu94uln1m4mfeqc1; jsAvailable=1; MGSession=eyJzdGF5X2xvZ2dlZF9pbiI6dHJ1ZSwidXNlcl9pZCI6IjIifQ.CVldEw.cTjLyQFoWW-oR9SEWLdmwN4aCwQ; mediagoblin_csrftoken=5878169815720531094'
HTTP_HOST: 'hub.spaz.org:6543'
HTTP_ORIGIN: 'http://hub.spaz.org:6543'
HTTP_REFERER: 'http://hub.spaz.org:6543/submit/'
HTTP_USER_AGENT: 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36'
PATH_INFO: '/submit/'
REMOTE_ADDR: '50.242.111.198'
REQUEST_METHOD: 'POST'
SERVER_NAME: '0.0.0.0'
SERVER_PORT: '6543'
SERVER_PROTOCOL: 'HTTP/1.1'

WSGI Variables


application: <mediagoblin.app.MediaGoblinApp object at 0x7fcf11bbf990>
paste.httpserver.thread_pool: <paste.httpserver.ThreadPool object at 0x7fcf023e3510>
paste.throw_errors: True
werkzeug.request: <Request 'http://hub.spaz.org:6543/submit/' [POST]>
wsgi process: 'Multithreaded'


Change History (7)

comment:1 by kenrestivo, 9 years ago

I should note, this error happens with every audio file I have tried; it doesn't seem to depend on the data.

comment:2 by Loic Dachary, 9 years ago

I was not able to reproduce the problem with 0.8.1 (installed using https://wiki.mediagoblin.org/EasyDeployment). Whatever the problem is, it probably comes from your environment. Did you figure it out ?

comment:3 by kenrestivo, 9 years ago

No, we ended up going with an old and simple PHP MP3 jukebox instead of MediaGoblin because it just worked.

comment:4 by Loic Dachary, 9 years ago

Resolution: worksforme
Status: newclosed

comment:5 by Jorge, 8 years ago

Please reopen - 0.9.0 is affected as well. I am willing to track this further to find a general solution.

$ /./bin/gmg addmedia user /home/user/media.mp3                                                    
/srv/mediagoblin.latest/mediagoblin/media_types/video/transcoders.py:37: PyGIWarning: GstPbutils was imported without specifying a version first. Use gi.require_version('
GstPbutils', '1.0') before import to ensure that the right version gets loaded.                                                                                           
  from gi.repository import GstPbutils
/srv/mediagoblin.latest/lib/python2.7/site-packages/SQLAlchemy-1.1.5-py2.7-linux-i686.egg/sqlalchemy/sql/sqltypes.py:219: SAWarning: Unicode type received non-unicode bin
d param value 'user'. (this warning may be suppressed after 10 occurrences)                                                                                             
/srv/mediagoblin.latest/lib/python2.7/site-packages/SQLAlchemy-1.1.5-py2.7-linux-i686.egg/sqlalchemy/sql/sqltypes.py:219: SAWarning: Unicode type received non-unicode bin
d param value 'mediagoblin.media_types.a...'. (this warning may be suppressed after 10 occurrences)                                                                       
/srv/mediagoblin.latest/lib/python2.7/site-packages/SQLAlchemy-1.1.5-py2.7-linux-i686.egg/sqlalchemy/sql/sqltypes.py:219: SAWarning: Unicode type received non-unicode bi$
d param value 'GNU MediaGoblin'. (this warning may be suppressed after 10 occurrences)
/srv/mediagoblin.latest/lib/python2.7/site-packages/SQLAlchemy-1.1.5-py2.7-linux-i686.egg/sqlalchemy/sql/sqltypes.py:219: SAWarning: Unicode type received non-unicode bi$
d param value 'core__media_entries'. (this warning may be suppressed after 10 occurrences)
/srv/mediagoblin.latest/lib/python2.7/site-packages/SQLAlchemy-1.1.5-py2.7-linux-i686.egg/sqlalchemy/sql/sqltypes.py:219: SAWarning: Unicode type received non-unicode bi$
d param value 'post'. (this warning may be suppressed after 10 occurrences)
DEBUG:mediagoblin.processing.task:Processing <MediaEntry 33:...>                                                
/srv/mediagoblin.latest/lib/python2.7/site-packages/SQLAlchemy-1.1.5-py2.7-linux-i686.egg/sqlalchemy/sql/sqltypes.py:219: SAWarning: Unicode type received non-unicode bin
d param value 'webm_audio'. (this warning may be suppressed after 10 occurrences)                                                
ERROR:mediagoblin.processing.task:An unhandled exception was raised while processing <MediaEntry 33: ...>
WARNING:mediagoblin.processing:No idea what happened here, but it failed: IndexError('axis 1 out of bounds [0, 1)',)
WARNING:mediagoblin.processing:No idea what happened here, but it failed: IndexError('axis 1 out of bounds [0, 1)',)
Traceback (most recent call last):                                                                
  File "/srv/mediagoblin/bin/gmg", line 11, in <module>               
    load_entry_point('mediagoblin', 'console_scripts', 'gmg')()                                              
  File "/srv/mediagoblin.latest/mediagoblin/gmg_commands/__init__.py", line 148, inmain_cli
    args.func(args)                                                                                  
  File "/srv/mediagoblin.latest/mediagoblin/gmg_commands/addmedia.py", line 110, inaddmedia
    tags_string=maybe_unicodeify(args.tags) or u"")                                                              
  File "/srv/mediagoblin.latest/mediagoblin/submit/lib.py", line 219, in submit_media
    run_process_media(entry, feed_url)                                                              
  File "/srv/mediagoblin.latest/mediagoblin/submit/lib.py", line 268, in run_process_media
    task_id=entry.queued_task_id)
  File "/srv/mediagoblin.latest/lib/python2.7/site-packages/celery-3.1.25-py2.7.egg/celery/app/task.py", line 565, in apply_async
    link=link, link_error=link_error, **options)
  File "/srv/mediagoblin.latest/lib/python2.7/site-packages/celery-3.1.25-py2.7.egg/celery/app/task.py", line 763, in apply
    request=request, propagate=throw)
  File "/srv/mediagoblin.latest/lib/python2.7/site-packages/celery-3.1.25-py2.7.egg/celery/app/trace.py", line 355, in eager_trace_task
    uuid, args, kwargs, request)
  File "/srv/mediagoblin.latest/lib/python2.7/site-packages/celery-3.1.25-py2.7.egg/celery/app/trace.py", line 253, in trace_task
    I, R, state, retval = on_error(task_request, exc, uuid)
  File "/srv/mediagoblin.latest/lib/python2.7/site-packages/celery-3.1.25-py2.7.egg/celery/app/trace.py", line 240, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/srv/mediagoblin.latest/mediagoblin/processing/task.py", line 101, in run
    processor.process(**reprocess_info)
  File "/srv/mediagoblin.latest/mediagoblin/media_types/audio/processing.py", line 260, in process
    self.create_spectrogram(max_width=medium_width, fft_size=fft_size)
  File "/srv/mediagoblin.latest/mediagoblin/media_types/audio/processing.py", line 158, in create_spectrogram
    fft_size=fft_size)
  File "/srv/mediagoblin.latest/mediagoblin/media_types/audio/transcoders.py", line76, in spectrogram
    seek_point)
  File "/srv/mediagoblin.latest/mediagoblin/media_types/audio/audioprocessing.py", line 180, in spectral_centroid
    samples = self.read(seek_point - self.fft_size/2, self.fft_size, True)
  File "/srv/mediagoblin.latest/mediagoblin/media_types/audio/audioprocessing.py", line 168, in read
    samples = numpy.concatenate((numpy.zeros(add_to_start), samples), axis=1)
IndexError: axis 1 out of bounds [0, 1)

comment:6 by ayleph, 8 years ago

Please try installing specific version of numpy and scikits.audiolab as mentioned in comment 12 of #5457. If that does not fix your issue, then please make a note saying so in that issue. Since that ticket is still open, let's leave this one closed.

comment:7 by Jorge, 8 years ago

(removed former long trace)

The workaround of ticket:5457#comment:12

./bin/pip install numpy==1.9.1
./bin/pip install scikits.audiolab==0.10.2

solves this issue for me as well. Thanks ayleph for looking it up

Last edited 8 years ago by Jorge (previous) (diff)
Note: See TracTickets for help on using tickets.