Repository navigation
Closed
Labels
P0Critical: Tackled by core team ASAPCritical: Tackled by core team ASAPeffort/daysEstimated to take multiple days, but less than a weekEstimated to take multiple days, but less than a weekexp/expertHaving worked on the specific codebase is importantHaving worked on the specific codebase is importantkind/bugA bug in existing code (including security flaws)A bug in existing code (including security flaws)
Description
Installation method
dist.ipfs.tech or ipfs-update
Version
0.38.0 on Windows 10
Config
updating existing repo created by 0.37 to 0.38
Description
Found this in ipfs/ipfs-desktop#2998
Windows test failed with IPFS Desktop + Kubo 0.38 using binaries from:
ipfs daemon --migrate executed by the electron app panics on Windows 10:
2025-10-02T22:18:25.619Z info: [daemon] ipfs data store is migrating
2025-10-02T22:18:25.669Z error: Initializing daemon...
Kubo version: 0.38.0
Repo version: 18
System version: amd64/windows
Golang version: go1.25.1
Kubo repository at C:\Users\lidel\.ipfs has version 17 and needs to be migrated to version 18.
Looking for embedded migrations.
Running embedded migration fs-repo-17-to-18...
applying 17-to-18 repo migration
> Migrating Provider and Reprovider configuration to unified Provide configuration
panic: error can't be dealt with transactionally: rename C:\Users\lidel\.ipfs\.tmp-config498655803 C:\Users\lidel\.ipfs\config: Access is denied.
goroutine 1 [running]:
github.com/ipfs/kubo/repo/fsrepo/migrations/common.Must(...)
github.com/ipfs/kubo@v0.38.0/repo/fsrepo/migrations/common/utils.go:37
github.com/ipfs/kubo/repo/fsrepo/migrations/common.WithBackup({0xc0000fd410, 0x1b}, {0xc00016e162, 0xd}, 0x7ff7ed362ef8)
github.com/ipfs/kubo@v0.38.0/repo/fsrepo/migrations/common/utils.go:82 +0x436
github.com/ipfs/kubo/repo/fsrepo/migrations/common.(*BaseMigration).Apply(0x7ff7ee9b18c0, {{0xc000255380?, 0x2?}, 0x58?})
github.com/ipfs/kubo@v0.38.0/repo/fsrepo/migrations/common/base.go:50 +0x2de
github.com/ipfs/kubo/repo/fsrepo/migrations.RunEmbeddedMigration({0x7ff7ed627d00?, 0x7ff7eea31d00?}, {0xc00016e0c0, 0x10}, {0xc000255380, 0x14}, 0x0)
github.com/ipfs/kubo@v0.38.0/repo/fsrepo/migrations/embedded.go:53 +0x1d1
github.com/ipfs/kubo/repo/fsrepo/migrations.RunEmbeddedMigrations({0x7ff7ed627d00, 0x7ff7eea31d00}, 0x12, {0xc000255380?, 0x0?}, 0x0)
github.com/ipfs/kubo@v0.38.0/repo/fsrepo/migrations/embedded.go:137 +0x31d
github.com/ipfs/kubo/repo/fsrepo/migrations.RunHybridMigrations({0x7ff7ed627d00, 0x7ff7eea31d00}, 0x12, {0xc000255380, 0x14}, 0x0)
github.com/ipfs/kubo@v0.38.0/repo/fsrepo/migrations/migrations.go:364 +0xaa6
github.com/ipfs/kubo/cmd/ipfs/kubo.daemonFunc(0xc0003703f0, {0x6?, 0xc00037a200?}, {0x7ff7ece1fe60, 0xc0003319a0})
github.com/ipfs/kubo@v0.38.0/cmd/ipfs/kubo/daemon.go:337 +0xa05
github.com/ipfs/go-ipfs-cmds.(*executor).Execute(0x7ff7ee9848e0?, 0xc0003703f0, {0x20d4d4b8e30, 0xc00036d200}, {0x7ff7ece1fe60, 0xc0003319a0})
github.com/ipfs/go-ipfs-cmds@v0.15.0/executor.go:88 +0x123
github.com/ipfs/kubo/cmd/ipfs/kubo.tracingWrappedExecutor.Execute({{0x7ff7ed60d160?, 0xc00015f010?}}, 0xc0003703f0, {0x20d4d4b8e30, 0xc00036d200}, {0x7ff7ece1fe60, 0xc0003319a0})
github.com/ipfs/kubo@v0.38.0/cmd/ipfs/kubo/start.go:371 +0x3d1
github.com/ipfs/go-ipfs-cmds/cli.Run({0x7ff7ed627ee8?, 0xc0003318b0?}, 0x7ff7ee9e74a0, {0xc0000c6000, 0x7ff7eb14f40e?, 0x7ff7eb0ead34?}, 0xc00006c008?, 0xc000080060, 0xc000080068, 0x7ff7ed360f78, ...)
github.com/ipfs/go-ipfs-cmds@v0.15.0/cli/run.go:137 +0x91e
github.com/ipfs/kubo/cmd/ipfs/kubo.Start(0x7ff7ed360f78)
github.com/ipfs/kubo@v0.38.0/cmd/ipfs/kubo/start.go:201 +0x595
main.main()
github.com/ipfs/kubo@v0.38.0/cmd/ipfs/main.go:10 +0x1a
2025-10-02T22:18:25.671Z error: [ipfsd] start daemon Error: Initializing daemon...
Kubo version: 0.38.0
Repo version: 18
System version: amd64/windows
Golang version: go1.25.1
Kubo repository at C:\Users\lidel\.ipfs has version 17 and needs to be migrated to version 18.
Looking for embedded migrations.
Running embedded migration fs-repo-17-to-18...
applying 17-to-18 repo migration
> Migrating Provider and Reprovider configuration to unified Provide configuration
panic: error can't be dealt with transactionally: rename C:\Users\lidel\.ipfs\.tmp-config498655803 C:\Users\lidel\.ipfs\config: Access is denied.
goroutine 1 [running]:
github.com/ipfs/kubo/repo/fsrepo/migrations/common.Must(...)
github.com/ipfs/kubo@v0.38.0/repo/fsrepo/migrations/common/utils.go:37
github.com/ipfs/kubo/repo/fsrepo/migrations/common.WithBackup({0xc0000fd410, 0x1b}, {0xc00016e162, 0xd}, 0x7ff7ed362ef8)
github.com/ipfs/kubo@v0.38.0/repo/fsrepo/migrations/common/utils.go:82 +0x436
github.com/ipfs/kubo/repo/fsrepo/migrations/common.(*BaseMigration).Apply(0x7ff7ee9b18c0, {{0xc000255380?, 0x2?}, 0x58?})
github.com/ipfs/kubo@v0.38.0/repo/fsrepo/migrations/common/base.go:50 +0x2de
github.com/ipfs/kubo/repo/fsrepo/migrations.RunEmbeddedMigration({0x7ff7ed627d00?, 0x7ff7eea31d00?}, {0xc00016e0c0, 0x10}, {0xc000255380, 0x14}, 0x0)
github.com/ipfs/kubo@v0.38.0/repo/fsrepo/migrations/embedded.go:53 +0x1d1
github.com/ipfs/kubo/repo/fsrepo/migrations.RunEmbeddedMigrations({0x7ff7ed627d00, 0x7ff7eea31d00}, 0x12, {0xc000255380?, 0x0?}, 0x0)
github.com/ipfs/kubo@v0.38.0/repo/fsrepo/migrations/embedded.go:137 +0x31d
github.com/ipfs/kubo/repo/fsrepo/migrations.RunHybridMigrations({0x7ff7ed627d00, 0x7ff7eea31d00}, 0x12, {0xc000255380, 0x14}, 0x0)
github.com/ipfs/kubo@v0.38.0/repo/fsrepo/migrations/migrations.go:364 +0xaa6
github.com/ipfs/kubo/cmd/ipfs/kubo.daemonFunc(0xc0003703f0, {0x6?, 0xc00037a200?}, {0x7ff7ece1fe60, 0xc0003319a0})
github.com/ipfs/kubo@v0.38.0/cmd/ipfs/kubo/daemon.go:337 +0xa05
github.com/ipfs/go-ipfs-cmds.(*executor).Execute(0x7ff7ee9848e0?, 0xc0003703f0, {0x20d4d4b8e30, 0xc00036d200}, {0x7ff7ece1fe60, 0xc0003319a0})
github.com/ipfs/go-ipfs-cmds@v0.15.0/executor.go:88 +0x123
github.com/ipfs/kubo/cmd/ipfs/kubo.tracingWrappedExecutor.Execute({{0x7ff7ed60d160?, 0xc00015f010?}}, 0xc0003703f0, {0x20d4d4b8e30, 0xc00036d200}, {0x7ff7ece1fe60, 0xc0003319a0})
github.com/ipfs/kubo@v0.38.0/cmd/ipfs/kubo/start.go:371 +0x3d1
github.com/ipfs/go-ipfs-cmds/cli.Run({0x7ff7ed627ee8?, 0xc0003318b0?}, 0x7ff7ee9e74a0, {0xc0000c6000, 0x7ff7eb14f40e?, 0x7ff7eb0ead34?}, 0xc00006c008?, 0xc000080060, 0xc000080068, 0x7ff7ed360f78, ...)
github.com/ipfs/go-ipfs-cmds@v0.15.0/cli/run.go:137 +0x91e
github.com/ipfs/kubo/cmd/ipfs/kubo.Start(0x7ff7ed360f78)
github.com/ipfs/kubo@v0.38.0/cmd/ipfs/kubo/start.go:201 +0x595
main.main()
github.com/ipfs/kubo@v0.38.0/cmd/ipfs/main.go:10 +0x1a
Command failed with exit code 2: C:\Users\lidel\AppData\Local\Programs\IPFS Desktop\resources\app.asar.unpacked\node_modules\kubo\kubo\ipfs.exe daemon --migrate --enable-gc --agent-version-suffix=desktop
panic: error can't be dealt with transactionally: rename C:\Users\lidel\.ipfs\.tmp-config498655803 C:\Users\lidel\.ipfs\config: Access is denied.
goroutine 1 [running]:
github.com/ipfs/kubo/repo/fsrepo/migrations/common.Must(...)
github.com/ipfs/kubo@v0.38.0/repo/fsrepo/migrations/common/utils.go:37
github.com/ipfs/kubo/repo/fsrepo/migrations/common.WithBackup({0xc0000fd410, 0x1b}, {0xc00016e162, 0xd}, 0x7ff7ed362ef8)
github.com/ipfs/kubo@v0.38.0/repo/fsrepo/migrations/common/utils.go:82 +0x436
github.com/ipfs/kubo/repo/fsrepo/migrations/common.(*BaseMigration).Apply(0x7ff7ee9b18c0, {{0xc000255380?, 0x2?}, 0x58?})
github.com/ipfs/kubo@v0.38.0/repo/fsrepo/migrations/common/base.go:50 +0x2de
github.com/ipfs/kubo/repo/fsrepo/migrations.RunEmbeddedMigration({0x7ff7ed627d00?, 0x7ff7eea31d00?}, {0xc00016e0c0, 0x10}, {0xc000255380, 0x14}, 0x0)
github.com/ipfs/kubo@v0.38.0/repo/fsrepo/migrations/embedded.go:53 +0x1d1
github.com/ipfs/kubo/repo/fsrepo/migrations.RunEmbeddedMigrations({0x7ff7ed627d00, 0x7ff7eea31d00}, 0x12, {0xc000255380?, 0x0?}, 0x0)
github.com/ipfs/kubo@v0.38.0/repo/fsrepo/migrations/embedded.go:137 +0x31d
github.com/ipfs/kubo/repo/fsrepo/migrations.RunHybridMigrations({0x7ff7ed627d00, 0x7ff7eea31d00}, 0x12, {0xc000255380, 0x14}, 0x0)
github.com/ipfs/kubo@v0.38.0/repo/fsrepo/migrations/migrations.go:364 +0xaa6
github.com/ipfs/kubo/cmd/ipfs/kubo.daemonFunc(0xc0003703f0, {0x6?, 0xc00037a200?}, {0x7ff7ece1fe60, 0xc0003319a0})
github.com/ipfs/kubo@v0.38.0/cmd/ipfs/kubo/daemon.go:337 +0xa05
github.com/ipfs/go-ipfs-cmds.(*executor).Execute(0x7ff7ee9848e0?, 0xc0003703f0, {0x20d4d4b8e30, 0xc00036d200}, {0x7ff7ece1fe60, 0xc0003319a0})
github.com/ipfs/go-ipfs-cmds@v0.15.0/executor.go:88 +0x123
github.com/ipfs/kubo/cmd/ipfs/kubo.tracingWrappedExecutor.Execute({{0x7ff7ed60d160?, 0xc00015f010?}}, 0xc0003703f0, {0x20d4d4b8e30, 0xc00036d200}, {0x7ff7ece1fe60, 0xc0003319a0})
github.com/ipfs/kubo@v0.38.0/cmd/ipfs/kubo/start.go:371 +0x3d1
github.com/ipfs/go-ipfs-cmds/cli.Run({0x7ff7ed627ee8?, 0xc0003318b0?}, 0x7ff7ee9e74a0, {0xc0000c6000, 0x7ff7eb14f40e?, 0x7ff7eb0ead34?}, 0xc00006c008?, 0xc000080060, 0xc000080068, 0x7ff7ed360f78, ...)
github.com/ipfs/go-ipfs-cmds@v0.15.0/cli/run.go:137 +0x91e
github.com/ipfs/kubo/cmd/ipfs/kubo.Start(0x7ff7ed360f78)
github.com/ipfs/kubo@v0.38.0/cmd/ipfs/kubo/start.go:201 +0x595
main.main()
github.com/ipfs/kubo@v0.38.0/cmd/ipfs/main.go:10 +0x1a
Initializing daemon...
Kubo version: 0.38.0
Repo version: 18
System version: amd64/windows
Golang version: go1.25.1
Kubo repository at C:\Users\lidel\.ipfs has version 17 and needs to be migrated to version 18.
Looking for embedded migrations.
Running embedded migration fs-repo-17-to-18...
applying 17-to-18 repo migration
> Migrating Provider and Reprovider configuration to unified Provide configuration
at makeError (C:\Users\lidel\AppData\Local\Programs\IPFS Desktop\resources\app.asar\node_modules\ipfsd-ctl\node_modules\execa\lib\error.js:60:11)
at handlePromise (C:\Users\lidel\AppData\Local\Programs\IPFS Desktop\resources\app.asar\node_modules\ipfsd-ctl\node_modules\execa\index.js:118:26)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
2025-10-02T22:18:25.672Z debug: [tray.update-menu] updating tray menu
2025-10-02T22:18:25.672Z info: [ctx] getting restartIpfs
2025-10-02T22:18:25.672Z info: [ctx] Found existing property restartIpfs
2025-10-02T22:18:25.672Z info: [ctx] Resolving promise for restartIpfs
2025-10-02T22:18:25.672Z info: [ctx] getting startIpfs
2025-10-02T22:18:25.672Z info: [ctx] Found existing property startIpfs
2025-10-02T22:18:25.672Z info: [ctx] Resolving promise for startIpfs
2025-10-02T22:18:25.672Z info: [ctx] getting stopIpfs
2025-10-02T22:18:25.672Z info: [ctx] Found existing property stopIpfs
2025-10-02T22:18:25.672Z info: [ctx] Resolving promise for stopIpfs
2025-10-02T22:18:25.672Z info: [ctx] getting launchWebUI
Metadata
Metadata
Assignees
Labels
P0Critical: Tackled by core team ASAPCritical: Tackled by core team ASAPeffort/daysEstimated to take multiple days, but less than a weekEstimated to take multiple days, but less than a weekexp/expertHaving worked on the specific codebase is importantHaving worked on the specific codebase is importantkind/bugA bug in existing code (including security flaws)A bug in existing code (including security flaws)
Activity
lidel commentedon Oct 3, 2025
The bug was introduced when migration code was refactored in v0.38 to use a common
WithBackup()function that attempts atomic file renames before updating the version file, whereas the original v0.37 code updated the version first and then attempted renames. This order change means Windows users hit the panic repeatedly on every startup because the version remains unchanged when the rename fails due to file locking, triggering the migration again and again.Why it was missed
On Windows, you cannot rename a file while any process has it open (even for reading), whereas Unix-like systems allow renaming files that are open.
Kubo tests do not run on windows. We detected it during IPFS Desktop release prep by following checklist from https://github.com/ipfs/ipfs-desktop/blob/main/DEVELOPER-NOTES.md#manual-testing
Next steps