Skip to content

Commit 184fe74

Browse files
authored
Add some logs to investigate minimization issues and disable multi th… (#4648)
…read runs
1 parent 25ae631 commit 184fe74

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/clusterfuzz/_internal/bot/minimizer/minimizer.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ def _deadline_exceeded(self, cleanup_function=None, soft_check=False):
183183
"""Check to see if we have exceeded the deadline for execution."""
184184
if self.minimizer.deadline and time.time() > self.minimizer.deadline:
185185
if soft_check:
186+
logs.warning(f'Minimization deadline exceeded. soft_check={soft_check}')
186187
return True
187188

188189
# If we are here, we have exceeded the deadline on a hard check. Clean up.
@@ -192,6 +193,7 @@ def _deadline_exceeded(self, cleanup_function=None, soft_check=False):
192193
if self.minimizer.cleanup_function:
193194
self.minimizer.cleanup_function()
194195

196+
logs.warning('Minimization deadline exceeded.')
195197
# Raise an exception if this is not a soft deadline check.
196198
raise errors.MinimizationDeadlineExceededError(self)
197199

@@ -558,6 +560,7 @@ def minimize(self, data):
558560
# minimized test case is stored with it so that we can recover the work
559561
# that had been done up to that point.
560562
testcase = error.testcase
563+
logs.warning('Minimization Deadline Exceeded.')
561564
except errors.TokenizationFailureError:
562565
logs.info('Tokenized data did not match original data. Defaulting to line'
563566
'minimization.')

src/clusterfuzz/_internal/bot/tasks/utasks/minimize_task.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,10 @@ def utask_main(uworker_input: uworker_msg_pb2.Input): # pylint: disable=no-memb
445445
' should have been detected in preprocess.')
446446
return None
447447

448-
max_threads = utils.maximum_parallel_processes_allowed()
448+
# TODO(alhijazi): re-install multithreaded runs
449+
# max_threads = utils.maximum_parallel_processes_allowed()
450+
# Temporarily run minimization single threaded.
451+
max_threads = 1
449452

450453
# Prepare the test case runner.
451454
crash_retries = environment.get_value('CRASH_RETRIES')
@@ -1748,8 +1751,10 @@ def do_html_minimization(test_function, get_temp_file, data, deadline, threads,
17481751
delete_temp_files=delete_temp_files,
17491752
progress_report_function=logs.info)
17501753
try:
1754+
logs.info('Launching html minimization.')
17511755
return current_minimizer.minimize(data)
17521756
except minimizer_errors.AntlrDecodeError:
1757+
logs.info('Launching line minimization.')
17531758
return do_line_minimization(test_function, get_temp_file, data, deadline,
17541759
threads, cleanup_interval, delete_temp_files)
17551760

0 commit comments

Comments
 (0)