Hi Denis,
On 04/25/2016 08:56 PM, Denis Kenzior wrote:
> Hi John,
>
> On 04/25/2016 02:02 AM, John Ernberg wrote:
>> Hi Denis,
>>
>> On 04/22/2016 09:43 PM, Denis Kenzior wrote:
>>> Hi John,
>>>
>>> On 04/22/2016 08:07 AM, John Ernberg wrote:
From: John Ernberg
Prevents glib from causing SIGFPE during certain circumstances of
modem
removal.
>>>
>>> Do you have a stack trace handy?
>> I have one for the bluez5 hfp plugin which was recreated by stopping
>> oFono, the rest of the changes were added as a sort of safeguard.
>>
>> Stack trace:
>>
>> (gdb)
>> (gdb) bt
>> #0 0x76d88748 in raise (sig=8)
>> at ../nptl/sysdeps/unix/sysv/linux/pt-raise.c:37
>> #1 0x76e8bcac in __aeabi_ldiv0 ()
>> at
>> /opt/yocto/build/tmp/work-shared/gcc-4.8.2-r0/gcc-4.8.2/libgcc/config/arm/lib1funcs.S:1331
>>
>>
>> #2 0x76e0e1b4 in g_hash_table_lookup_node (hash_return=> pointer>,
>> key=0xe17418, hash_table=0xe10e38)
>> at
>> /usr/src/debug/glib-2.0/1_2.38.2-r0/glib-2.38.2/glib/ghash.c:371
>> #3 g_hash_table_lookup (hash_table=0xe10e38, key=key@entry=0xe17418)
>> at
>> /usr/src/debug/glib-2.0/1_2.38.2-r0/glib-2.38.2/glib/ghash.c:1076
>> #4 0x0008ccb8 in sim_watch (atom=, cond=,
>> data=0xe18f88) at plugins/hfp_ag_bluez5.c:260
>> #5 0x000910d0 in call_watches (atom=atom@entry=0xe17540,
>> cond=cond@entry=OFONO_ATOM_WATCH_CONDITION_UNREGISTERED) at
>> src/modem.c:261
>> #6 0x00091de0 in __ofono_atom_unregister (atom=atom@entry=0xe17540)
>> at src/modem.c:281
>> #7 0x00091e54 in flush_atoms (
>> new_state=new_state@entry=MODEM_STATE_POWER_OFF, modem=0xe18f88)
>> at src/modem.c:430
>> #8 0x00091f60 in modem_change_state (modem=0xe18f88,
>> new_state=MODEM_STATE_POWER_OFF) at src/modem.c:511
>> #9 0x000921c8 in set_powered (modem=modem@entry=0xe18f88,
>> powered=powered@entry=0) at src/modem.c:882
>> #10 0x00092990 in modem_unregister (modem=0xe18f88) at src/modem.c:2040
>> #11 0x00093cec in ofono_modem_driver_unregister (d=0x112168)
>> at src/modem.c:2176
>
> What calls this? The corresponding exit function in question is not
> present in the stack trace.
The modem plugins call it during their exit. Since the plugins are all
calling exit the drivers gets unregistered.
>
>> #12 0x00091040 in __ofono_plugin_cleanup () at src/plugin.c:197
>> #13 0x00014e24 in main (argc=85540, argv=0x7ee60d44) at src/main.c:255
>>
>> oFono debug log:
>>
>> ofonod[5126]: src/plugin.c:__ofono_plugin_cleanup()
>> ofonod[5126]: plugins/push-notification.c:push_notification_exit()
>> ofonod[5126]: plugins/smart-messaging.c:smart_messaging_exit()
>> ofonod[5126]: plugins/bluez5.c:bt_unregister_profile() Bluetooth:
>> Unregistering profile /bluetooth/profile/dun_gw
>> ofonod[5126]: plugins/bluez5.c:bt_unregister_profile() Bluetooth:
>> Unregistering profile /bluetooth/profile/hfp_hf
>> ofonod[5126]:
>> src/handsfree-audio.c:ofono_handsfree_card_driver_unregister() driver:
>> 0x113994
>> ofonod[5126]: src/modem.c:ofono_modem_driver_unregister() driver:
>> 0x1139a4, name: hfp
>> ofonod[5126]: src/modem.c:ofono_modem_driver_unregister() driver:
>> 0x11391c, name: ublox
>> ofonod[5126]: src/modem.c:ofono_modem_driver_unregister() driver:
>> 0x1138b4, name: quectel
>> ofonod[5126]: src/modem.c:ofono_modem_driver_unregister() driver:
>> 0x113854, name: he910
>> ofonod[5126]:
>> src/private-network.c:ofono_private_network_driver_unregister() driver:
>> 0x113828, name: ConnMan Private Network
>> ofonod[5126]: src/modem.c:ofono_modem_driver_unregister() driver:
>> 0x1137d0, name: sim900
>> ofonod[5126]: src/modem.c:ofono_modem_driver_unregister() driver:
>> 0x113778, name: samsung
>> ofonod[5126]: src/modem.c:ofono_modem_driver_unregister() driver:
>> 0x113720, name: speedupcdma
>> ofonod[5126]: src/modem.c:ofono_modem_driver_unregister() driver:
>> 0x1136c0, name: speedup
>> ofonod[5126]: src/modem.c:ofono_modem_driver_unregister() driver:
>> 0x113668, name: alcatel
>> ofonod[5126]: src/modem.c:ofono_modem_driver_unregister() driver:
>> 0x113600, name: icera
>> ofonod[5126]: src/modem.c:ofono_modem_driver_unregister() driver:
>> 0x1135a8, name: linktop
>> ofonod[5126]: src/modem.c:ofono_modem_driver_unregister() driver:
>> 0x113550, name: nokiacdma
>> ofonod[5126]: src/modem.c:ofono_modem_driver_unregister() driver:
>> 0x1134f8, name: nokia
>> ofonod[5126]: src/modem.c:ofono_modem_driver_unregister() driver:
>> 0x1134a0, name: tc65
>> ofonod[5126]: src/modem.c:ofono_modem_driver_unregister() driver:
>> 0x113408, name: ste
>> ofonod[5126]: src/modem.c:ofono_modem_driver_unregister() driver:
>> 0x1133a0, name: ifx
>> ofonod[5126]: src/modem.c:ofono_modem_driver_unregister() driver:
>> 0x113348, name: palmpre
>> ofonod[5126]: src/modem.c:ofono_modem_driver_unregister() driver:
>> 0x1132e8, name: novatel
>> ofonod[5126]: src/modem.c:ofono_modem_driver_unregister() driver:
>> 0x113290, name: sierra
>> ofonod[5126]: