Gusted
356c5055ad
lib/sha256: Remove it ( #9643 )
...
### Purpose
Remove the `lib/sha256` package, because it's no longer necessary. Go's
standard library now has the same performance and is on par with
`sha256-simd` since [Since Go
1.21](1a64574f42
).
Therefore using `sha256-simd` has no benefits anymore.
ARM already has optimized sha256 assembly code since
7b8a7f8272
,
`sha256-simd` published their results before that optimized assembly was
implemented,
f941fedda8
.
The assembly looks very similar and the benchmarks in the Go commit
match that of `sha256-simd`.
This patch removes all of the related code of `lib/sha256` and makes
`crypto/sha256` the 'default'.
Benchmark of `sha256-simd` and `crypto/sha256`:
<details>
```
cpu: AMD Ryzen 5 3600X 6-Core Processor
│ simd.txt │ go.txt │
│ sec/op │ sec/op vs base │
Hash/8Bytes-12 63.25n ± 1% 73.38n ± 1% +16.02% (p=0.002 n=6)
Hash/64Bytes-12 98.73n ± 1% 105.30n ± 1% +6.65% (p=0.002 n=6)
Hash/1K-12 567.2n ± 1% 572.8n ± 1% +0.99% (p=0.002 n=6)
Hash/8K-12 4.062µ ± 1% 4.062µ ± 1% ~ (p=0.396 n=6)
Hash/1M-12 512.1µ ± 0% 510.6µ ± 1% ~ (p=0.485 n=6)
Hash/5M-12 2.556m ± 1% 2.564m ± 0% ~ (p=0.093 n=6)
Hash/10M-12 5.112m ± 0% 5.127m ± 0% ~ (p=0.093 n=6)
geomean 13.82µ 14.27µ +3.28%
│ simd.txt │ go.txt │
│ B/s │ B/s vs base │
Hash/8Bytes-12 120.6Mi ± 1% 104.0Mi ± 1% -13.81% (p=0.002 n=6)
Hash/64Bytes-12 618.2Mi ± 1% 579.8Mi ± 1% -6.22% (p=0.002 n=6)
Hash/1K-12 1.682Gi ± 1% 1.665Gi ± 1% -0.98% (p=0.002 n=6)
Hash/8K-12 1.878Gi ± 1% 1.878Gi ± 1% ~ (p=0.310 n=6)
Hash/1M-12 1.907Gi ± 0% 1.913Gi ± 1% ~ (p=0.485 n=6)
Hash/5M-12 1.911Gi ± 1% 1.904Gi ± 0% ~ (p=0.093 n=6)
Hash/10M-12 1.910Gi ± 0% 1.905Gi ± 0% ~ (p=0.093 n=6)
geomean 1.066Gi 1.032Gi -3.18%
```
</details>
### Testing
Compiled and tested on Linux.
### Documentation
https://github.com/syncthing/docs/pull/874
2024-08-10 12:58:20 +01:00
Jakob Borg
2f281799c1
cmd/stcrashreceiver: Ignore patterns, improve metrics
2024-06-03 19:50:28 +02:00
Jakob Borg
07a9fa2dbd
all: Use own automaxprocs package that doesn't log (ref #9436 ) ( #9437 )
...
### Purpose
🤫
2024-02-27 13:05:19 +01:00
Thomas
aa559bf496
all: Use Linux container CPU quota ( fixes #9357 , fixes #9435 ) ( #9436 )
...
Go is not cgroup aware and by default will set GOMAXPROCS to the number
of available threads, regardless of whether it is within the allocated
quota. This behaviour causes high amount of CPU throttling and degraded
application performance.
2024-02-26 12:23:14 +00:00
Jakob Borg
2ae15aa454
cmd/stcrashreceiver: Add metrics for diskstore inventory
2023-11-27 08:24:59 +01:00
Jakob Borg
47bcf4f8f4
cmd/stcrashreceiver: Minor cleanup, stricter file permissions
2023-11-27 08:24:59 +01:00
Jakob Borg
a8b9096353
cmd/stcrashreceiver: Add metrics for incoming reports
2023-11-27 08:24:59 +01:00
Jakob Borg
9ce6a73f42
Revert "cmd/stcrashreceiver: Aggregate slice out of bounds errors"
...
This reverts commit dc6a10dff4
.
2023-10-16 08:08:23 +02:00
Jakob Borg
dc6a10dff4
cmd/stcrashreceiver: Aggregate slice out of bounds errors
2023-10-14 12:19:55 +02:00
Jakob Borg
d4c2acf6f6
cmd/stcrashreceiver: Propagate synthetic user ID for crashes
2023-10-14 12:19:55 +02:00
Jakob Borg
48c95eb41d
cmd/stcrashreceiver: Correct parsing of current version string
2023-07-12 09:27:34 +02:00
Jakob Borg
229b6a292c
cmd/stcrashreceiver: Add /ping endpoint
2023-07-01 07:53:50 +02:00
Jakob Borg
d5e4ef249f
Add forgotten copyright notices
2023-02-01 22:59:41 +01:00
Jakob Borg
65cfefaa3c
cmd, docker: Updates for infrastructure
...
These are some changes to the relay pool server, upgrade server, and
crash receiver to run under Kubernetes. It's been in production for a
while.
2023-01-31 11:17:52 +01:00
Jakob Borg
1e652de5af
cmd/stcrashreceiver: Update to more modern panicparse ( #8566 )
2022-10-01 21:03:14 +01:00
deepsource-autofix[bot]
755d21953f
all: Remove unused method receivers ( #8462 )
...
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
2022-07-28 17:32:45 +02:00
deepsource-autofix[bot]
80ec4acb53
all: Fix check for empty string ( #8456 )
...
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
2022-07-28 16:51:03 +02:00
Jakob Borg
4b750b6dc3
all: Remove usage of deprecated io/ioutil ( #7971 )
...
As of Go 1.16 io/ioutil is deprecated. This replaces usage with the
corresponding functions in package os and package io.
2021-11-22 08:59:47 +01:00
Simon Frei
67b18569cf
all: Send deadlocks as failures, crash only as a last resort ( #7785 )
2021-07-27 21:27:52 +02:00
Simon Frei
1ae5ac7d0b
cmd/stcrashreceiver: Sanitize failure report fingerprints ( #7840 )
2021-07-22 11:16:24 +02:00
Simon Frei
0970aed596
cmd/stcrashreceiver: Add tag for report type (crash/failure) ( #7374 )
2021-02-18 13:16:32 +00:00
Simon Frei
27a34609a1
all: Failure reporting fixes ( #7331 )
2021-02-05 11:21:14 +01:00
Simon Frei
cccbb0bd5e
lib/ur: Reset timer when there's nothing to report ( #7169 )
2020-11-28 20:09:22 +01:00
Simon Frei
d828adb648
cmd/stcrashreceiver, lib/db: Improve panic message handling ( #7029 )
2020-10-08 17:37:45 +02:00
Simon Frei
9d09fd6af3
all: Add failure reporting ( fixes #7028 ) ( #6925 )
2020-10-07 10:05:13 +02:00
Jakob Borg
2286a6ebef
cmd/stcrashreceiver: Don't crash on nil err
2020-08-18 12:54:20 +02:00
Jakob Borg
ec718e729e
various: Master is now main
...
Also cleans out various old strings from the translation strings.
2020-06-16 07:08:09 +02:00
Jakob Borg
1b77ab2b52
cmd/stcrashreceiver: Pick up extra build tags and send to Sentry ( #6710 )
...
This extracts the extra tags from any `[foo]` stuff at the end of the
version and sends them to Sentry for indexing.
If I need to modify that regexp again I'll probably write a from scratch
tokenizer and parser for our version string instead...
2020-06-03 15:00:46 +02:00
Jakob Borg
4b17c511f9
cmd/stcrashreceiver: Enable (rough) affected users count ( #6511 )
...
Seeing thousands of reports is no use when we don't know if they
represent one poor user or thousands.
2020-04-07 13:19:49 +02:00
Jakob Borg
15e51fc045
cmd/stcrashreceiver: Store and serve compressed reports ( #5892 )
...
This changes the on disk format for new raw reports to be gzip
compressed. Also adds the ability to serve these reports in plain text,
to insulate web browsers from the change (previously we just served the
raw reports from disk using Caddy).
2019-07-28 11:13:04 +02:00
Jakob Borg
d0ab65a178
cmd/stcrashreceiver: Don't leak clients
...
Use a global raven.Client because they allocate an http.Client for each,
with a separate CA bundle and infinite connection idle time. Infinite
connection idle time means that if the client is never used again it
will always keep the connection around, not verifying whether it's
closed server side or not. This leaks about a megabyte of memory for
each client every created.
client.Close() doesn't help with this because the http.Client is still
around, retained by its own goroutines.
The thing with the map is just to retain the API on sendReport, even
though there will in practice only ever be one DSN per process
instance...
2019-07-09 11:11:06 +02:00
Jakob Borg
43b6ac9501
cmd/stcrashreceiver: Add source code loader ( #5779 )
2019-06-29 08:50:09 +02:00
Jakob Borg
42ce6be9b9
lib/ur: Implement crash (panic) reporting ( fixes #959 ) ( #5702 )
...
* lib/ur: Implement crash (panic) reporting (fixes #959 )
This implements a simple crash reporting method. It piggybacks on the
panic log files created by the monitor process, picking these up and
uploading them from the usage reporting routine.
A new config value points to the crash receiver base URL, which defaults
to "https://crash.syncthing.net/newcrash " (following the pattern of
"https://data.syncthing.net/newdata " for usage reports, but allowing us
to separate the service as required).
2019-06-11 08:19:11 +02:00