On Sat, 14.02.15 19:37, Olivier Brunel (j...@jjacky.com) wrote:

Heya!

Sorry for responding so late again, but I think we can close this now:

> #0  bus_message_enter_struct (m=0x7f5fb0cb88b0, c=0x7f5fb0cb8250,
>     contents=0x7f5faef0d152 "bba{ss}", item_size=0x7fffcebd48e8,
> offsets=0x7fffcebd48d8,
>     n_offsets=0x7fffcebd48e0) at src/libsystemd/sd-bus/bus-message.c:3865
> #1  0x00007f5faee80136 in sd_bus_message_enter_container
> (m=0x7f5fb0cb88b0, type=114 'r',
>     contents=0x7f5faef0d152 "bba{ss}") at
> src/libsystemd/sd-bus/bus-message.c:4012
> #2  0x00007f5faee8e00d in bus_verify_polkit_async (call=0x7f5fb0ca59a0,
> capability=21,
>     action=0x7f5faeef05f8 "org.freedesktop.systemd1.manage-units",
> interactive=false,
>     registry=0x7f5fb0c0a890, error=0x7fffcebd4ad0) at
> src/libsystemd/sd-bus/bus-util.c:374
> #3  0x00007f5faee0aa00 in bus_verify_manage_unit_async
> (m=0x7f5fb0c0a460, call=0x7f5fb0ca59a0,
>     error=0x7fffcebd4ad0) at src/core/dbus.c:1196
> #4  0x00007f5faee12feb in bus_unit_method_reset_failed (bus=0x7f5fb0ca32f0,
>     message=0x7f5fb0ca59a0, userdata=0x7f5fb0cc7ff0, error=0x7fffcebd4ad0)
>     at src/core/dbus-unit.c:496
> #5  0x00007f5faee0c8aa in method_reset_failed_unit (bus=0x7f5fb0ca32f0,
> message=0x7f5fb0ca59a0,
>     userdata=0x7f5fb0c0a460, error=0x7fffcebd4ad0) at
> src/core/dbus-manager.c:588
> 
> (gdb) p *c
> $40 = {enclosing = 114 'r', need_offsets = true, index = 2, saved_index
> = 2,
>   signature = 0x7f5fb0ca3ec0 "bba{ss}", before = 0, begin = 0, end =
> 133, array_size = 0x0,
>   offsets = 0x0, n_offsets = 0, offsets_allocated = 8391685410159683651,
> offset_index = 0,
>   item_size = 0, peeked_signature = 0x0}
> (gdb) p contents
> $41 = 0x7f5faef0d152 "bba{ss}"
> 
> And this will fail on:
> if (c->signature[c->index] != SD_BUS_TYPE_STRUCT_BEGIN ||
> and return -ENXIO.
> 
> 
> Hope this can be helpful,

Yes it was!

I am pretty sure this was fixed with
1d22e9068c52c1cf935bcdff70b9b9654e3c939e. Can you check if this fixes
the issue for you?

(This was simply that we checked the PK auth twice, unnecessarily. And
the second time the read ptr into the PK message was already at the
end of the message which meant parsing it failed. But with the change
pointed out above this is fixed, we should authenticate only once
now.)

Thanks for gdb'ing this!

Lennart

-- 
Lennart Poettering, Red Hat
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to