aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-10-03iface-modem-3gpp-profile-manager: correct a GError instance ownershipLubomir Rintel
The call to g_task_return_error() takes ownership of the GError passed to it; we must not free it ourselves upon automatic pointer cleanup. Otherwise a crash can be triggered in the error handling path: ModemManager[259816]: <debug> [1633088468.157848] [modem0/modemu/at] <-- '<CR><LF>OK<CR><LF>' ModemManager[259816]: <debug> [1633088468.159832] [modem0] stored profile with id '1' ModemManager[259816]: <debug> [1633088468.160501] [modem0] set profile state (7/8): list after ModemManager[259816]: <debug> [1633088468.161686] [modem0/modemu/at] device open count is 3 (open) ModemManager[259816]: <debug> [1633088468.162320] [modem0/modemu/at] device open count is 2 (close) ModemManager[259816]: <debug> [1633088468.162746] [modem0/modemu/at] --> 'AT+CGDCONT?<CR>' ModemManager[259816]: <debug> [1633088468.177437] [modem0/modemu/at] <-- '<CR><LF>ERROR<CR><LF>' ModemManager[259816]: <debug> [1633088468.178011] [modem0/modemu/at] operation failure: 100 (Unknown error) ModemManager[259816]: <warn> [1633088468.182420] [modem0/bearer0] connection attempt #1 failed: Couldn't validate update of profile '1': Unknown error ModemManager[259816]: <info> [1633088468.193156] [modem0/bearer0] connection #1 finished: duration 0s, tx: 0 bytes, rx: 0 bytes ModemManager[259816]: <debug> [1633088468.194280] [modem0] couldn't connect bearer: Couldn't validate update of profile '1': Unknown error ==259816== Invalid read of size 4 ==259816== at 0x4FF66CF: UnknownInlinedFun (gerror.c:535) ==259816== by 0x4FF66CF: g_error_free (gerror.c:832) ==259816== by 0x1A7F49: UnknownInlinedFun (glib-autocleanups.h:52) ==259816== by 0x1A7F49: UnknownInlinedFun (glib-autocleanups.h:52) ==259816== by 0x1A7F49: profile_manager_get_profile_after_ready (mm-iface-modem-3gpp-profile-manager.c:140) ==259816== by 0x4E342C9: g_task_return_now (gtask.c:1219) ==259816== by 0x4E344CA: UnknownInlinedFun (gtask.c:1289) ==259816== by 0x4E344CA: g_task_return (gtask.c:1245) ==259816== by 0x1A867C: get_profile_list_ready (mm-iface-modem-3gpp-profile-manager.c:680) ==259816== by 0x4E342C9: g_task_return_now (gtask.c:1219) ==259816== by 0x4E344CA: UnknownInlinedFun (gtask.c:1289) ==259816== by 0x4E344CA: g_task_return (gtask.c:1245) ==259816== by 0x1A3DB5: internal_list_profiles_ready (mm-iface-modem-3gpp-profile-manager.c:774) ==259816== by 0x4E342C9: g_task_return_now (gtask.c:1219) ==259816== by 0x4E344CA: UnknownInlinedFun (gtask.c:1289) ==259816== by 0x4E344CA: g_task_return (gtask.c:1245) ==259816== by 0x1D7B8B: profile_manager_cgdcont_query_ready (mm-broadband-modem.c:10240) ==259816== by 0x4E1DB61: g_simple_async_result_complete (gsimpleasyncresult.c:802) ==259816== Address 0x9286da0 is 0 bytes inside a block of size 16 free'd ==259816== at 0x48440E4: free (vg_replace_malloc.c:755) ==259816== by 0x500FD1C: g_free (gmem.c:199) ==259816== by 0x502A22F: g_slice_free1 (gslice.c:1180) ==259816== by 0x4FF6780: g_error_free (gerror.c:864) ==259816== by 0x1B22D2: connect_bearer_ready (mm-iface-modem-simple.c:286) ==259816== by 0x4E342C9: g_task_return_now (gtask.c:1219) ==259816== by 0x4E344CA: UnknownInlinedFun (gtask.c:1289) ==259816== by 0x4E344CA: g_task_return (gtask.c:1245) ==259816== by 0x18031A: connect_ready (mm-base-bearer.c:917) ==259816== by 0x4E342C9: g_task_return_now (gtask.c:1219) ==259816== by 0x4E344CA: UnknownInlinedFun (gtask.c:1289) ==259816== by 0x4E344CA: g_task_return (gtask.c:1245) ==259816== by 0x18329B: connect_3gpp_ready (mm-broadband-bearer.c:918) ==259816== by 0x4E342C9: g_task_return_now (gtask.c:1219) ==259816== Block was alloc'd at ==259816== at 0x484186F: malloc (vg_replace_malloc.c:380) ==259816== by 0x5013408: g_malloc (gmem.c:106) ==259816== by 0x502ACB4: g_slice_alloc (gslice.c:1069) ==259816== by 0x502B33D: g_slice_alloc0 (gslice.c:1095) ==259816== by 0x4FF64E6: g_error_allocate (gerror.c:702) ==259816== by 0x4FF6F03: UnknownInlinedFun (gerror.c:716) ==259816== by 0x4FF6F03: g_error_copy (gerror.c:886) ==259816== by 0x4E1D0A0: g_simple_async_result_set_from_error (gsimpleasyncresult.c:676) ==259816== by 0x236AAB: port_serial_got_response (mm-port-serial.c:744) ==259816== by 0x23B0F1: UnknownInlinedFun (mm-port-serial.c:934) ==259816== by 0x23B0F1: common_input_available (mm-port-serial.c:1035) ==259816== by 0x500AF9E: UnknownInlinedFun (gmain.c:3337) ==259816== by 0x500AF9E: g_main_context_dispatch (gmain.c:4055) ==259816== by 0x505F607: g_main_context_iterate.constprop.0 (gmain.c:4131) ==259816== by 0x500A562: g_main_loop_run (gmain.c:4329)
2021-10-03broadband-modem: ensure mm_broadband_modem_create_device_identifier() sets ↵Lubomir Rintel
an error on all bad returns modem_load_device_identifier_finish() expect it to do so and trips an assertion failure in g_propagate_error(): ModemManager[256038]: <warn> [1633083601.491190] [modem0] couldn't load equipment identifier: Unknown error ModemManager[256038]: <debug> [1633083601.491204] [modem0] loading device identifier... ModemManager[256038]: <debug> [1633083601.491215] [modem0/modemu/at] device open count is 3 (open) ModemManager[256038]: <debug> [1633083601.491231] [modem0/modemu/at] device open count is 2 (close) ModemManager[256038]: <debug> [1633083601.491254] [modem0/modemu/at] --> 'ATI<CR>' ModemManager[256038]: <debug> [1633083601.494616] [modem0/modemu/at] <-- '<CR><LF>ERROR<CR><LF>' ModemManager[256038]: <debug> [1633083601.494643] [modem0/modemu/at] operation failure: 100 (Unknown error) (ModemManager:256038): GLib-CRITICAL **: 06:20:01.494: g_propagate_error: assertion 'src != NULL' failed Thread 1 "ModemManager" received signal SIGTRAP, Trace/breakpoint trap. g_logv (log_domain=0x7ffff77d1071 "GLib", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=<optimized out>) at ../glib/gmessages.c:1413 1413 g_private_set (&g_log_depth, GUINT_TO_POINTER (depth)); Missing separate debuginfos, use: dnf debuginfo-install libmbim-1.26.0-2.el9.x86_64 libqmi-1.30.2-1.el9.x86_64 (gdb) bt #0 g_logv (log_domain=0x7ffff77d1071 "GLib", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=<optimized out>) at ../glib/gmessages.c:1413 #1 0x00007ffff77813d3 in g_log (log_domain=<optimized out>, log_level=<optimized out>, format=<optimized out>) at ../glib/gmessages.c:1451 #2 0x000055555561122d in modem_load_device_identifier_finish (self=0x5555557e62d0, res=<optimized out>, error=0x7fffffffd320) at /usr/src/debug/ModemManager-1.18.2-1.el9.x86_64/src/mm-broadband-modem.c:1168 #3 0x00005555555ea69a in load_device_identifier_ready (self=0x5555557e62d0, res=0x5555557ea6b0, task=task@entry=0x7fffe8011e20 [GTask]) at /usr/src/debug/ModemManager-1.18.2-1.el9.x86_64/src/mm-iface-modem.c:4727 #4 0x00007ffff7951b62 in g_simple_async_result_complete (simple=0x5555557ea6b0 [GSimpleAsyncResult]) at ../gio/gsimpleasyncresult.c:802 #5 0x00005555555d1b0a in at_sequence_parse_response (port=<optimized out>, res=<optimized out>, ctx=ctx@entry=0x5555557ed7f0) at /usr/src/debug/ModemManager-1.18.2-1.el9.x86_64/src/mm-base-modem-at.c:250 #6 0x00007ffff7951b62 in g_simple_async_result_complete (simple=0x5555557e5440 [GSimpleAsyncResult]) at ../gio/gsimpleasyncresult.c:802 #7 0x00005555556805dc in serial_command_ready (port=<optimized out>, res=<optimized out>, simple=simple@entry=0x5555557e5440 [GSimpleAsyncResult]) at /usr/src/debug/ModemManager-1.18.2-1.el9.x86_64/src/mm-port-serial-at.c:378 #8 0x00007ffff7951b62 in g_simple_async_result_complete (simple=0x5555557d6730 [GSimpleAsyncResult]) at ../gio/gsimpleasyncresult.c:802 #9 0x000055555567fb35 in command_context_complete_and_free (ctx=ctx@entry=0x7fffe800c200, idle=idle@entry=0) at /usr/src/debug/ModemManager-1.18.2-1.el9.x86_64/src/mm-port-serial.c:141 #10 0x0000555555682a96 in port_serial_got_response (self=0x5555557dd4e0 [MMPortSerialAt], parsed_response=0x0, error=0x5555557d5040) at /usr/src/debug/ModemManager-1.18.2-1.el9.x86_64/src/mm-port-serial.c:755 #11 0x00005555556870d2 in parse_response_buffer (self=<optimized out>) at /usr/src/debug/ModemManager-1.18.2-1.el9.x86_64/src/mm-port-serial.c:934 #12 common_input_available (self=0x5555557dd4e0 [MMPortSerialAt], condition=(G_IO_NVAL | unknown: 0xf762a5c0)) at /usr/src/debug/ModemManager-1.18.2-1.el9.x86_64/src/mm-port-serial.c:1035 #13 0x00007ffff7778f9f in g_main_dispatch (context=0x5555557527c0) at ../glib/gmain.c:3337 #14 g_main_context_dispatch (context=0x5555557527c0) at ../glib/gmain.c:4055 #15 0x00007ffff77cd608 in g_main_context_iterate.constprop.0 (context=0x5555557527c0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4131 #16 0x00007ffff7778563 in g_main_loop_run (loop=0x55555576da60) at ../glib/gmain.c:4329 #17 0x00005555555b7b60 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/ModemManager-1.18.2-1.el9.x86_64/src/main.c:216
2021-10-03ci: bump image template to refresh CA certificatesAleksander Morgado
At the end of September 2021, Let's Encrypt's DST Root CA X3 certificate expired, and the new ISRG Root X1 took over. Update the CI template so that the new certificate is available and we can keep on cloning the libmbim/libqmi/libqrtr-glib repos without failures.
2021-09-29telit: fix g_object_unref failed assertionDaniele Palmas
Fix the following g_object_unref failed assertion: ModemManager[385967]: <debug> [1632924639.132023] [modem0/ttyUSB2/at] --> 'AT+CSIM=1<CR>' ModemManager[385967]: <debug> [1632924639.144892] [modem0/ttyUSB2/at] <-- '<CR><LF>ERROR<CR><LF>' ModemManager[385967]: <debug> [1632924639.145021] [modem0/ttyUSB2/at] operation failure: 100 (Unknown error) (ModemManager:385967): GLib-GObject-CRITICAL **: 16:10:39.145: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
2021-09-23sms: increase send timeout to 5 minutesBenoît Monin
The timeout for sms send operation can exceed the current value, so increase it to 5 minutes. Timeouts up to 4 minutes have been observed in the following test scenario: * Power up the modem and wait for registration. * Right when the modem is registered, attenuate the rf signal or remove the antenna. * Immediately try to send an sms. Increasing the timeout cover this corner case.
2021-09-21modem-qmi,sim-qmi: read personalization retries from Card StatusMichal Mazur
2021-09-21modem-mbim: enter LOCKED state when SIM is incompatibleMichal Mazur
According to MBIM specification, the subscriber state is INITIALIZED when SIM card is incompatible with enabled modem personalization lock. This patch introduce additional check for enabled PIN lock in such case and fixes depersonalization of one lock if several are enabled.
2021-09-20.gitignore: ignore ctags tags fileYegor Yefremov
2021-09-19Fix -Wmaybe-uninitialized warningYegor Yefremov
Initialize the scheme variable to QMI_VOICE_USS_DATA_CODING_SCHEME_UNKNOWN to avoid the warning.
2021-09-19sim-mbim: always close UICC channel, even on errorAleksander Morgado
Don't close the UICC channel only when the EID was successfully load. If for any reason it failed, also close the channel.
2021-09-19sim-mbim: coding style fixes in the EID loadingAleksander Morgado
2021-09-19sim-mbim: add support for loading eid via mbim protocolSom_SP
Support is added to set eid dbus interface property using MBIM protocol when the inserted sim is esim.
2021-09-17Tests: fix -Wformat compiler warningYegor Yefremov
Use G_GUINT64_FORMAT to properly format a guint64 type.
2021-09-17build: enable qcom-soc plugin by defaultShawn Guo
As people are running distros like Debian, Archlinux, Fedora, etc., on laptops powered by Qualcomm Snapdragon SoCs, e.g. Lenovo Yoga C630, it makes sense to enable qcom-soc plugin by default, so that MM aarch64 package can be built by those distros more easily. Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2021-09-16ci: add meson build testAleksander Morgado
The system template is updated to add new packages required at build time: * libdbus-1-dev is added so that we can autodetect the service directory path via the installed pkg-config file. * udev is added so that we can autodetect the udev rules directory path via the installed pkg-config file. * policykit-1 is added so that the i18n operation merging policy files is able to use the installed ITS files. * bash-completion is added to enable the feature in the meson build. The 'dist' step in the test is fully skipped for now, as the meson port doesn't fully support running all unit tests successfully.
2021-09-16build,meson: simplify build of daemon enums sourcesAleksander Morgado
2021-09-15build,meson: introspection is setup as a featureAleksander Morgado
2021-09-15Revert "build,meson: Improve plugins option set"Aleksander Morgado
This reverts commit 09a5052a777c858b83baf9444306775ed5c50300. This commit breaks the default disabling of the qcom-soc plugin.
2021-09-15meson,build: don't include daemon enum sources in pluginsAleksander Morgado
We will end up exporting what we shouldn't: $ abidiff /tmp/autotools/lib/ModemManager/libmm-shared-icera.so /tmp/meson/lib/ModemManager/libmm-shared-icera.so Functions changes summary: 0 Removed, 0 Changed (3 filtered out), 8 Added functions Variables changes summary: 0 Removed, 0 Changed, 0 Added variable 8 Added functions: [A] 'function const gchar* mm_bearer_connection_status_get_string(MMBearerConnectionStatus)' {mm_bearer_connection_status_get_string} [A] 'function GType mm_bearer_connection_status_get_type()' {mm_bearer_connection_status_get_type} [A] 'function const gchar* mm_bearer_status_get_string(MMBearerStatus)' {mm_bearer_status_get_string} [A] 'function GType mm_bearer_status_get_type()' {mm_bearer_status_get_type} [A] 'function gchar* mm_filter_rule_build_string_from_mask(MMFilterRule)' {mm_filter_rule_build_string_from_mask} [A] 'function GType mm_filter_rule_get_type()' {mm_filter_rule_get_type} [A] 'function gchar* mm_port_probe_flag_build_string_from_mask(MMPortProbeFlag)' {mm_port_probe_flag_build_string_from_mask} [A] 'function GType mm_port_probe_flag_get_type()' {mm_port_probe_flag_get_type}
2021-09-15build,meson: fix building shared utils and pluginsAleksander Morgado
When building shared utils modules or plugins, we should not link with the static libraries built under src/, because that would mean we're including their symbols as exported by the modules, and it'll break in runtime. Instead, just define the correct set of 'include_directories' to be used in each plugin. Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/436
2021-09-15build,meson: rename plugin helpers library variableAleksander Morgado
So that we don't confuse the plugin-specific libhelpers with the core libhelpers built in src/.
2021-09-15novatel: avoid returning a NULL timezone without error setAleksander Morgado
Reported and fix suggested by: Frederic Martinsons <frederic.martinsons@sigfox.com> Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/438
2021-09-15build,meson: make PLUGINDIR an absolute pathAleksander Morgado
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/433
2021-09-13ci: Use feature values for libqmi, libmbim and libqrtr-glibAleksander Morgado
`libmbim`, `libqmi` and `libqrtr-glib` have started using `feature` options in their meson builds.
2021-09-10introspection,sar: new interface introduced for 1.20Aleksander Morgado
2021-09-10build,meson: add Sar interfaceAleksander Morgado
2021-09-10Revert "api: remove Modem.Sar interface"Aleksander Morgado
This reverts commit 686e37ff84daca6096fe18781ad9ba6f29cd4063.
2021-09-10build,meson: Improve plugins helper library buildingIñigo Martínez
To avoid those cases where a plugin does not need a helper library an empty array is created. However, when a helper library has to be built, it is not necessary to include the created static library in an array.
2021-09-10build,meson: Fix libmm-test-common name and dependenciesIñigo Martínez
`libmm-test-common` is created using underscores. It also uses `gio-unix-2.0` as a public dependency but actually it should be private. Both issues have been fixed.
2021-09-10build,meson: Fix suspend/resume optionIñigo Martínez
The suspend/resume option does not build properly if journal option is disabled. This is beacause the journal option is check to add suspend/resume code. It has been fixed by replacing journal option check by the suspend/resume option.
2021-09-10build,meson: Fix libsystemd checkIñigo Martínez
At the moment `libsystemd` is check even if `suspend/resume` and systemd support are not enabled. This has been changed so `libsystemd` is checked only if any or both options are enabled.
2021-09-10build,meson: Improve libqcdm buildIñigo Martínez
`libqcdm`'s meson build files have been improved slightly by removing unnecessary variables shortening their contents.
2021-09-10build,meson: Make use of feature option for introspectionIñigo Martínez
2021-09-10build,meson: Remove unnecessary variablesIñigo Martínez
2021-09-10build,meson: Improve plugins option setIñigo Martínez
Improved the way the plugins are set to allow a smaller summary.
2021-09-10build,meson: Make use of the summary functionIñigo Martínez
Since meson 0.53 it has added a new function to summarize the build configuration[0]. We changed the summary to make use of it. [0] https://mesonbuild.com/Release-notes-for-0-53-0.html#add-a-new-summary-function
2021-09-10core: remove execution bit from file modes in source filesAleksander Morgado
2021-09-09build: post-release version bump to 1.19.0Aleksander Morgado
2021-09-08release: bump to 1.18.0Aleksander Morgado
2021-09-08NEWS: update for 1.18 with changes since rc1Aleksander Morgado
2021-09-08build: require libqmi 1.30.2Aleksander Morgado
We need the new "Get All Call Info" request support.
2021-09-08build,meson: add sms-c examples to buildAleksander Morgado
2021-09-08examples: new SMS sending example in C using the async APIAleksander Morgado
2021-09-08examples: new SMS sending example in C using the sync APIAleksander Morgado
2021-09-08broadband-modem-qmi: don't error out on empty call listAleksander Morgado
Only error out if the required TLVs are missing.
2021-09-08iface-modem-voice: avoid warning with -Wincompatible-pointer-typesAleksander Morgado
../src/mm-iface-modem-voice.c: In function ‘mm_iface_modem_voice_reload_all_calls’: ../src/mm-iface-modem-voice.c:2549:64: warning: passing argument 2 of ‘((MMIfaceModemVoice *)g_type_interface_peek((void *)((GTypeInstance *)self)->g_class, mm_iface_modem_voice_get_type()))->load_call_list’ from incompatible pointer type [-Wincompatible-pointer-types] 2549 | reload_all_calls_ready, | ^~~~~~~~~~~~~~~~~~~~~~ | | | void (*)(MMIfaceModemVoice *, GAsyncResult *, GTask *) {aka void (*)(struct _MMIfaceModemVoice *, struct _GAsyncResult *, struct _GTask *)} ../src/mm-iface-modem-voice.c:2549:64: note: expected ‘GAsyncReadyCallback’ {aka ‘void (*)(struct _GObject *, struct _GAsyncResult *, void *)’} but argument is of type ‘void (*)(MMIfaceModemVoice *, GAsyncResult *, GTask *)’ {aka ‘void (*)(struct _MMIfaceModemVoice *, struct _GAsyncResult *, struct _GTask *)’}
2021-09-08broadband-modem-qmi: refactor process_get_all_call_info() to avoid handling ↵Aleksander Morgado
the GTask The process_get_all_call_info() was not completing the input GTask on every possible code path (e.g. when remote party number or call info wasn't available). The method is now updated to avoid processing the GTask itself, instead it will attempt to build the call list and return a GError on any kind of failure.
2021-09-08mm-broadband-modem-qmi: add AT URCs fall back for callsDylan Van Assche
Enable AT URCs for calls on top of QMI Voice indications for AT+QMI devices only. Some AT+QMI devices send unreliable QMI indications when the host is resuming. In such cases, AT URCs can be used as a fall back to make calls reliable. While AT+QMI devices relied before on AT commands to load call list information and handle AT URCs for async updates, this is now handled through QMI by forcefully reloading the call list instead of processing the AT URCs. This approach is disabled by default through the MM_IFACE_MODEM_VOICE_INDICATION_CALL_LIST_RELOAD_ENABLED property. This property is set to true in case of QMI modems.
2021-09-08mm-modem-helpers: only parse calls in voice modeDylan Van Assche
Calls in a CLCC response in data-only or fax-only mode do not count as actuall calls.
2021-09-07build,meson: add missing Call object support in introspectionAleksander Morgado