Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: sing-box high load CPU on certain processes (when installing MS Office, for instance) #6485

Closed
2 tasks done
d0verenny opened this issue Jan 11, 2025 · 3 comments
Closed
2 tasks done
Labels
bug Something isn't working

Comments

@d0verenny
Copy link

预期情况

sing-box CPU load should be ~1%

实际情况

When I was installing the MS Office from here, https://gravesoft.dev/office_c2r_links, sing-box went 60-70% load on CPU.

复现方法

  1. Launch v2ray in Tun mode
  2. Download and install MS Office from here
  3. Open Task Manager and see the sing-box.exe going 30-70% CPU load

日志信息

2025-01-12 01:15:42.9042-DEBUG CoreHandler,Only part of a ReadProcessMemory or WriteProcessMemory request was completed.
2025-01-12 01:15:42.9042-DEBUG at System.Diagnostics.NtProcessManager.EnumProcessModulesUntilSuccess(SafeProcessHandle processHandle, IntPtr[] modules, Int32 size, Int32& needed, Int32 filterFlag)
at System.Diagnostics.NtProcessManager.GetModules(Int32 processId, Boolean firstModuleOnly)
at System.Diagnostics.NtProcessManager.GetFirstModule(Int32 processId)
at ServiceLib.Common.ProcUtils.ProcessKill(Process proc, Boolean review) in /home/runner/work/v2rayN/v2rayN/v2rayN/ServiceLib/Common/ProcUtils.cs:line 85
at ServiceLib.Handler.CoreHandler.CoreStop() in /home/runner/work/v2rayN/v2rayN/v2rayN/ServiceLib/Handler/CoreHandler.cs:line 115
2025-01-12 01:15:50.6693-INFO MyAppExitAsync Begin
2025-01-12 01:15:51.3444-INFO ProcUtils, KillProcess not completing the job, fileName
2025-01-12 01:15:51.3444-INFO MyAppExitAsync End
2025-01-12 01:15:51.3942-INFO OnExit
2025-01-12 01:15:52.6734-INFO UpdateTaskRunGeo
2025-01-12 01:16:52.6861-INFO UpdateTaskRunSubscription
2025-01-12 01:27:34.1996-INFO ProcUtils, KillProcess not completing the job, procId
2025-01-12 01:27:37.2593-DEBUG ProcUtils,No process is associated with this object.
2025-01-12 01:27:37.2740-DEBUG at System.Diagnostics.Process.EnsureState(State state)
at System.Diagnostics.Process.EnsureState(State state)
at System.Diagnostics.Process.get_MainModule()
at ServiceLib.Common.ProcUtils.ProcessKill(Process proc, Boolean review) in /home/runner/work/v2rayN/v2rayN/v2rayN/ServiceLib/Common/ProcUtils.cs:line 106
2025-01-12 01:27:37.5992-INFO ProcUtils, KillProcess not completing the job, procId
2025-01-12 01:27:37.9101-DEBUG ProcUtils,No process is associated with this object.
2025-01-12 01:27:37.9101-DEBUG at System.Diagnostics.Process.EnsureState(State state)
at System.Diagnostics.Process.EnsureState(State state)
at System.Diagnostics.Process.get_MainModule()
at ServiceLib.Common.ProcUtils.ProcessKill(Process proc, Boolean review) in /home/runner/work/v2rayN/v2rayN/v2rayN/ServiceLib/Common/ProcUtils.cs:line 106
2025-01-12 01:27:40.5032-INFO MyAppExitAsync Begin
2025-01-12 01:27:41.3455-INFO MyAppExitAsync End
2025-01-12 01:27:41.3876-INFO OnExit
2025-01-12 01:27:41.4968-INFO v2rayN start up | v2rayN - V7.5.6 - X64 | C:\Users\maxpe\AppData\Local\Microsoft\WinGet\Packages\2dust.v2rayN_Microsoft.Winget.Source_8wekyb3d8bbwe\v2rayN-windows-64-With-Core\ | C:\Users\maxpe\AppData\Local\Microsoft\WinGet\Packages\2dust.v2rayN_Microsoft.Winget.Source_8wekyb3d8bbwe\v2rayN-windows-64-With-Core\v2rayN.exe | Microsoft Windows NT 10.0.26100.0 | 64
2025-01-12 01:27:43.3862-INFO UpdateTaskRunGeo
2025-01-12 01:28:43.3962-INFO UpdateTaskRunSubscription
2025-01-12 01:29:32.4732-INFO ProcUtils, KillProcess not completing the job, procId
2025-01-12 01:29:34.7268-DEBUG ProcUtils,No process is associated with this object.
2025-01-12 01:29:34.7630-DEBUG at System.Diagnostics.Process.EnsureState(State state)
at System.Diagnostics.Process.EnsureState(State state)
at System.Diagnostics.Process.get_MainModule()
at ServiceLib.Common.ProcUtils.ProcessKill(Process proc, Boolean review) in /home/runner/work/v2rayN/v2rayN/v2rayN/ServiceLib/Common/ProcUtils.cs:line 106
2025-01-12 01:29:35.3659-DEBUG CoreHandler,Only part of a ReadProcessMemory or WriteProcessMemory request was completed.
2025-01-12 01:29:35.3659-DEBUG at System.Diagnostics.NtProcessManager.EnumProcessModulesUntilSuccess(SafeProcessHandle processHandle, IntPtr[] modules, Int32 size, Int32& needed, Int32 filterFlag)
at System.Diagnostics.NtProcessManager.GetModules(Int32 processId, Boolean firstModuleOnly)
at System.Diagnostics.NtProcessManager.GetFirstModule(Int32 processId)
at ServiceLib.Common.ProcUtils.ProcessKill(Process proc, Boolean review) in /home/runner/work/v2rayN/v2rayN/v2rayN/ServiceLib/Common/ProcUtils.cs:line 85
at ServiceLib.Handler.CoreHandler.CoreStop() in /home/runner/work/v2rayN/v2rayN/v2rayN/ServiceLib/Handler/CoreHandler.cs:line 115
2025-01-12 01:29:36.5891-INFO MyAppExitAsync Begin
2025-01-12 01:29:37.0109-DEBUG CoreHandler,Only part of a ReadProcessMemory or WriteProcessMemory request was completed.
2025-01-12 01:29:37.0109-DEBUG at System.Diagnostics.NtProcessManager.EnumProcessModulesUntilSuccess(SafeProcessHandle processHandle, IntPtr[] modules, Int32 size, Int32& needed, Int32 filterFlag)
at System.Diagnostics.NtProcessManager.GetModules(Int32 processId, Boolean firstModuleOnly)
at System.Diagnostics.NtProcessManager.GetFirstModule(Int32 processId)
at ServiceLib.Common.ProcUtils.ProcessKill(Process proc, Boolean review) in /home/runner/work/v2rayN/v2rayN/v2rayN/ServiceLib/Common/ProcUtils.cs:line 85
at ServiceLib.Handler.CoreHandler.CoreStop() in /home/runner/work/v2rayN/v2rayN/v2rayN/ServiceLib/Handler/CoreHandler.cs:line 115
2025-01-12 01:29:37.0109-INFO MyAppExitAsync End
2025-01-12 01:29:37.0348-INFO OnExit
2025-01-12 01:29:50.6539-INFO v2rayN start up | v2rayN - V7.5.6 - X64 | C:\Users\maxpe\AppData\Local\Microsoft\WinGet\Packages\2dust.v2rayN_Microsoft.Winget.Source_8wekyb3d8bbwe\v2rayN-windows-64-With-Core\ | C:\Users\maxpe\AppData\Local\Microsoft\WinGet\Packages\2dust.v2rayN_Microsoft.Winget.Source_8wekyb3d8bbwe\v2rayN-windows-64-With-Core\v2rayN.exe | Microsoft Windows NT 10.0.26100.0 | 64
2025-01-12 01:29:51.4976-INFO UpdateTaskRunGeo
2025-01-12 01:30:51.4992-INFO UpdateTaskRunSubscription
2025-01-12 01:31:07.7750-INFO ProcUtils, KillProcess not completing the job, procId
2025-01-12 01:31:08.0861-DEBUG ProcUtils,No process is associated with this object.
2025-01-12 01:31:08.0861-DEBUG at System.Diagnostics.Process.EnsureState(State state)
at System.Diagnostics.Process.EnsureState(State state)
at System.Diagnostics.Process.get_MainModule()
at ServiceLib.Common.ProcUtils.ProcessKill(Process proc, Boolean review) in /home/runner/work/v2rayN/v2rayN/v2rayN/ServiceLib/Common/ProcUtils.cs:line 106
2025-01-12 01:31:08.8740-DEBUG CoreHandler,Only part of a ReadProcessMemory or WriteProcessMemory request was completed.
2025-01-12 01:31:08.8740-DEBUG at System.Diagnostics.NtProcessManager.EnumProcessModulesUntilSuccess(SafeProcessHandle processHandle, IntPtr[] modules, Int32 size, Int32& needed, Int32 filterFlag)
at System.Diagnostics.NtProcessManager.GetModules(Int32 processId, Boolean firstModuleOnly)
at System.Diagnostics.NtProcessManager.GetFirstModule(Int32 processId)
at ServiceLib.Common.ProcUtils.ProcessKill(Process proc, Boolean review) in /home/runner/work/v2rayN/v2rayN/v2rayN/ServiceLib/Common/ProcUtils.cs:line 85
at ServiceLib.Handler.CoreHandler.CoreStop() in /home/runner/work/v2rayN/v2rayN/v2rayN/ServiceLib/Handler/CoreHandler.cs:line 115
2025-01-12 01:31:12.8349-INFO MyAppExitAsync Begin
2025-01-12 01:31:13.4884-INFO ProcUtils, KillProcess not completing the job, fileName
2025-01-12 01:31:13.4884-INFO MyAppExitAsync End
2025-01-12 01:31:13.5429-INFO OnExit
2025-01-12 01:32:41.3339-INFO v2rayN start up | v2rayN - V7.5.6 - X64 | C:\Users\maxpe\AppData\Local\Microsoft\WinGet\Packages\2dust.v2rayN_Microsoft.Winget.Source_8wekyb3d8bbwe\v2rayN-windows-64-With-Core\ | C:\Users\maxpe\AppData\Local\Microsoft\WinGet\Packages\2dust.v2rayN_Microsoft.Winget.Source_8wekyb3d8bbwe\v2rayN-windows-64-With-Core\v2rayN.exe | Microsoft Windows NT 10.0.26100.0 | 64
2025-01-12 01:32:42.0703-INFO UpdateTaskRunGeo
2025-01-12 01:33:42.0870-INFO UpdateTaskRunSubscription
2025-01-12 01:36:14.9728-DEBUG CoreHandler,Only part of a ReadProcessMemory or WriteProcessMemory request was completed.
2025-01-12 01:36:14.9728-DEBUG at System.Diagnostics.NtProcessManager.EnumProcessModulesUntilSuccess(SafeProcessHandle processHandle, IntPtr[] modules, Int32 size, Int32& needed, Int32 filterFlag)
at System.Diagnostics.NtProcessManager.GetModules(Int32 processId, Boolean firstModuleOnly)
at System.Diagnostics.NtProcessManager.GetFirstModule(Int32 processId)
at ServiceLib.Common.ProcUtils.ProcessKill(Process proc, Boolean review) in /home/runner/work/v2rayN/v2rayN/v2rayN/ServiceLib/Common/ProcUtils.cs:line 85
at ServiceLib.Handler.CoreHandler.CoreStop() in /home/runner/work/v2rayN/v2rayN/v2rayN/ServiceLib/Handler/CoreHandler.cs:line 115
2025-01-12 01:36:20.2143-INFO MyAppExitAsync Begin
2025-01-12 01:36:20.2709-DEBUG DownloadService,The SSL connection could not be established, see inner exception.
2025-01-12 01:36:20.2709-DEBUG at System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, Boolean async, Stream stream, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem queueItem)
at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpClient.GetStringAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken)
at ServiceLib.Common.HttpClientHelper.GetAsync(HttpClient client, String url, CancellationToken token) in /home/runner/work/v2rayN/v2rayN/v2rayN/ServiceLib/Common/HttpClientHelper.cs:line 48
at ServiceLib.Services.DownloadService.DownloadStringAsync(String url, Boolean blProxy, String userAgent, Int32 timeout) in /home/runner/work/v2rayN/v2rayN/v2rayN/ServiceLib/Services/DownloadService.cs:line 177
2025-01-12 01:36:20.2709-ERROR System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
2025-01-12 01:36:20.8850-INFO MyAppExitAsync End
2025-01-12 01:36:20.9124-INFO OnExit
2025-01-12 01:36:21.2666-INFO v2rayN start up | v2rayN - V7.5.6 - X64 | C:\Users\maxpe\AppData\Local\Microsoft\WinGet\Packages\2dust.v2rayN_Microsoft.Winget.Source_8wekyb3d8bbwe\v2rayN-windows-64-With-Core\ | C:\Users\maxpe\AppData\Local\Microsoft\WinGet\Packages\2dust.v2rayN_Microsoft.Winget.Source_8wekyb3d8bbwe\v2rayN-windows-64-With-Core\v2rayN.exe | Microsoft Windows NT 10.0.26100.0 | 64
2025-01-12 01:36:22.1427-INFO UpdateTaskRunGeo
2025-01-12 01:37:22.1554-INFO UpdateTaskRunSubscription
2025-01-12 01:38:39.8680-INFO MyAppExitAsync Begin
2025-01-12 01:38:40.2311-INFO ProcUtils, KillProcess not completing the job, procId
2025-01-12 01:38:40.5435-DEBUG ProcUtils,No process is associated with this object.
2025-01-12 01:38:40.5589-DEBUG at System.Diagnostics.Process.EnsureState(State state)
at System.Diagnostics.Process.EnsureState(State state)
at System.Diagnostics.Process.get_MainModule()
at ServiceLib.Common.ProcUtils.ProcessKill(Process proc, Boolean review) in /home/runner/work/v2rayN/v2rayN/v2rayN/ServiceLib/Common/ProcUtils.cs:line 106
2025-01-12 01:38:40.8783-INFO ProcUtils, KillProcess not completing the job, procId
2025-01-12 01:38:41.1905-DEBUG ProcUtils,No process is associated with this object.
2025-01-12 01:38:41.1905-DEBUG at System.Diagnostics.Process.EnsureState(State state)
at System.Diagnostics.Process.EnsureState(State state)
at System.Diagnostics.Process.get_MainModule()
at ServiceLib.Common.ProcUtils.ProcessKill(Process proc, Boolean review) in /home/runner/work/v2rayN/v2rayN/v2rayN/ServiceLib/Common/ProcUtils.cs:line 106
2025-01-12 01:38:41.1905-INFO MyAppExitAsync End
2025-01-12 01:38:41.2115-INFO OnExit
2025-01-12 01:40:07.7084-INFO v2rayN start up | v2rayN - V7.5.6 - X64 | C:\Users\maxpe\AppData\Local\Microsoft\WinGet\Packages\2dust.v2rayN_Microsoft.Winget.Source_8wekyb3d8bbwe\v2rayN-windows-64-With-Core\ | C:\Users\maxpe\AppData\Local\Microsoft\WinGet\Packages\2dust.v2rayN_Microsoft.Winget.Source_8wekyb3d8bbwe\v2rayN-windows-64-With-Core\v2rayN.exe | Microsoft Windows NT 10.0.26100.0 | 64
2025-01-12 01:40:25.6704-INFO UpdateTaskRunGeo
2025-01-12 01:41:25.6735-INFO UpdateTaskRunSubscription
2025-01-12 01:51:43.2539-INFO MyAppExitAsync Begin
2025-01-12 01:51:48.5529-INFO ProcUtils, KillProcess not completing the job, procId
2025-01-12 01:51:48.9145-DEBUG ProcUtils,No process is associated with this object.
2025-01-12 01:51:48.9336-DEBUG at System.Diagnostics.Process.EnsureState(State state)
at System.Diagnostics.Process.EnsureState(State state)
at System.Diagnostics.Process.get_MainModule()
at ServiceLib.Common.ProcUtils.ProcessKill(Process proc, Boolean review) in /home/runner/work/v2rayN/v2rayN/v2rayN/ServiceLib/Common/ProcUtils.cs:line 106
2025-01-12 01:51:49.6762-INFO ProcUtils, KillProcess not completing the job, procId
2025-01-12 01:51:50.0039-DEBUG ProcUtils,No process is associated with this object.
2025-01-12 01:51:50.0039-DEBUG at System.Diagnostics.Process.EnsureState(State state)
at System.Diagnostics.Process.EnsureState(State state)
at System.Diagnostics.Process.get_MainModule()
at ServiceLib.Common.ProcUtils.ProcessKill(Process proc, Boolean review) in /home/runner/work/v2rayN/v2rayN/v2rayN/ServiceLib/Common/ProcUtils.cs:line 106
2025-01-12 01:51:50.0039-INFO MyAppExitAsync End
2025-01-12 01:51:50.2310-INFO OnExit
2025-01-12 01:53:00.0576-INFO v2rayN start up | v2rayN - V7.5.6 - X64 | C:\Users\maxpe\AppData\Local\Microsoft\WinGet\Packages\2dust.v2rayN_Microsoft.Winget.Source_8wekyb3d8bbwe\v2rayN-windows-64-With-Core\ | C:\Users\maxpe\AppData\Local\Microsoft\WinGet\Packages\2dust.v2rayN_Microsoft.Winget.Source_8wekyb3d8bbwe\v2rayN-windows-64-With-Core\v2rayN.exe | Microsoft Windows NT 10.0.26100.0 | 64
2025-01-12 01:53:00.9242-INFO UpdateTaskRunGeo
2025-01-12 01:53:48.1540-INFO Current_SessionEnding
2025-01-12 01:53:48.1553-INFO MyAppExitAsync Begin
2025-01-12 01:55:07.0900-INFO v2rayN start up | v2rayN - V7.5.6 - X64 | C:\Users\maxpe\AppData\Local\Microsoft\WinGet\Packages\2dust.v2rayN_Microsoft.Winget.Source_8wekyb3d8bbwe\v2rayN-windows-64-With-Core\ | C:\Users\maxpe\AppData\Local\Microsoft\WinGet\Packages\2dust.v2rayN_Microsoft.Winget.Source_8wekyb3d8bbwe\v2rayN-windows-64-With-Core\v2rayN.exe | Microsoft Windows NT 10.0.26100.0 | 64
2025-01-12 01:55:13.9096-INFO UpdateTaskRunGeo
2025-01-12 01:56:13.9086-INFO UpdateTaskRunSubscription
2025-01-12 02:19:54.7178-INFO MyAppExitAsync Begin
2025-01-12 02:19:56.4948-INFO ProcUtils, KillProcess not completing the job, procId
2025-01-12 02:19:56.8247-DEBUG ProcUtils,No process is associated with this object.
2025-01-12 02:19:56.8454-DEBUG at System.Diagnostics.Process.EnsureState(State state)
at System.Diagnostics.Process.EnsureState(State state)
at System.Diagnostics.Process.get_MainModule()
at ServiceLib.Common.ProcUtils.ProcessKill(Process proc, Boolean review) in /home/runner/work/v2rayN/v2rayN/v2rayN/ServiceLib/Common/ProcUtils.cs:line 106
2025-01-12 02:19:57.2852-INFO ProcUtils, KillProcess not completing the job, procId
2025-01-12 02:19:57.6135-DEBUG ProcUtils,No process is associated with this object.
2025-01-12 02:19:57.6135-DEBUG at System.Diagnostics.Process.EnsureState(State state)
at System.Diagnostics.Process.EnsureState(State state)
at System.Diagnostics.Process.get_MainModule()
at ServiceLib.Common.ProcUtils.ProcessKill(Process proc, Boolean review) in /home/runner/work/v2rayN/v2rayN/v2rayN/ServiceLib/Common/ProcUtils.cs:line 106
2025-01-12 02:19:57.6135-INFO MyAppExitAsync End
2025-01-12 02:19:57.6407-INFO OnExit
2025-01-12 02:23:22.4891-INFO v2rayN start up | v2rayN - V7.5.6 - X64 | C:\Users\maxpe\AppData\Local\Microsoft\WinGet\Packages\2dust.v2rayN_Microsoft.Winget.Source_8wekyb3d8bbwe\v2rayN-windows-64-With-Core\ | C:\Users\maxpe\AppData\Local\Microsoft\WinGet\Packages\2dust.v2rayN_Microsoft.Winget.Source_8wekyb3d8bbwe\v2rayN-windows-64-With-Core\v2rayN.exe | Microsoft Windows NT 10.0.26100.0 | 64
2025-01-12 02:23:23.3399-INFO UpdateTaskRunGeo
2025-01-12 02:23:39.2866-INFO MyAppExitAsync Begin
2025-01-12 02:23:39.9605-INFO MyAppExitAsync End
2025-01-12 02:23:39.9796-INFO OnExit
2025-01-12 02:28:08.9550-INFO v2rayN start up | v2rayN - V7.5.6 - X64 | C:\Users\maxpe\AppData\Local\Microsoft\WinGet\Packages\2dust.v2rayN_Microsoft.Winget.Source_8wekyb3d8bbwe\v2rayN-windows-64-With-Core\ | C:\Users\maxpe\AppData\Local\Microsoft\WinGet\Packages\2dust.v2rayN_Microsoft.Winget.Source_8wekyb3d8bbwe\v2rayN-windows-64-With-Core\v2rayN.exe | Microsoft Windows NT 10.0.26100.0 | 64
2025-01-12 02:28:09.7792-INFO UpdateTaskRunGeo
2025-01-12 02:29:09.7894-INFO UpdateTaskRunSubscription
2025-01-12 02:37:46.6106-DEBUG ProcUtils,No process is associated with this object.
2025-01-12 02:37:46.6362-DEBUG at System.Diagnostics.Process.EnsureState(State state)
at System.Diagnostics.Process.EnsureState(State state)
at System.Diagnostics.Process.get_Id()
at ServiceLib.Common.ProcUtils.ProcessStart(String fileName, String arguments, String dir) in /home/runner/work/v2rayN/v2rayN/v2rayN/ServiceLib/Common/ProcUtils.cs:line 35

额外信息

ver. 7.5.6

我确认已更新至最新版本

我确认已查询历史issues

@d0verenny d0verenny added the bug Something isn't working label Jan 11, 2025
@2dust
Copy link
Owner

2dust commented Jan 12, 2025

The performance of tun mode entry is not as good as socks entry. If you just want to download, please set socks proxy in the download software or browser settings.

@d0verenny
Copy link
Author

d0verenny commented Jan 12, 2025

I'm using it on Discord and other banned software (by my state, or the states that bans IPs from my country or limits them) as well. Proxy isn't always a solution for me.

@2dust
Copy link
Owner

2dust commented Jan 12, 2025

#4539

@2dust 2dust closed this as not planned Won't fix, can't repro, duplicate, stale Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants