bostrot / wsl2-distro-manager

A GUI to quickly manage your WSL2 instances
https://apps.microsoft.com/store/detail/wsl-manager/9NWS9K95NMJB
Other
1.79k stars 108 forks source link

[BUG] Extreme log spam (10+ gigs/day) #216

Closed SirFrags closed 11 months ago

SirFrags commented 12 months ago

Is there an existing issue for this?

Current Behavior

When blocked from internet access, the log is filled with rapid repeated errors:

Error: SocketException: A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied.
 (OS Error: A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied.
, errno = 10057), address = n8n.aachen.dev, port = 54907 at #0      DioMixin.fetch.<anonymous closure> (package:dio/src/dio_mixin.dart:507)
#1      _RootZone.runUnary (dart:async/zone.dart:1661)
#2      _FutureListener.handleError (dart:async/future_impl.dart:174)
#3      Future._propagateToListeners.handleError (dart:async/future_impl.dart:852)
#4      Future._propagateToListeners (dart:async/future_impl.dart:873)
#5      Future._completeError (dart:async/future_impl.dart:649)
#6      _SyncCompleter._completeError (dart:async/future_impl.dart:60)
#7      _Completer.completeError (dart:async/future_impl.dart:26)
#8      Future.any.onError (dart:async/future.dart:620)
#9      _RootZone.runBinary (dart:async/zone.dart:1666)
#10     _FutureListener.handleError (dart:async/future_impl.dart:171)
#11     Future._propagateToListeners.handleError (dart:async/future_impl.dart:852)
#12     Future._propagateToListeners (dart:async/future_impl.dart:873)
#13     Future._completeError (dart:async/future_impl.dart:649)
#14     Future._chainForeignFuture.<anonymous closure> (dart:async/future_impl.dart:550)
#15     _microtaskLoop (dart:async/schedule_microtask.dart:40)
#16     _startMicrotaskLoop (dart:async/schedule_microtask.dart:49)
 in nullDioException [unknown]: null

Where the port is incremented on each retry.

Expected Behavior

It should give up trying to contact at some point and/or throttle attempts to reduce log spam, cpu usage, etc.

Steps To Reproduce

  1. wsl2-distro-manager-v1.8.9.zip
  2. Extract to a folder.
  3. Block wsl2distromanager.exe with windows firewall.
  4. C:\Users\\AppData\Roaming\com.bostrot\WSL Distro Manager\wslmanager_01.log grows rapidly

Environment

- Windows Version: Windows 11 21H2
- WSL Distro Manager Version: v1.8.9

Anything else?

No response

github-actions[bot] commented 12 months ago

Hello there! As you are a first time Issuer please read our Code of Conduct. Please also check whether your issue description is reasonable and complete. If you are having an issue always include the version you are using (WSL, this app, Windows) as well as a way to reproduce it.