Hi Josef,
I get the same behavior without any state scripts.
$ sudo mender --version
v3.3.0 runtime: go1.19.4
$ sudo mender -l trace install http://artifact-url.mender
DEBU[0000] Reading Mender configuration from file /var/lib/mender/mender.conf
INFO[0000] Loaded configuration file: /var/lib/mender/mender.conf
DEBU[0000] Reading Mender configuration from file /etc/mender/mender.conf
INFO[0000] Loaded configuration file: /etc/mender/mender.conf
DEBU[0000] Loaded 2 configuration file(s)
INFO[0000] 'UpdateControlMapExpirationTimeSeconds' is not set in the Mender configuration file. Falling back to the default of 2*UpdatePollIntervalSeconds
INFO[0000] 'UpdateControlMapBootExpirationTimeSeconds' is not set in the Mender configuration file. Falling back to the default of 600 seconds
DEBU[0000] Loaded configuration = &conf.MenderConfig{MenderConfigFromFile:conf.MenderConfigFromFile{ArtifactVerifyKey:"", HttpsClient:client.HttpsClient{Certificate:"", Key:"", SSLEngine:""}, Security:client.Security{AuthPrivateKey:"", SSLEngine:""}, Connectivity:client.Connectivity{DisableKeepAlive:false, IdleConnTimeoutSeconds:0}, RootfsPartA:"ubi0_0", RootfsPartB:"ubi0_1", BootUtilitiesSetActivePart:"", BootUtilitiesGetNextActivePart:"", DeviceTypeFile:"", DBus:conf.DBusConfig{Enabled:true}, UpdateControlMapExpirationTimeSeconds:0, UpdateControlMapBootExpirationTimeSeconds:0, UpdatePollIntervalSeconds:1800, InventoryPollIntervalSeconds:28800, SkipVerify:false, RetryPollIntervalSeconds:300, RetryPollCount:0, StateScriptTimeoutSeconds:0, StateScriptRetryTimeoutSeconds:0, StateScriptRetryIntervalSeconds:0, ModuleTimeoutSeconds:0, ServerCertificate:"", ServerURL:"https://docker.mender.io", UpdateLogPath:"", TenantToken:"dummy", Servers:[]client.MenderServer(nil)}, ModulesPath:"/usr/share/mender/modules/v3", ModulesWorkPath:"/var/lib/mender/modules/v3", ArtifactInfoFile:"/etc/mender/artifact_info", ArtifactScriptsPath:"/var/lib/mender/scripts", RootfsScriptsPath:"/etc/mender/scripts"}
DEBU[0000] Verified configuration = &conf.MenderConfig{MenderConfigFromFile:conf.MenderConfigFromFile{ArtifactVerifyKey:"", HttpsClient:client.HttpsClient{Certificate:"", Key:"", SSLEngine:""}, Security:client.Security{AuthPrivateKey:"", SSLEngine:""}, Connectivity:client.Connectivity{DisableKeepAlive:false, IdleConnTimeoutSeconds:0}, RootfsPartA:"ubi0_0", RootfsPartB:"ubi0_1", BootUtilitiesSetActivePart:"", BootUtilitiesGetNextActivePart:"", DeviceTypeFile:"/var/lib/mender/device_type", DBus:conf.DBusConfig{Enabled:true}, UpdateControlMapExpirationTimeSeconds:0, UpdateControlMapBootExpirationTimeSeconds:0, UpdatePollIntervalSeconds:1800, InventoryPollIntervalSeconds:28800, SkipVerify:false, RetryPollIntervalSeconds:300, RetryPollCount:0, StateScriptTimeoutSeconds:0, StateScriptRetryTimeoutSeconds:0, StateScriptRetryIntervalSeconds:0, ModuleTimeoutSeconds:0, ServerCertificate:"", ServerURL:"https://docker.mender.io", UpdateLogPath:"", TenantToken:"dummy", Servers:[]client.MenderServer{client.MenderServer{ServerURL:"https://docker.mender.io"}}}, ModulesPath:"/usr/share/mender/modules/v3", ModulesWorkPath:"/var/lib/mender/modules/v3", ArtifactInfoFile:"/etc/mender/artifact_info", ArtifactScriptsPath:"/var/lib/mender/scripts", RootfsScriptsPath:"/etc/mender/scripts"}
DEBU[0000] Tried command "grub-mender-grubenv-print", but it was not found
DEBU[0000] Tried command "systemd-boot-printenv", but it was not found
DEBU[0000] Have U-Boot variable: mender_check_saveenv_canary=1
DEBU[0000] List of U-Boot variables:map[mender_check_saveenv_canary:1]
DEBU[0000] Tried command "grub-mender-grubenv-print", but it was not found
DEBU[0000] Tried command "systemd-boot-printenv", but it was not found
DEBU[0000] Have U-Boot variable: mender_saveenv_canary=1
DEBU[0000] List of U-Boot variables:map[mender_saveenv_canary:1]
DEBU[0000] Tried command "grub-mender-grubenv-print", but it was not found
DEBU[0000] Tried command "systemd-boot-printenv", but it was not found
DEBU[0000] Have U-Boot variable: mender_boot_part=0
DEBU[0000] List of U-Boot variables:map[mender_boot_part:0]
WARN[0000] Could not resolve path link: overlay:user Attempting to continue
DEBU[0000] Setting active partition from configuration and environment: ubi0_0
INFO[0000] Mender running on partition: ubi0_0
DEBU[0000] ModuleTimeoutSeconds not set. Defaulting to 14400 seconds
DEBU[0000] Starting device update.
INFO[0000] Performing remote update from: [http://artifact-url.mender].
DEBU[0000] Client initialized. Start downloading image.
DEBU[0000] Received fetch update response &{200 OK 200 HTTP/1.1 1 1 map[Accept-Ranges:[bytes] Content-Length:[84441600] Date:[Mon, 02 Dec 2024 14:58:13 GMT] Etag:["5087a00-6284ac37e6a68"] Last-Modified:[Mon, 02 Dec 2024 14:57:12 GMT] Server:[Apache/2.4.58 (Unix)]] 0x100f740 84441600 [] false false map[] 0x1098680 <nil>}+
DEBU[0000] Image downloaded: 84441600 [&{0x100f740 0x1146220 0x1098600 0 84441600 0 0}] [<nil>]
Installing Artifact of size 84441600...
DEBU[0000] Reading data from the device manifest file: /var/lib/mender/device_type
DEBU[0000] device_type=l1
DEBU[0000] Current manifest data: l1
DEBU[0000] statescript: The timeout for executing scripts is not defined; using default of 1h0m0s seconds
INFO[0000] No public key was provided for authenticating the artifact
INFO[0000] Update Module path "/usr/share/mender/modules/v3" could not be opened (open /usr/share/mender/modules/v3: no such file or directory). Update modules will not be available
DEBU[0000] Checking if device [l1] is on compatible device list: [l1]
DEBU[0000] Installer: Successfully read artifact [name: artifact-name; version: 3; compatible devices: [l1]]
WARN[0000] Returning artifact name from /etc/mender/artifact_info file. This is a fallback, in case the information can not be retrieved from the database, and is only expected when an update has never been installed before.
DEBU[0000] Reading data from the device manifest file: /etc/mender/artifact_info
DEBU[0000] artifact_name=artifact-name
DEBU[0000] Current manifest data: artifact-name
DEBU[0000] Active partition: ubi0_0
DEBU[0000] Detected inactive partition ubi0_1, based on active partition ubi0_0
INFO[0000] Opening device "ubi0_1" for writing
DEBU[0000] Installing update of size: 105771008
DEBU[0000] Device: ubi0_1 is a ubi device: true
INFO[0000] Native sector size of block device /dev/ubi0_1 is 126976 bytes. Mender will write in chunks of 2031616 bytes
DEBU[0000] Opening device: /dev/ubi0_1 for writing with flag: 1
.............................................................. - 100 %
INFO[0082] All bytes were successfully written to the new partition
INFO[0082] Wrote 105771008/105771008 bytes to the inactive partition
DEBU[0082] statescript: The timeout for executing scripts is not defined; using default of 1h0m0s seconds
DEBU[0082] statescript: The timeout for executing scripts is not defined; using default of 1h0m0s seconds
DEBU[0082] Inactive partition: ubi0_1
INFO[0082] Enabling partition with new image installed to be a boot candidate: 1
DEBU[0082] Tried command "grub-mender-grubenv-print", but it was not found
DEBU[0082] Tried command "systemd-boot-printenv", but it was not found
DEBU[0082] Have U-Boot variable: mender_check_saveenv_canary=1
DEBU[0082] List of U-Boot variables:map[mender_check_saveenv_canary:1]
DEBU[0082] Tried command "grub-mender-grubenv-print", but it was not found
DEBU[0082] Tried command "systemd-boot-printenv", but it was not found
DEBU[0082] Have U-Boot variable: mender_saveenv_canary=1
DEBU[0082] List of U-Boot variables:map[mender_saveenv_canary:1]
DEBU[0082] Probing the Bootloader environment for which separator to use
DEBU[0082] Writing map[mender_uboot_separator:1] to the U-Boot environment, using separator:
DEBU[0082] Tried command "grub-mender-grubenv-set", but it was not found
DEBU[0082] Tried command "systemd-boot-setenv", but it was not found
DEBU[0082] Tried command "grub-mender-grubenv-print", but it was not found
DEBU[0082] Tried command "systemd-boot-printenv", but it was not found
DEBU[0082] Have U-Boot variable: mender_check_saveenv_canary=1
DEBU[0082] List of U-Boot variables:map[mender_check_saveenv_canary:1]
DEBU[0082] Tried command "grub-mender-grubenv-print", but it was not found
DEBU[0082] Tried command "systemd-boot-printenv", but it was not found
DEBU[0083] Have U-Boot variable: mender_saveenv_canary=1
DEBU[0083] List of U-Boot variables:map[mender_saveenv_canary:1]
DEBU[0083] Tried command "grub-mender-grubenv-print", but it was not found
DEBU[0083] Tried command "systemd-boot-printenv", but it was not found
DEBU[0083] Have U-Boot variable: mender_uboot_separator=
DEBU[0083] List of U-Boot variables:map[mender_uboot_separator:]
DEBU[0083] Using (=) as the bootloader environment separator
DEBU[0083] Writing map[bootcount:0 mender_boot_part:1 mender_boot_part_hex:1 upgrade_available:1] to the U-Boot environment, using separator: =
DEBU[0083] Tried command "grub-mender-grubenv-set", but it was not found
DEBU[0083] Tried command "systemd-boot-setenv", but it was not found
DEBU[0083] Marking inactive partition as a boot candidate successful.
DEBU[0083] statescript: The timeout for executing scripts is not defined; using default of 1h0m0s seconds
Use 'commit' to update, or 'rollback' to roll back the update.
At least one payload requested a reboot of the device it updated.
>>> REBOOT <<<
sudo mender-update -l trace commit
record_id=1 severity=trace time="2024-Dec-02 15:11:13.777833" name="Global" msg="Entering state N6mender6update10standalone13JustSaveStateE"
record_id=2 severity=trace time="2024-Dec-02 15:11:13.792937" name="Global" msg="Entering state N6mender6update10standalone17ScriptRunnerStateE"
record_id=3 severity=trace time="2024-Dec-02 15:11:13.812646" name="Global" msg="Entering state N6mender6update10standalone21ArtifactRollbackStateE"
record_id=4 severity=trace time="2024-Dec-02 15:11:15.138724" name="Global" msg="Entering state N6mender6update10standalone17ScriptRunnerStateE"
record_id=5 severity=trace time="2024-Dec-02 15:11:15.149508" name="Global" msg="Entering state N6mender6update10standalone13JustSaveStateE"
record_id=6 severity=trace time="2024-Dec-02 15:11:15.156323" name="Global" msg="Entering state N6mender6update10standalone17ScriptRunnerStateE"
record_id=7 severity=trace time="2024-Dec-02 15:11:15.165562" name="Global" msg="Entering state N6mender6update10standalone20ArtifactFailureStateE"
record_id=8 severity=trace time="2024-Dec-02 15:11:15.217239" name="Global" msg="Entering state N6mender6update10standalone17ScriptRunnerStateE"
record_id=9 severity=trace time="2024-Dec-02 15:11:15.225529" name="Global" msg="Entering state N6mender6update10standalone13JustSaveStateE"
record_id=10 severity=trace time="2024-Dec-02 15:11:15.233478" name="Global" msg="Entering state N6mender6update10standalone12CleanupStateE"
record_id=11 severity=trace time="2024-Dec-02 15:11:15.291560" name="Global" msg="Entering state N6mender6update10standalone9ExitStateE"
Rolled back.
My hypothesis is that there is some kind of bug here. Either it doesn’t detect correctly the state, either there is a missing error message indicating why it fails to commit.
How is the state determined ? Is it related to the storage? If it is, are there any tools to inspect the storage (lmdb) to compare the results of an install from 3.3 and 5.0 ?