From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13541 invoked by alias); 17 Oct 2014 15:04:25 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 13531 invoked by uid 89); 17 Oct 2014 15:04:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: ausc60ps301.us.dell.com Received: from ausc60ps301.us.dell.com (HELO ausc60ps301.us.dell.com) (143.166.148.206) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Fri, 17 Oct 2014 15:04:24 +0000 X-LoopCount0: from 10.170.28.40 From: To: CC: , Subject: Re: recursion limit exceeded in Python API, but there's only one function in traceback Date: Fri, 17 Oct 2014 15:04:00 -0000 Message-ID: <2BD7D737-CFF3-4368-9265-25C6611CF40C@dell.com> References: <543FBDFF.3050709@redhat.com> <104DEFBD-D686-4290-8E3C-725A51C165E6@dell.com> <7BB30632-15BE-4EF8-B84F-D35A27772F18@dell.com> <5440EB39.2060305@redhat.com> In-Reply-To: <5440EB39.2060305@redhat.com> Content-Type: text/plain; charset="windows-1254" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-IsSubscribed: yes X-SW-Source: 2014-10/txt/msg00071.txt.bz2 On Oct 17, 2014, at 6:11 AM, Phil Muldoon wrote: > ... > Right. gdb.execute won't return until the command has completed. > Also the Python GIL has been acquired (as this is coming from the > Python interpreter) and so now Python is also blocked too. So in > effect the only thing running at this point is the gdb.execute command > that was invoked (in your case, the continue command). That will > return, and then the Python GIL will be released and the rest of the > script will continue. >=20 > I have a patch I need to upstream that adds a release_gil keyword to > gdb.execute. This optionally releases the GIL before executing the > command. But I have not got around to that yet. Could you explain why gdb.execute should ever hold onto the GIL while perfo= rming the command? I view gdb.execute as akin to an I/O operation, which r= eleases the GIL around the I/O. Another way to look at it is that execute = is performing a GDB command. Either that isn=92t a Python operation =97 in= which case the GIL is not needed since the data it protects won=92t be tou= ched. Or it is a command that (possibly indirectly) invokes another Python= operation =97 in which case the GIL has to be released or you end up with = a deadlock. What am I missing? paul