krakjoe / krakjoe/stat

Corrupted json

Open
#14 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
209
Forks
7
PR merge metrics
No merged PRs in 30d

Description

I've been testing stat for a few hours, returned to it overnight run a symfony controlle and caught a bug with corrupted paths. I stripped some output and left only the unique records.
```
{"type": "memory", "request": {"pid": 9, "elapsed": 30563.5950944093, "path": "/code/my_project_name/public/index.php", "method":GET", "uri":/index.php"}, "elapsed": 30563.7584877112, "memory": {"used": 0, "peak": 0}}
...
{"type": "memory", "request": {"pid": 9, "elapsed": 30563.5950944093, "path": "/code/my_project_name/public/index.pcp", "method":GET", "uri":/index.php"}, "elapsed": 30563.7586159492, "memory": {"used": 0, "peak": 0}}
...
{"type": "memory", "request": {"pid": 9, "elapsed": 30563.5950944093, "path": "/code/my_project_name/public/index.p\p", "method":GET", "uri":/index.php"}, "elapsed": 30563.7598306644, "memory": {"used": 0, "peak": 0}}
...
{"type": "memory", "request": {"pid": 9, "elapsed": 30563.5950944093, "path": "/code/my_project_name/public/index.pVp", "method":GET", "uri":/index.php"}, "elapsed": 30563.7618115731, "memory": {"used": 0, "peak": 0}}
...
{"type": "memory", "request": {"pid": 9, "elapsed": 30563.5950944093, "path": "/code/my_project_name/public/index.p"p", "method":GET", "uri":/index.php"}, "elapsed": 30563.7726114844, "memory": {"used": 0, "peak": 0}}
...
{"type": "memory", "request": {"pid": 9, "elapsed": 30563.5950944093, "path": "/code/my_project_name/public/index.pp", "method":GET", "uri":/index.php"}, "elapsed": 30563.7727152910, "memory": {"used": 0, "peak": 0}}
...
```

The issues I see:
1. `"method":GET"` - missing quote
2. `"uri":/index.php"` - missing quote
3. `index.p\p` - corrupted paths
4. I've never seen the `symbol` key mentioned in the documentation.

My setup:

- php7.4-fpm inside docker
- Docker-compose using these files: [php-krakjoe-stat-example.zip](https://github.com/krakjoe/stat/files/7148831/php-krakjoe-stat-example.zip)
- symfony 5 example
- `nc 127.0.0.1 8010` from inside the php container

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the report with the linked Docker Compose setup and the Symfony 5 example, then inspect the output collected through `nc 127.0.0.1 8010`. Compare the emitted records against the reported malformed method, URI, path, and undocumented `symbol` fields. Done means the source of the corrupted JSON is identified and the affected output is consistently valid.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, docker, php
Domain
backend, observability
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.