I run the fuzzer with -atheris_runs=100 and I always get empty data and not sure what I miss. Here is my code snippet:
import atheris, asyncio, sys
from datetime import datetime
from uuid_extensions import uuid7, uuid7str
from langchain_core.runnables import RunnableConfig, ensure_config
from src.rag_agent.RAGAgent import RAGAgent
@atheris.instrument_func
async def main(input_message):
rag = RAGAgent()
await rag.CreateGraph()
config = RunnableConfig(run_name="RAG Deep Agent", configurable={"thread_id": uuid7str(), "user_id": uuid7str()})
timestamp = datetime.now().strftime("%d-%m-%Y_%H-%M-%S")
message = f"[Timestamp: {timestamp}]\n{input_message}\n"
await rag.ChatAgent(config, message, ["values"], False)
@atheris.instrument_func
def FuzzEntryPoint(data):
# Initialize the provider with raw bytes from the fuzzer
fdp = atheris.FuzzedDataProvider(data)
# Consume structured data
number = fdp.ConsumeIntInRange(100, 100000)
input_message = fdp.ConsumeUnicodeNoSurrogates(128)
print(f"input_messsage: {repr(input_message)}", flush=True)
asyncio.run(main(input_message))
if __name__ == "__main__":
atheris.Setup(sys.argv, FuzzEntryPoint)
atheris.instrument_all()
atheris.Fuzz()
This is what I see in the console:
INFO: Instrumenting functions: [58178/58178] 100%
INFO: Using built-in libfuzzer
WARNING: Failed to find function "__sanitizer_acquire_crash_state".
WARNING: Failed to find function "__sanitizer_print_stack_trace".
WARNING: Failed to find function "__sanitizer_set_death_callback".
INFO: Running with entropic power schedule (0xFF, 100).
INFO: Seed: 2817686543
INFO: -max_len is not provided; libFuzzer will not generate inputs larger than 4096 bytes
input_messsage: ''
================================ Human Message =================================
[Timestamp: 22-04-2026_19-37-11]
================================ Human Message =================================
[Timestamp: 22-04-2026_19-37-11]
================================== Ai Message ==================================
Tool Calls:
write_file (311c9924-9f89-4722-8321-bfc9262c78f2)
Call ID: 311c9924-9f89-4722-8321-bfc9262c78f2
Args:
file_path: /user_request_22-04-2026_19-37-11.md
content:
================================= Tool Message =================================
Name: write_file
Updated file /user_request_22-04-2026_19-37-11.md
================================== Ai Message ==================================
It looks like the request body is empty. Could you please provide the question or topic you’d like me to address?
INFO: A corpus is not provided, starting from an empty corpus
input_messsage: ''
================================ Human Message =================================
[Timestamp: 22-04-2026_19-37-26]
================================ Human Message =================================
[Timestamp: 22-04-2026_19-37-26]
================================== Ai Message ==================================
Could you please provide the question or request you’d like me to address?
#2 pulse ft: 11881 exec/s: 0 rss: 404Mb
#2 INITED cov: 11885 ft: 11881 corp: 1/1b exec/s: 0 rss: 404Mb
input_messsage: ''
================================ Human Message =================================
[Timestamp: 22-04-2026_19-37-29]
================================ Human Message =================================
[Timestamp: 22-04-2026_19-37-29]
================================== Ai Message ==================================
Could you let me know what you’d like assistance with?
#3 NEW cov: 11895 ft: 12080 corp: 2/3b lim: 4 exec/s: 0 rss: 413Mb L: 2/2 MS: 1 InsertByte-
input_messsage: ''
================================ Human Message =================================
[Timestamp: 22-04-2026_19-37-33]
================================ Human Message =================================
[Timestamp: 22-04-2026_19-37-33]
================================== Ai Message ==================================
I see the timestamp `22-04-2026_19-37-33`, but there’s no request or question following it. Could you let me know what you’d like assistance with?
#4 pulse cov: 11895 ft: 12494 corp: 2/3b lim: 4 exec/s: 0 rss: 421Mb
#4 NEW cov: 11911 ft: 12494 corp: 3/7b lim: 4 exec/s: 0 rss: 421Mb L: 4/4 MS: 1 CopyPart-
input_messsage: ''
As seen the Human Message is always empty except for the timestamp which is provided by the code. Question on the Exception ignored in: <function _removeHandlerRef at 0x79ced5d9a700>. Is that something caught and reported by artheris? It is not clear to me as it looks like a usual exception / python error that shows normally on a console when running app sometimes.
What's the corpus_dir in README? Is it data or the modules to be executed by the fuzzer?
Why are these files always seem to be empty?
$ ll crash-* slow-unit-*
-rw-rw-r-- 1 khteh khteh 1 Apr 20 13:35 crash-adc83b19e793491b1c6ea0fd8b46cd9f32e592fc
-rw-rw-r-- 1 khteh khteh 0 Apr 21 10:24 crash-da39a3ee5e6b4b0d3255bfef95601890afd80709
-rw-rw-r-- 1 khteh khteh 2 Apr 21 12:00 slow-unit-0a493543ed2c9330548e26865cbd5029a954b928
-rw-rw-r-- 1 khteh khteh 2 Apr 21 11:58 slow-unit-454ca76b8adc45fa3cb7347b6fe5f12339f93b7c
But I am able to generate html report with coverage data in it:
$ ll htmlcov/
total 924
drwxrwxr-x 2 khteh khteh 4096 Apr 20 15:36 ./
drwxrwxr-x 16 khteh khteh 4096 Apr 21 12:00 ../
-rw-rw-r-- 1 khteh khteh 27 Apr 20 15:36 .gitignore
-rw-rw-r-- 1 khteh khteh 29803 Apr 20 15:36 class_index.html
-rw-rw-r-- 1 khteh khteh 25450 Apr 20 15:36 coverage_html_cb_dd2e7eb5.js
-rw-rw-r-- 1 khteh khteh 1732 Apr 20 15:36 favicon_32_cb_c827f16f.png
-rw-rw-r-- 1 khteh khteh 45023 Apr 20 15:36 function_index.html
-rw-rw-r-- 1 khteh khteh 15143 Apr 20 15:36 index.html
-rw-rw-r-- 1 khteh khteh 9004 Apr 20 15:36 keybd_closed_cb_900cfef5.png
-rw-rw-r-- 1 khteh khteh 8817 Apr 20 15:36 status.json
-rw-rw-r-- 1 khteh khteh 16104 Apr 20 15:36 style_cb_9ff733b0.css
-rw-rw-r-- 1 khteh khteh 4570 Apr 20 15:36 z_145eef247bfb46b6___init___py.html
-rw-rw-r-- 1 khteh khteh 39574 Apr 20 15:36 z_145eef247bfb46b6_config_py.html
-rw-rw-r-- 1 khteh khteh 21584 Apr 20 15:36 z_af79f3804eddddbf_Configuration_py.html
-rw-rw-r-- 1 khteh khteh 6721 Apr 20 15:36 z_af79f3804eddddbf_ContextSchema_py.html
-rw-rw-r-- 1 khteh khteh 5477 Apr 20 15:36 z_af79f3804eddddbf_Prompts_py.html
-rw-rw-r-- 1 khteh khteh 18078 Apr 20 15:36 z_af79f3804eddddbf_State_py.html
-rw-rw-r-- 1 khteh khteh 4572 Apr 20 15:36 z_af79f3804eddddbf___init___py.html
-rw-rw-r-- 1 khteh khteh 12239 Apr 20 15:36 z_b491f7ea070f9a13_Context_py.html
-rw-rw-r-- 1 khteh khteh 67088 Apr 20 15:36 z_b491f7ea070f9a13_Tools_py.html
-rw-rw-r-- 1 khteh khteh 5110 Apr 20 15:36 z_b491f7ea070f9a13___init___py.html
-rw-rw-r-- 1 khteh khteh 35465 Apr 20 15:36 z_c969fe9432d0cef8_EmailPrompts_py.html
-rw-rw-r-- 1 khteh khteh 140145 Apr 20 15:36 z_c969fe9432d0cef8_EmailRAG_py.html
-rw-rw-r-- 1 khteh khteh 30704 Apr 20 15:36 z_c969fe9432d0cef8_RobustEmailModelParser_py.html
-rw-rw-r-- 1 khteh khteh 5144 Apr 20 15:36 z_cb3a919737131835___init___py.html
-rw-rw-r-- 1 khteh khteh 51564 Apr 20 15:36 z_cb3a919737131835_prompts_py.html
-rw-rw-r-- 1 khteh khteh 51140 Apr 20 15:36 z_defad1a87623d8bf_EmailModel_py.html
-rw-rw-r-- 1 khteh khteh 30917 Apr 20 15:36 z_defad1a87623d8bf_EscalationModel_py.html
-rw-rw-r-- 1 khteh khteh 7691 Apr 20 15:36 z_defad1a87623d8bf___init___py.html
-rw-rw-r-- 1 khteh khteh 37329 Apr 20 15:36 z_defad1a87623d8bf_schema_py.html
-rw-rw-r-- 1 khteh khteh 4516 Apr 20 15:36 z_efda893aa850b0c0___init___py.html
-rw-rw-r-- 1 khteh khteh 21808 Apr 20 15:36 z_efda893aa850b0c0_sample_emails_py.html
-rw-rw-r-- 1 khteh khteh 4574 Apr 20 15:36 z_f1b38b22aeb65474___init___py.html
-rw-rw-r-- 1 khteh khteh 12120 Apr 20 15:36 z_f1b38b22aeb65474_image_py.html
-rw-rw-r-- 1 khteh khteh 7247 Apr 20 15:36 z_ff2b9fe67d372814_Backend_py.html
-rw-rw-r-- 1 khteh khteh 19141 Apr 20 15:36 z_ff2b9fe67d372814_PostgreSQLSetup_py.html
-rw-rw-r-- 1 khteh khteh 64674 Apr 20 15:36 z_ff2b9fe67d372814_VectorStore_py.html
I run the fuzzer with
-atheris_runs=100and I always get emptydataand not sure what I miss. Here is my code snippet:This is what I see in the console:
As seen the
Human Messageis always empty except for the timestamp which is provided by the code. Question on theException ignored in: <function _removeHandlerRef at 0x79ced5d9a700>. Is that something caught and reported by artheris? It is not clear to me as it looks like a usual exception / python error that shows normally on a console when running app sometimes.What's the
corpus_dirin README? Is it data or the modules to be executed by the fuzzer?Why are these files always seem to be empty?
But I am able to generate html report with coverage data in it: