element-hq / element-hq/synapse

Warning log contains newline in a message

Open
#11,350 0 comments 0 reactions 0 assignees View on GitHub
P4 S-Tolerable T-Defect
Dominant language
Python
Stars
4.6k
Forks
600
Avg merge
5d 22h
Merged PRs (30d)
51

Description

This issue has been migrated from [#11350](https://github.com/matrix-org/synapse/issues/11350).

---

### Description
In the log files there's an extra \n which can lead to problems with parsing
```
2021-11-16 01:13:12,111 - synapse.storage.txn - 565 - WARNING - POST-13293904 - [TXN OPERROR] {insert_linearized_receipt-144e005} could not serialize access due to concurrent update
0/5
```

### Steps to reproduce
1. set loglevel to WARN
2. wait for a concurrent update warning
3. use grep -vr WARNING or anything els
4. find extra lines:
```
./homeserver.log: 0/5
./homeserver.log: 1/5
./homeserver.log: 0/5
./homeserver.log: 1/5
```

### Version information
1.46

- **Install method**:
repo
- **Platform**:
debian linux

Contributor guide

Open the contributing guide

Research direction

Reproduce the warning described in the issue by setting the log level to WARN and waiting for a concurrent update. Trace the warning output path; done means each warning remains on one log line and grep no longer finds separate lines such as `0/5` or `1/5`.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
observability-sre
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.