Opened 5 years ago

Closed 5 years ago

#1811 closed defect (fixed)

logprocessor crashes if unable to process one log file

Reported by: trev Assignee: trev
Priority: P1 Milestone:
Module: Infrastructure Keywords:
Cc: Blocked By:
Blocking: Platform: Unknown
Ready: no Confidential: no
Tester: Verified working:
Review URL(s):

http://codereview.adblockplus.org/5315116274810880/

Description

Background

logprocessor parses a number of log files. If processing one of the log files fails it is supposed to report the error and continue. However, that's not what currently happens, instead the following error occurs and crashes the entire process:

Traceback (most recent call last):
  File "app_main.py", line 51, in run_toplevel
  File "/usr/lib/pypy/lib-python/2.7/runpy.py", line 164, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/pypy/lib-python/2.7/runpy.py", line 73, in _run_code
    exec code in run_globals
  File "/opt/sitescripts/sitescripts/stats/bin/logprocessor.py", line 556, in <module>
    parse_sources(sources, args.factor, args.verbose)
  File "/opt/sitescripts/sitescripts/stats/bin/logprocessor.py", line 533, in parse_sources
    for log_file, ignored in pool.imap_unordered(callback, sources, chunksize=1):
ValueError: expected length 2, got 4

What to change

Adjust number of returned values in case of error to be the same as in the normal scenario.

Change History (3)

comment:1 Changed 5 years ago by trev

  • Owner set to trev

comment:2 Changed 5 years ago by trev

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:3 Changed 5 years ago by trev

  • Resolution set to fixed
  • Status changed from reviewing to closed
Note: See TracTickets for help on using tickets.