-
Notifications
You must be signed in to change notification settings - Fork 116
Open
Labels
Description
I get the following logs when trying to run polaris 0.15.0 on a host with 500gb of music mounted with nfs:
march 24 14:57:48 somehost systemd[1]: Starting Polaris Music Server...
march 24 14:57:49 somehost systemd[1]: Started Polaris Music Server.
march 24 14:57:49 somehost polaris[1562189]: 13:57:49 [INFO] [src/main.rs:129] Cache files location is "/var/cache/polaris"
march 24 14:57:49 somehost polaris[1562189]: 13:57:49 [INFO] [src/main.rs:130] Data files location is "/var/lib/polaris/data"
march 24 14:57:49 somehost polaris[1562189]: 13:57:49 [INFO] [src/main.rs:131] Config file location is "/var/lib/polaris/config.toml"
march 24 14:57:49 somehost polaris[1562189]: 13:57:49 [INFO] [src/main.rs:132] Legacy database file location is "/var/lib/polaris/db.sqlite"
march 24 14:57:49 somehost polaris[1562189]: 13:57:49 [INFO] [src/main.rs:133] Log file location is None
march 24 14:57:49 somehost polaris[1562189]: 13:57:49 [INFO] [src/main.rs:138] Web client files location is "/nix/store/...-polaris-web-76/share/polaris-web"
march 24 14:57:49 somehost polaris[1562189]: 13:57:49 [INFO] [src/app/index.rs:42] No existing collection index to restore
march 24 14:57:49 somehost polaris[1562189]: 13:57:49 [INFO] [src/app.rs:264] Found usable config in legacy database at `/var/lib/polaris/db.sqlite`, beginning migration process
march 24 14:57:49 somehost polaris[1562189]: 13:57:49 [INFO] [src/app.rs:269] Migrating configuration
march 24 14:57:49 somehost polaris[1562189]: 13:57:49 [INFO] [src/app.rs:273] Migrating playlists
march 24 14:57:49 somehost polaris[1562189]: 13:57:49 [INFO] [src/app/scanner.rs:202] Beginning collection scan
march 24 14:57:49 somehost polaris[1562189]: 13:57:49 [INFO] [src/app/scanner.rs:370] Browsing collection using 8 threads
march 24 14:57:50 somehost polaris[1562189]: 13:57:50 [INFO] [src/app/config.rs:122] Sucessfully applied configuration change
march 24 14:57:51 somehost polaris[1562189]: 13:57:51 [INFO] [src/app/scanner.rs:202] Beginning collection scan
march 24 14:57:51 somehost polaris[1562189]: 13:57:51 [INFO] [src/app/scanner.rs:370] Browsing collection using 8 threads
march 24 14:57:55 somehost polaris[1562189]: 13:57:55 [INFO] [src/app/scanner.rs:258] Promoted partial collection index (343 songs)
march 24 14:57:57 somehost polaris[1562189]: 13:57:57 [INFO] [src/app/scanner.rs:258] Promoted partial collection index (433 songs)
...
march 24 15:12:16 somehost polaris[1562189]: 14:12:16 [INFO] [src/app/scanner.rs:258] Promoted partial collection index (39941 songs)
march 24 15:12:18 somehost polaris[1562189]: 14:12:18 [ERROR] [src/app/scanner.rs:129] Error while updating index: task 31 panicked with message "range end index 4 out of range for slice of length 0"
march 24 15:12:21 somehost polaris[1562189]: thread 'tokio-runtime-worker' panicked at src/app/index.rs:70:10:
march 24 15:12:21 somehost polaris[1562189]: called `Result::unwrap()` on an `Err` value: JoinError::Cancelled(Id(321))
march 24 15:12:21 somehost polaris[1562189]: Error: App(ThreadJoining(JoinError::Panic(Id(24), "range end index 4 out of range for slice of length 0", ...)))
march 24 15:12:21 somehost systemd[1]: polaris.service: Main process exited, code=exited, status=1/FAILURE
march 24 15:12:21 somehost systemd[1]: polaris.service: Failed with result 'exit-code'.
march 24 15:12:21 somehost systemd[1]: polaris.service: Consumed 29min 23.166s CPU time, 4.6G memory peak, 5.2M read from disk, 1.5M written to disk.
march 24 15:12:22 somehost systemd[1]: polaris.service: Scheduled restart job, restart counter is at 47.
march 24 15:12:22 somehost systemd[1]: Starting Polaris Music Server...
march 24 15:12:22 somehost systemd[1]: Started Polaris Music Server.
march 24 15:12:22 somehost polaris[1562436]: 14:12:22 [INFO] [src/main.rs:129] Cache files location is "/var/cache/polaris"
march 24 15:12:22 somehost polaris[1562436]: 14:12:22 [INFO] [src/main.rs:130] Data files location is "/var/lib/polaris/data"
march 24 15:12:22 somehost polaris[1562436]: 14:12:22 [INFO] [src/main.rs:131] Config file location is "/var/lib/polaris/config.toml"
march 24 15:12:22 somehost polaris[1562436]: 14:12:22 [INFO] [src/main.rs:132] Legacy database file location is "/var/lib/polaris/db.sqlite"
march 24 15:12:22 somehost polaris[1562436]: 14:12:22 [INFO] [src/main.rs:133] Log file location is None
march 24 15:12:22 somehost polaris[1562436]: 14:12:22 [INFO] [src/main.rs:138] Web client files location is "/nix/store/...-polaris-web-76/share/polaris-web"
march 24 15:12:22 somehost polaris[1562436]: 14:12:22 [INFO] [src/app/index.rs:42] No existing collection index to restore
march 24 15:12:22 somehost polaris[1562436]: 14:12:22 [INFO] [src/app.rs:264] Found usable config in legacy database at `/var/lib/polaris/db.sqlite`, beginning migration process
march 24 15:12:22 somehost polaris[1562436]: 14:12:22 [INFO] [src/app.rs:269] Migrating configuration
march 24 15:12:22 somehost polaris[1562436]: 14:12:22 [INFO] [src/app.rs:273] Migrating playlists
march 24 15:12:22 somehost polaris[1562436]: 14:12:22 [INFO] [src/app/scanner.rs:202] Beginning collection scan
march 24 15:12:22 somehost polaris[1562436]: 14:12:22 [INFO] [src/app/scanner.rs:370] Browsing collection using 8 threads
march 24 15:12:23 somehost polaris[1562436]: 14:12:23 [INFO] [src/app/config.rs:122] Sucessfully applied configuration change
march 24 15:12:24 somehost polaris[1562436]: 14:12:24 [INFO] [src/app/scanner.rs:202] Beginning collection scan
march 24 15:12:24 somehost polaris[1562436]: 14:12:24 [INFO] [src/app/scanner.rs:370] Browsing collection using 8 threads
march 24 15:12:28 somehost polaris[1562436]: 14:12:28 [INFO] [src/app/scanner.rs:258] Promoted partial collection index (470 songs)
It seems to complete indexing the music directory, then crash due to some bounds checking error.
For complete context, I'm running polaris as a systemd service on nixos:
/etc/systemd/system/polaris.service
[Unit]
After=network.target
Description=Polaris Music Server
[Install]
WantedBy=multi-user.target
[Service]
Restart=on-failure
StateDirectory=polaris
CacheDirectory=polaris
WorkingDirectory=%S/polaris
DynamicUser=true
User=polaris
Group=polaris
ExecStart=/nix/store/...-polaris-0.15.0/bin/polaris --foreground --port 7890 --database %S/polaris/db.sqlite --data %S/polaris/data --cache %C/polaris --config %S/polaris/config.toml
# Hardening options, can likely be ignored
AmbientCapabilities=
CapabilityBoundingSet=
DeviceAllow=
LockPersonality=true
PrivateDevices=true
PrivateUsers=true
ProtectClock=true
ProtectControlGroups=true
ProtectHostname=true
ProtectKernelLogs=true
ProtectKernelModules=true
ProtectKernelTunables=true
RestrictAddressFamilies=AF_INET
RestrictAddressFamilies=AF_INET6
RestrictAddressFamilies=AF_UNIX
RestrictNamespaces=true
RestrictRealtime=true
SystemCallArchitectures=native
SystemCallErrorNumber=EPERM
SystemCallFilter=@system-service
SystemCallFilter=~@cpu-emulation
SystemCallFilter=~@debug
SystemCallFilter=~@keyring
SystemCallFilter=~@memlock
SystemCallFilter=~@obsolete
SystemCallFilter=~@privileged
SystemCallFilter=~@setuid