connman.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* Too many wlans
@ 2021-12-06 13:10 Klaus Ethgen
  2021-12-19 17:22 ` Daniel Wagner
  0 siblings, 1 reply; 6+ messages in thread
From: Klaus Ethgen @ 2021-12-06 13:10 UTC (permalink / raw)
  To: connman

[-- Attachment #1: Type: text/plain, Size: 1244 bytes --]

Hello,

I found a bug in connman when too many networks are stored into
/var/lib/connman.

I shuttle between different locations and today, connman stopped showing
networks at all. After some debugging, I found the following Messages in
wpa_supplicant debug output:
```
wlan0: Event SCAN_RESULTS (3) received
Scan results did not fit - trying larger buffer (8192 bytes)
Scan results did not fit - trying larger buffer (16384 bytes)
Scan results did not fit - trying larger buffer (32768 bytes)
Scan results did not fit - trying larger buffer (65535 bytes)
ioctl[SIOCGIWSCAN]: Argument list too long
wlan0: Failed to get scan results
wlan0: Failed to get scan results - try scanning again
```

The `Argument list too long` got my interest and I looked into
/var/lib/connman finding 104 directories in the form
wifi_XXXXXXXXXXXX_XXXXXXXX_managed_XXXXXXXXX.

After deleting all directories and restarting connman, everything went
back to working state.

So, if that directories is an issue, could it be cleaned up?

Regards
   Klaus
-- 
Klaus Ethgen                                       http://www.ethgen.ch/
pub  4096R/4E20AF1C 2011-05-16            Klaus Ethgen <Klaus@Ethgen.ch>
Fingerprint: 85D4 CA42 952C 949B 1753  62B3 79D0 B06F 4E20 AF1C

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 688 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Too many wlans
  2021-12-06 13:10 Too many wlans Klaus Ethgen
@ 2021-12-19 17:22 ` Daniel Wagner
  2021-12-19 17:23   ` Michael Nazzareno Trimarchi
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Wagner @ 2021-12-19 17:22 UTC (permalink / raw)
  To: Klaus Ethgen; +Cc: connman

Hi,

On Mon, Dec 06, 2021 at 02:10:18PM +0100, Klaus Ethgen wrote:
> Hello,
> 
> I found a bug in connman when too many networks are stored into
> /var/lib/connman.
> 
> I shuttle between different locations and today, connman stopped showing
> networks at all. After some debugging, I found the following Messages in
> wpa_supplicant debug output:
> ```
> wlan0: Event SCAN_RESULTS (3) received
> Scan results did not fit - trying larger buffer (8192 bytes)
> Scan results did not fit - trying larger buffer (16384 bytes)
> Scan results did not fit - trying larger buffer (32768 bytes)
> Scan results did not fit - trying larger buffer (65535 bytes)
> ioctl[SIOCGIWSCAN]: Argument list too long
> wlan0: Failed to get scan results
> wlan0: Failed to get scan results - try scanning again
> ```
> 
> The `Argument list too long` got my interest and I looked into
> /var/lib/connman finding 104 directories in the form
> wifi_XXXXXXXXXXXX_XXXXXXXX_managed_XXXXXXXXX.

Do you have the exact log for this? ConnMan uses GLib APIs for iterating
over files and directory. I would be very surprised if GLib is not able
to deal with this small numbers of entries.

> After deleting all directories and restarting connman, everything went
> back to working state.

I don't think 104 known networks are a real resource problem as long
there is enough memory in the system. But even then, I don't think
ConnMan needs more than a few kb per known network.

> So, if that directories is an issue, could it be cleaned up?

Yes you can cleanup the directories but it's recommended not to do this
while ConnMan is running.

I think by deleting all known networks and previously corrupted? entry
got removed which prevented the proper working before.

Daniel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Too many wlans
  2021-12-19 17:22 ` Daniel Wagner
@ 2021-12-19 17:23   ` Michael Nazzareno Trimarchi
  2021-12-19 17:31     ` Daniel Wagner
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Nazzareno Trimarchi @ 2021-12-19 17:23 UTC (permalink / raw)
  To: Daniel Wagner; +Cc: Klaus Ethgen, connman

Hi

On Sun, Dec 19, 2021 at 6:22 PM Daniel Wagner <wagi@monom.org> wrote:
>
> Hi,
>
> On Mon, Dec 06, 2021 at 02:10:18PM +0100, Klaus Ethgen wrote:
> > Hello,
> >
> > I found a bug in connman when too many networks are stored into
> > /var/lib/connman.
> >
> > I shuttle between different locations and today, connman stopped showing
> > networks at all. After some debugging, I found the following Messages in
> > wpa_supplicant debug output:
> > ```
> > wlan0: Event SCAN_RESULTS (3) received
> > Scan results did not fit - trying larger buffer (8192 bytes)
> > Scan results did not fit - trying larger buffer (16384 bytes)
> > Scan results did not fit - trying larger buffer (32768 bytes)
> > Scan results did not fit - trying larger buffer (65535 bytes)
> > ioctl[SIOCGIWSCAN]: Argument list too long
> > wlan0: Failed to get scan results
> > wlan0: Failed to get scan results - try scanning again
> > ```
> >
> > The `Argument list too long` got my interest and I looked into
> > /var/lib/connman finding 104 directories in the form
> > wifi_XXXXXXXXXXXX_XXXXXXXX_managed_XXXXXXXXX.
>
> Do you have the exact log for this? ConnMan uses GLib APIs for iterating
> over files and directory. I would be very surprised if GLib is not able
> to deal with this small numbers of entries.
>
> > After deleting all directories and restarting connman, everything went
> > back to working state.
>
> I don't think 104 known networks are a real resource problem as long
> there is enough memory in the system. But even then, I don't think
> ConnMan needs more than a few kb per known network.
>
> > So, if that directories is an issue, could it be cleaned up?
>
> Yes you can cleanup the directories but it's recommended not to do this
> while ConnMan is running.
>
> I think by deleting all known networks and previously corrupted? entry
> got removed which prevented the proper working before.
>

I have respin the patches on network removal. I will send

Michael

> Daniel
>


-- 
Michael Nazzareno Trimarchi
Co-Founder & Chief Executive Officer
M. +39 347 913 2170
michael@amarulasolutions.com
__________________________________

Amarula Solutions BV
Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
T. +31 (0)85 111 9172
info@amarulasolutions.com
www.amarulasolutions.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Too many wlans
  2021-12-19 17:23   ` Michael Nazzareno Trimarchi
@ 2021-12-19 17:31     ` Daniel Wagner
  2021-12-19 17:41       ` Michael Nazzareno Trimarchi
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Wagner @ 2021-12-19 17:31 UTC (permalink / raw)
  To: Michael Nazzareno Trimarchi; +Cc: Klaus Ethgen, connman

On Sun, Dec 19, 2021 at 06:23:55PM +0100, Michael Nazzareno Trimarchi wrote:
> > I think by deleting all known networks and previously corrupted? entry
> > got removed which prevented the proper working before.
> >
> 
> I have respin the patches on network removal. I will send

That would be great. IIRC the patch was almost ready.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Too many wlans
  2021-12-19 17:31     ` Daniel Wagner
@ 2021-12-19 17:41       ` Michael Nazzareno Trimarchi
  2021-12-19 17:42         ` Daniel Wagner
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Nazzareno Trimarchi @ 2021-12-19 17:41 UTC (permalink / raw)
  To: Daniel Wagner; +Cc: Klaus Ethgen, connman

Hi

On Sun, Dec 19, 2021 at 6:31 PM Daniel Wagner <wagi@monom.org> wrote:
>
> On Sun, Dec 19, 2021 at 06:23:55PM +0100, Michael Nazzareno Trimarchi wrote:
> > > I think by deleting all known networks and previously corrupted? entry
> > > got removed which prevented the proper working before.
> > >
> >
> > I have respin the patches on network removal. I will send
>
> That would be great. IIRC the patch was almost ready.

I would like to send it on Christmas as I have a nice way to put
variables :D follow the Christmas tree pattern ;)

Michael

-- 
Michael Nazzareno Trimarchi
Co-Founder & Chief Executive Officer
M. +39 347 913 2170
michael@amarulasolutions.com
__________________________________

Amarula Solutions BV
Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
T. +31 (0)85 111 9172
info@amarulasolutions.com
www.amarulasolutions.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Too many wlans
  2021-12-19 17:41       ` Michael Nazzareno Trimarchi
@ 2021-12-19 17:42         ` Daniel Wagner
  0 siblings, 0 replies; 6+ messages in thread
From: Daniel Wagner @ 2021-12-19 17:42 UTC (permalink / raw)
  To: Michael Nazzareno Trimarchi; +Cc: Klaus Ethgen, connman

On Sun, Dec 19, 2021 at 06:41:25PM +0100, Michael Nazzareno Trimarchi wrote:
> I would like to send it on Christmas as I have a nice way to put
> variables :D follow the Christmas tree pattern ;)

Hehe, nice present indeed :)

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-12-19 17:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-06 13:10 Too many wlans Klaus Ethgen
2021-12-19 17:22 ` Daniel Wagner
2021-12-19 17:23   ` Michael Nazzareno Trimarchi
2021-12-19 17:31     ` Daniel Wagner
2021-12-19 17:41       ` Michael Nazzareno Trimarchi
2021-12-19 17:42         ` Daniel Wagner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).