Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Zachary Ware Newsgroups: comp.lang.python Subject: Re: Futex hang when running event loop on a separated thread Date: Tue, 24 Nov 2015 13:41:51 -0600 Lines: 17 Sender: zachary.ware@gmail.com Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de ePzqEm12rvvhKgSUFWf64g2NFIRtu4XEoH2h4GIfTqIA== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.011 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'differently': 0.07; 'behave': 0.09; 'directions': 0.09; 'thread': 0.10; 'python': 0.10; '24,': 0.16; 'fix,': 0.16; 'osx': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'stuff,': 0.16; 'subject:when': 0.16; 'wrote:': 0.16; 'sender:addr:gmail.com': 0.18; 'python?': 0.18; '2015': 0.20; 'appears': 0.23; 'tried': 0.24; 'patch': 0.24; 'header:In-Reply-To:1': 0.24; 'message-id:@mail.gmail.com': 0.27; 'idea': 0.28; 'marc': 0.29; "can't": 0.32; 'maybe': 0.33; 'evolving': 0.33; 'ubuntu': 0.33; "skip:' 20": 0.34; 'tue,': 0.34; 'received:google.com': 0.35; 'nov': 0.35; 'but': 0.36; 'received:209.85': 0.36; 'to:addr:python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'version': 0.38; 'received:209': 0.38; 'why': 0.39; 'received:209.85.214': 0.39; 'to:addr:python.org': 0.40; 'still': 0.40; 'some': 0.40; 'hang': 0.60; 'waiting': 0.60; 'your': 0.60; 'confirm': 0.62; 'more': 0.63; 'between': 0.65; '12:37': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=9/SU0tHVHd/XZ6AIuO4O7P+e+rFAyLC4eMz9iEhy2IA=; b=Y7g2ozeWhm5vaUVWEU29RfWYcKs6B0j8+WF6G7tNQP/7d5WdVbSEDH9TSjrsTclfoo T/iHZkIWjdYnCHbQLTuhG4eESAKIxuPlVR1ZKdmomNEhIbDKUIOtStV7q/eKNuLC12EM 4ZBzQlmU05gKX8AjLFznDkuJWvMunXGuyaPKx8ENTDXYPCYPy6A5N94leqB8azIxpfTg KH4+BQ9MqurRYFoHcgM0G3sfxararu8P4a2mFh/j0Tdm2+5QLVVdcU93CPE0ezY8aweF yOTHaT/ZIpya6zatmMPW6qGmlMDq68xz7izYioH6OJ6DNSp2qI/vMEMEsZPW5M+Looyw sILQ== X-Received: by 10.182.22.132 with SMTP id d4mr10158559obf.50.1448394130295; Tue, 24 Nov 2015 11:42:10 -0800 (PST) In-Reply-To: X-Google-Sender-Auth: 2Yf1Jwe5RqScC9uUdtuMV51FA0o X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:99391 On Tue, Nov 24, 2015 at 12:37 PM, Marc Aymerich wrote: > still it appears to work only if the main thread is in the foreground > (as of calling Thread() with deamon=True), I don't get why it behaves > differently :( maybe it is waiting for other stuff, but no idea how to > confirm this with strace of other means.. i always see the same > 'futex(0x7f9a70000c10, FUTEX_WAIT_PRIVATE, 0, NULL' What's your exact version of Python? asyncio is still evolving rapidly, and may behave differently between patch releases (say, between 3.4.1 and 3.4.3). I have tried out your reproducer with my fix, and I can't provoke a hang using Python 3.4.3 on either OSX or Ubuntu Trusty. Can you give some more specific directions to reproduce? -- Zach