Skip to contentSkip to conversation

Too many wlans

DISCUSSION Klaus Ethgen 3 participants 6 messages Dec 6, 2021 – Dec 19, 2021

lore
Share & tools
lore
#0 lore raw

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

Signature · 3 lines
Klaus Ethgen                                       http://www.ethgen.ch/
pub  4096R/4E20AF1C 2011-05-16            Klaus Ethgen <[email protected]>
Fingerprint: 85D4 CA42 952C 949B 1753  62B3 79D0 B06F 4E20 AF1C
#1 lore raw

Hi,

Quoted 19 lines · Klaus Ethgen

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
```
Quoted 3 lines

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.

Quoted 2 lines

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.

Quoted 1 line

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

#2 lore raw

Hi

Quoted 38 lines · Daniel Wagner

Hi,

Quoted 19 lines · Klaus Ethgen

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
```
Quoted 3 lines

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.

Quoted 2 lines

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.

Quoted 8 lines
Quoted 1 line

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

Quoted 2 lines

Daniel

Signature · 11 lines
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
#3 lore raw
Quoted 5 lines · Michael Nazzareno Trimarchi
Quoted 3 lines

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.

#4 lore raw

Hi

Quoted 9 lines · Daniel Wagner
Quoted 5 lines · Michael Nazzareno Trimarchi
Quoted 3 lines

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

Signature · 11 lines
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
#5 lore raw
Quoted 2 lines · Michael Nazzareno Trimarchi

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 :)