[OpenWrt-Devel] procd fails to start /sbin/netifd randomly (libubox regression)
Rafał Miłecki
zajec5 at gmail.com
Sat May 23 06:22:05 EDT 2020
On 22.05.2020 11:28, Rafał Miłecki wrote:
> Failed restart:
> Fri May 22 09:22:05 2020 daemon.err procd: [instance_fill_array] blobmsg_type(cur): 2 (BLOBMSG_TYPE_TABLE)
> Fri May 22 09:22:05 2020 daemon.err procd: [instance_fill_array] BEFORE 75e300aeec25:
> Fri May 22 09:22:05 2020 daemon.err procd: [instance_fill_array] blob_len(cur): 36
> Fri May 22 09:22:05 2020 daemon.err procd: [instance_fill_array] blobmsg_check_attr_len(cur, false, 36): 1
> Fri May 22 09:22:05 2020 daemon.err procd: [instance_fill_array] [for_each_attr] blobmsg_name(sub): core blobmsg_type(sub): 3 (BLOBMSG_TYPE_STRING)
> Fri May 22 09:22:05 2020 daemon.err procd: [instance_fill_array] [for_each_attr] blobmsg_name(sub): blobmsg_type(sub): 5 (BLOBMSG_TYPE_INT32)
> Fri May 22 09:22:05 2020 daemon.err procd: [instance_fill_array] AFTER 75e300aeec25:
> Fri May 22 09:22:05 2020 daemon.err procd: [instance_fill_array] blobmsg_len(cur): 24
> Fri May 22 09:22:05 2020 daemon.err procd: [instance_fill_array] blobmsg_check_attr_len(cur, false, 24): 1
> Fri May 22 09:22:05 2020 daemon.err procd: [instance_fill_array] [for_each_attr] blobmsg_name(sub): core blobmsg_type(sub): 3 (BLOBMSG_TYPE_STRING)
> Fri May 22 09:22:05 2020 daemon.err procd: [instance_fill_array] blob_attr *cur as JSON: { "core": "unlimited" }
> Fri May 22 09:22:05 2020 daemon.err procd: [instance_fill_array] blobmsg_check_attr_list() failed
>
> As you can see, libubox fix resulted in blobmsg_check_array_len()
> actually iterating over sub-attr-s but also failing occasionally.
My observation was reversed. After 75e300aeec25 libubox uses blob_len,
not blobmsg_len. It means that iteration over sub-attr-s in
blobmsg_check_array_len() actually got broken. It's because
__blobmsg_for_each_attr() macro expects *data* len to be passed to it.
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list