New issue
Advanced search Search tips

Issue 869438 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 28
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

Tko crash when logging type error

Project Member Reported by haddowk@chromium.org, Jul 31

Issue description

WARNING:py.warnings:/usr/local/autotest/tko/db.py:382: Warning: Data truncated for column 'label' at row 1
  self.cur.execute(sql, values)

WARNING:py.warnings:/usr/local/autotest/tko/db.py:382: Warning: Data truncated for column 'attribute' at row 1
  self.cur.execute(sql, values)

Exception occurred formatting message: 'Unexpected type %s for attr %s, should be %s' using args ((<type 'int'>, 'afe_parent_job_id', <type 'str'>),)
  File "/usr/local/autotest/tko/parse", line 5, in <module>
    parse.main()
  File "/usr/local/autotest/tko/parse.py", line 700, in main
    _main_with_options(options, args)
  File "/usr/local/autotest/tko/parse.py", line 757, in _main_with_options
    parse_options)
  File "/usr/local/autotest/tko/parse.py", line 672, in parse_path
    parse_options)
  File "/usr/local/autotest/tko/parse.py", line 634, in parse_leaf_path
    parse_options)
  File "/usr/local/autotest/tko/db.py", line 203, in run_with_retry
    result = function(*args, **dargs)
  File "/usr/local/autotest/tko/parse.py", line 451, in parse_one
    export_tko_job_to_file(job, jobname, binary_file_name)
  File "/usr/local/autotest/tko/parse.py", line 300, in export_tko_job_to_file
    serializer.serialize_to_binary(job, jobname, filename)
  File "/usr/local/autotest/tko/job_serializer.py", line 115, in serialize_to_binary
    self.set_pb_job(the_job, pb_job, tag)
  File "/usr/local/autotest/tko/job_serializer.py", line 188, in set_pb_job
    self.set_trivial_attr(tko_job, pb_job, self.job_type_dict)
  File "/usr/local/autotest/tko/job_serializer.py", line 419, in set_trivial_attr
    self.set_attr_safely(pb_obj, attr, value, attr_type)
  File "/usr/local/autotest/tko/job_serializer.py", line 444, in set_attr_safely
    (type(value), attr, vartype))
  File "/usr/lib64/python2.7/logging/__init__.py", line 1617, in warning
    root.warning(msg, *args, **kwargs)
  File "/usr/lib64/python2.7/logging/__init__.py", line 1177, in warning
    self._log(WARNING, msg, args, **kwargs)
  File "/usr/lib64/python2.7/logging/__init__.py", line 1284, in _log
    self.handle(record)
  File "/usr/lib64/python2.7/logging/__init__.py", line 1294, in handle
    self.callHandlers(record)
  File "/usr/lib64/python2.7/logging/__init__.py", line 1334, in callHandlers
    hdlr.handle(record)
  File "/usr/lib64/python2.7/logging/__init__.py", line 757, in handle
    self.emit(record)
  File "/usr/lib64/python2.7/logging/__init__.py", line 887, in emit
    self.handleError(record)
  File "/usr/local/autotest/client/setup_modules.py", line 86, in _autotest_logging_handle_error
    traceback.print_stack()
--------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python2.7/logging/__init__.py", line 859, in emit
    msg = self.format(record)
  File "/usr/lib64/python2.7/logging/__init__.py", line 732, in format
    return fmt.format(record)
  File "/usr/lib64/python2.7/logging/__init__.py", line 471, in format
    record.message = record.getMessage()
  File "/usr/lib64/python2.7/logging/__init__.py", line 335, in getMessage
    msg = msg % self.args
TypeError: not enough arguments for format string
Future logging formatting exceptions disabled.
lucifer: 2018/07/31 08:54:04 Sending event completed
lucifer: 2018/07/31 08:54:04 Exiting with 0
 
Project Member

Comment 1 by bugdroid1@chromium.org, Aug 2

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/f9ae33ff5bbcdeb7d38fc0c4fca005ae2ff1d63c

commit f9ae33ff5bbcdeb7d38fc0c4fca005ae2ff1d63c
Author: Keith Haddow <haddowk@chromium.org>
Date: Thu Aug 02 20:53:22 2018

[autotest] Fix issue with logging error formatting

TEST=Local moblab testing
BUG= chromium:869438 

Change-Id: Ie9b866699c61fcf88e28b9d3ee90fdefc47b48d4
Reviewed-on: https://chromium-review.googlesource.com/1158849
Commit-Ready: Keith Haddow <haddowk@chromium.org>
Tested-by: Keith Haddow <haddowk@chromium.org>
Reviewed-by: Allen Li <ayatane@chromium.org>

[modify] https://crrev.com/f9ae33ff5bbcdeb7d38fc0c4fca005ae2ff1d63c/tko/job_serializer.py

Project Member

Comment 2 by bugdroid1@chromium.org, Aug 3

Labels: merge-merged-release-R68-10718.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/f402129260efa0d834e43a3583f2d17075468ac0

commit f402129260efa0d834e43a3583f2d17075468ac0
Author: Keith Haddow <haddowk@chromium.org>
Date: Fri Aug 03 21:14:16 2018

[autotest] Fix issue with logging error formatting

TEST=Local moblab testing
BUG= chromium:869438 

Change-Id: Ie9b866699c61fcf88e28b9d3ee90fdefc47b48d4
Reviewed-on: https://chromium-review.googlesource.com/1158849
Commit-Ready: Keith Haddow <haddowk@chromium.org>
Tested-by: Keith Haddow <haddowk@chromium.org>
Reviewed-by: Allen Li <ayatane@chromium.org>
(cherry picked from commit f9ae33ff5bbcdeb7d38fc0c4fca005ae2ff1d63c)
Reviewed-on: https://chromium-review.googlesource.com/1162463
Reviewed-by: Keith Haddow <haddowk@chromium.org>
Commit-Queue: Keith Haddow <haddowk@chromium.org>
Trybot-Ready: Keith Haddow <haddowk@chromium.org>

[modify] https://crrev.com/f402129260efa0d834e43a3583f2d17075468ac0/tko/job_serializer.py

Project Member

Comment 3 by bugdroid1@chromium.org, Aug 3

Labels: merge-merged-release-R69-10895.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/21441c72ce6a6afabeffadd10de14a30cbf384b2

commit 21441c72ce6a6afabeffadd10de14a30cbf384b2
Author: Keith Haddow <haddowk@chromium.org>
Date: Fri Aug 03 21:14:17 2018

[autotest] Fix issue with logging error formatting

TEST=Local moblab testing
BUG= chromium:869438 

Change-Id: Ie9b866699c61fcf88e28b9d3ee90fdefc47b48d4
Reviewed-on: https://chromium-review.googlesource.com/1158849
Commit-Ready: Keith Haddow <haddowk@chromium.org>
Tested-by: Keith Haddow <haddowk@chromium.org>
Reviewed-by: Allen Li <ayatane@chromium.org>
(cherry picked from commit f9ae33ff5bbcdeb7d38fc0c4fca005ae2ff1d63c)
Reviewed-on: https://chromium-review.googlesource.com/1162462
Reviewed-by: Keith Haddow <haddowk@chromium.org>
Commit-Queue: Keith Haddow <haddowk@chromium.org>
Trybot-Ready: Keith Haddow <haddowk@chromium.org>

[modify] https://crrev.com/21441c72ce6a6afabeffadd10de14a30cbf384b2/tko/job_serializer.py

Status: Fixed (was: Assigned)

Sign in to add a comment