text: Title: "buffer_size" error in the middle of training
  Body: I faced "buffer_size cannot be larger than the size of the DataFlow!" error in the middle of training (e.g., after epoch 10). I'm trying to minimize reproducible codes for debugging, but couldn't yet find.
  Meanwhile, can I ask your advice about where to look at? 
  
  ### training code
  ```
      df = MyDataFlow(config, 'trainvalminusminival')
      df = MultiThreadMapData(df, 10, df.mapf, buffer_size=32, strict=True)
      df = PrefetchDataZMQ(df, 10)
      df = BatchData(df, config.TRAIN.BATCH_SIZE, remainder=False)
  
      vdf = MyDataFlow(config, 'minival')
      vdf = MultiThreadMapData(vdf, 10, vdf.mapf, buffer_size=32, strict=True)
      vdf = PrefetchDataZMQ(vdf, 10)
      vdf = BatchData(vdf, config.TRAIN.BATCH_SIZE)
  
      model = MyModel(config)
      traincfg = get_train_config(model, df, vdf, config)
      nr_tower = max(get_num_gpu(), 1)
      trainer = SyncMultiGPUTrainerReplicated(nr_tower)
      launch_train_with_config(traincfg, trainer)
  ```
  
  ### data flow 
  ```
  class MyDataFlow(RNGDataFlow):
      def __init__(self, config, split, path, aug=False):
          super(MyDataFlow, self).__init__()
          self.config = config
          self.image_size = config.DATA.IMAGE_SIZE
          self.aug = aug
  
          ... tfrecord file grapping and generator using tf.python_io.tf_record_iterator ...
          logger.info('{}: grabbed {} TFRecords.'.format(split, len(tfrecords)))
          logger.info('{}: grabbed {} examples.'.format(split, self.num_samples))
  
      def __len__(self):
          return self.num_samples
  
      def __iter__(self):
          while True:
              example = next(self.generator)
              ... parsing using tf.train.Example.FromString(example) ...
              yield key, points, label
  
      def mapf(self, example):
             ... some preprocessing ...
  ```
  
  ### log 
  ````
   [1021 15:51:58 @base.py:250]  Start Epoch 8 ...
   [1021 16:12:30 @base.py:260]  Epoch 8 (global_step 2500000) finished, time:20 minutes 31 seconds.
   [1021 16:12:30 @graph.py:73]  Running Op sync_variables/sync_variables_from_main_tower ...
   [1021 16:12:30 @saver.py:77]  Model saved to train_log/config/model-2500000.
   [1021 16:12:31 @misc.py:109]  Estimated Time Left: 15 hours 45 minutes 23 seconds
   [1021 16:14:30 @monitor.py:459]  DataParallelInferenceRunner/QueueInput/queue_size: 25
   [1021 16:14:30 @monitor.py:459]  GPUUtil/0: 19.745
   [1021 16:14:30 @monitor.py:459]  QueueInput/queue_size: 49.969
   [1021 16:14:30 @monitor.py:459]  cost: 5.802
   [1021 16:14:30 @monitor.py:459]  learning_rate: 0.01
   [1021 16:14:30 @monitor.py:459]  train-error-top1: 0.98717
   [1021 16:14:30 @monitor.py:459]  train-error-top3: 0.96963
   [1021 16:14:30 @monitor.py:459]  val-error-top1: 0.99726
   [1021 16:14:30 @monitor.py:459]  val-error-top3: 0.99152
   [1021 16:14:30 @group.py:48]  Callbacks took 119.715 sec in total. DataParallelInferenceRunner: 1 minute 59 seconds
   [1021 16:14:30 @base.py:250]  Start Epoch 9 ...
   [1021 16:35:00 @base.py:260]  Epoch 9 (global_step 2812500) finished, time:20 minutes 30 seconds.
   [1021 16:35:00 @graph.py:73]  Running Op sync_variables/sync_variables_from_main_tower ...
   [1021 16:35:00 @saver.py:77]  Model saved to train_log/config/model-2812500.
   [1021 16:35:01 @misc.py:109]  Estimated Time Left: 15 hours 22 minutes 47 seconds
   [1021 16:37:01 @monitor.py:459]  DataParallelInferenceRunner/QueueInput/queue_size: 25
   [1021 16:37:01 @monitor.py:459]  GPUUtil/0: 19.735
   [1021 16:37:01 @monitor.py:459]  QueueInput/queue_size: 49.858
   [1021 16:37:01 @monitor.py:459]  cost: 5.8078
   [1021 16:37:01 @monitor.py:459]  learning_rate: 0.01
   [1021 16:37:01 @monitor.py:459]  train-error-top1: 0.99174
   [1021 16:37:01 @monitor.py:459]  train-error-top3: 0.9626
   [1021 16:37:01 @monitor.py:459]  val-error-top1: 0.99711
   [1021 16:37:01 @monitor.py:459]  val-error-top3: 0.99116
   [1021 16:37:01 @group.py:48]  Callbacks took 120.659 sec in total. DataParallelInferenceRunner: 2 minutes
   [1021 16:37:01 @base.py:250]  Start Epoch 10 ...
   [1021 16:57:34 @base.py:260]  Epoch 10 (global_step 3125000) finished, time:20 minutes 32 seconds.
   [1021 16:57:34 @graph.py:73]  Running Op sync_variables/sync_variables_from_main_tower ...
   [1021 16:57:34 @saver.py:77]  Model saved to train_log/config/model-3125000.
   [1021 16:57:34 @misc.py:109]  Estimated Time Left: 15 hours 36 seconds
   [1021 16:59:32 @parallel_map.py:53]   [4m [5m [31mERR [0m [MultiThreadMapData] buffer_size cannot be larger than the size of the DataFlow!
   [1021 16:59:32 @parallel_map.py:53]   [4m [5m [31mERR [0m [MultiThreadMapData] buffer_size cannot be larger than the size of the DataFlow!
  ````
  
  ### error related code: `parallel_map.py` 
  ```
      def _fill_buffer(self, cnt=None):
          if cnt is None:
              cnt = self._buffer_size - self._buffer_occupancy
          try:
              for _ in range(cnt):
                  dp = next(self._iter)
                  self._send(dp)
          except StopIteration:
              logger.error(
                  "[{}] buffer_size cannot be larger than the size of the DataFlow!".format(type(self).__name__))
              raise
          self._buffer_occupancy += cnt
  ```
  Is it possible for `data source` to get empty (the end of its data), during the for loop in `_fill_buffer`?
  
  
  Python version: 3.5
  TF version: 1.11.0
  Tensorpack version: 0.8.9