Skip to content

Failed logs are seen when we do a system update using apertis hawkbit agent on Bosch IOT

Affected images versions

  • not relevant (explain why)
  • see the table below (list the build id and the apt or ostree variant of the tested images in the appropriate cells)
Type Arch v2021 v2022 v2023dev3
minimal/fixedfunction amd64
minimal/fixedfunction armhf v2021.0(Ostree)
minimal/fixedfunction arm64
target/hmi amd64
target/hmi armhf
target/hmi arm64
basesdk amd64
sdk amd64
nfs amd64
nfs armhf
nfs arm64
lxc amd64
lxc armhf
lxc arm64
image-builder
package-source-builder
                 |

To find the build id and the variant type you can:

  • derive it from the image name
    • for instance, with the apertis_ostree_v2022dev0-minimal-amd64-uefi_20201031.0425.img.gz image the build id is 20201031.0425 the variant type is ostree
  • obtain it from /etc/os-release using the BUILD_ID and VARIANT_ID keys

Unaffected images versions

Testcase

n/a

Steps to reproduce

Flash an imx6q_sabrelite with: apertis_ostree_v2021-minimal-armhf-uboot_v2021.0.img.gz Configure the target in Bosch-Iot-rollouts https://console.eu1.bosch-iot-rollouts.com/UI/#!deployment Add the delta file to the Software module of Distributions : apertis_ostree_v2021-minimal-armhf-uboot_v2021.0.delta Configure the hawkbit agent on the Target: /etc/apertis-hawkbit-agent.ini

Expected result

System update should be successful and no assertion errors should be seen

Actual result

g_output_stream_close: assertion 'G_IS_OUTPUT_STREAM (stream)' failed logs are seen when we do a system update using apertis hawkbit agent on Bosch IOT

$ journalctl -f &
$ -- Logs begin at Thu 2021-04-08 06:25:13 UTC. --
Apr 08 06:54:58 apertis sudo[619]:     user : TTY=ttymxc1 ; PWD=/home/user ; USER=root ; COMMAND=/usr/bin/systemctl restart apertis-hawkbit-agent
Apr 08 06:54:58 apertis sudo[619]: pam_unix(sudo:session): session opened for user root by user(uid=0)
Apr 08 06:54:59 apertis systemd[1]: Stopping Apertis hawkBit agent...
Apr 08 06:54:59 apertis systemd[1]: apertis-hawkbit-agent.service: Main process exited, code=killed, status=15/TERM
Apr 08 06:54:59 apertis systemd[1]: apertis-hawkbit-agent.service: Succeeded.
Apr 08 06:54:59 apertis systemd[1]: Stopped Apertis hawkBit agent.
Apr 08 06:54:59 apertis systemd[1]: Started Apertis hawkBit agent.
Apr 08 06:54:59 apertis sudo[619]: pam_unix(sudo:session): session closed for user root
Apr 08 06:55:09 apertis apertis-hawkbit[622]: Retrieving base update info
Apr 08 06:55:10 apertis apertis-hawkbit[622]: Changing poll timeout to 300 seconds
Apr 08 07:00:10 apertis apertis-hawkbit[622]: Retrieving base update info
Apr 08 07:00:10 apertis apertis-hawkbit[622]: Retrieving base update info
Apr 08 07:00:10 apertis apertis-hawkbit[622]: Retrieving base update info
Apr 08 07:00:10 apertis apertis-hawkbit[622]: Retrieving base update info
Apr 08 07:00:12 apertis apertis-hawkbit[622]: Downloading /tmp/apertis_ostree_v2021-minimal-armhf-uboot_v2021.0.delta
Apr 08 07:00:12 apertis apertis-hawkbit[622]: Downloading /tmp/apertis_ostree_v2021-minimal-armhf-uboot_v2021.0.delta
Apr 08 07:00:12 apertis apertis-hawkbit[622]: Downloading /tmp/apertis_ostree_v2021-minimal-armhf-uboot_v2021.0.delta
Apr 08 07:00:12 apertis apertis-hawkbit[622]: Downloading /tmp/apertis_ostree_v2021-minimal-armhf-uboot_v2021.0.delta
Apr 08 07:00:59 apertis apertis-hawkbit[622]: g_output_stream_close: assertion 'G_IS_OUTPUT_STREAM (stream)' failed
Apr 08 07:00:59 apertis apertis-hawkbit[622]: invalid unclassed pointer in cast to 'GLocalFileOutputStream'
Apr 08 07:00:59 apertis apertis-hawkbit[622]: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
Apr 08 07:00:59 apertis apertis-hawkbit[622]: g_output_stream_close: assertion 'G_IS_OUTPUT_STREAM (stream)' failed
Apr 08 07:00:59 apertis apertis-hawkbit[622]: g_output_stream_close: assertion 'G_IS_OUTPUT_STREAM (stream)' failed
Apr 08 07:00:59 apertis apertis-hawkbit[622]: invalid unclassed pointer in cast to 'GLocalFileOutputStream'
Apr 08 07:00:59 apertis apertis-hawkbit[622]: invalid unclassed pointer in cast to 'GLocalFileOutputStream'
Apr 08 07:00:59 apertis apertis-hawkbit[622]: g_output_stream_close: assertion 'G_IS_OUTPUT_STREAM (stream)' failed
Apr 08 07:00:59 apertis apertis-hawkbit[622]: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
Apr 08 07:00:59 apertis apertis-hawkbit[622]: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
Apr 08 07:00:59 apertis apertis-hawkbit[622]: invalid unclassed pointer in cast to 'GLocalFileOutputStream'
Apr 08 07:00:59 apertis apertis-hawkbit[622]: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
Apr 08 07:01:00 apertis apertis-update-[392]: Ostree static delta starting
Apr 08 07:01:00 apertis apertis-update-[392]: Ostree static delta starting
Apr 08 07:01:00 apertis apertis-update-[392]: Ostree static delta starting
Apr 08 07:01:00 apertis apertis-update-[392]: Ostree static delta starting
Apr 08 07:01:00 apertis apertis-update-[392]: Metadata read from commit '255da637eea1cc13e11bdfd2a9aa9c397b2da4150f6548bdc38dc66c2fb223bf': {'ostree.ref-binding': <['apertis/v2020/armhf-ubo}
Apr 08 07:01:00 apertis apertis-update-[392]: Metadata read from commit '255da637eea1cc13e11bdfd2a9aa9c397b2da4150f6548bdc38dc66c2fb223bf': {'ostree.ref-binding': <['apertis/v2020/armhf-ubo}
Apr 08 07:01:00 apertis apertis-update-[392]: Metadata read from commit '255da637eea1cc13e11bdfd2a9aa9c397b2da4150f6548bdc38dc66c2fb223bf': {'ostree.ref-binding': <['apertis/v2020/armhf-ubo}
Apr 08 07:01:00 apertis apertis-update-[392]: Metadata read from commit '255da637eea1cc13e11bdfd2a9aa9c397b2da4150f6548bdc38dc66c2fb223bf': {'ostree.ref-binding': <['apertis/v2020/armhf-ubo}
Apr 08 07:01:07 apertis apertis-update-[392]: Ostree already up to date
Apr 08 07:01:07 apertis apertis-update-[392]: Ostree already up to date
Apr 08 07:01:07 apertis apertis-update-[392]: Ostree already up to date
Apr 08 07:01:07 apertis apertis-update-[392]: Ostree already up to date

Reproducibility

How often the issue is hit when repeating the test and changing nothing (same device, same image, etc.)?

Put the in the most appropriate entry:

  1. always

Impact of bug

Low.

Despite the assertion being printed out, the update is applied correctly.

We're also in discussions with other Bosch teams about their plans for integrating Apertis and hawkBit, which may lead to adopting the team-provided agents instead of the current proof-of-concept agent.

Root cause

tbd

Outcomes

TBD

Management data

This section is for management only, it should be the last one in the description.

Phabricator link: https://phabricator.apertis.org/T7836

Edited by Walter Lozano