Re: Fix the crash issue when restarting the wpa_supplicant or wifi driver while BackgroundScanning is enable
Michael Nazzareno Trimarchi <[email protected]> Fri, 12 Dec 2025 08:31:35 +0100
| Newsgroups | dev.linux.lists.connman |
|---|---|
| Message-ID | <CAOf5uwmeODc99O0LMs=kLXBuxK7RR6MarHLrg5WZX+o5199CqA@mail.gmail.com> |
Hi
This is the actual code
/* Distinguish between devices performing passive and active scannin=
g */
wifi_update_scanner_type(wifi, WIFI_SCANNING_ACTIVE);
connman_device_ref(device);
reset_autoscan(device); <=3D=3D=3D reset autoscan is here
ret =3D g_supplicant_interface_scan(wifi->interface, scan_params,
scan_callback, device);
if (ret =3D=3D 0) {
connman_device_set_scanning(device,
CONNMAN_SERVICE_TYPE_WIFI, true);
According to your patch you now execute two times. Just an idea,
because the connman_device_ref is a bit
convoluted, is possible to just move up
connman_device_ref(device);
reset_autoscan(device);
/* Distinguish between devices performing passive and active scanni=
ng */
wifi_update_scanner_type(wifi, WIFI_SCANNING_ACTIVE);
Michael
On Fri, Dec 12, 2025 at 8:04=E2=80=AFAM Michael Nazzareno Trimarchi
<[email protected]> wrote:
>
> Hi
>
> On Fri, Dec 12, 2025 at 7:37=E2=80=AFAM Chen Yaming (BSH GDE-EDSCD)
> <[email protected]> wrote:
> >
> > Hello:
> >
> >
> >
> > I repackaged the patch file into a zip file, please check i=
t, thanks!!
> >
>
> Can you try to send an inline patch? You can use git send-email, this
> allow people to review.
>
> Michael
>
>
> >
> >
> > Yaming Chen
> > GDE-EDSCD
> >
> > =E5=8D=9A=E8=A5=BF=E5=8D=8E=E7=94=B5=E5=99=A8=EF=BC=88=E6=B1=9F=E8=8B=
=8F=EF=BC=89=E6=9C=89=E9=99=90=E5=85=AC=E5=8F=B8, =E4=B8=AD=E5=9B=BD=E6=B1=
=9F=E8=8B=8F=E7=9C=81=E5=8D=97=E4=BA=AC=E5=B8=82=E7=BB=8F=E6=B5=8E=E6=8A=80=
=E6=9C=AF=E5=BC=80=E5=8F=91=E5=8C=BA=E5=B0=A7=E6=96=B0=E5=A4=A7=E9=81=93208=
=E5=8F=B7 210046
> > =E6=89=8B=E6=9C=BA=EF=BC=9A19962032751
> > [email protected]
> >
> >
> >
> >
> >
> > From: Bytemark [email protected]
> > Sent: Friday, December 12, 2025 2:31 PM
> > To: Chen Yaming (BSH GDE-EDSCD) [email protected]
> > Subject: Your attachment was rejected
> >
> >
> >
> > Dear Chen Yaming (BSH GDE-EDSCD),
> >
> > Your email to our support system could not be accepted in full. The fol=
lowing file(s) were rejected by our system: 0001-wifi-Fix-the-crash-issue-w=
hen-restarting-the-wpa_supplicant-or-wifi-driver-while-background-scanning-=
enable.patch
> >
> > Please try re-sending your attachment using one of the following allowe=
d attachment types: doc|docx|xml|png|gif|jpg|jpeg|zip|rar|pdf|txt|log|xlsx|=
wav.
> >
> > Kind Regards,
> > Bytemark
> >
> >
> >
> >
> >
> > From: Chen Yaming (BSH GDE-EDSCD)
> > Sent: Friday, December 12, 2025 2:28 PM
> > To: '[email protected]' <[email protected]>
> > Cc: Dembianny Sven (BSH GDE-EDSD7) <[email protected]>
> > Subject: Fix the crash issue when restarting the wpa_supplicant or wifi=
driver while BackgroundScanning is enable
> >
> >
> >
> > Hello, conman team:
> >
> > I am a software development engineer of BSH company. We h=
ave discovered a bug in our project using connman. When BackgroundScanning =
is enable, if the wifi driver or wpa_supplicant is restarted, it will cause=
connman crash. The parsing of the core dump print call stack shows the fol=
lowing:
> >
> >
> >
> > Core was generated by `/usr/sbin/connmand --nodnsproxy -n'.
> >
> > Program terminated with signal SIGSEGV, Segmentation fault.
> >
> > #0 autoscan_timeout (data=3D0x144bc00) at ../connman-1.44/plugins/wifi.=
c:1382
> >
> > 1382 ../connman-1.44/plugins/wifi.c: No such file or directory.
> >
> > (gdb) bt
> >
> > #0 autoscan_timeout (data=3D0x144bc00) at ../connman-1.44/plugins/wifi.=
c:1382
> >
> > #1 0x76d0f8b4 in ?? () from /usr/lib/libglib-2.0.so.0
> >
> > #2 0x76d0eff6 in g_main_context_dispatch () from /usr/lib/libglib-2.0.s=
o.0
> >
> > #3 0x76d0f24c in ?? () from /usr/lib/libglib-2.0.so.0
> >
> > #4 0x76d0f4a6 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
> >
> > #5 0x0001d126 in main (argc=3D<optimized out>, argv=3D<optimized out>) =
at ../connman-1.44/src/main.c:1253
> >
> >
> >
> > We have created a patch to attempt to fix this issue, please help evalu=
ate and review it=EF=BC=8Cthanks=EF=BC=81=EF=BC=81
> >
> >
> >
> >
> >
> > Best regards=EF=BC=81=EF=BC=81
> >
> >
> >
> >
> >
> >
> >
> > Yaming Chen
> > GDE-EDSCD
> >
> > =E5=8D=9A=E8=A5=BF=E5=8D=8E=E7=94=B5=E5=99=A8=EF=BC=88=E6=B1=9F=E8=8B=
=8F=EF=BC=89=E6=9C=89=E9=99=90=E5=85=AC=E5=8F=B8, =E4=B8=AD=E5=9B=BD=E6=B1=
=9F=E8=8B=8F=E7=9C=81=E5=8D=97=E4=BA=AC=E5=B8=82=E7=BB=8F=E6=B5=8E=E6=8A=80=
=E6=9C=AF=E5=BC=80=E5=8F=91=E5=8C=BA=E5=B0=A7=E6=96=B0=E5=A4=A7=E9=81=93208=
=E5=8F=B7 210046
> > =E6=89=8B=E6=9C=BA=EF=BC=9A19962032751
> > [email protected]
> >
> >
>
>
>
> --
> Michael Nazzareno Trimarchi
> Co-Founder & Chief Executive Officer
> M. +39 347 913 2170
> [email protected]
> __________________________________
>
> Amarula Solutions BV
> Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
> T. +31 (0)85 111 9172
> [email protected]
> www.amarulasolutions.com
--=20
Michael Nazzareno Trimarchi
Co-Founder & Chief Executive Officer
M. +39 347 913 2170
[email protected]
__________________________________
Amarula Solutions BV
Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
T. +31 (0)85 111 9172
[email protected]
www.amarulasolutions.com