Errors after calculating deltas

256 views
Skip to first unread message

Ben W

unread,
Apr 2, 2024, 4:52:01 PM4/2/24
to swupdate

Screenshot 2024-04-02 154143.png
I'm seeing these errors after my device finished calculating the deltas. Googling shows that ZSTD_decompressStream failed error might be a file not having been compressed, but I'm not sure what file that would be here as deltas seem to be downloaded from channel_get_file line. I'm also assuming other errors are juts caused by the first one.

Below is just error messages copied and pasted.

[ERROR] : SWUPDATE failed [0] ERROR cpio_utils.c : zstd_step : 416 : ZSTD_decompressStream failed: Unknown frame descriptor
[ERROR] : SWUPDATE failed [0] ERROR delta_handler.c : network_process_data : 182 : copybuffer failed !
[TRACE] : SWUPDATE running :  [channel_log_effective_url] : Channel's effective URL resolved to https://NotVideoOpted.b-cdn.net/output.zck
[DEBUG] : SWUPDATE running :  [channel_get_file] : Channel downloaded 5312163 bytes ~ 5 MiB.
[ERROR] : SWUPDATE failed [0] ERROR delta_handler.c : install_delta : 1077 : Delta Update fails : aborting
[TRACE] : SWUPDATE running :  [zck_log_toswupdate] : (comp_close) Closing compression
[TRACE] : SWUPDATE running :  [zck_log_toswupdate] : (comp_close) Closing compression
[TRACE] : SWUPDATE running :  [install_single_image] : Installer for delta not successful !
[ERROR] : SWUPDATE failed [1] Installation failed !
[TRACE] : SWUPDATE running :  [network_initializer] : Main thread sleep again !
[INFO ] : No SWUPDATE running :  Waiting for requests...
[ERROR] : SWUPDATE failed [0] ERROR install_from_file.c : endupdate : 55 : SWUpdate *failed* !
[TRACE] : SWUPDATE running :  [unlink_sockets] : unlink socket /tmp/swupdateprog
[TRACE] : SWUPDATE running :  [unlink_sockets] : unlink socket /tmp/sockinstctrl

Ben W

unread,
Apr 4, 2024, 8:57:35 AM4/4/24
to swupdate
I noticed that the Total bytes to download (71319254) did not match the Channel downloaded(5212163) and looking at the byte ranges, the last range is 26,477,442 - 2,650,457. This range seems rather odd considering it's a not lower to upper bound and would overlap with most of the other ranges.

Ben W

unread,
Apr 4, 2024, 4:52:18 PM4/4/24
to swupdate
Testing today and got some interesting results. I started off with a fresh install. image is on p1 and p2 is empty. Attempting an update on p2 with reference to p1 fails. (shown below)
Screenshot 2024-04-04 120130.png
Attempting a new update of p2 referencing p3 instead yielded a success, but it seems as though it downloads the whole image instead of getting deltas.(below) You can see it is downloading about 300mb of data which is essentially the full image.
Screenshot 2024-04-04 121912.png
From here I updated P1 with reference of P2 and it was successful as well as using deltas.(below) You can see that the download this time is about 200kb. Screenshot 2024-04-04 130931.png
Below is  a SS of the sw-description file as it is the only thing I changed was the line for device and line for source.
Screenshot 2024-04-04 145416.png
The only difference between the fresh image and the upgrade image is that the upgrade image has jq preinstalled which has an installed size of about 90kb using apt show.

Stefano Babic

unread,
Apr 5, 2024, 12:54:31 AM4/5/24
to Ben W, swupdate
On 04.04.24 14:57, Ben W wrote:
> I noticed that the Total bytes to download (71319254) did not match the
> Channel downloaded(5212163) and looking at the byte ranges, the last
> range is 26,477,442 - 2,650,457. This range seems rather odd considering
> it's a not lower to upper bound and would overlap with most of the other
> ranges.

I do not think the range is wrong, bnut the output is maybe truncated.
The trace her eis very long and shout have hit the maximum size.

Best regards,
Stefano Babic
> --
> You received this message because you are subscribed to the Google
> Groups "swupdate" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to swupdate+u...@googlegroups.com
> <mailto:swupdate+u...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/swupdate/52e3c6a1-7cf2-4dea-94ec-87c202e9caaan%40googlegroups.com <https://groups.google.com/d/msgid/swupdate/52e3c6a1-7cf2-4dea-94ec-87c202e9caaan%40googlegroups.com?utm_medium=email&utm_source=footer>.

Stefano Babic

unread,
Apr 5, 2024, 1:55:22 AM4/5/24
to Ben W, swupdate
Hi Ben,

On 04.04.24 22:52, Ben W wrote:
> Testing today and got some interesting results. I started off with a
> fresh install. image is on p1 and p2 is empty. Attempting an update on
> p2 with reference to p1 fails. (shown below)
> Screenshot 2024-04-04 120130.png

Can you avoid to use screenshot and inline the logs ? They are just text
files, and it is much more simple for review and identify what is going
on - thanks.

A very basic question: a "delta" supposes that is possible to compute
the difference between a "source" and the "destination". It is obvious
that a source, to be reused, requires that it remains unchanged at least
for the time the job is done, that is during the update - from the
beginning of the computation until the update has finished.

If the mounted filesystem is read-only, this is ensured for definition.
If the filesystem is rw, it should be guaranteed and synchronized that
the filesystem is not modified during the update. Like informing
processes to not write into this filesystem. It seems obvious.

The log is reporting a HASH mismatch when a chunk from source is copied.
Now please tell me that you have not a rw filesystem and during the
update you have your application, processes and whatever writing into
this filesystem. If this happens, be happy that this is detected by
SWUpdate, else you just get a corrupted filesystem.

> Attempting a new update of p2 referencing p3 instead yielded a success,
> but it seems as though it downloads the whole image instead of getting
> deltas.(below) You can see it is downloading about 300mb of data which
> is essentially the full image.
> Screenshot 2024-04-04 121912.png

That is wrong. It is just that the source image differs a lot from the
final image. The downloaded bytes are 50MB less than the total size, see
in the log. Delta has worked, differences are huge, more bytes must be
downloaded.

> From here I updated P1 with reference of P2 and it was successful as
> well as using deltas.(below) You can see that the download this time is
> about 200kb. Screenshot 2024-04-04 130931.png

Small difference, small delta.

> Below is  a SS of the sw-description file as it is the only thing I
> changed was the line for device and line for source.
> Screenshot 2024-04-04 145416.png
> The only difference between the fresh image and the upgrade image is
> that the upgrade image has jq preinstalled which has an installed size
> of about 90kb using apt show.

You don't surely mind that this make a substantial difference in the update.

Best regards,
Stefano Babic
> --
> You received this message because you are subscribed to the Google
> Groups "swupdate" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to swupdate+u...@googlegroups.com
> <mailto:swupdate+u...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/swupdate/b31314f1-d097-438c-b831-b51048709525n%40googlegroups.com <https://groups.google.com/d/msgid/swupdate/b31314f1-d097-438c-b831-b51048709525n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Message has been deleted
Message has been deleted
Message has been deleted

Ben W

unread,
Apr 5, 2024, 5:03:43 PM4/5/24
to swupdate
Stefano,

Yes, I'll switch to inline.

I tried to make the mounted system read-only by chmod 440 of /dev/mmcblk1p1 as well as the yocto image_features read_only_rootfs. Was this the correct approach? Both of these still yielded the error message below:

"[zck_log_toswupdate] : (zck_write) Automatically ending chunk

[zck_log_toswupdate] : (finish_chunk) Index 40744 digest 5102ea268ea10698a0e2326e6f3437ecc58ed771bda61130fad63af440140262 digest uncomp 5102ea268ea10698a0e2326e6f3437ecc58ed771bda61130fad63af440140262

[zck_log_toswupdate] : (zck_end_chunk) Finished chunk size: 16399

[zck_log_toswupdate] : (lib_hash_init) Initializing SHA-256 hash

[zck_log_toswupdate] : (lib_hash_init) Initializing SHA-256 hash

[get_total_size] : Total bytes to be reused : 902450554

[get_total_size] : Total bytes to be downloaded : 71417346

[install_delta] : Size of artifact to be installed : 1167294464

[read_settings_file] : Reading config file /etc/swupdate.cfg

[read_module_settings] : No config settings found for module delta

[install_single_image] : Found installer for stream output.zck.header raw

[channel_set_options] : cURL's low download speed timeout is disabled, this is most probably not what you want. Adapted it to 300s instead.

[search_boundary_in_body] : Boundary found in body

[channel_log_effective_url] : Channel's effective URL resolved to https://NotVideoOpted.b-cdn.net/output.zck

[channel_get_file] : Channel downloaded 5312163 bytes ~ 5 MiB.

[read_settings_file] : Reading config file /etc/swupdate.cfg

[read_module_settings] : No config settings found for module delta

[search_boundary_in_body] : Boundary found in body

ERROR delta_handler.c : copy_existing_chunks : 809 : Seeking source file at 3625751309

ERROR cpio_utils.c : __swupdate_copy : 665 : HASH mismatch : aa08ae5991253060be213af11fcb52dd2ab029f09e2cc4fd2173565b3543fecd <--> ad80d09e00575aea968603eda840f6bcbb66b2e62bfb77aa9cee5d653cd780d1

ERROR delta_handler.c : network_process_data : 182 : copybuffer failed !

[channel_log_effective_url] : Channel's effective URL resolved to https://NotVideoOpted.b-cdn.net/output.zck

[channel_get_file] : Channel downloaded 3668733 bytes ~ 3 MiB.

ERROR delta_handler.c : install_delta : 1077 : Delta Update fails : aborting

[zck_log_toswupdate] : (comp_close) Closing compression

[zck_log_toswupdate] : (comp_close) Closing compression

[install_single_image] : Installer for delta not successful !

Installation failed !

[network_initializer] : Main thread sleep again !

Waiting for requests..."




Ben W

unread,
Apr 8, 2024, 3:27:53 PM4/8/24
to swupdate

Rebuilding the image again and remaking the .swu gives the initial error message with decompressStream failed:


"[get_total_size] : Total bytes to be reused : 899805303

[get_total_size] : Total bytes to be downloaded : 71549820

[install_delta] : Size of artifact to be installed : 1163673600

[read_settings_file] : Reading config file /etc/swupdate.cfg

[install_single_image] : Found installer for stream outputro.zck.header raw

[read_module_settings] : No config settings found for module delta

[search_boundary_in_body] : Boundary found in body

ERROR cpio_utils.c : zstd_step : 416 : ZSTD_decompressStream failed: Unknown frame descriptor

ERROR delta_handler.c : network_process_data : 182 : copybuffer failed !

[channel_log_effective_url] : Channel's effective URL resolved to https://NotVideoOpted.b-cdn.net/outputro.zck

[channel_get_file] : Channel downloaded 5260313 bytes ~ 5 MiB.

ERROR delta_handler.c : install_delta : 1077 : Delta Update fails : aborting

[zck_log_toswupdate] : (comp_close) Closing compression

[zck_log_toswupdate] : (comp_close) Closing compression

[install_single_image] : Installer for delta not successful !

Installation failed !"



Message has been deleted

Ben W

unread,
Apr 10, 2024, 3:52:46 PM4/10/24
to swupdate
Running with -l 5 -v,
"[INFO ] : SWUPDATE running :  [get_total_size] : Total bytes to be reused     :    901808968

[INFO ] : SWUPDATE running :  [get_total_size] : Total bytes to be downloaded :     70786035

[INFO ] : SWUPDATE running :  [install_delta] : Size of artifact to be installed : 1163705344
[TRACE] : SWUPDATE running :  [trigger_download] : Range request : 1397474-1739698,1750611-1765752,2609418-2645537,2756638-2839292,2880125-2987059,3019178-3071058,3128791-3169487,3180677-3228862,3261931-3395488,3457226-3472627,3524647-3554443,3636536-3724412,3759365-3807761,3862632-3877142,3954736-3988288,4239504-4270289,4276355-4308797,4388887-4397242,4786208-4794469,4809522-4833464,13504509-13548661,13591206-13613835,13619525-13713226,13799773-13828981,15255972-15261592,15689507-15699446,15709352-15719421,16044761-16049324,16271677-16429590,16675077-16687890,16740836-16782869,17028356-17041169,17094115-17172379,17382824-17445729,17656174-17685078,17929840-17945743,18296804-18319898,18396860-18415694,19186775-19248399,19576607-19618981,19641708-19655078,20006422-20114925,20160409-20193458,20202347-20536407,20545992-20593707,20696358-20733238,20736327-20762062,20780833-20803123,20820792-20847289,20888397-20906544,20925286-20940106,20955035-20981801,21025976-21048126,21075374-21115856,21135360-21166663,21256817-21281842,21298148-21325247,21431781-21499329,21517734-21553226,21563521-21646351,21664274-21691934,21698054-21704640,21743521-21772883,21955895-21994715,22025408-22062167,22132925-22200375,22207728-22229834,22288582-22293762,22305647-22320549,22334414-22345911,22569101-22582404,22589509-22662642,22747193-22776563,22802363-22815280,22855426-22874525,22890624-22898225,22904553-22917885,23060304-23086420,23100633-23108516,23183422-23207464,23330605-23402856,23493412-23552890,23688521-23742299,23746034-23763024,23776826-23808543,23844711-23859833,23867971-23882272,24513479-24537202,24543562-24574607,24630700-24648268,24674818-24693833,24698167-24707679,24777852-24818160,24914766-24937052,24953374-24966273,25231205-25259215,25290756-25309487,25316357-25385922,25395687-25427667,25577704-25604225,25617371-25628824,25640441-25655459,25745976-25786278,25816791-25821140,25828344-25854833,25884516-25902559,25906989-25948512,25959357-25982393,25997670-26070776,26106147-26145158,26152958-26199028,26205354-26350803,26364639-26387769,26402499-2643619
[TRACE] : SWUPDATE running :  [install_single_image] : Found installer for stream outputro.zck.header raw
[DEBUG] : SWUPDATE running :  [read_settings_file] : Reading config file /etc/swupdate.cfg
[DEBUG] : SWUPDATE running :  [read_module_settings] : No config settings found for module delta
[DEBUG] : SWUPDATE running :  [channel_set_options] : cURL's low download speed timeout is disabled, this is most probably not what you want. Adapted it to 300s instead.

[DEBUG] : SWUPDATE running :  [search_boundary_in_body] : Boundary found in body
[TRACE] : SWUPDATE running :  [channel_log_effective_url] : Channel's effective URL resolved to https://NotVideoOpted.b-cdn.net/outputro.zck
[DEBUG] : SWUPDATE running :  [channel_get_file] : Channel downloaded 5255338 bytes ~ 5 MiB.
[TRACE] : SWUPDATE running :  [trigger_download] : Range request : 27608433-27638462,27645189-27689530,27696313-27716578,27726562-27767289,27790025-27813469,27830983-27846286,27903155-27914841,28040126-28078532,28584451-28603117,29139846-29169903,29644218-29665630,29727264-29743344,29785610-29806227,30271989-30283671,30491421-30594161,30623802-30673928,30834150-30871110,31052987-31128848,31695012-31704746,31844669-31869953,32586197-32645208,32669329-32674889,32679198-32697146,32755468-32780320,32896202-32915253,32961316-32967880,33029264-33042152,34308089-34312047,35269978-35300606,36277077-36292962,36426651-36502847,36696530-36727965,36974144-37050336,37329706-37344970,37403416-37414447,37490332-37496156,37516299-37520764,37603367-37610663,37688401-37697706,37757408-37772829,38499948-38553510,39335331-39358559,39410071-39415149,39415392-39415483,39415740-39459681,39614384-39626888,40301345-40335543,40432354-40453129,40513440-40558568,41612720-41627632,42352432-42364865,42561635-42574104,43045563-43051290,43320533-43388006,45602830-45673022,47173758-47185112,50107247-50126224,50935773-50955489,51227585-51246690,52904917-52955758,54278210-54280250,54338919-54354610,54415251-54423718,55500492-55515733,56465660-56478029,56674591-56700099,56808716-56819722,56821561-56829507,56830178-56843792,56903549-56968291,56973209-56984399,57315246-57324295,57638532-57669310,58260288-58339884,58552545-58560594,58613937-58733988,59126729-59133211,59136477-59194658,60490427-60507813,60509819-60538449,60728572-60753072,60802063-60814880,60876047-60894419,60943752-61010083,61013330-61046586,61071907-61119410,61139192-61174398,61206825-61225469,61274655-61289516,61340837-61419976,61477627-61489406,61547399-61559555,61617940-61626438,61686800-61694608,61756813-61768626,61826619-61838776,61897161-61905662,61966602-61974410,62037215-62060235,62108195-62113228,62165960-62186819,62237387-62318156,62376320-62389065,62447705-62460170,62522007-62530122,62588146-62599903,62658143-62663489,62724393-62733577,62794736-62802558,62863717-62930233,62935204-62938056,62998879-630
[DEBUG] : SWUPDATE running :  [read_settings_file] : Reading config file /etc/swupdate.cfg
[DEBUG] : SWUPDATE running :  [read_module_settings] : No config settings found for module delta
[DEBUG] : SWUPDATE running :  [search_boundary_in_body] : Boundary found in body
[ERROR] : SWUPDATE failed [0] ERROR delta_handler.c : copy_existing_chunks : 809 : Seeking source file at 3625766500
[ERROR] : SWUPDATE failed [0] ERROR cpio_utils.c : __swupdate_copy : 665 : HASH mismatch : 2cce5397cb4381bde520f74d62b2fc7285360d2dc2940b4860a1d1d7f8321ede <--> 970c4ad1404249fc814cad196b60c7c60e2435bb605bab24160ac968e175f573
[ERROR] : SWUPDATE failed [0] ERROR delta_handler.c : network_process_data : 182 : copybuffer failed !
[TRACE] : SWUPDATE running :  [channel_log_effective_url] : Channel's effective URL resolved to https://NotVideoOpted.b-cdn.net/outputro.zck
[DEBUG] : SWUPDATE running :  [channel_get_file] : Channel downloaded 3588042 bytes ~ 3 MiB.
[ERROR] : SWUPDATE failed [0] ERROR delta_handler.c : install_delta : 1077 : Delta Update fails : aborting

[TRACE] : SWUPDATE running :  [zck_log_toswupdate] : (comp_close) Closing compression
[TRACE] : SWUPDATE running :  [zck_log_toswupdate] : (comp_close) Closing compression
[TRACE] : SWUPDATE running :  [install_single_image] : Installer for delta not successful !

[ERROR] : SWUPDATE failed [1] Installation failed !
[TRACE] : SWUPDATE running :  [network_initializer] : Main thread sleep again !

[INFO ] : No SWUPDATE running :  Waiting for requests...
[ERROR] : SWUPDATE failed [0] ERROR install_from_file.c : endupdate : 55 : SWUpdate *failed* !
[TRACE] : SWUPDATE running :  [unlink_sockets] : unlink socket /tmp/swupdateprog
[TRACE] : SWUPDATE running :  [unlink_sockets] : unlink socket /tmp/sockinstctrl"

Ben W

unread,
Apr 15, 2024, 8:26:15 AM4/15/24
to swupdate
Stefano,

Any ideas? It just seems to be swapping between the two errors for me.

Stefano Babic

unread,
Apr 15, 2024, 8:32:04 AM4/15/24
to Ben W, swupdate
On 15.04.24 14:10, Ben W wrote:
> Stefano,
>
> Any ideas? It just seems to be swapping between the two errors for me.
>

This is something that should be debugged to check what is going on. I
am afraid that just looking at the log I cannot say more. The error
comes at:
This error is saying that when the chunk is read from the source and
written to destination, the resulting hash does not match the original
one. Reason cannot be simply detected here, it should be analyzed on
your hardware to check. I just suggest to run last SWUpdate from
-master, as there are a couple of fixes related to delta.

Best regards,
Stefano
> --
> You received this message because you are subscribed to the Google
> Groups "swupdate" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to swupdate+u...@googlegroups.com
> <mailto:swupdate+u...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/swupdate/b1ff7fb4-7cbc-4df7-895b-a0555f768034n%40googlegroups.com <https://groups.google.com/d/msgid/swupdate/b1ff7fb4-7cbc-4df7-895b-a0555f768034n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Cal

unread,
Jun 24, 2025, 5:10:48 PMJun 24
to swupdate
Ben, did you ever discover the root cause of your issues? I'm encountering the "Unknown frame descriptor" issue that you saw, but I haven't encountered a hash mismatch yet.
Reply all
Reply to author
Forward
0 new messages