Skip to content

Null bytes (^@) in structured logs #17400

@dannywillems

Description

@dannywillems

Preliminary Checks

Description

While investigating #17384, we detected some unexpected unstructured logging information in a devnet node.

{"timestamp":"2025-06-10 23:04:40.330000Z","level":"Debug","source":{"module":"Libp2p_helper.Go.net/identify","location":"(not tracked)"},"message":"libp2p_helper: failed negotiate identify protocol with peer","metadata":{"caller":"identify/id.go:434","go_error":"stream reset","peer":"12D3KooWDHSqgMBza6pnz4VtueaT3vSbJQHbXqgFtzL6A5uttJLx"}}
{"timestamp":"2025-06-10 23:04:40.330000Z","level":"Debug","source":{"module":"Libp2p_helper.Go.net/identify","location":"(not tracked)"},"message":"libp2p_helper: failed to identify 12D3KooWDHSqgMBza6pnz4VtueaT3vSbJQHbXqgFtzL6A5uttJLx: stream reset","metadata":{"caller":"identify/id.go:406"}}
{"timestamp":"2025-06-10 23:04:40.583077Z","level":"Debug","source":{"module":"Mina_lib","location":"File \"src/lib/mina_lib/mina_lib.ml\", line 2431, characters 16-43"},"message":"Current sync status: $status","metadata":{"host":"37.27.237.44","peer_id":"12D3KooWQ2hwPK6kaVFMMe44k3xVCMZWzhNJiRXvM5H1U2ETTDQM","port":10005,"status":"Connecting"}}
{"timestamp":"2025-06-10 23:04:41.583277Z","level":"Debug","source":{"module":"Mina_lib","location":"File \"src/lib/mina_lib/mina_lib.ml\", line 2431, characters 16-43"},"message":"Current sync status: $status","metadata":{"host":"37.27.237.44","peer_id":"12D3KooWQ2hwPK6kaVFMMe44k3xVCMZWzhNJiRXvM5H1U2ETTDQM","port":10005,"status":"Connecting"}}
{"timestamp":"2025-06-10 23:04:42.583635Z","level":"Debug","source":{"module":"Mina_lib","location":"File \"src/lib/mina_lib/mina_lib.ml\", line 2431, characters 16-43"},"message":"Current sync status: $status","metadata":{"host":"37.27.237.44","peer_id":"12D3KooWQ2hwPK6kaVFMMe44k3xVCMZWzhNJiRXvM5H1U2ETTDQM","port":10005,"status":"Connecting"}}
\00 [... ]\00{"timestamp":"2025-06-10 23:11:15.547270Z","level":"Info","source":{"module":"Mina_cli_entrypoint","location":"File \"src/app/cli/src/cli_entrypoint/mina_cli_entrypoint.ml\", line 649, characters 8-19"},"message":"Mina daemon is booting up; built with commit $commit","metadata":{"commit":"a35e44079c01234b2caf92a04f5d3a3f60b2c189"}}
{"timestamp":"2025-06-10 23:11:15.549766Z","level":"Debug","source":{"module":"Mina_lib__Conf_dir","location":"File \"src/lib/mina_lib/conf_dir.ml\", line 21, characters 10-22"},"message":"Created daemon lockfile $lockfile","metadata":{"lockfile":"/root/.mina-config/.mina-lock"}}
{"timestamp":"2025-06-10 23:11:15.549923Z","level":"Debug","source":{"module":"Exit_handlers","location":"File \"src/lib/exit_handlers/exit_handlers.ml\", line 28, characters 2-14"},"message":"Registering async shutdown handler: $description","metadata":{"description":"Remove daemon lockfile"}}

We do not know yet how this happened. The NULL characters prefix a valid structured log.

mina.log

Steps to Reproduce

We do not know.

Expected Result

No NULL character in log.

Actual Result

NULL characters in log.

Daemon version

release/3.1.2

How frequently do you see this issue?

Rarely

What is the impact of this issue on your ability to run a node?

High

Status

See log

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions