What to do with these errors or warnings when upgrading my nixos channel from 22.05 to 23.05?

I got the following errors or warnings(?) when upgrading my nixos channel from 22.05 to 23.05 following nix - How do I upgrade Nixos to use a new channel nixos version? - Unix & Linux Stack Exchange.

Are they warnings or errors?

What shall I do with each of them?

$ sudo nixos-rebuild --upgrade boot


...
copying path '/nix/store/6jfpwh7wmd1zqn4kpy4q98skzv26k14a-jemalloc-5.3.0' from 'https://cache.nixos.org'...
warning: error: unable to download 'https://cache.nixos.org/nar/03366ngpqxm9gynfv4ns63kjrm27mxqn0a3nprrrxk3i67kldpkv.nar.xz': HTTP error 206 (curl error: Transferred a partial file); retrying from offset 42972496 in 517 ms
copying path '/nix/store/mqzln0zicdv9bkiyl8hx2smi571ak2ga-jitsi-meet-1.0.6943' from 'https://cache.nixos.org'...
warning: error: unable to download 'https://cache.nixos.org/nar/0ishsxahmnzwda2qldisznjr22nrpcbgg2v0hvjjfmbrq4dxkdj0.nar.xz': HTTP error 200 (curl error: Transferred a partial file); retrying from offset 28348096 in 339 ms
warning: error: unable to download 'https://cache.nixos.org/nar/0lgny0ppdmgaml4p8hmihqd16pb19hhcsz44lgab72f4p4khwbdm.nar.xz': HTTP error 206 (curl error: Transferred a partial file); retrying from offset 42414336 in 1343 ms
warning: error: unable to download 'https://cache.nixos.org/nar/1p5kj5zlh8kx9zxzlvyp0kdl1sz23cj23xnavs0s1z2sczrib4dy.nar.xz': HTTP error 200 (curl error: Transferred a partial file); retrying from offset 14873858 in 255 ms
warning: error: unable to download 'https://cache.nixos.org/nar/1g2gck06i3df69ydmzymxh7lyn3zqy4qwd7k0mfa8ay2p2pj7sn0.nar.xz': HTTP error 200 (curl error: Transferred a partial file); retrying from offset 5313328 in 342 ms
warning: error: unable to download 'https://cache.nixos.org/nar/1gisn6369x31843dvgnk1pzf9idjh3cf65kddkid3mwczz0ql4di.nar.xz': HTTP error 200 (curl error: Transferred a partial file); retrying from offset 6046848 in 327 ms
warning: error: unable to download 'https://cache.nixos.org/nar/1cihnc4m593wanmnqwzn6aca72bvvjgypks3al5a6p76yqk1wl83.nar.xz': HTTP error 200 (curl error: Transferred a partial file); retrying from offset 1103016 in 309 ms
warning: error: unable to download 'https://cache.nixos.org/nar/03366ngpqxm9gynfv4ns63kjrm27mxqn0a3nprrrxk3i67kldpkv.nar.xz': HTTP error 206 (curl error: Transferred a partial file); retrying from offset 43205750 in 1021 ms
warning: error: unable to download 'https://cache.nixos.org/nar/10w6p98dbmkqb9dzzx372q597ph0h5np6s74r95z45m2id103hrc.nar.xz': HTTP error 200 (curl error: Transferred a partial file); retrying from offset 244723 in 352 ms
warning: error: unable to download 'https://cache.nixos.org/nar/0ishsxahmnzwda2qldisznjr22nrpcbgg2v0hvjjfmbrq4dxkdj0.nar.xz': HTTP error 206 (curl error: Transferred a partial file); retrying from offset 28608980 in 548 ms
warning: error: unable to download 'https://cache.nixos.org/nar/1g2gck06i3df69ydmzymxh7lyn3zqy4qwd7k0mfa8ay2p2pj7sn0.nar.xz': HTTP error 206 (curl error: Transferred a partial file); retrying from offset 5547658 in 682 ms
warning: error: unable to download 'https://cache.nixos.org/nar/1gisn6369x31843dvgnk1pzf9idjh3cf65kddkid3mwczz0ql4di.nar.xz': HTTP error 206 (curl error: Transferred a partial file); retrying from offset 6299010 in 612 ms
warning: error: unable to download 'https://cache.nixos.org/nar/1p5kj5zlh8kx9zxzlvyp0kdl1sz23cj23xnavs0s1z2sczrib4dy.nar.xz': HTTP error 206 (curl error: Transferred a partial file); retrying from offset 15142791 in 511 ms
warning: error: unable to download 'https://cache.nixos.org/nar/0lgny0ppdmgaml4p8hmihqd16pb19hhcsz44lgab72f4p4khwbdm.nar.xz': HTTP error 206 (curl error: Transferred a partial file); retrying from offset 42666902 in 2629 ms
warning: error: unable to download 'https://cache.nixos.org/nar/1cihnc4m593wanmnqwzn6aca72bvvjgypks3al5a6p76yqk1wl83.nar.xz': HTTP error 206 (curl error: Transferred a partial file); retrying from offset 1322280 in 521 ms
copying path '/nix/store/wvxmw8scb815rmbjgvhpglj7fwdh4bsa-jpegexiforient-unstable-2002-02-17' from 'https://cache.nixos.org'...
copying path '/nix/store/ymxsxgw9lvjj6jpmrk0psj45sdc8y7cm-json-c-0.16' from 'https://cache.nixos.org'...
copying path '/nix/store/ygb5pbyzs1hjixg2did3fnf2pkqw89wp-kexec-tools-2.0.26' from 'https://cache.nixos.org'...
copying path '/nix/store/qd9b26yi8rcjv1r5z64cq0y1hjhd4lyc-keymap' from 'https://cache.nixos.org'...
copying path '/nix/store/7sxf9gg57xkj9y6j7lw7rgw2pdgk1bm3-kjobwidgets-5.106.0-bin' from 'https://cache.nixos.org'...
copying path '/nix/store/9w3zycp6cb7lziwmj9607ssrl5wxslx4-kmod-30' from 'https://cache.nixos.org'...
copying path '/nix/store/pxsflxy8y1xqy3p7f3rdvzynfnad24cj-kmod-30-lib' from 'https://cache.nixos.org'...
copying path '/nix/store/j12aid9x4rbbb5p7kgr3x3m3sf6qs3yp-kmod-blacklist-28-1ubuntu4' from 'https://cache.nixos.org'...
copying path '/nix/store/f3fsd1k7bx3sml7483i0xpfjxnsvqfk3-kmod-30-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/lbvvh45nnwvrly34czkqpcnq9bwqnnr5-kmod-debian-aliases.conf-22-1.1' from 'https://cache.nixos.org'...
copying path '/nix/store/fm7m0bpai70hgskpm5xkbxqqxqkphffr-kparts-5.106.0-bin' from 'https://cache.nixos.org'...
warning: error: unable to download 'https://cache.nixos.org/nar/1p5kj5zlh8kx9zxzlvyp0kdl1sz23cj23xnavs0s1z2sczrib4dy.nar.xz': HTTP error 206 (curl error: Transferred a partial file); retrying from offset 15727495 in 1318 ms
copying path '/nix/store/8c1rvciqhif7ky0vkz01q392mmbsxqfv-kubernetes-1.27.1-man' from 'https://cache.nixos.org'...
warning: error: unable to download 'https://cache.nixos.org/nar/03366ngpqxm9gynfv4ns63kjrm27mxqn0a3nprrrxk3i67kldpkv.nar.xz': HTTP error 206 (curl error: Transferred a partial file); retrying from offset 44040192 in 2508 ms
warning: error: unable to download 'https://cache.nixos.org/nar/0ishsxahmnzwda2qldisznjr22nrpcbgg2v0hvjjfmbrq4dxkdj0.nar.xz': HTTP error 206 (curl error: Transferred a partial file); retrying from offset 29429440 in 1258 ms
warning: error: unable to download 'https://cache.nixos.org/nar/10w6p98dbmkqb9dzzx372q597ph0h5np6s74r95z45m2id103hrc.nar.xz': HTTP error 206 (curl error: Transferred a partial file); retrying from offset 1064960 in 627 ms
error: unable to download 'https://cache.nixos.org/nar/0lgny0ppdmgaml4p8hmihqd16pb19hhcsz44lgab72f4p4khwbdm.nar.xz': HTTP error 206 (curl error: Transferred a partial file)
copying path '/nix/store/r5vwmsxznry4bl8m2j8r9alw5xrg8yyh-lame-3.100-lib' from 'https://cache.nixos.org'...
error: some substitutes for the outputs of derivation '/nix/store/h8555g3q9wi6isayasdd8dzwfsgkmdxg-pdfsandwich-0.1.7.drv' failed (usually happens due to networking issues); try '--fallback' to build derivation from source
warning: error: unable to download 'https://cache.nixos.org/nar/1gisn6369x31843dvgnk1pzf9idjh3cf65kddkid3mwczz0ql4di.nar.xz': HTTP error 206 (curl error: Transferred a partial file); retrying from offset 7139522 in 1101 ms
warning: error: unable to download 'https://cache.nixos.org/nar/1p5kj5zlh8kx9zxzlvyp0kdl1sz23cj23xnavs0s1z2sczrib4dy.nar.xz': HTTP error 206 (curl error: Transferred a partial file); retrying from offset 15941203 in 2751 ms
warning: error: unable to download 'https://cache.nixos.org/nar/1cihnc4m593wanmnqwzn6aca72bvvjgypks3al5a6p76yqk1wl83.nar.xz': HTTP error 206 (curl error: Transferred a partial file); retrying from offset 2158733 in 1089 ms
warning: error: unable to download 'https://cache.nixos.org/nar/0ishsxahmnzwda2qldisznjr22nrpcbgg2v0hvjjfmbrq4dxkdj0.nar.xz': HTTP error 206 (curl error: Transferred a partial file); retrying from offset 32795970 in 2418 ms
warning: error: unable to download 'https://cache.nixos.org/nar/10w6p98dbmkqb9dzzx372q597ph0h5np6s74r95z45m2id103hrc.nar.xz': HTTP error 206 (curl error: Transferred a partial file); retrying from offset 4645440 in 1133 ms
copying path '/nix/store/f0ixrvbhxnprhg6gfzgybiagy5flihic-lcms2-2.15' from 'https://cache.nixos.org'...
copying path '/nix/store/1xc1hx5279iayglywil4i0vqcsrlydls-libICE-1.0.10' from 'https://cache.nixos.org'...
error: 1 dependencies of derivation '/nix/store/j2nhkiky3nllr2zq0p2glphiv2m9q7lr-system-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/y2baa7ff5ccygqwn15iyqvmhgwk5a187-nixos-system-o-23.05.4448.5550a85a087c.drv' failed to build

These errors tell you that Nix was not able to download pre-built packages from the cache. This might be due to a bad network connection. If you have permanent connection issues with cache.nixos.org you can also try the alternative cache Maintainers:Fastly - NixOS Wiki.

Thanks. Still got errors, albeit a different set of errors, after changing the cache to the one in the link.

By the way, I am a NixOS newbie in China, and can that be the cause of the problem? Improvements to cache.nixos.org (help test the new config!) says:

I would also appreciate any feedback from users who hit the cache from Asia/Australia for example. Previously, these users would normally connect somewhere like Singapore/Hong Kong, which would then later connect all the way to us-east-1 . This would require a very large TCP handshake across the globe, making latency quite bad, especially in the case of many small misses (e.g. for many narinfo files which do not exist, which would effectively be a worst-case.)

I found on warning: unable to download: HTTP error 200 (curl error: Timeout was reached); · Issue #65015 · NixOS/nixpkgs · GitHub

Long story short, in ~/.config/nix/nix.conf I put “stalled-download-timeout = 99999999” (just an arbitrarily large number). I guess you can put this into /etc/nix/nix.conf if you prefer. PROBLEM FIXED!!!

What is the equivalent way to set timeout in /etc/configuration.nix?

For ~/.config/nix/nix.conf you would set nix.settings.stalled-download-timeout = 99999999 in your home-manager configuration.

For /etc/nix/nix.conf you would set nix.settings.stalled-download-timeout = 99999999 in your /etc/nixos/configuration.nix

If you get errors about an missing attribute, you may need to use nix.extraOptions.

Note that by setting these in you configuration, they will only become effective after rebuilding and switching to a new generation.

@wamserma Sorry, I was wondering what the equivalent way to set timeout for NixOS (not for nix)? Is it done in /etc/configuration.nix?

Check out https://github.com/NixOS-CN/NixOS-FAQ/blob/5d64736daa02d9f577a7b6ee993d4f1c22fca379/answers/how-to-mannually-download-file-while-nixos-rebuild.md.

@1sixth Thanks. I followed https://mirrors.ustc.edu.cn/help/nix-channels.html given in the link you gave, and added the channel as my nixos channel

$ sudo nix-channel --add https://mirrors.ustc.edu.cn/nix-channels/nixos-23.05 nixos
$ sudo nix-channel --update

and set to use its cache in my /etc/configuration.nix.

nix.settings.substituters = [ "https://mirrors.ustc.edu.cn/nix-channels/store" ];

Then I ran

$ sudo nixos-rebuild --upgrade boot

It looked good till I got the following errors. I was wondering what they mean? What packages failed to download or build? Maybe I can skip them in /etc/configuration.nix till I finish upgrading NixOS to 23.05.

$ sudo nixos-rebuild --upgrade boot

...

[  0%] Generating ../../DerivedSources/ForwardingHeaders/JavaScriptCore/Scripts/generate-combined-inspector-json.py

[  0%] Generating ../../DerivedSources/ForwardingHeaders/JavaScriptCore/Scripts/generate-js-builtins.py

[  0%] Generating ../../DerivedSources/ForwardingHeaders/JavaScriptCore/Scripts/inline-and-minify-stylesheets-and-scripts.py

[  0%] Generating ../../DerivedSources/ForwardingHeaders/JavaScriptCore/Scripts/jsmin.py

[  0%] Generating ../../DerivedSources/ForwardingHeaders/JavaScriptCore/Scripts/lazywriter.py

[  0%] Generating ../../DerivedSources/ForwardingHeaders/JavaScriptCore/Scripts/make-js-file-arrays.py

[  1%] Generating ../../DerivedSources/ForwardingHeaders/JavaScriptCore/Scripts/wkbuiltins.py

[  1%] Generating ../../DerivedSources/ForwardingHeaders/JavaScriptCore/Scripts/xxd.pl

[  1%] Building C object Source/ThirdParty/brotli/CMakeFiles/brotli.dir/dec/state.c.o

cc1: warning: command-line option '-Wno-class-memaccess' is valid for C++/ObjC++ but not for C

[  1%] Built target stageSharedScripts

[  1%] Building CXX object Source/bmalloc/CMakeFiles/bmalloc.dir/bmalloc/Deallocator.cpp.o

[  1%] Building CXX object Source/bmalloc/CMakeFiles/bmalloc.dir/bmalloc/Environment.cpp.o

[  1%] Building CXX object Source/WebCore/CMakeFiles/ANGLESupport.dir/__/ThirdParty/ANGLE/src/common/debug.cpp.o

[  1%] Building CXX object Source/WebCore/CMakeFiles/ANGLESupport.dir/__/ThirdParty/ANGLE/src/common/event_tracer.cpp.o

02d8:fixme:richedit:editor_handle_message EM_SETMARGINS: stub

[  1%] Built target WebKit2-forwarding-headers

[  1%] Building CXX object Source/WebCore/CMakeFiles/ANGLESupport.dir/__/ThirdParty/ANGLE/src/common/mathutil.cpp.o

[  1%] Building CXX object Source/bmalloc/CMakeFiles/bmalloc.dir/bmalloc/Heap.cpp.o

[  1%] Building CXX object Source/bmalloc/CMakeFiles/bmalloc.dir/bmalloc/Logging.cpp.o

[  2%] Building CXX object Source/bmalloc/CMakeFiles/bmalloc.dir/bmalloc/ObjectType.cpp.o

[  2%] Building CXX object Source/bmalloc/CMakeFiles/bmalloc.dir/bmalloc/StaticMutex.cpp.o

[  2%] Building CXX object Source/bmalloc/CMakeFiles/bmalloc.dir/bmalloc/VMHeap.cpp.o

[  2%] Building CXX object Source/WebCore/CMakeFiles/ANGLESupport.dir/__/ThirdParty/ANGLE/src/common/MemoryBuffer.cpp.o

[  2%] Building CXX object Source/bmalloc/CMakeFiles/bmalloc.dir/bmalloc/XLargeMap.cpp.o

02d8:fixme:ole:get_tymed_from_nonole_cf returning TYMED_NULL for cf 0010

[  2%] Building CXX object Source/bmalloc/CMakeFiles/bmalloc.dir/bmalloc/mbmalloc.cpp.o

[  2%] Linking C static library ../../../lib/libbrotli.a

[  2%] Built target brotli

[  2%] Building CXX object Source/WebCore/CMakeFiles/ANGLESupport.dir/__/ThirdParty/ANGLE/src/common/utilities.cpp.o

[  2%] Building CXX object Source/WebCore/CMakeFiles/ANGLESupport.dir/__/ThirdParty/ANGLE/src/common/tls.cpp.o

[  2%] Building CXX object Source/WebCore/CMakeFiles/ANGLESupport.dir/__/ThirdParty/ANGLE/src/compiler/translator/ArrayReturnValueToOutParameter.cpp.o

[  2%] Building CXX object Source/WebCore/CMakeFiles/ANGLESupport.dir/__/ThirdParty/ANGLE/src/compiler/translator/ASTMetadataHLSL.cpp.o

[  2%] Building CXX object Source/WebCore/CMakeFiles/ANGLESupport.dir/__/ThirdParty/ANGLE/src/compiler/translator/blocklayout.cpp.o

[  2%] Building CXX object Source/WebCore/CMakeFiles/ANGLESupport.dir/__/ThirdParty/ANGLE/src/compiler/translator/blocklayoutHLSL.cpp.o

[  2%] Building CXX object Source/ThirdParty/woff2/CMakeFiles/woff2.dir/src/table_tags.cc.o

[  2%] Building CXX object Source/ThirdParty/woff2/CMakeFiles/woff2.dir/src/variable_length.cc.o

[  2%] Building CXX object Source/ThirdParty/woff2/CMakeFiles/woff2.dir/src/woff2_common.cc.o

[  2%] Linking CXX static library ../../lib/libbmalloc.a

[  2%] Built target bmalloc

[  2%] Generating WorkQueueQt.moc

[  2%] Generating MainThreadQt.moc

[  2%] Generating RunLoopQt.moc

[  2%] Building CXX object Source/ThirdParty/woff2/CMakeFiles/woff2.dir/src/woff2_dec.cc.o

[  2%] Building CXX object Source/WTF/wtf/CMakeFiles/WTF.dir/Assertions.cpp.o

[  2%] Building CXX object Source/ThirdParty/woff2/CMakeFiles/woff2.dir/src/woff2_out.cc.o

[  2%] Building CXX object Source/WebCore/CMakeFiles/ANGLESupport.dir/__/ThirdParty/ANGLE/src/compiler/translator/BuiltInFunctionEmulator.cpp.o

[  2%] Building CXX object Source/WebCore/CMakeFiles/ANGLESupport.dir/__/ThirdParty/ANGLE/src/compiler/translator/BuiltInFunctionEmulatorGLSL.cpp.o

[  2%] Building CXX object Source/WTF/wtf/CMakeFiles/WTF.dir/Atomics.cpp.o

[  2%] Building CXX object Source/WebCore/CMakeFiles/ANGLESupport.dir/__/ThirdParty/ANGLE/src/compiler/translator/BuiltInFunctionEmulatorHLSL.cpp.o

[  2%] Building CXX object Source/WebCore/CMakeFiles/ANGLESupport.dir/__/ThirdParty/ANGLE/src/compiler/translator/CallDAG.cpp.o

[  2%] Building CXX object Source/WTF/wtf/CMakeFiles/WTF.dir/BitVector.cpp.o

[  2%] Building CXX object Source/WebCore/CMakeFiles/ANGLESupport.dir/__/ThirdParty/ANGLE/src/compiler/translator/CodeGen.cpp.o

[  2%] Building CXX object Source/WebCore/CMakeFiles/ANGLESupport.dir/__/ThirdParty/ANGLE/src/compiler/translator/Diagnostics.cpp.o

[  2%] Building CXX object Source/WebCore/CMakeFiles/ANGLESupport.dir/__/ThirdParty/ANGLE/src/compiler/translator/Compiler.cpp.o

[  2%] Building CXX object Source/WTF/wtf/CMakeFiles/WTF.dir/CompilationThread.cpp.o

[  2%] Building CXX object Source/WebCore/CMakeFiles/ANGLESupport.dir/__/ThirdParty/ANGLE/src/compiler/translator/DirectiveHandler.cpp.o

[  2%] Building CXX object Source/WebCore/CMakeFiles/ANGLESupport.dir/__/ThirdParty/ANGLE/src/compiler/translator/EmulatePrecision.cpp.o

[  2%] Building CXX object Source/WebCore/CMakeFiles/ANGLESupport.dir/__/ThirdParty/ANGLE/src/compiler/translator/glslang_lex.cpp.o

[  2%] Building CXX object Source/WTF/wtf/CMakeFiles/WTF.dir/CryptographicUtilities.cpp.o

[  2%] Building CXX object Source/WebCore/CMakeFiles/ANGLESupport.dir/__/ThirdParty/ANGLE/src/compiler/translator/glslang_tab.cpp.o

[  2%] Building CXX object Source/WebCore/CMakeFiles/ANGLESupport.dir/__/ThirdParty/ANGLE/src/compiler/translator/ForLoopUnroll.cpp.o

[  2%] Building CXX object Source/WebCore/CMakeFiles/ANGLESupport.dir/__/ThirdParty/ANGLE/src/compiler/translator/FlagStd140Structs.cpp.o

[  3%] Linking CXX static library ../../../lib/libwoff2.a

[  3%] Built target woff2

[  3%] Building CXX object Source/WebCore/CMakeFiles/ANGLESupport.dir/__/ThirdParty/ANGLE/src/compiler/translator/InfoSink.cpp.o

[  3%] Building CXX object Source/WTF/wtf/CMakeFiles/WTF.dir/CryptographicallyRandomNumber.cpp.o

[  3%] Building CXX object Source/WebCore/CMakeFiles/ANGLESupport.dir/__/ThirdParty/ANGLE/src/compiler/translator/Initialize.cpp.o

[  3%] Building CXX object Source/WTF/wtf/CMakeFiles/WTF.dir/CurrentTime.cpp.o

[  3%] Building CXX object Source/WebCore/CMakeFiles/ANGLESupport.dir/__/ThirdParty/ANGLE/src/compiler/translator/InitializeDll.cpp.o

0     0    0     0    0     0      0      0 --:--:--  0:02:00 --:--:--     0

curl: (56) Failure when receiving data from the peer

error: cannot download source from any mirror

error: builder for '/nix/store/4my1q96n9k44jjxjynybr98vrhjf1ifq-source.drv' failed with exit code 1

error: 1 dependencies of derivation '/nix/store/ffjdz05lsqqsll3nv1hdf8r6abcrqmr2-rarcrack-0.2.drv' failed to build


error: 1 dependencies of derivation '/nix/store/kkak95hjlryvgl8k5x8nyw97jbd2dvc6-system-path.drv' failed to build

error: 1 dependencies of derivation '/nix/store/ylk4w8cjbarxqyrpm1d1irjngpbv3dni-nixos-system-o-23.05.4527.60b9db998f71.drv' failed to build