GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — ThreadSanitizer reports thread leak in multiprocessing.Manager accepter thread · Issue #140267 · python/cpython Closed Closed Copy link Labels stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error DescriptionBug reportBug description:How to ReproduceCC=clang CXX=clang++ ./configure --with-thread-sanitizer --with-pydebug --with-lto=full && make -j8TSAN_OPTIONS=handle_segv=0 ./python -X dev -m test test_multiprocessing_forkserver.test_manager -j8ThreadSanitizer OutputReproduces: Every run Observations
This suppression masks all thread leaks starting from
The def accepter(self): while True: # Line ~197 try: c = self.listener.accept() except OSError: continue t = threading.Thread(target=self.handle_request, args=(c,)) t.daemon = True t.start() The def serve_forever(self): self.stop_event = threading.Event() # ... accepter = threading.Thread(target=self.accepter) accepter.daemon = True accepter.start() try: while not self.stop_event.is_set(): # Line ~189 self.stop_event.wait(1) The def shutdown(self, c): # ... finally: self.stop_event.set() # Line ~235
def serve_client(self, conn): while not self.stop_event.is_set(): # Line ~259 # handle requests AnalysisThe
When The test teardown ( cls.manager.shutdown() cls.manager.join() ThreadSanitizer detects that the daemon accepter thread was created but not properly joined/terminated. Additional Context
CPython versions tested on:3.15 Operating systems tested on:Linux Linked PRsActivity
MetadataMetadataAssigneesLabelsstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error ProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |