[Issue]: upgrade from v10.9.3 -> v10.9.6 is has corrupted library.db #5969

Closed
opened 2025-12-22 03:17:15 +01:00 by backuprepo · 7 comments
Owner

Originally created by @vbatts on GitHub (Jun 8, 2024).

Please describe your bug

I run jellyfin from the docker container on linux/amd64.
just upgraded from the image with v10.9.3 (docker.io/jellyfin/jellyfin@sha256:63136341d22edc06208a1392d544f064784dda7ac0955b2ee1da3f81cbed10ec)
to the image with v10.9.6 (docker.io/jellyfin/jellyfin@sha256:15579ab64a14f9e3dce043c076df148e9de9631f11c9b3f614f1fbad868db701)

and the server is in a fail-loop attempting to start: see attached logs

It's tried 30+ times just now, curiously resulting in different sized library.db many times:

root@infra1:/mnt/data/volumes/jellyfin/data# ls -lart
total 10986024
-rw-r--r-- 1 root root        35 Sep 28  2022 device.txt
drwxr-xr-x 1 root root        84 Sep 28  2022 ..
-rw-r--r-- 1 root root 276398080 Nov  1  2023 library.db.bak1
drwxr-xr-x 1 root root       746 Nov  9  2023 playlists
drwxr-xr-x 1 root root        32 Dec 26 09:44 subtitles
drwxr-xr-x 1 root root        32 Feb  8 16:28 attachments
drwxr-xr-x 1 root root       998 Feb 13 21:41 collections
drwxr-xr-x 1 root root        32 Mar 23 12:43 keyframes
-rw-r--r-- 1 root root   4151877 May 13 10:52 splashscreen.png
drwxr-xr-x 1 root root      1248 May 13 23:00 ScheduledTasks
-rw-r--r-- 1 root root   1978368 Jun  8 07:02 jellyfin.db
-rw-r--r-- 1 root root 272384000 Jun  8 07:02 library.db.bak2
-rw-r--r-- 1 root root 273408000 Jun  8 07:04 library.db.bak3
-rw-r--r-- 1 root root 274354176 Jun  8 07:05 library.db.bak4
-rw-r--r-- 1 root root 274345984 Jun  8 07:07 library.db.bak5
-rw-r--r-- 1 root root 274350080 Jun  8 07:08 library.db.bak6
-rw-r--r-- 1 root root 274345984 Jun  8 07:10 library.db.bak7
-rw-r--r-- 1 root root 274345984 Jun  8 07:11 library.db.bak8
-rw-r--r-- 1 root root 274345984 Jun  8 07:12 library.db.bak9
-rw-r--r-- 1 root root 274341888 Jun  8 07:14 library.db.bak10
-rw-r--r-- 1 root root 274341888 Jun  8 07:15 library.db.bak11
-rw-r--r-- 1 root root 274337792 Jun  8 07:16 library.db.bak12
-rw-r--r-- 1 root root 274341888 Jun  8 07:18 library.db.bak13
-rw-r--r-- 1 root root 274341888 Jun  8 07:19 library.db.bak14
-rw-r--r-- 1 root root 274337792 Jun  8 07:20 library.db.bak15
-rw-r--r-- 1 root root 274337792 Jun  8 07:22 library.db.bak16
-rw-r--r-- 1 root root 274341888 Jun  8 07:23 library.db.bak17
-rw-r--r-- 1 root root 274337792 Jun  8 07:24 library.db.bak18
-rw-r--r-- 1 root root 274337792 Jun  8 07:25 library.db.bak19
-rw-r--r-- 1 root root 274341888 Jun  8 07:27 library.db.bak20
-rw-r--r-- 1 root root 274341888 Jun  8 07:28 library.db.bak21
-rw-r--r-- 1 root root 274350080 Jun  8 07:30 library.db.bak22
-rw-r--r-- 1 root root 274350080 Jun  8 07:31 library.db.bak23
-rw-r--r-- 1 root root 274350080 Jun  8 07:32 library.db.bak24
-rw-r--r-- 1 root root 274350080 Jun  8 07:34 library.db.bak25
-rw-r--r-- 1 root root 274345984 Jun  8 07:35 library.db.bak26
-rw-r--r-- 1 root root 274350080 Jun  8 07:36 library.db.bak27
-rw-r--r-- 1 root root 274350080 Jun  8 07:37 library.db.bak28
-rw-r--r-- 1 root root 274350080 Jun  8 07:39 library.db.bak29
-rw-r--r-- 1 root root 274350080 Jun  8 07:40 library.db.bak30
-rw-r--r-- 1 root root 274350080 Jun  8 07:41 library.db.bak31
-rw-r--r-- 1 root root 274350080 Jun  8 07:42 library.db.bak32
-rw-r--r-- 1 root root 274354176 Jun  8 07:44 library.db.bak33
-rw-r--r-- 1 root root 274350080 Jun  8 07:45 library.db.bak34
-rw-r--r-- 1 root root 274350080 Jun  8 07:46 library.db.bak35
-rw-r--r-- 1 root root 274350080 Jun  8 07:48 library.db.bak36
-rw-r--r-- 1 root root 274350080 Jun  8 07:49 library.db.bak37
-rw-r--r-- 1 root root 274345984 Jun  8 07:51 library.db.bak38
-rw-r--r-- 1 root root 272384000 Jun  8 08:05 library.db
-rw-r--r-- 1 root root         0 Jun  8 08:13 library.db-wal
drwxr-xr-x 1 root root      1608 Jun  8 08:13 .
-rw-r--r-- 1 root root     32768 Jun  8 08:13 library.db-shm
-rw-r--r-- 1 root root     61832 Jun  8 08:13 jellyfin.db-wal
-rw-r--r-- 1 root root     32768 Jun  8 08:13 jellyfin.db-shm
root@infra1:/mnt/data/volumes/jellyfin/data# sha1sum library.db*
050761f629e078df9b1e308400cf94d36b856a05  library.db.bak18                                                                                   
aa61ecb9d235e35a46a26fb47b220d40ac1b0c95  library.db                                                                                         
1c4657ee87c5a234440f3ce40b16aef20b5ff71e  library.db.bak26                                                                                   
3054b72ebc988ffc819c9458d6fa09e41eb3ac96  library.db.bak15                                                                                   
3100b4788db99de754c01bbc0ab4dcf70537ff7c  library.db.bak25                                                                                   
3399eb576c36513aa9535969916f3855a53a2db5  library.db.bak31                                                                                   
37d925868e4a15f8751c5739581d9c14e917b0a3  library.db.bak21                                                                                   
388c30316464698f0716214b76da5f92f4ddbf79  library.db.bak3                                                                                    
39e5d4f901518850c3c8987f6a0d41e466346faa  library.db.bak38                                                                                   
3d41d016f2565d6085b57f64e1077f8b878ca74c  library.db.bak35                                                                                   
3fb0936768ea31193db9547784dc4c4eed539323  library.db.bak32                                                                                   
421cbfedaa48892b28ca132014f7ee3de39aaeb2  library.db.bak20                                                                                   
44b72ddfd6aece26de00121867a623bf4e40178c  library.db.bak36                                                                                   
483e57425a6ec6e9dd52c156b1c5be1476966301  library.db.bak11                                                                                   
573052b57460c2cb72531167a0e1687bcd8eb551  library.db.bak10                                                                                   
80633b3f0fca7d7ba44dfd12db58691b9e6837f0  library.db.bak8                                                                                    
80d7f4b3096284c1acb980b0ede7d30f8593a9e7  library.db.bak17                                                                                   
875f958514b6f53ca6440001c0c6e753e9550d03  library.db.bak27                                                                                   
9484507c07bc8016adebc26adfee30c5790e1967  library.db.bak12                                                                                   
94be92032a232e1a1636b5db129e4b5ab1598a78  library.db.bak22                                                                                   
9943dfcf9527e57a32ede9061d1562b00cfca869  library.db.bak6                                                                                    
99e916c2deacfb35e12da7ad52ffc45f17bccb27  library.db.bak4                                                                                    
a4a148c9f627b96dab3d4c780e0da548659d544c  library.db.bak29                                                                                   
a6757923c9411b8065a2c1f6ea0c5030bd61d6b0  library.db.bak16                                                                                   
ad4853452bee794bfd4d10cf5f022ed51685f2d1  library.db.bak30                                                                                   
b39262464b167bde5fc2033178f22483015f030d  library.db.bak23                                                                                   
baa872a2ee7f4b5be35759594f0c1ea25739af16  library.db.bak24                                                                                   
badea4e96ff150bb3116f669a1abf8f3c5d267fd  library.db.bak37                                                                                   
bed6a9b4705126649079ec8149dcbf4b43d75660  library.db.bak13                                                                                   
c8e2c80898d85a3e4e48096d11ba66838fad3191  library.db.bak19                                                                                   
ca96c07427772765a21bb7457837b772961bd4c4  library.db.bak33                                                                                   
d67f55d166df581870fbc5537edec28e9b5dc08e  library.db.bak34                                                                                   
da175e5f85555e1068e7133f54689f54b9cb66bb  library.db.bak1                                                                                    
eaeedb573d859305608462971ed8a47daba1d3f0  library.db.bak5                                                                                    
ecd6067f4908144cdd1b3b6c6d6f453b4b90560a  library.db.bak9                                                                                    
f043467b64b3b06e738f03cf20340417310c73e7  library.db.bak7                                                                                    
f05ed492c95244ae6f52ee55044c959e0c3e6ada  library.db.bak2                                                                                    
f211a40509df688bf3e587911c7902033190df4f  library.db.bak28                                                                                   
fa32a6ed60f262202b6cb087ba7ef991ec2d2d01  library.db.bak14                                                                                   

Reproduction Steps

  1. running docker image with v10.9.3 docker.io/jellyfin/jellyfin@sha256:63136341d22edc06208a1392d544f064784dda7ac0955b2ee1da3f81cbed10ec
  2. fetch new image and restart with docker image for v10.9.6 docker.io/jellyfin/jellyfin@sha256:15579ab64a14f9e3dce043c076df148e9de9631f11c9b3f614f1fbad868db701

Jellyfin Version

10.9.0

if other:

No response

Environment

- OS: Linux Debian bookworm
- Linux Kernel: 6.1.0-21-amd64
- Virtualization: docker 20.10.24+dfsg1
- Clients: -
- Browser: -
- FFmpeg Version: - 
- Playback Method: - 
- Hardware Acceleration: -
- GPU Model: -
- Plugins: -
- Reverse Proxy: -
- Base URL: -
- Networking: -
- Storage: -

Jellyfin logs

jellyfin_1  | [11:50:47] [INF] [1] Main: Jellyfin version: 10.9.6
jellyfin_1  | [11:50:47] [INF] [1] Main: Environment Variables: ["[JELLYFIN_FFMPEG, /usr/lib/jellyfin-ffmpeg/ffmpeg]", "[JELLYFIN_WEB_DIR, /j
ellyfin/jellyfin-web]", "[JELLYFIN_LOG_DIR, /config/log]", "[JELLYFIN_DATA_DIR, /config]", "[JELLYFIN_CONFIG_DIR, /config/config]", "[JELLYFI
N_CACHE_DIR, /cache]"]
jellyfin_1  | [11:50:47] [INF] [1] Main: Arguments: ["/jellyfin/jellyfin.dll", "--ffmpeg", "/usr/lib/jellyfin-ffmpeg/ffmpeg"]
jellyfin_1  | [11:50:47] [INF] [1] Main: Operating system: Debian GNU/Linux 12 (bookworm)
jellyfin_1  | [11:50:47] [INF] [1] Main: Architecture: X64
jellyfin_1  | [11:50:47] [INF] [1] Main: 64-Bit Process: True
jellyfin_1  | [11:50:47] [INF] [1] Main: User Interactive: True
jellyfin_1  | [11:50:47] [INF] [1] Main: Processor count: 12
jellyfin_1  | [11:50:47] [INF] [1] Main: Program data path: /config
jellyfin_1  | [11:50:47] [INF] [1] Main: Log directory path: /config/log
jellyfin_1  | [11:50:47] [INF] [1] Main: Config directory path: /config/config
jellyfin_1  | [11:50:47] [INF] [1] Main: Cache path: /cache
jellyfin_1  | [11:50:47] [INF] [1] Main: Web resources path: /jellyfin/jellyfin-web
jellyfin_1  | [11:50:47] [INF] [1] Main: Application directory: /jellyfin/
jellyfin_1  | [11:50:47] [INF] [1] Emby.Server.Implementations.AppBase.BaseConfigurationManager: Setting cache path: /cache
jellyfin_1  | [11:50:49] [INF] [1] Emby.Server.Implementations.ApplicationHost: Loading assemblies
jellyfin_1  | [11:50:49] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly Jellyfin.Plugin.Bookshelf, Ver[93/1869]
.0.0, Culture=neutral, PublicKeyToken=null from /config/plugins/Bookshelf_11.0.0.0/Jellyfin.Plugin.Bookshelf.dll
jellyfin_1  | [11:50:49] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Defined LAN subnets: ["127.0.0.1/8", "10.0.0.0/8", "172.16.0.0
/12", "192.168.0.0/16"]
jellyfin_1  | [11:50:49] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Defined LAN exclusions: []
jellyfin_1  | [11:50:49] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Used LAN subnets: ["127.0.0.1/8", "10.0.0.0/8", "172.16.0.0/12
", "192.168.0.0/16"]
jellyfin_1  | [11:50:49] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Filtered interface addresses: ["127.0.0.1", "172.22.0.2"]
jellyfin_1  | [11:50:49] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Bind Addresses ["0.0.0.0"]
jellyfin_1  | [11:50:49] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Remote IP filter is Allowlist
jellyfin_1  | [11:50:49] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Filtered subnets: []
jellyfin_1  | [11:51:06] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: Bookshelf 11.0.0.0
jellyfin_1  | [11:51:06] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: TMDb 10.9.6.0
jellyfin_1  | [11:51:06] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: Studio Images 10.9.6.0
jellyfin_1  | [11:51:06] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: OMDb 10.9.6.0
jellyfin_1  | [11:51:06] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: MusicBrainz 10.9.6.0
jellyfin_1  | [11:51:06] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: AudioDB 10.9.6.0
jellyfin_1  | [11:51:06] [INF] [1] Jellyfin.Server.Migrations.MigrationRunner: Applying migration 'FixAudioData'
jellyfin_1  | [11:51:06] [INF] [1] Jellyfin.Server.Migrations.Routines.FixAudioData: Backing up library.db to /config/data/library.db.bak38
jellyfin_1  | [11:51:11] [INF] [1] Jellyfin.Server.Migrations.Routines.FixAudioData: library.db backed up to /config/data/library.db.bak38
jellyfin_1  | [11:51:11] [INF] [1] Jellyfin.Server.Migrations.Routines.FixAudioData: Backfilling audio lyrics data to database.
jellyfin_1  | [11:51:27] [INF] [1] Jellyfin.Server.Migrations.Routines.FixAudioData: Backfilled data for 5000 of 39975 audio records
jellyfin_1  | [11:51:42] [INF] [1] Jellyfin.Server.Migrations.Routines.FixAudioData: Backfilled data for 10000 of 39975 audio records
jellyfin_1  | [11:52:01] [ERR] [1] Jellyfin.Server.Migrations.MigrationRunner: Could not apply migration 'FixAudioData'
jellyfin_1  | Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 11: 'database disk image is malformed'.
jellyfin_1  |    at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
jellyfin_1  |    at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
jellyfin_1  |    at Microsoft.Data.Sqlite.SqliteCommand.ExecuteNonQuery()
jellyfin_1  |    at Emby.Server.Implementations.Data.SqliteItemRepository.SaveItem(BaseItem item, BaseItem topParent, String userDataKey, Sql
iteCommand saveItemStatement)
jellyfin_1  |    at Emby.Server.Implementations.Data.SqliteItemRepository.SaveItemsInTransaction(ManagedConnection db, IEnumerable`1 tuples)
jellyfin_1  |    at Emby.Server.Implementations.Data.SqliteItemRepository.SaveItems(IReadOnlyList`1 items, CancellationToken cancellationToke
n)
jellyfin_1  |    at Jellyfin.Server.Migrations.Routines.FixAudioData.Perform()
jellyfin_1  |    at Jellyfin.Server.Migrations.MigrationRunner.PerformMigrations(IMigrationRoutine[] migrations, MigrationOptions migrationOp
tions, Action`1 saveConfiguration, ILogger logger)
jellyfin_1  | [11:52:01] [FTL] [1] Main: Error while starting server
jellyfin_1  | Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 11: 'database disk image is malformed'.
jellyfin_1  |    at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
jellyfin_1  |    at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
jellyfin_1  |    at Microsoft.Data.Sqlite.SqliteCommand.ExecuteNonQuery()
jellyfin_1  |    at Emby.Server.Implementations.Data.SqliteItemRepository.SaveItem(BaseItem item, BaseItem topParent, String userDataKey, Sql
iteCommand saveItemStatement)
jellyfin_1  |    at Emby.Server.Implementations.Data.SqliteItemRepository.SaveItemsInTransaction(ManagedConnection db, IEnumerable`1 tuples)
jellyfin_1  |    at Emby.Server.Implementations.Data.SqliteItemRepository.SaveItems(IReadOnlyList`1 items, CancellationToken cancellationToke
n)
jellyfin_1  |    at Jellyfin.Server.Migrations.Routines.FixAudioData.Perform()
jellyfin_1  |    at Jellyfin.Server.Migrations.MigrationRunner.PerformMigrations(IMigrationRoutine[] migrations, MigrationOptions migrationOp
tions, Action`1 saveConfiguration, ILogger logger)
jellyfin_1  |    at Jellyfin.Server.Migrations.MigrationRunner.Run(CoreAppHost host, ILoggerFactory loggerFactory)
jellyfin_1  |    at Jellyfin.Server.Program.StartServer(IServerApplicationPaths appPaths, StartupOptions options, IConfiguration startupConfi
g)
jellyfin_1  | [11:52:01] [INF] [1] Main: Running query planner optimizations in the database... This might take a while
jellyfin_1  | [11:52:02] [INF] [1] Emby.Server.Implementations.ApplicationHost: Disposing CoreAppHost
jellyfin_1  | [11:52:02] [INF] [1] Emby.Server.Implementations.ApplicationHost: Disposing MusicBrainzArtistProvider
jellyfin_1  | [11:52:02] [INF] [1] Emby.Server.Implementations.ApplicationHost: Disposing MusicBrainzAlbumProvider
jellyfin_1  | [11:52:02] [INF] [1] Emby.Server.Implementations.ApplicationHost: Disposing PluginManager

FFmpeg logs

No response

Please attach any browser or client logs here

No response

Please attach any screenshots here

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
Originally created by @vbatts on GitHub (Jun 8, 2024). ### Please describe your bug I run jellyfin from the docker container on linux/amd64. just upgraded from the image with v10.9.3 (`docker.io/jellyfin/jellyfin@sha256:63136341d22edc06208a1392d544f064784dda7ac0955b2ee1da3f81cbed10ec`) to the image with v10.9.6 (`docker.io/jellyfin/jellyfin@sha256:15579ab64a14f9e3dce043c076df148e9de9631f11c9b3f614f1fbad868db701`) and the server is in a fail-loop attempting to start: see attached logs It's tried 30+ times just now, curiously resulting in different sized library.db many times: ```shell root@infra1:/mnt/data/volumes/jellyfin/data# ls -lart total 10986024 -rw-r--r-- 1 root root 35 Sep 28 2022 device.txt drwxr-xr-x 1 root root 84 Sep 28 2022 .. -rw-r--r-- 1 root root 276398080 Nov 1 2023 library.db.bak1 drwxr-xr-x 1 root root 746 Nov 9 2023 playlists drwxr-xr-x 1 root root 32 Dec 26 09:44 subtitles drwxr-xr-x 1 root root 32 Feb 8 16:28 attachments drwxr-xr-x 1 root root 998 Feb 13 21:41 collections drwxr-xr-x 1 root root 32 Mar 23 12:43 keyframes -rw-r--r-- 1 root root 4151877 May 13 10:52 splashscreen.png drwxr-xr-x 1 root root 1248 May 13 23:00 ScheduledTasks -rw-r--r-- 1 root root 1978368 Jun 8 07:02 jellyfin.db -rw-r--r-- 1 root root 272384000 Jun 8 07:02 library.db.bak2 -rw-r--r-- 1 root root 273408000 Jun 8 07:04 library.db.bak3 -rw-r--r-- 1 root root 274354176 Jun 8 07:05 library.db.bak4 -rw-r--r-- 1 root root 274345984 Jun 8 07:07 library.db.bak5 -rw-r--r-- 1 root root 274350080 Jun 8 07:08 library.db.bak6 -rw-r--r-- 1 root root 274345984 Jun 8 07:10 library.db.bak7 -rw-r--r-- 1 root root 274345984 Jun 8 07:11 library.db.bak8 -rw-r--r-- 1 root root 274345984 Jun 8 07:12 library.db.bak9 -rw-r--r-- 1 root root 274341888 Jun 8 07:14 library.db.bak10 -rw-r--r-- 1 root root 274341888 Jun 8 07:15 library.db.bak11 -rw-r--r-- 1 root root 274337792 Jun 8 07:16 library.db.bak12 -rw-r--r-- 1 root root 274341888 Jun 8 07:18 library.db.bak13 -rw-r--r-- 1 root root 274341888 Jun 8 07:19 library.db.bak14 -rw-r--r-- 1 root root 274337792 Jun 8 07:20 library.db.bak15 -rw-r--r-- 1 root root 274337792 Jun 8 07:22 library.db.bak16 -rw-r--r-- 1 root root 274341888 Jun 8 07:23 library.db.bak17 -rw-r--r-- 1 root root 274337792 Jun 8 07:24 library.db.bak18 -rw-r--r-- 1 root root 274337792 Jun 8 07:25 library.db.bak19 -rw-r--r-- 1 root root 274341888 Jun 8 07:27 library.db.bak20 -rw-r--r-- 1 root root 274341888 Jun 8 07:28 library.db.bak21 -rw-r--r-- 1 root root 274350080 Jun 8 07:30 library.db.bak22 -rw-r--r-- 1 root root 274350080 Jun 8 07:31 library.db.bak23 -rw-r--r-- 1 root root 274350080 Jun 8 07:32 library.db.bak24 -rw-r--r-- 1 root root 274350080 Jun 8 07:34 library.db.bak25 -rw-r--r-- 1 root root 274345984 Jun 8 07:35 library.db.bak26 -rw-r--r-- 1 root root 274350080 Jun 8 07:36 library.db.bak27 -rw-r--r-- 1 root root 274350080 Jun 8 07:37 library.db.bak28 -rw-r--r-- 1 root root 274350080 Jun 8 07:39 library.db.bak29 -rw-r--r-- 1 root root 274350080 Jun 8 07:40 library.db.bak30 -rw-r--r-- 1 root root 274350080 Jun 8 07:41 library.db.bak31 -rw-r--r-- 1 root root 274350080 Jun 8 07:42 library.db.bak32 -rw-r--r-- 1 root root 274354176 Jun 8 07:44 library.db.bak33 -rw-r--r-- 1 root root 274350080 Jun 8 07:45 library.db.bak34 -rw-r--r-- 1 root root 274350080 Jun 8 07:46 library.db.bak35 -rw-r--r-- 1 root root 274350080 Jun 8 07:48 library.db.bak36 -rw-r--r-- 1 root root 274350080 Jun 8 07:49 library.db.bak37 -rw-r--r-- 1 root root 274345984 Jun 8 07:51 library.db.bak38 -rw-r--r-- 1 root root 272384000 Jun 8 08:05 library.db -rw-r--r-- 1 root root 0 Jun 8 08:13 library.db-wal drwxr-xr-x 1 root root 1608 Jun 8 08:13 . -rw-r--r-- 1 root root 32768 Jun 8 08:13 library.db-shm -rw-r--r-- 1 root root 61832 Jun 8 08:13 jellyfin.db-wal -rw-r--r-- 1 root root 32768 Jun 8 08:13 jellyfin.db-shm root@infra1:/mnt/data/volumes/jellyfin/data# sha1sum library.db* 050761f629e078df9b1e308400cf94d36b856a05 library.db.bak18 aa61ecb9d235e35a46a26fb47b220d40ac1b0c95 library.db 1c4657ee87c5a234440f3ce40b16aef20b5ff71e library.db.bak26 3054b72ebc988ffc819c9458d6fa09e41eb3ac96 library.db.bak15 3100b4788db99de754c01bbc0ab4dcf70537ff7c library.db.bak25 3399eb576c36513aa9535969916f3855a53a2db5 library.db.bak31 37d925868e4a15f8751c5739581d9c14e917b0a3 library.db.bak21 388c30316464698f0716214b76da5f92f4ddbf79 library.db.bak3 39e5d4f901518850c3c8987f6a0d41e466346faa library.db.bak38 3d41d016f2565d6085b57f64e1077f8b878ca74c library.db.bak35 3fb0936768ea31193db9547784dc4c4eed539323 library.db.bak32 421cbfedaa48892b28ca132014f7ee3de39aaeb2 library.db.bak20 44b72ddfd6aece26de00121867a623bf4e40178c library.db.bak36 483e57425a6ec6e9dd52c156b1c5be1476966301 library.db.bak11 573052b57460c2cb72531167a0e1687bcd8eb551 library.db.bak10 80633b3f0fca7d7ba44dfd12db58691b9e6837f0 library.db.bak8 80d7f4b3096284c1acb980b0ede7d30f8593a9e7 library.db.bak17 875f958514b6f53ca6440001c0c6e753e9550d03 library.db.bak27 9484507c07bc8016adebc26adfee30c5790e1967 library.db.bak12 94be92032a232e1a1636b5db129e4b5ab1598a78 library.db.bak22 9943dfcf9527e57a32ede9061d1562b00cfca869 library.db.bak6 99e916c2deacfb35e12da7ad52ffc45f17bccb27 library.db.bak4 a4a148c9f627b96dab3d4c780e0da548659d544c library.db.bak29 a6757923c9411b8065a2c1f6ea0c5030bd61d6b0 library.db.bak16 ad4853452bee794bfd4d10cf5f022ed51685f2d1 library.db.bak30 b39262464b167bde5fc2033178f22483015f030d library.db.bak23 baa872a2ee7f4b5be35759594f0c1ea25739af16 library.db.bak24 badea4e96ff150bb3116f669a1abf8f3c5d267fd library.db.bak37 bed6a9b4705126649079ec8149dcbf4b43d75660 library.db.bak13 c8e2c80898d85a3e4e48096d11ba66838fad3191 library.db.bak19 ca96c07427772765a21bb7457837b772961bd4c4 library.db.bak33 d67f55d166df581870fbc5537edec28e9b5dc08e library.db.bak34 da175e5f85555e1068e7133f54689f54b9cb66bb library.db.bak1 eaeedb573d859305608462971ed8a47daba1d3f0 library.db.bak5 ecd6067f4908144cdd1b3b6c6d6f453b4b90560a library.db.bak9 f043467b64b3b06e738f03cf20340417310c73e7 library.db.bak7 f05ed492c95244ae6f52ee55044c959e0c3e6ada library.db.bak2 f211a40509df688bf3e587911c7902033190df4f library.db.bak28 fa32a6ed60f262202b6cb087ba7ef991ec2d2d01 library.db.bak14 ``` ### Reproduction Steps 1. running docker image with v10.9.3 `docker.io/jellyfin/jellyfin@sha256:63136341d22edc06208a1392d544f064784dda7ac0955b2ee1da3f81cbed10ec` 2. fetch new image and restart with docker image for v10.9.6 `docker.io/jellyfin/jellyfin@sha256:15579ab64a14f9e3dce043c076df148e9de9631f11c9b3f614f1fbad868db701` ### Jellyfin Version 10.9.0 ### if other: _No response_ ### Environment ```markdown - OS: Linux Debian bookworm - Linux Kernel: 6.1.0-21-amd64 - Virtualization: docker 20.10.24+dfsg1 - Clients: - - Browser: - - FFmpeg Version: - - Playback Method: - - Hardware Acceleration: - - GPU Model: - - Plugins: - - Reverse Proxy: - - Base URL: - - Networking: - - Storage: - ``` ### Jellyfin logs ```shell jellyfin_1 | [11:50:47] [INF] [1] Main: Jellyfin version: 10.9.6 jellyfin_1 | [11:50:47] [INF] [1] Main: Environment Variables: ["[JELLYFIN_FFMPEG, /usr/lib/jellyfin-ffmpeg/ffmpeg]", "[JELLYFIN_WEB_DIR, /j ellyfin/jellyfin-web]", "[JELLYFIN_LOG_DIR, /config/log]", "[JELLYFIN_DATA_DIR, /config]", "[JELLYFIN_CONFIG_DIR, /config/config]", "[JELLYFI N_CACHE_DIR, /cache]"] jellyfin_1 | [11:50:47] [INF] [1] Main: Arguments: ["/jellyfin/jellyfin.dll", "--ffmpeg", "/usr/lib/jellyfin-ffmpeg/ffmpeg"] jellyfin_1 | [11:50:47] [INF] [1] Main: Operating system: Debian GNU/Linux 12 (bookworm) jellyfin_1 | [11:50:47] [INF] [1] Main: Architecture: X64 jellyfin_1 | [11:50:47] [INF] [1] Main: 64-Bit Process: True jellyfin_1 | [11:50:47] [INF] [1] Main: User Interactive: True jellyfin_1 | [11:50:47] [INF] [1] Main: Processor count: 12 jellyfin_1 | [11:50:47] [INF] [1] Main: Program data path: /config jellyfin_1 | [11:50:47] [INF] [1] Main: Log directory path: /config/log jellyfin_1 | [11:50:47] [INF] [1] Main: Config directory path: /config/config jellyfin_1 | [11:50:47] [INF] [1] Main: Cache path: /cache jellyfin_1 | [11:50:47] [INF] [1] Main: Web resources path: /jellyfin/jellyfin-web jellyfin_1 | [11:50:47] [INF] [1] Main: Application directory: /jellyfin/ jellyfin_1 | [11:50:47] [INF] [1] Emby.Server.Implementations.AppBase.BaseConfigurationManager: Setting cache path: /cache jellyfin_1 | [11:50:49] [INF] [1] Emby.Server.Implementations.ApplicationHost: Loading assemblies jellyfin_1 | [11:50:49] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly Jellyfin.Plugin.Bookshelf, Ver[93/1869] .0.0, Culture=neutral, PublicKeyToken=null from /config/plugins/Bookshelf_11.0.0.0/Jellyfin.Plugin.Bookshelf.dll jellyfin_1 | [11:50:49] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Defined LAN subnets: ["127.0.0.1/8", "10.0.0.0/8", "172.16.0.0 /12", "192.168.0.0/16"] jellyfin_1 | [11:50:49] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Defined LAN exclusions: [] jellyfin_1 | [11:50:49] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Used LAN subnets: ["127.0.0.1/8", "10.0.0.0/8", "172.16.0.0/12 ", "192.168.0.0/16"] jellyfin_1 | [11:50:49] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Filtered interface addresses: ["127.0.0.1", "172.22.0.2"] jellyfin_1 | [11:50:49] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Bind Addresses ["0.0.0.0"] jellyfin_1 | [11:50:49] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Remote IP filter is Allowlist jellyfin_1 | [11:50:49] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Filtered subnets: [] jellyfin_1 | [11:51:06] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: Bookshelf 11.0.0.0 jellyfin_1 | [11:51:06] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: TMDb 10.9.6.0 jellyfin_1 | [11:51:06] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: Studio Images 10.9.6.0 jellyfin_1 | [11:51:06] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: OMDb 10.9.6.0 jellyfin_1 | [11:51:06] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: MusicBrainz 10.9.6.0 jellyfin_1 | [11:51:06] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: AudioDB 10.9.6.0 jellyfin_1 | [11:51:06] [INF] [1] Jellyfin.Server.Migrations.MigrationRunner: Applying migration 'FixAudioData' jellyfin_1 | [11:51:06] [INF] [1] Jellyfin.Server.Migrations.Routines.FixAudioData: Backing up library.db to /config/data/library.db.bak38 jellyfin_1 | [11:51:11] [INF] [1] Jellyfin.Server.Migrations.Routines.FixAudioData: library.db backed up to /config/data/library.db.bak38 jellyfin_1 | [11:51:11] [INF] [1] Jellyfin.Server.Migrations.Routines.FixAudioData: Backfilling audio lyrics data to database. jellyfin_1 | [11:51:27] [INF] [1] Jellyfin.Server.Migrations.Routines.FixAudioData: Backfilled data for 5000 of 39975 audio records jellyfin_1 | [11:51:42] [INF] [1] Jellyfin.Server.Migrations.Routines.FixAudioData: Backfilled data for 10000 of 39975 audio records jellyfin_1 | [11:52:01] [ERR] [1] Jellyfin.Server.Migrations.MigrationRunner: Could not apply migration 'FixAudioData' jellyfin_1 | Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 11: 'database disk image is malformed'. jellyfin_1 | at Microsoft.Data.Sqlite.SqliteDataReader.NextResult() jellyfin_1 | at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior) jellyfin_1 | at Microsoft.Data.Sqlite.SqliteCommand.ExecuteNonQuery() jellyfin_1 | at Emby.Server.Implementations.Data.SqliteItemRepository.SaveItem(BaseItem item, BaseItem topParent, String userDataKey, Sql iteCommand saveItemStatement) jellyfin_1 | at Emby.Server.Implementations.Data.SqliteItemRepository.SaveItemsInTransaction(ManagedConnection db, IEnumerable`1 tuples) jellyfin_1 | at Emby.Server.Implementations.Data.SqliteItemRepository.SaveItems(IReadOnlyList`1 items, CancellationToken cancellationToke n) jellyfin_1 | at Jellyfin.Server.Migrations.Routines.FixAudioData.Perform() jellyfin_1 | at Jellyfin.Server.Migrations.MigrationRunner.PerformMigrations(IMigrationRoutine[] migrations, MigrationOptions migrationOp tions, Action`1 saveConfiguration, ILogger logger) jellyfin_1 | [11:52:01] [FTL] [1] Main: Error while starting server jellyfin_1 | Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 11: 'database disk image is malformed'. jellyfin_1 | at Microsoft.Data.Sqlite.SqliteDataReader.NextResult() jellyfin_1 | at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior) jellyfin_1 | at Microsoft.Data.Sqlite.SqliteCommand.ExecuteNonQuery() jellyfin_1 | at Emby.Server.Implementations.Data.SqliteItemRepository.SaveItem(BaseItem item, BaseItem topParent, String userDataKey, Sql iteCommand saveItemStatement) jellyfin_1 | at Emby.Server.Implementations.Data.SqliteItemRepository.SaveItemsInTransaction(ManagedConnection db, IEnumerable`1 tuples) jellyfin_1 | at Emby.Server.Implementations.Data.SqliteItemRepository.SaveItems(IReadOnlyList`1 items, CancellationToken cancellationToke n) jellyfin_1 | at Jellyfin.Server.Migrations.Routines.FixAudioData.Perform() jellyfin_1 | at Jellyfin.Server.Migrations.MigrationRunner.PerformMigrations(IMigrationRoutine[] migrations, MigrationOptions migrationOp tions, Action`1 saveConfiguration, ILogger logger) jellyfin_1 | at Jellyfin.Server.Migrations.MigrationRunner.Run(CoreAppHost host, ILoggerFactory loggerFactory) jellyfin_1 | at Jellyfin.Server.Program.StartServer(IServerApplicationPaths appPaths, StartupOptions options, IConfiguration startupConfi g) jellyfin_1 | [11:52:01] [INF] [1] Main: Running query planner optimizations in the database... This might take a while jellyfin_1 | [11:52:02] [INF] [1] Emby.Server.Implementations.ApplicationHost: Disposing CoreAppHost jellyfin_1 | [11:52:02] [INF] [1] Emby.Server.Implementations.ApplicationHost: Disposing MusicBrainzArtistProvider jellyfin_1 | [11:52:02] [INF] [1] Emby.Server.Implementations.ApplicationHost: Disposing MusicBrainzAlbumProvider jellyfin_1 | [11:52:02] [INF] [1] Emby.Server.Implementations.ApplicationHost: Disposing PluginManager ``` ### FFmpeg logs _No response_ ### Please attach any browser or client logs here _No response_ ### Please attach any screenshots here _No response_ ### Code of Conduct - [X] I agree to follow this project's Code of Conduct
backuprepo 2025-12-22 03:17:15 +01:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@jellyfin-bot commented on GitHub (Jun 8, 2024):

Hi, it seems like your issue report has the following item(s) that need to be addressed:

  • You have not filled in the environment completely.

This is an automated message, currently under testing. Please file an issue here if you encounter any problems.

@jellyfin-bot commented on GitHub (Jun 8, 2024): Hi, it seems like your issue report has the following item(s) that need to be addressed: - You have not filled in the environment completely. This is an automated message, currently under testing. Please file an issue [here](https://github.com/jellyfin/jellyfin-triage-scripts/issues) if you encounter any problems.
Author
Owner

@gnattu commented on GitHub (Jun 8, 2024):

If you have any kind of timeout mechanisms that will kill a container if the health check fails, please remove that.

Upgrades beyond 10.9.3 requires a db migration that would take some time to finish and if you or your container manager is not patient enough to kill if because the container seems to be "unhealthy", it will kill your db file.

For this exact reason we backup your entire db before doing that. As you can see you have tons of db backups now.

Please use the library.db.bak2 which seems like the first backup before this migration to restore library.db, don't forget to take another backup, then run the container again without all kind of auto-killing feature, be patient to let the migration complete.

@gnattu commented on GitHub (Jun 8, 2024): If you have any kind of timeout mechanisms that will kill a container if the health check fails, please remove that. Upgrades beyond 10.9.3 requires a db migration that would take some time to finish and if you or your container manager is not patient enough to kill if because the container seems to be "unhealthy", it will kill your db file. For this exact reason we backup your entire db before doing that. As you can see you have tons of db backups now. Please use the `library.db.bak2` which seems like the first backup before this migration to restore `library.db`, don't forget to take another backup, then run the container again without all kind of auto-killing feature, be patient to let the migration complete.
Author
Owner

@vbatts commented on GitHub (Jun 8, 2024):

oh interesting. That HealthCheck is declared by the image publisher

            "Healthcheck": {
                "Test": [
                    "CMD-SHELL",
                    "curl -Lk -fsS \"${HEALTHCHECK_URL}\" || exit 1"
                ],
                "Interval": 30000000000,
                "Timeout": 30000000000,
                "StartPeriod": 10000000000,
                "Retries": 3
            },
@vbatts commented on GitHub (Jun 8, 2024): oh interesting. That HealthCheck is declared by the image publisher ```json "Healthcheck": { "Test": [ "CMD-SHELL", "curl -Lk -fsS \"${HEALTHCHECK_URL}\" || exit 1" ], "Interval": 30000000000, "Timeout": 30000000000, "StartPeriod": 10000000000, "Retries": 3 }, ```
Author
Owner

@gnattu commented on GitHub (Jun 8, 2024):

But the health check itself should not restart your container, it will only indicate that the container is not responding to the health check message.

@gnattu commented on GitHub (Jun 8, 2024): But the health check itself should not restart your container, it will only indicate that the container is not responding to the health check message.
Author
Owner

@vbatts commented on GitHub (Jun 8, 2024):

totally get that, and I can/will disable it to get through this. But since this image is from the publisher, as well as the migration that is taking a long time, perhaps that healthcheck endpoint ought to be brought up during a migration to indicate the application is healthy even if it's currently occupied in a migration.

@vbatts commented on GitHub (Jun 8, 2024): totally get that, and I can/will disable it to get through this. But since this image is from the publisher, as well as the migration that is taking a long time, perhaps that healthcheck endpoint ought to be brought up during a migration to indicate the application is healthy even if it's currently occupied in a migration.
Author
Owner

@Fabien98 commented on GitHub (Jul 3, 2024):

Hello i'm facing the same error.
I'm running Jellyfin through Debian on a VM.

Each time I try to update Jellyfin to a >10.9.3 version, my library.db gets corrupted.
I tried to replace library.db with a backup, as stated above, but no success..

Here's the log where the corruption seems to happen?

[2024-07-04 01:12:35.869 +02:00] [INF] Applying migration '"UpdateDefaultPluginRepository10.9"'
[2024-07-04 01:12:35.870 +02:00] [INF] Saving system configuration
[2024-07-04 01:12:35.872 +02:00] [INF] Setting cache path: "/var/cache/jellyfin"
[2024-07-04 01:12:35.872 +02:00] [INF] Migration '"UpdateDefaultPluginRepository10.9"' applied successfully
[2024-07-04 01:12:35.879 +02:00] [INF] Applying migration '"FixAudioData"'
[2024-07-04 01:12:35.883 +02:00] [INF] Backing up "library.db" to "/var/lib/jellyfin/data/library.db.bak2"
[2024-07-04 01:12:36.535 +02:00] [INF] "library.db" backed up to "/var/lib/jellyfin/data/library.db.bak2"
[2024-07-04 01:12:36.536 +02:00] [INF] Backfilling audio lyrics data to database.
[2024-07-04 01:12:43.827 +02:00] [ERR] Could not apply migration '"FixAudioData"'
Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 11: 'database disk image is malformed'.
   at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
   at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
   at Microsoft.Data.Sqlite.SqliteCommand.ExecuteNonQuery()
@Fabien98 commented on GitHub (Jul 3, 2024): Hello i'm facing the same error. I'm running Jellyfin through Debian on a VM. Each time I try to update Jellyfin to a >10.9.3 version, my `library.db` gets corrupted. I tried to replace `library.db` with a backup, as stated above, but no success.. Here's the log where the corruption seems to happen? ``` [2024-07-04 01:12:35.869 +02:00] [INF] Applying migration '"UpdateDefaultPluginRepository10.9"' [2024-07-04 01:12:35.870 +02:00] [INF] Saving system configuration [2024-07-04 01:12:35.872 +02:00] [INF] Setting cache path: "/var/cache/jellyfin" [2024-07-04 01:12:35.872 +02:00] [INF] Migration '"UpdateDefaultPluginRepository10.9"' applied successfully [2024-07-04 01:12:35.879 +02:00] [INF] Applying migration '"FixAudioData"' [2024-07-04 01:12:35.883 +02:00] [INF] Backing up "library.db" to "/var/lib/jellyfin/data/library.db.bak2" [2024-07-04 01:12:36.535 +02:00] [INF] "library.db" backed up to "/var/lib/jellyfin/data/library.db.bak2" [2024-07-04 01:12:36.536 +02:00] [INF] Backfilling audio lyrics data to database. [2024-07-04 01:12:43.827 +02:00] [ERR] Could not apply migration '"FixAudioData"' Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 11: 'database disk image is malformed'. at Microsoft.Data.Sqlite.SqliteDataReader.NextResult() at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior) at Microsoft.Data.Sqlite.SqliteCommand.ExecuteNonQuery() ```
Author
Owner

@felix920506 commented on GitHub (Jul 6, 2024):

Please head to our forum or chat rooms for support. https://jellyfin.org/contact

@felix920506 commented on GitHub (Jul 6, 2024): Please head to our forum or chat rooms for support. https://jellyfin.org/contact
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: starred/jellyfin#5969
No description provided.