Bug with serial port parsing rework

Aleksander Morgado aleksander at aleksander.es
Thu Feb 18 21:38:40 UTC 2016


On Thu, Feb 18, 2016 at 6:04 PM, Dan Williams <dcbw at redhat.com> wrote:
> Just ran across this; haven't looked into it yet but feel free to get
> there before me.  mm-1-4 git head.
>
> Dan
>
> ModemManager[19109]: <debug> [1455814962.494537] [mm-plugin-manager.c:316] port_probe_context_finished(): (Plugin Manager) 'eno1' port probe finished, last one in device
> ModemManager[19109]: <debug> [1455814962.494567] [mm-plugin-manager.c:138] find_device_support_context_complete_and_free(): (Plugin Manager) [/sys/devices/pci0000:00/0000:00:19.0] device support check finished in '2.579958' seconds
> ModemManager[19109]: <info>  [1455814962.494687] [mm-base-manager.c:153] find_device_support_ready(): Couldn't find support for device at '/sys/devices/pci0000:00/0000:00:19.0': not supported by any plugin
>
> (ModemManager:19109): GLib-CRITICAL **: g_byte_array_remove_range: assertion 'index_ < array->len' failed
> ModemManager[19109]: <debug> [1455814963.493174] [mm-port-probe-at.c:43] mm_port_probe_response_processor_is_at(): Parsing AT got: 'Serial command timed out'
> ModemManager[19109]: <debug> [1455814963.493334] [mm-port-serial-at.c:440] debug_log(): (ttyS4): --> 'AT<CR>'
>
> (ModemManager:19109): GLib-CRITICAL **: g_byte_array_remove_range: assertion 'index_ < array->len' failed
> ModemManager[19109]: <debug> [1455814966.495050] [mm-port-probe-at.c:43] mm_port_probe_response_processor_is_at(): Parsing AT got: 'Serial command timed out'
> ModemManager[19109]: <debug> [1455814966.495191] [mm-port-serial-at.c:440] debug_log(): (ttyS4): --> 'AT<CR>'
>
> (ModemManager:19109): GLib-CRITICAL **: g_byte_array_remove_range: assertion 'index_ < array->len' failed
> ModemManager[19109]: <debug> [1455814969.494977] [mm-port-probe-at.c:43] mm_port_probe_response_processor_is_at(): Parsing AT got: 'Serial command timed out'

This may happen when array->len is 0 and we g_byte_array_remove_range
(array, 0, 0). Given that we're fully clearing the buffer, can you
update it to use g_byte_array_set_size (array, 0) and retry; or
otherwise only remove range if (array->len > 0)?

-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list