Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

TypeError: not all arguments converted during string formatting on SIGHUP #14257

Closed
richvdh opened this issue Oct 21, 2022 · 1 comment · Fixed by #14258
Closed

TypeError: not all arguments converted during string formatting on SIGHUP #14257

richvdh opened this issue Oct 21, 2022 · 1 comment · Fixed by #14258
Labels
A-Config Configuration, or the documentation thereof T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.

Comments

@richvdh
Copy link
Member

richvdh commented Oct 21, 2022

After I send my synapse a SIGHUP:

2022-10-21 13:50:03,303 - twisted - 274 - ERROR - sentinel - --- Logging error ---
2022-10-21 13:50:03,313 - twisted - 274 - ERROR - sentinel - Traceback (most recent call last):
2022-10-21 13:50:03,314 - twisted - 274 - ERROR - sentinel -   File "/usr/lib/python3.10/logging/__init__.py", line 1100, in emit
2022-10-21 13:50:03,314 - twisted - 274 - ERROR - sentinel -     msg = self.format(record)
2022-10-21 13:50:03,314 - twisted - 274 - ERROR - sentinel -   File "/usr/lib/python3.10/logging/__init__.py", line 943, in format
2022-10-21 13:50:03,314 - twisted - 274 - ERROR - sentinel -     return fmt.format(record)
2022-10-21 13:50:03,314 - twisted - 274 - ERROR - sentinel -   File "/usr/lib/python3.10/logging/__init__.py", line 678, in format
2022-10-21 13:50:03,314 - twisted - 274 - ERROR - sentinel -     record.message = record.getMessage()
2022-10-21 13:50:03,314 - twisted - 274 - ERROR - sentinel -   File "/usr/lib/python3.10/logging/__init__.py", line 368, in getMessage
2022-10-21 13:50:03,315 - twisted - 274 - ERROR - sentinel -     msg = msg % self.args
2022-10-21 13:50:03,315 - twisted - 274 - ERROR - sentinel - TypeError: not all arguments converted during string formatting
2022-10-21 13:50:03,315 - twisted - 274 - ERROR - sentinel - Call stack:
2022-10-21 13:50:03,315 - twisted - 274 - ERROR - sentinel -   File "/usr/local/pycharm-community-2022.1.3/plugins/python-ce/helpers/pydev/_pydev_bundle/pydev_monkey.py", line 795, in __call__
2022-10-21 13:50:03,315 - twisted - 274 - ERROR - sentinel -     ret = self.original_func(*self.args, **self.kwargs)
2022-10-21 13:50:03,316 - twisted - 274 - ERROR - sentinel -   File "/usr/lib/python3.10/threading.py", line 973, in _bootstrap
2022-10-21 13:50:03,316 - twisted - 274 - ERROR - sentinel -     self._bootstrap_inner()
2022-10-21 13:50:03,316 - twisted - 274 - ERROR - sentinel -   File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
2022-10-21 13:50:03,316 - twisted - 274 - ERROR - sentinel -     self.run()
2022-10-21 13:50:03,316 - twisted - 274 - ERROR - sentinel -   File "/usr/lib/python3.10/threading.py", line 953, in run
2022-10-21 13:50:03,317 - twisted - 274 - ERROR - sentinel -     self._target(*self._args, **self._kwargs)
2022-10-21 13:50:03,317 - twisted - 274 - ERROR - sentinel -   File "/home/rav/work/synapse/synapse/logging/handlers.py", line 84, in _flush_periodically
2022-10-21 13:50:03,317 - twisted - 274 - ERROR - sentinel -     self.flush()
2022-10-21 13:50:03,317 - twisted - 274 - ERROR - sentinel - Message: 'New cache config. Was:\n %s\nNow:\n'
2022-10-21 13:50:03,317 - twisted - 274 - ERROR - sentinel - Arguments: ({'root': None, 'default_template_dir': '/home/rav/work/synapse/synapse/res/templates', 'event_cache_size': 102400, 'cache_factors': {}, 'global_factor': 0.5, 'track_memory_usage': False, 'expiry_time_msec': 1800000, 'cache_autotuning': None, 'sync_response_cache_duration': 120000}, {'root': <synapse.config.homeserver.HomeServerConfig object at 0x7ffb0012fb50>, 'default_template_dir': '/home/rav/work/synapse/synapse/res/templates', 'event_cache_size': 102400, 'cache_factors': {}, 'global_factor': 0.5, 'track_memory_usage': False, 'expiry_time_msec': 1800000, 'cache_autotuning': None, 'sync_response_cache_duration': 120000})

looks like a missing %s in https://github.com/matrix-org/synapse/tree/v1.69.0/synapse/app/_base.py#L560-L564

@DMRobertson
Copy link
Contributor

Well that's embarassing. Could have sworn I tested this too... #12673

@DMRobertson DMRobertson added T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. A-Config Configuration, or the documentation thereof labels Oct 21, 2022
@DMRobertson DMRobertson self-assigned this Oct 21, 2022
richvdh added a commit that referenced this issue Oct 21, 2022
@DMRobertson DMRobertson removed their assignment Oct 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Config Configuration, or the documentation thereof T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants