An exception is raised while generating accessible path

Open
#3 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python

Research direction

Start with odfuzz/entities.py at the build() implementation referenced in the issue, then trace odfuzz/fuzzer.py through crossover(), build_mutated_accessible_keys(), and _mutate_accessible_keys(). Reproduce the failure while testing /FAR_DOUBTFUL_ACCTS_VALUATION_SRV and inspect when principal entities disappear. Done means accessible-key mutation no longer raises the NoneType entity_type exception and principal entities remain available or are safely handled.

Written by the indexing model from the issue text.

Description

bug

The fuzzer raises an unhandled exception when the service /FAR_DOUBTFUL_ACCTS_VALUATION_SRV is being tested.

fuzzer: 2194699375504 - 12:29:55 - ERROR: Traceback (most recent call last):

fuzzer: 2194699375504 - 12:29:55 - ERROR:   File "C:\Users\I342520\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 193, in _run_module_as_main

fuzzer: 2194699375504 - 12:29:55 - ERROR:     
fuzzer: 2194699375504 - 12:29:55 - ERROR: "__main__", mod_spec)
fuzzer: 2194699375504 - 12:29:55 - ERROR: 

fuzzer: 2194699375504 - 12:29:55 - ERROR:   File "C:\Users\I342520\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 85, in _run_code

fuzzer: 2194699375504 - 12:29:55 - ERROR:     
fuzzer: 2194699375504 - 12:29:55 - ERROR: exec(code, run_globals)
fuzzer: 2194699375504 - 12:29:55 - ERROR: 

fuzzer: 2194699375504 - 12:29:55 - ERROR:   File "C:\Users\I342520\PycharmProjects\ODfuzz\odfuzz\odfuzz.py", line 101, in <module>

fuzzer: 2194699375504 - 12:29:55 - ERROR:     
fuzzer: 2194699375504 - 12:29:55 - ERROR: main()
fuzzer: 2194699375504 - 12:29:55 - ERROR: 

fuzzer: 2194699375504 - 12:29:55 - ERROR:   File "C:\Users\I342520\PycharmProjects\ODfuzz\odfuzz\odfuzz.py", line 24, in main

fuzzer: 2194699375504 - 12:29:55 - ERROR:     
fuzzer: 2194699375504 - 12:29:55 - ERROR: execute(sys.argv[1:])
fuzzer: 2194699375504 - 12:29:55 - ERROR: 

fuzzer: 2194699375504 - 12:29:55 - ERROR:   File "C:\Users\I342520\PycharmProjects\ODfuzz\odfuzz\odfuzz.py", line 42, in execute

fuzzer: 2194699375504 - 12:29:55 - ERROR:     
fuzzer: 2194699375504 - 12:29:55 - ERROR: run_fuzzer(bind, parsed_arguments, collection_name)
fuzzer: 2194699375504 - 12:29:55 - ERROR: 

fuzzer: 2194699375504 - 12:29:55 - ERROR:   File "C:\Users\I342520\PycharmProjects\ODfuzz\odfuzz\odfuzz.py", line 76, in run_fuzzer

fuzzer: 2194699375504 - 12:29:55 - ERROR:     
fuzzer: 2194699375504 - 12:29:55 - ERROR: manager.start()
fuzzer: 2194699375504 - 12:29:55 - ERROR: 

fuzzer: 2194699375504 - 12:29:55 - ERROR:   File "C:\Users\I342520\PycharmProjects\ODfuzz\odfuzz\fuzzer.py", line 62, in start

fuzzer: 2194699375504 - 12:29:55 - ERROR:     
fuzzer: 2194699375504 - 12:29:55 - ERROR: fuzzer.run()
fuzzer: 2194699375504 - 12:29:55 - ERROR: 

fuzzer: 2194699375504 - 12:29:55 - ERROR:   File "C:\Users\I342520\PycharmProjects\ODfuzz\odfuzz\fuzzer.py", line 137, in run

fuzzer: 2194699375504 - 12:29:55 - ERROR:     
fuzzer: 2194699375504 - 12:29:55 - ERROR: self.evolve_population()
fuzzer: 2194699375504 - 12:29:55 - ERROR: 

fuzzer: 2194699375504 - 12:29:55 - ERROR:   File "C:\Users\I342520\PycharmProjects\ODfuzz\odfuzz\fuzzer.py", line 161, in evolve_population

fuzzer: 2194699375504 - 12:29:55 - ERROR:     
fuzzer: 2194699375504 - 12:29:55 - ERROR: queries = q.crossover(selection.crossable)
fuzzer: 2194699375504 - 12:29:55 - ERROR: 

fuzzer: 2194699375504 - 12:29:55 - ERROR:   File "C:\Users\I342520\PycharmProjects\ODfuzz\odfuzz\fuzzer.py", line 492, in crossover

fuzzer: 2194699375504 - 12:29:55 - ERROR:     
fuzzer: 2194699375504 - 12:29:55 - ERROR: query = self.build_mutated_accessible_keys(accessible_keys, crossable_selection[0])
fuzzer: 2194699375504 - 12:29:55 - ERROR: 

fuzzer: 2194699375504 - 12:29:55 - ERROR:   File "C:\Users\I342520\PycharmProjects\ODfuzz\odfuzz\fuzzer.py", line 365, in build_mutated_accessible_keys

fuzzer: 2194699375504 - 12:29:55 - ERROR:     
fuzzer: 2194699375504 - 12:29:55 - ERROR: self._mutate_accessible_keys(accessible_keys, data_to_be_mutated)
fuzzer: 2194699375504 - 12:29:55 - ERROR: 

fuzzer: 2194699375504 - 12:29:55 - ERROR:   File "C:\Users\I342520\PycharmProjects\ODfuzz\odfuzz\fuzzer.py", line 380, in _mutate_accessible_keys

fuzzer: 2194699375504 - 12:29:55 - ERROR:     
fuzzer: 2194699375504 - 12:29:55 - ERROR: proprty = accessible_entity_set.entity_type.proprty(proprty_name)
fuzzer: 2194699375504 - 12:29:55 - ERROR: 

fuzzer: 2194699375504 - 12:29:55 - ERROR: AttributeError
fuzzer: 2194699375504 - 12:29:55 - ERROR: : 
fuzzer: 2194699375504 - 12:29:55 - ERROR: 'NoneType' object has no attribute 'entity_type'

Principal entities disappear from the list of all principal entities attached to the queryable entity set in some random cases. However, principal entities (associated relations) are properly built in the beginning in the build() method on line: https://github.com/SAP/odfuzz/blob/fbb4c8f28a1119ae45466312a5a1c07b25c28eee/odfuzz/entities.py#L54.

After some period of time, the values are disappearing.

A workaround is to check for the exiting principal entities before the method build_mutated_accessible_keys() is called, i. e. in the method crossover().

Dominant language
Python
Stars
23
Forks
12
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from SAP/odfuzz

All issues in SAP/odfuzz

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.