blacs leaves python images after quitting

5 views
Skip to first unread message

Chris Timossi

unread,
Mar 24, 2026, 6:03:12 PM (8 days ago) Mar 24
to the labscript suite
I've noticed two instances of python.exe are always left behind after quiting BLACS.  I don't know if it's a resource leak or not I usually just manually kill them. Here's the detail:

PS C:\Users\ctimo> get-process -Name python | Format-List *


Name                       : python
Id                         : 7192
PriorityClass              : Normal
FileVersion                : 3.11.14
HandleCount                : 194
WorkingSet                 : 17506304
PagedMemorySize            : 37634048
PrivateMemorySize          : 37634048
VirtualMemorySize          : 156205056
TotalProcessorTime         : 00:00:00.6562500
SI                         : 2
Handles                    : 194
VM                         : 4451172352
WS                         : 17506304
PM                         : 37634048
NPM                        : 47256
Path                       : C:\anaconda3\envs\labscript\python.exe
Company                    : Python Software Foundation
CPU                        : 0.65625
ProductVersion             : 3.11.14
Description                : Python
Product                    : Python
__NounName                 : Process
BasePriority               : 8
ExitCode                   :
HasExited                  : False
ExitTime                   :
Handle                     : 2284
SafeHandle                 : Microsoft.Win32.SafeHandles.SafeProcessHandle
MachineName                : .
MainWindowHandle           : 0
MainWindowTitle            :
MainModule                 : System.Diagnostics.ProcessModule (python.exe)
MaxWorkingSet              : 1413120
MinWorkingSet              : 204800
Modules                    : {System.Diagnostics.ProcessModule (python.exe), System.Diagnostics.ProcessModule
                             (ntdll.dll), System.Diagnostics.ProcessModule (KERNEL32.DLL),
                             System.Diagnostics.ProcessModule (KERNELBASE.dll)...}
NonpagedSystemMemorySize   : 47256
NonpagedSystemMemorySize64 : 47256
PagedMemorySize64          : 37634048
PagedSystemMemorySize      : 163640
PagedSystemMemorySize64    : 163640
PeakPagedMemorySize        : 38469632
PeakPagedMemorySize64      : 38469632
PeakWorkingSet             : 31981568
PeakWorkingSet64           : 31981568
PeakVirtualMemorySize      : 159318016
PeakVirtualMemorySize64    : 4454285312
PriorityBoostEnabled       : True
PrivateMemorySize64        : 37634048
PrivilegedProcessorTime    : 00:00:00.3750000
ProcessName                : python
ProcessorAffinity          : 255
Responding                 : True
SessionId                  : 2
StartInfo                  : System.Diagnostics.ProcessStartInfo
StartTime                  : 3/21/2026 1:31:23 PM
SynchronizingObject        :
Threads                    : {10484, 19292, 3008, 12292...}
UserProcessorTime          : 00:00:00.2812500
VirtualMemorySize64        : 4451172352
EnableRaisingEvents        : False
StandardInput              :
StandardOutput             :
StandardError              :
WorkingSet64               : 17506304
Site                       :
Container                  :

Name                       : python
Id                         : 12960
PriorityClass              : Normal
FileVersion                : 3.11.14
HandleCount                : 194
WorkingSet                 : 18493440
PagedMemorySize            : 38043648
PrivateMemorySize          : 38043648
VirtualMemorySize          : 156205056
TotalProcessorTime         : 00:00:01.6093750
SI                         : 2
Handles                    : 194
VM                         : 4451172352
WS                         : 18493440
PM                         : 38043648
NPM                        : 46312
Path                       : C:\anaconda3\envs\labscript\python.exe
Company                    : Python Software Foundation
CPU                        : 1.609375
ProductVersion             : 3.11.14
Description                : Python
Product                    : Python
__NounName                 : Process
BasePriority               : 8
ExitCode                   :
HasExited                  : False
ExitTime                   :
Handle                     : 1952
SafeHandle                 : Microsoft.Win32.SafeHandles.SafeProcessHandle
MachineName                : .
MainWindowHandle           : 0
MainWindowTitle            :
MainModule                 : System.Diagnostics.ProcessModule (python.exe)
MaxWorkingSet              : 1413120
MinWorkingSet              : 204800
Modules                    : {System.Diagnostics.ProcessModule (python.exe), System.Diagnostics.ProcessModule
                             (ntdll.dll), System.Diagnostics.ProcessModule (KERNEL32.DLL),
                             System.Diagnostics.ProcessModule (KERNELBASE.dll)...}
NonpagedSystemMemorySize   : 46312
NonpagedSystemMemorySize64 : 46312
PagedMemorySize64          : 38043648
PagedSystemMemorySize      : 163624
PagedSystemMemorySize64    : 163624
PeakPagedMemorySize        : 38502400
PeakPagedMemorySize64      : 38502400
PeakWorkingSet             : 32165888
PeakWorkingSet64           : 32165888
PeakVirtualMemorySize      : 159338496
PeakVirtualMemorySize64    : 4454305792
PriorityBoostEnabled       : True
PrivateMemorySize64        : 38043648
PrivilegedProcessorTime    : 00:00:00.9843750
ProcessName                : python
ProcessorAffinity          : 255
Responding                 : True
SessionId                  : 2
StartInfo                  : System.Diagnostics.ProcessStartInfo
StartTime                  : 3/21/2026 1:31:25 PM
SynchronizingObject        :
Threads                    : {16776, 3520, 5736, 11852...}
UserProcessorTime          : 00:00:00.6250000
VirtualMemorySize64        : 4451172352
EnableRaisingEvents        : False
StandardInput              :
StandardOutput             :
StandardError              :
WorkingSet64               : 18493440
Site                       :
Container                  :

Chris Billington

unread,
Mar 24, 2026, 6:54:10 PM (8 days ago) Mar 24
to labscri...@googlegroups.com
Hi Chris,

The two programs are "zlock" and "zlog" - the server programs managing inter-process file locking and logging used by the various labscript suite programs. When any program wants to connect to either of them, an instance is started if one isn't already running (unless configured to be running on a different computer). The programs continue running indefinitely after being started (this is kind of necessary since they can't know if another program, other than the one that started them, still needs to talk to them - there isn't any session-tracking that would allow them to close once they knew they weren't needed anymore).

So other than the fixed RAM usage of the two programs continuing to run, it's not a problem. It's also not a problem to terminate them if no labscript programs are running, though any that are may malfunction (the check for whether to start a new instance is only done at program startup).

Regards,

Chris

--
You received this message because you are subscribed to the Google Groups "the labscript suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to labscriptsuit...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/labscriptsuite/748f6f72-0b2c-4519-b79f-e6ff0eae694cn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages