Skip to content

Commit

Permalink
Log trace of uncaught exception in load generator (#1162)
Browse files Browse the repository at this point in the history
With this commit we enhance the handlers for uncaught exception handlers
in the load generator to log the full exception trace before forwarding
the exception *message* to the coordinating process. Previously, the
coordinating process would then log the exception message but we lost
the actual trace which makes diagnosis harder.
  • Loading branch information
danielmitterdorfer authored Jan 27, 2021
1 parent 6ada969 commit 8e8c122
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions esrally/driver/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ def receiveMsg_WakeupMessage(self, msg, sender):
if self.executor_future is not None and self.executor_future.done():
e = self.executor_future.exception(timeout=0)
if e:
self.logger.info("Track preparator has detected a benchmark failure. Notifying master...")
self.logger.exception("Track preparator has detected a benchmark failure. Notifying master...", exc_info=e)
# the exception might be user-defined and not be on the load path of the original sender. Hence, it
# cannot be deserialized on the receiver so we convert it here to a plain string.
self.send(self.original_sender, actor.BenchmarkFailure("Error in track preparator", str(e)))
Expand Down Expand Up @@ -893,7 +893,8 @@ def receiveMsg_WakeupMessage(self, msg, sender):
elif self.executor_future is not None and self.executor_future.done():
e = self.executor_future.exception(timeout=0)
if e:
self.logger.info("Worker[%s] has detected a benchmark failure. Notifying master...", str(self.worker_id))
self.logger.exception("Worker[%s] has detected a benchmark failure. Notifying master...",
str(self.worker_id), exc_info=e)
# the exception might be user-defined and not be on the load path of the master driver. Hence, it cannot be
# deserialized on the receiver so we convert it here to a plain string.
self.send(self.master, actor.BenchmarkFailure("Error in load generator [{}]".format(self.worker_id), str(e)))
Expand Down

0 comments on commit 8e8c122

Please sign in to comment.