beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ahmet Altay (JIRA)" <>
Subject [jira] [Commented] (BEAM-391) Exceptions in gcsio upload thread causes pipeline to stall
Date Fri, 08 Jul 2016 20:48:11 GMT


Ahmet Altay commented on BEAM-391:

Another type of Exception that result in the same behavior:

Exception in thread Thread-10:
Traceback (most recent call last):
File "/usr/lib/python2.7/", line 810, in __bootstrap_inner
File "/usr/lib/python2.7/", line 763, in run self.__target(*self.__args, **self.__kwargs)
File "/usr/local/lib/python2.7/dist-packages/apache_beam/utils/", line 160, in wrapper
return fun(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/apache_beam/io/", line 563, in _start_upload
self.client.objects.Insert(self.insert_request, upload=self.upload)
File "/usr/local/lib/python2.7/dist-packages/apache_beam/internal/clients/storage/",
line 970, in Insertdownload=download)
File "/usr/local/lib/python2.7/dist-packages/apitools/base/py/", line 687, in _RunMethodhttp_request,
File "/usr/local/lib/python2.7/dist-packages/apitools/base/py/", line 838, in InitializeUploadretries=self.num_retries)
File "/usr/local/lib/python2.7/dist-packages/apitools/base/py/", line 351,
in MakeRequestmax_retry_wait, total_wait_sec))
File "/usr/local/lib/python2.7/dist-packages/apitools/base/py/", line 341,
in MakeRequestcheck_response_func=check_response_func)
File "/usr/local/lib/python2.7/dist-packages/apitools/base/py/", line 391,
in _MakeRequestNoRetry redirections=redirections, connection_type=connection_type)
File "/usr/local/lib/python2.7/dist-packages/oauth2client/", line 616, in new_request
File "/usr/local/lib/python2.7/dist-packages/apache_beam/internal/", line 90, in _refresh
token_data = json.loads(urllib2.urlopen(req).read())
File "/usr/lib/python2.7/", line 154, in urlopen return, data, timeout)
File "/usr/lib/python2.7/", line 431, in open response = self._open(req, data)
File "/usr/lib/python2.7/", line 449, in _open '_open', req)
File "/usr/lib/python2.7/", line 409, in _call_chain result = func(*args)
File "/usr/lib/python2.7/", line 1227, in http_open return self.do_open(httplib.HTTPConnection,
File "/usr/lib/python2.7/", line 1197, in do_open raise URLError(err)

Error is coming from _refresh(). That may require retries based on the type of error.

> Exceptions in gcsio upload thread causes pipeline to stall
> ----------------------------------------------------------
>                 Key: BEAM-391
>                 URL:
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-py
>            Reporter: Ahmet Altay
> gcsio got stuck with invalid bucket name
> GcsBufferedWriter._start_upload ( raises an exception if the bucket does not
exist. This causes upload thread to silenty fail. It logs exception to the log but this does
not stop the pipeline or closes the receiving end of the multiprocessing.Pipe(). Later a call
in to write() blocks at self.conn.send_bytes(). Note that send may block if the buffer is
> Upload thread should have a finally clause to close the socket connection. Or better
propagating the exception to its parent. This is true for other types of exceptions also.
> Another small issue in the GcsBufferedWriter.close(). It does not self self.close to
> reproduction: python -m apache_beam.examples.wordcount --output gs://no-such-thing/
> Prints the exception but goes on forever. Ctrl + C breaks the main thread shows where
it got stuck.
> Similarly reproducible on the service.

This message was sent by Atlassian JIRA

View raw message