albertz / music-player

Music player - endlessly plays your music
http://albertz.github.io/music-player/
BSD 2-Clause "Simplified" License
490 stars 58 forks source link

Last.fm module hanging #28

Closed albertz closed 11 years ago

albertz commented 11 years ago
MusicPlayer 1.0 from 2013-03-06 03:51:54 +0000 git-ref dc8acb4812 on MacOSX (darwin)
startup on 2013-03-06 03:52:01 +0000

The hanging thread (hanging in ssl.SSLContext.do_handshake()):

# Thread: Lastfm client(4462522368)
Traceback (most recent call first)
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/ssl.py", line 279, in do_handshake
    line: self._sslobj.do_handshake()
    locals:
      self = <local> <ssl.SSLSocket object at 0x119080848>
      self._sslobj = <local> <ssl.SSLContext object at 0x110b8bff0>
      self._sslobj.do_handshake = <local> <built-in method do_handshake of ssl.SSLContext object at 0x110b8bff0>
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/ssl.py", line 120, in __init__
    line: self.do_handshake()
    locals:
      self = <local> <ssl.SSLSocket object at 0x119080848>
      self.do_handshake = <local> <bound method SSLSocket.do_handshake of <ssl.SSLSocket object at 0x119080848>>
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/ssl.py", line 338, in wrap_socket
    line: suppress_ragged_eofs=suppress_ragged_eofs)
    locals:
      suppress_ragged_eofs = <local> True
  File "/Users/az/Programmierung/music-player/mac/build/Release/MusicPlayer.app/Contents/Resources/Python/lastfm/rest.py", line 43, in connect
    line: self.sock = ssl.wrap_socket(sock, cert_reqs=self.cert_reqs, ca_certs=self.ca_certs)
    locals:
      self = <local> <lastfm.rest.ProperHTTPSConnection instance at 0x119079560>
      self.sock = <local> None
      ssl = <global> <module 'ssl' from '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/ssl.py'>
      ssl.wrap_socket = <global> <function wrap_socket at 0x1080c7488>
      sock = <local> <socket._socketobject object at 0x1116b0f30>
      cert_reqs = <not found>
      self.cert_reqs = <local> 2
      ca_certs = <not found>
      self.ca_certs = <local> '/Users/az/Programmierung/music-player/mac/build/Release/MusicPlayer.app/Contents/Resources/Python/lastfm/trusted-certs.crt', len = 122
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py", line 739, in send
    line: self.connect()
    locals:
      self = <local> <lastfm.rest.ProperHTTPSConnection instance at 0x119079560>
      self.connect = <local> <bound method ProperHTTPSConnection.connect of <lastfm.rest.ProperHTTPSConnection instance at 0x119079560>>
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py", line 780, in _send_output
    line: self.send(msg)
    locals:
      self = <local> <lastfm.rest.ProperHTTPSConnection instance at 0x119079560>
      self.send = <local> <bound method ProperHTTPSConnection.send of <lastfm.rest.ProperHTTPSConnection instance at 0x119079560>>
      msg = <local> 'POST https://ws.audioscrobbler.com/2.0/ HTTP/1.1\r\nHost: ws.audioscrobbler.com\r\nAccept-Encoding: identity\r\nContent-Length: 243\r\nContent-type: application/x-www-form-urlencoded\r\n\r\n', len = 178
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py", line 908, in endheaders
    line: self._send_output()
    locals:
      self = <local> <lastfm.rest.ProperHTTPSConnection instance at 0x119079560>
      self._send_output = <local> <bound method ProperHTTPSConnection._send_output of <lastfm.rest.ProperHTTPSConnection instance at 0x119079560>>
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py", line 951, in _send_request
    line: self.endheaders()
    locals:
      self = <local> <lastfm.rest.ProperHTTPSConnection instance at 0x119079560>
      self.endheaders = <local> <bound method ProperHTTPSConnection.endheaders of <lastfm.rest.ProperHTTPSConnection instance at 0x119079560>>
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py", line 914, in request
    line: self._send_request(method, url, body, headers)
    locals:
      self = <local> <lastfm.rest.ProperHTTPSConnection instance at 0x119079560>
      self._send_request = <local> <bound method ProperHTTPSConnection._send_request of <lastfm.rest.ProperHTTPSConnection instance at 0x119079560>>
      method = <local> 'POST'
      url = <local> 'https://ws.audioscrobbler.com/2.0/', len = 34
      body = <local> 'artist=Venetian+Snares&...', len = 243
      headers = <local> {'Content-type': 'application/x-www-form-urlencoded'}
  File "/Users/az/Programmierung/music-player/mac/build/Release/MusicPlayer.app/Contents/Resources/Python/lastfm/rest.py", line 154, in request
    line: conn.request(method, url, body, headers)
    locals:
      conn = <local> <lastfm.rest.ProperHTTPSConnection instance at 0x119079560>
      conn.request = <local> <bound method ProperHTTPSConnection.request of <lastfm.rest.ProperHTTPSConnection instance at 0x119079560>>
      method = <local> 'POST'
      url = <local> 'https://ws.audioscrobbler.com/2.0/', len = 34
      body = <local> 'artist=Venetian+Snares&track=%C3%96ngy...', len = 243
      headers = <local> {'Content-type': 'application/x-www-form-urlencoded'}
  File "/Users/az/Programmierung/music-player/mac/build/Release/MusicPlayer.app/Contents/Resources/Python/lastfm/rest.py", line 219, in POST
    line: post_params=params, headers=headers, raw_response=raw_response)
    locals:
      post_params = <not found>
      params = <local> {..., len = 9
      headers = <local> {}
      raw_response = <local> False
  File "/Users/az/Programmierung/music-player/mac/build/Release/MusicPlayer.app/Contents/Resources/Python/lastfm/rest.py", line 272, in POST
    line: return cls.IMPL.POST(*n, **kw)
    locals:
      cls = <local> <class 'lastfm.rest.RESTClient'>
      cls.IMPL = <local> <lastfm.rest.RESTClientObject object at 0x109a10610>
      cls.IMPL.POST = <local> <bound method RESTClientObject.POST of <lastfm.rest.RESTClientObject object at 0x109a10610>>
      n = <local> ('https://ws.audioscrobbler.com/2.0/',), _[0]: {len = 34}
      kw = <local> {'headers': {}, 'params': {...
  File "/Users/az/Programmierung/music-player/mac/build/Release/MusicPlayer.app/Contents/Resources/Python/lastfm/client.py", line 129, in scrobble
    line: ret = self.rest_client.POST(url, headers=headers, params=params)
    locals:
      ret = <not found>
      self = <local> <lastfm.client.LastfmClient object at 0x10806b150>
      self.rest_client = <local> <class 'lastfm.rest.RESTClient'>
      self.rest_client.POST = <local> <bound method type.POST of <class 'lastfm.rest.RESTClient'>>
      url = <local> 'https://ws.audioscrobbler.com/2.0/', len = 34
      headers = <local> {}
      params = <local> {..., len = 9
  File "/Users/az/Programmierung/music-player/mac/build/Release/MusicPlayer.app/Contents/Resources/Python/lastfm/__init__.py", line 173, in apiCall
    line: ret = f(**kwargs)
    locals:
      ret = <not found>
      f = <local> <bound method LastfmClient.scrobble of <lastfm.client.LastfmClient object at 0x10806b150>>
      kwargs = <local> {'track': '\xc3\x96ngyilkos Vas\xc3\xa1rnap', 'duration': 206.21061224489796, 'artist': 'Venetian Snares', 'timestamp': 1362993162.7501941}
  File "/Users/az/Programmierung/music-player/mac/build/Release/MusicPlayer.app/Contents/Resources/Python/lastfm/__init__.py", line 150, in <lambda>
    line: self.execQueue.put(lambda: f(self, *args, **kwargs))
    locals:
      self = <local> <lastfm.Client instance at 0x1080931b8>
      self.execQueue = <local> <Queue.Queue instance at 0x1098f52d8>
      self.execQueue.put = <local> <bound method Queue.put of <Queue.Queue instance at 0x1098f52d8>>
      f = <local> <function apiCall at 0x1098a8aa0>
      args = <local> ('scrobble',), _[0]: {len = 8}
      kwargs = <local> {'track': '\xc3\x96ngyilkos Vas\xc3\xa1rnap', 'duration': 206.21061224489796, 'timestamp': 1362993162.7501941, 'artist': 'Venetian Snares'}
  File "/Users/az/Programmierung/music-player/mac/build/Release/MusicPlayer.app/Contents/Resources/Python/lastfm/__init__.py", line 139, in _threadMain
    line: item()
    locals:
      item = <local> <function <lambda> at 0x11c24e668>
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/threading.py", line 484, in run
    line: self.__target(*self.__args, **self.__kwargs)
    locals:
      self = <local> <Thread(Lastfm client, started 4462522368)>
      self.__target = <local> !AttributeError: 'Thread' object has no attribute '__target'
      self.__args = <local> !AttributeError: 'Thread' object has no attribute '__args'
      self.__kwargs = <local> !AttributeError: 'Thread' object has no attribute '__kwargs'
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/threading.py", line 532, in __bootstrap_inner
    line: self.run()
    locals:
      self = <local> <Thread(Lastfm client, started 4462522368)>
      self.run = <local> <bound method Thread.run of <Thread(Lastfm client, started 4462522368)>>
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/threading.py", line 504, in __bootstrap
    line: self.__bootstrap_inner()
    locals:
      self = <local> <Thread(Lastfm client, started 4462522368)>
      self.__bootstrap_inner = <local> !AttributeError: 'Thread' object has no attribute '__bootstrap_inner'

The module thread itself is uninteresting:

# Thread: tracker_lastfm main(4431114240)
Traceback (most recent call first)
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/threading.py", line 239, in wait
    line: waiter.acquire()
    locals:
      waiter = <local> <thread.lock object at 0x11d38c6f0>
      waiter.acquire = <local> <built-in method acquire of thread.lock object at 0x11d38c6f0>
  File "/Users/az/Programmierung/music-player/mac/build/Release/MusicPlayer.app/Contents/Resources/Python/utils.py", line 80, in read
    line: q.cond.wait()
    locals:
      q = <local> <utils.QueueEnd instance at 0x10807d0e0>
      q.cond = <local> <Condition(<_RLock owner=None count=0>, 1)>
      q.cond.wait = <local> <bound method _Condition.wait of <Condition(<_RLock owner=None count=0>, 1)>>
  File "/Users/az/Programmierung/music-player/mac/build/Release/MusicPlayer.app/Contents/Resources/Python/tracker_lastfm.py", line 31, in tracker_lastfmMain
    line: listType = lambda: PersistentObject(deque, "lastfm-queue.dat", namespace=globals())
    locals:
      listType = <not found>
      PersistentObject = <global> <function PersistentObject at 0x103b2f938>
      deque = <global> <type 'collections.deque'>
      namespace = <not found>
      globals = <builtin> <built-in function globals>
  File "/Users/az/Programmierung/music-player/mac/build/Release/MusicPlayer.app/Contents/Resources/Python/utils.py", line 500, in threadMain
    line: mainFunc()
albertz commented 11 years ago

Should be fixed in commit 8a7876025bf (and related for cleanup).