Skip to content

analyser: introduce an option to control parallel mode#2278

Open
ligurio wants to merge 1 commit intoossf:mainfrom
ligurio:ligurio/fix-analysis-oss-fuzz
Open

analyser: introduce an option to control parallel mode#2278
ligurio wants to merge 1 commit intoossf:mainfrom
ligurio:ligurio/fix-analysis-oss-fuzz

Conversation

@ligurio
Copy link

@ligurio ligurio commented Feb 9, 2026

Fuzz Introspector is failed when building reports for Tarantool and other projects, see [1]:

During handling of the above exception, another exception occurred:

File "/usr/local/lib/python3.10/multiprocessing/managers.py", line 817, in _callmethod
conn.send((self._id, methodname, args, kwds))
File "/fuzz-introspector/src/fuzz_introspector/datatypes/fuzzer_profile.py", line 359, in accummulate_profile
return_dict[uniq_id] = self
AttributeError: 'ForkAwareLocal' object has no attribute 'connection'

The issue (theoretically) is related to processing data in parallel mode and cannot be reproduced locally. The patch introduce an option for controlling parallel mode - FUZZ_INTROSPECTOR_PARALLEL. When envronment variable is set to false Fuzz Introspector will process data in sequential mode.

  1. Introspector build failure: AttributeError: 'ForkAwareLocal' object has no attribute 'connection' google/oss-fuzz#13226

Related to #2267
Related to google/oss-fuzz#13226

@ligurio ligurio force-pushed the ligurio/fix-analysis-oss-fuzz branch 2 times, most recently from 808e8b3 to de3ef76 Compare February 9, 2026 13:20
@ligurio
Copy link
Author

ligurio commented Feb 9, 2026

@DavidKorczynski could you take a look?

@ligurio
Copy link
Author

ligurio commented Feb 12, 2026

@arthurscchan could you please review?

ligurio added a commit to ligurio/oss-fuzz that referenced this pull request Feb 17, 2026
ligurio added a commit to ligurio/oss-fuzz that referenced this pull request Feb 17, 2026
ligurio added a commit to ligurio/oss-fuzz that referenced this pull request Feb 17, 2026
ligurio added a commit to ligurio/oss-fuzz that referenced this pull request Feb 17, 2026
DavidKorczynski pushed a commit to google/oss-fuzz that referenced this pull request Feb 18, 2026
@@ -124,6 +125,7 @@ def analyse_end_to_end(arg_language,
out_dir=out_dir,
dump_files=dump_files,
harness_lists=harness_lists)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
harness_lists=harness_lists)
harness_lists=harness_lists,

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, thanks!

out_dir=out_dir,
dump_files=dump_files,
harness_lists=harness_lists)
parallelise=is_parallel
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
parallelise=is_parallel
parallelise=is_parallel)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

centic9 added a commit to centic9/fuzz-introspector that referenced this pull request Feb 21, 2026
Fuzz Introspector is failed when building reports for Tarantool
and other projects, see [1]:

During handling of the above exception, another exception occurred:

  File "/usr/local/lib/python3.10/multiprocessing/managers.py", line 817, in _callmethod
    conn.send((self._id, methodname, args, kwds))
  File "/fuzz-introspector/src/fuzz_introspector/datatypes/fuzzer_profile.py", line 359, in accummulate_profile
    return_dict[uniq_id] = self
AttributeError: 'ForkAwareLocal' object has no attribute 'connection'

The issue (theoretically) is related to processing data in
parallel mode and cannot be reproduced locally. The patch
introduce an option for controlling parallel mode -
FUZZ_INTROSPECTOR_PARALLEL. When envronment variable is set to
`false` Fuzz Introspector will process data in sequential mode.

1. google/oss-fuzz#13226

Related to ossf#2267
Related to google/oss-fuzz#13226

Signed-off-by: Sergey Bronnikov <[email protected]>
@ligurio ligurio force-pushed the ligurio/fix-analysis-oss-fuzz branch from de3ef76 to 5a15718 Compare February 21, 2026 17:26
else:
for profile in self.profiles:
fuzzer_profile.FuzzerProfile.accummulate_profile(
profile, self.base_folder, result_dict, f"uniq-{idx}")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idx is unknown here, maybe should count up similar as above?

centic9 added a commit to centic9/fuzz-introspector that referenced this pull request Feb 22, 2026
@centic9
Copy link

centic9 commented Feb 22, 2026

After fixing "idx", it still fails with:

Traceback (most recent call last):
  File "/usr/local/bin/fuzz-introspector", line 6, in <module>
    sys.exit(main())
             ^^^^^^
  File "/fuzz-introspector/src/fuzz_introspector/cli.py", line 324, in main
    return_code = commands.end_to_end(args)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/fuzz-introspector/src/fuzz_introspector/commands.py", line 73, in end_to_end
    exit_code, _ = analyse_end_to_end(arg_language=args.language,
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/fuzz-introspector/src/fuzz_introspector/commands.py", line 117, in analyse_end_to_end
    exit_code, return_values2 = run_analysis_on_dir(
                                ^^^^^^^^^^^^^^^^^^^^
  File "/fuzz-introspector/src/fuzz_introspector/commands.py", line 162, in run_analysis_on_dir
    introspection_proj.load_data_files(parallelise, correlation_file, out_dir,
  File "/fuzz-introspector/src/fuzz_introspector/analysis.py", line 115, in load_data_files
    fuzzer_profile.FuzzerProfile.accummulate_profile(
TypeError: FuzzerProfile.accummulate_profile() missing 1 required positional argument: 'semaphore'
ERROR:__main__:Building fuzzers failed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants