mail archive of the rauc mailing list
 help / color / mirror / Atom feed
* [RAUC] Caught an error while installing bundle
@ 2017-02-28 12:27 caglar.kilimci
  2017-02-28 13:47 ` Enrico Joerns
  0 siblings, 1 reply; 5+ messages in thread
From: caglar.kilimci @ 2017-02-28 12:27 UTC (permalink / raw)
  To: rauc

Hi all,

First of all thank you such an amazing product. I am really happy to found it.

I have been working on an embedded device which has barebox bootloader and would like to update via RAUC. I have successfully build rauc with meta-ptx layer and I can run rauc on device. In addition, I have created RAUC bundle in my development environment and copied into the device. Even if everything seems fine, I got below error when I would like to install bundle:
# rauc install update-2017.02-1.raucb

** (rauc:525): WARNING **: installer is NULL


(rauc:525): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(rauc:525): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

** (rauc:525): ERROR **: failed to connect properties-changed signal caught at main
Trace/breakpoint trap


I made small change to debug some but I could not go further:
diff --git a/src/main.c b/src/main.c
index 6444c49..801bb8c 100644
--- a/src/main.c
+++ b/src/main.c
@@ -137,9 +137,14 @@ static gboolean install_start(int argc, char **argv)
                installer = r_installer_proxy_new_for_bus_sync(G_BUS_TYPE_SYSTEM,
                        G_DBUS_PROXY_FLAGS_GET_INVALIDATED_PROPERTIES,
                        "de.pengutronix.rauc", "/", NULL, NULL);
+               if (NULL != installer) {
+                       g_print("installer is OK\n");
+               } else {
+                       g_warning("installer is NULL\n");
+               }
                if (g_signal_connect(installer, "g-properties-changed",
                                     G_CALLBACK(on_installer_changed), args) <= 0) {
-                       g_error("failed to connect properties-changed signal");
+                       g_error("failed to connect properties-changed signal caught at main");
                        goto out_loop;
                }
                if (g_signal_connect(installer, "completed",
diff --git a/test/service.c b/test/service.c
index 80fb229..c3808dc 100644
--- a/test/service.c
+++ b/test/service.c
@@ -51,7 +51,7 @@ static void service_test_status(ServiceFixture *fixture, gconstpointer user_data
                "de.pengutronix.rauc", "/", NULL, NULL);
        if (g_signal_connect(installer, "g-properties-changed",
                             G_CALLBACK(on_installer_changed), NULL) <= 0) {
-               g_error("failed to connect properties-changed signal");
+               g_error("failed to connect properties-changed signal caught at test service");
                goto out;
        }
        if (g_signal_connect(installer, "completed",


Here is my system.conf:
[system]
compatible=mydevice
bootloader=barebox
mountprefix=/mnt/rauc

[keyring]
path=/etc/rauc/openssl-ca/dev-ca.pem

[slot.rootfs.0]
device=/dev/mmcblk0p2
type=ext4
bootname=A

[slot.rootfs.1]
device=/dev/mmcblk0p3
type=ext4
bootname=B


Here is my manifest file:
[update]
compatible= mydevice
version=2017.02-1

[image.rootfs]
sha256=265c87e5784fb1ae93fd825f78e6aca0ecd454039019a27e038699d2af311b75
size=935329792
filename=rootfs.ext4


So, what am I missing? Thank you for your help.

Sincerely,
Caglar

________________________________

This message is for the designated recipient only and may contain privileged, proprietary, or otherwise confidential information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the e-mail by you is prohibited. Where allowed by local law, electronic communications with Accenture and its affiliates, including e-mail and instant messaging (including content), may be scanned by our systems for the purposes of information security and assessment of internal compliance with Accenture policy.
______________________________________________________________________________________

www.accenture.com

_______________________________________________
RAUC mailing list

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RAUC] Caught an error while installing bundle
  2017-02-28 12:27 [RAUC] Caught an error while installing bundle caglar.kilimci
@ 2017-02-28 13:47 ` Enrico Joerns
  2017-02-28 14:24   ` caglar.kilimci
  0 siblings, 1 reply; 5+ messages in thread
From: Enrico Joerns @ 2017-02-28 13:47 UTC (permalink / raw)
  To: caglar.kilimci; +Cc: rauc

Hi Caglar,

On 02/28/2017 01:27 PM, caglar.kilimci@accenture.com wrote:
> Hi all,
>
> First of all thank you such an amazing product. I am really happy to found it.

thank you, too. I hope it will help you solving the update challenges of 
your device.

> I have been working on an embedded device which has barebox bootloader and would like to update via RAUC. I have successfully build rauc with meta-ptx layer and I can run rauc on device. In addition, I have created RAUC bundle in my development environment and copied into the device. Even if everything seems fine, I got below error when I would like to install bundle:
> # rauc install update-2017.02-1.raucb
>
> ** (rauc:525): WARNING **: installer is NULL
>
>
> (rauc:525): GLib-GObject-WARNING **: invalid (NULL) pointer instance
>
> (rauc:525): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
>
> ** (rauc:525): ERROR **: failed to connect properties-changed signal caught at main
> Trace/breakpoint trap

we have added some more debugging output and handling to this part since 
the last update that has been placed in meta-ptx (note that RAUC support 
will be continued in the specialized meta-rauc layer).

Maybe its worth updating to the 0.1 release version of RAUC in your 
rauc_%.bbappend file as an initial step. For reference, its sha is

SRCREV = "bce6dcefa01812653fb5b6e087db0c20d930adbe"


Could you test it with this one again and paste the output?

Could you also verify that the d-bus configuration file 
`de.pengutronix.rauc.conf` was installed properly on your target?

> Here is my system.conf:
> [system]
> compatible=mydevice
> bootloader=barebox
> mountprefix=/mnt/rauc
>
> [keyring]
> path=/etc/rauc/openssl-ca/dev-ca.pem
>
> [slot.rootfs.0]
> device=/dev/mmcblk0p2
> type=ext4
> bootname=A
>
> [slot.rootfs.1]
> device=/dev/mmcblk0p3
> type=ext4
> bootname=B
>
>
> Here is my manifest file:
> [update]
> compatible= mydevice
> version=2017.02-1
>
> [image.rootfs]
> sha256=265c87e5784fb1ae93fd825f78e6aca0ecd454039019a27e038699d2af311b75
> size=935329792
> filename=rootfs.ext4

These look ok to me.


Best regards

Enrico

-- 
Pengutronix e.K.                           | Enrico Jörns                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-5080 |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |


_______________________________________________
RAUC mailing list

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RAUC] Caught an error while installing bundle
  2017-02-28 13:47 ` Enrico Joerns
@ 2017-02-28 14:24   ` caglar.kilimci
  2017-02-28 14:59     ` Enrico Joerns
  0 siblings, 1 reply; 5+ messages in thread
From: caglar.kilimci @ 2017-02-28 14:24 UTC (permalink / raw)
  To: ejo; +Cc: rauc

Hi Enrico,

> -----Original Message-----
> From: Enrico Joerns [mailto:ejo@pengutronix.de]
> Sent: Tuesday, February 28, 2017 4:47 PM
> To: Kilimci, Caglar <caglar.kilimci@accenture.com>
> Cc: rauc@pengutronix.de
> Subject: Re: [RAUC] Caught an error while installing bundle
>
> Hi Caglar,
>
> On 02/28/2017 01:27 PM, caglar.kilimci@accenture.com wrote:
> > Hi all,
> >
> > First of all thank you such an amazing product. I am really happy to found it.
>
> thank you, too. I hope it will help you solving the update challenges of your device.
>
> > I have been working on an embedded device which has barebox bootloader and would like to update via RAUC. I have successfully build rauc with meta-ptx layer and I can run rauc on device. In addition, I have created RAUC bundle in my development environment and copied into the device. Even if everything seems fine, I got below error when I would like to install bundle:
> > # rauc install update-2017.02-1.raucb
> >
> > ** (rauc:525): WARNING **: installer is NULL
> >
> >
> > (rauc:525): GLib-GObject-WARNING **: invalid (NULL) pointer instance
> >
> > (rauc:525): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion
> > 'G_TYPE_CHECK_INSTANCE (instance)' failed
> >
> > ** (rauc:525): ERROR **: failed to connect properties-changed signal
> > caught at main Trace/breakpoint trap

> we have added some more debugging output and handling to this part since the last update that has been placed in meta-ptx (note that RAUC support will be continued in the specialized meta-rauc layer).

> Maybe its worth updating to the 0.1 release version of RAUC in your rauc_%.bbappend file as an initial step. For reference, its sha is

> SRCREV = "bce6dcefa01812653fb5b6e087db0c20d930adbe"
>

> Could you test it with this one again and paste the output?

I tested and still receive error. Output is:
# rauc install update-2017.02-1.raucb
Error creating proxy: Error calling StartServiceByName for de.pengutronix.rauc: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Launch helper exited with unknown return code 1
D-Bus error while installing `/home/root/update-2017.02-1.raucb`


> Could you also verify that the d-bus configuration file `de.pengutronix.rauc.conf` was installed properly on your target?

Sure, it is installed into the device.

# find / -name de.pengutronix.rauc.conf
/usr/share/dbus-1/system.d/de.pengutronix.rauc.conf

Sincerely,
Caglar


________________________________

This message is for the designated recipient only and may contain privileged, proprietary, or otherwise confidential information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the e-mail by you is prohibited. Where allowed by local law, electronic communications with Accenture and its affiliates, including e-mail and instant messaging (including content), may be scanned by our systems for the purposes of information security and assessment of internal compliance with Accenture policy.
______________________________________________________________________________________

www.accenture.com
_______________________________________________
RAUC mailing list

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RAUC] Caught an error while installing bundle
  2017-02-28 14:24   ` caglar.kilimci
@ 2017-02-28 14:59     ` Enrico Joerns
  2017-02-28 15:44       ` caglar.kilimci
  0 siblings, 1 reply; 5+ messages in thread
From: Enrico Joerns @ 2017-02-28 14:59 UTC (permalink / raw)
  To: caglar.kilimci; +Cc: rauc

Hi Caglar,

On 02/28/2017 03:24 PM, caglar.kilimci@accenture.com wrote:
> I tested and still receive error. Output is:
> # rauc install update-2017.02-1.raucb
> Error creating proxy: Error calling StartServiceByName for de.pengutronix.rauc: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Launch helper exited with unknown return code 1
> D-Bus error while installing `/home/root/update-2017.02-1.raucb`

ok, the issue you encounter is that the RAUC service is not running on 
your system and that the RAUC client, i.e. your command line tool, does 
not correctly start it via dbus activation.

The bug that causes this issue is located in the D-Bus service file 
`de.pengutronix.rauc.service` and shows that we haven't used non-systemd 
systems for a long time...
Am I right in assuming you are using a non-systemd-based system?

The reason why activation is not working for the non-systemd case is 
that the `Exec` argument in the dbus service file lacks the required 
`service` argument for RAUC in order to be started properly as the 
background service. Thus the fix is:

--- a/data/de.pengutronix.rauc.service.in
+++ b/data/de.pengutronix.rauc.service.in
@@ -1,5 +1,5 @@
  [D-BUS Service]
  Name=de.pengutronix.rauc
-Exec=@bindir@/rauc
+Exec=@bindir@/rauc service
  User=root
  SystemdService=rauc.service


Many thanks for revealing this issue! I've created a PullRequest on 
GitHub for this:

https://github.com/rauc/rauc/pull/104


Does this solve your problems?


Best regards

Enrico

-- 
Pengutronix e.K.                           | Enrico Jörns                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-5080 |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |


_______________________________________________
RAUC mailing list

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RAUC] Caught an error while installing bundle
  2017-02-28 14:59     ` Enrico Joerns
@ 2017-02-28 15:44       ` caglar.kilimci
  0 siblings, 0 replies; 5+ messages in thread
From: caglar.kilimci @ 2017-02-28 15:44 UTC (permalink / raw)
  To: ejo; +Cc: rauc

Hi Enrico,

> ok, the issue you encounter is that the RAUC service is not running on your system and that the RAUC client, i.e. your command line tool, does not correctly start it via dbus activation.

Thanks a lot. The main reason is this.

> The bug that causes this issue is located in the D-Bus service file `de.pengutronix.rauc.service` and shows that we haven't used non-systemd systems for a long time...
> Am I right in assuming you are using a non-systemd-based system?

Actually no. My system has systemd but neither `service` nor systemctl command is installed on device for now so nobody can start rauc service.

> The reason why activation is not working for the non-systemd case is that the `Exec` argument in the dbus service file lacks the required `service` argument for RAUC in order to be started properly as the background service. Thus the fix is:
>
> --- a/data/de.pengutronix.rauc.service.in
> +++ b/data/de.pengutronix.rauc.service.in
> @@ -1,5 +1,5 @@
>   [D-BUS Service]
>   Name=de.pengutronix.rauc
> -Exec=@bindir@/rauc
> +Exec=@bindir@/rauc service
>   User=root
>   SystemdService=rauc.service
>
>
> Many thanks for revealing this issue! I've created a PullRequest on GitHub for this:
>
> https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_rauc_rauc_pull_104&d=DwIDaQ&c=eIGjsITfXP_y-DLLX0uEHXJvU8nOHrUK8IrwNKOtkVU&r=upIHLD0Klq6JestBglGOFqnMsu-XuSQmo8ZR72YSuzk&m=v4oRMKmKBbRnJingbFfHqrZCP9xRWoNgl6wzXt1RvCU&s=7cXYEm7-KjhvkFb3cDUseFUViDWGKdkZgNgaFKh_gCs&e=
>

You are welcome. I am happy to help.

> Does this solve your problems?

This patch does not work for me but at least I understand where is the problem. Thank you very much.

Sincerely,
Caglar

________________________________

This message is for the designated recipient only and may contain privileged, proprietary, or otherwise confidential information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the e-mail by you is prohibited. Where allowed by local law, electronic communications with Accenture and its affiliates, including e-mail and instant messaging (including content), may be scanned by our systems for the purposes of information security and assessment of internal compliance with Accenture policy.
______________________________________________________________________________________

www.accenture.com
_______________________________________________
RAUC mailing list

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-02-28 15:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-28 12:27 [RAUC] Caught an error while installing bundle caglar.kilimci
2017-02-28 13:47 ` Enrico Joerns
2017-02-28 14:24   ` caglar.kilimci
2017-02-28 14:59     ` Enrico Joerns
2017-02-28 15:44       ` caglar.kilimci

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox