From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Thomas Fitzsimmons Newsgroups: gmane.emacs.bugs Subject: bug#73199: soap-client; soap-invoke-internal is not thread-safe Date: Sat, 14 Sep 2024 10:06:47 -0400 Message-ID: References: <87cyl9j6ng.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38050"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: AlexHarsanyi@gmail.com, michael.albinus@gmx.de To: 73199@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 14 16:08:28 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1spTRr-0009j6-2Q for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 14 Sep 2024 16:08:27 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1spTRL-0005V3-Ca; Sat, 14 Sep 2024 10:07:55 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1spTRJ-0005UR-2X for bug-gnu-emacs@gnu.org; Sat, 14 Sep 2024 10:07:53 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1spTRI-0000gI-PM for bug-gnu-emacs@gnu.org; Sat, 14 Sep 2024 10:07:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=rHZqKbOz1TT9kQ0uANILJf9hAjmlQowbuoiM0HvN2+E=; b=FKevKcTjDZMU9UdpRq7YzfBvQ6R72F/Zv0D4p5DY9ynngLPdfPm0DoIHNMJhlOMCilNVUGiQZTntuoA5QTNOBGT14zL6tfahEFojEA13jBecL+ig3ge3gwV2fQ0vi47PYiyQTthQN7/yOl9TbicSiOaNogxV48DRQpUZVpFHE4LPLbY4JWyD/u5NRKmUTaKRcGpX6E6dazUP87rXMVPfbcXOpl73umEZ4x6tIRG/AmtlyWtxVAz+DQb+ckY/PSz92uy72nD2neev+WRNC771jeDzeHzQg+DjEDrjWLeKR7UC/vvbcd/R4Czi6k6pGHzswLGo+27Wq7lTZ4TbETMg9g==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1spTRT-0000ck-Ax for bug-gnu-emacs@gnu.org; Sat, 14 Sep 2024 10:08:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Thomas Fitzsimmons Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 14 Sep 2024 14:08:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73199 X-GNU-PR-Package: emacs X-Debbugs-Original-To: Michael Albinus via "Bug reports for GNU Emacs, the Swiss army knife of text editors" X-Debbugs-Original-Cc: Alexandru Harsanyi , Michael Albinus , 73199@debbugs.gnu.org Original-Received: via spool by 73199-submit@debbugs.gnu.org id=B73199.17263228312271 (code B ref 73199); Sat, 14 Sep 2024 14:08:03 +0000 Original-Received: (at 73199) by debbugs.gnu.org; 14 Sep 2024 14:07:11 +0000 Original-Received: from localhost ([127.0.0.1]:47441 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1spTQd-0000aV-Bj for submit@debbugs.gnu.org; Sat, 14 Sep 2024 10:07:11 -0400 Original-Received: from mail.fitzsim.org ([69.165.165.189]:46832) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1spTQZ-0000a0-N1 for 73199@debbugs.gnu.org; Sat, 14 Sep 2024 10:07:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=fitzsim.org ; s=20220430; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=rHZqKbOz1TT9kQ0uANILJf9hAjmlQowbuoiM0HvN2+E=; b=ar60v3q1WsTd48Y+5QWt99xgdV PwvdYooN+iUqVA72DmyOvDh/DX/azmE5AXbpqfaA3Fqs6n9zuT/VsTnuwZKnXQ7mj1WzLJfBe2dx4 lubIVcg+xrQTf8GQ0qxZPC+ZmU2lkyC7OsAYp6GsGz6ziOdizEspP/1Wozdn5s7btNJ+xZdhKCS0c FJEWjXHlRVy1zdgqCJ3Pej5wliUMASPO0NF7sP9rY+NZFSjtY7/+GXTA4dAqhQHdfmQ9hJGpnvHtB jW742VNzT4IeAYyZPLSMBa/iUQK/Gzk0BUf8NVPmhVFMzz3MNKQ0c5RSelJ1r67Y8DXNfPJUlNm4A nzEeEolQ==; Original-Received: from [192.168.1.1] (helo=localhost.localdomain) by mail.fitzsim.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1spTQF-000Dsl-22; Sat, 14 Sep 2024 10:06:48 -0400 In-Reply-To: <87cyl9j6ng.fsf@gmx.de> (Michael Albinus via's message of "Thu, 12 Sep 2024 16:20:03 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:291756 Archived-At: Hi Michael, Michael Albinus writes: > Forward to debbugs > > From: Michael Albinus > Subject: soap-client; soap-invoke-internal is not thread-safe > To: Alexandru Harsanyi > Date: Thu, 12 Sep 2024 15:57:45 +0200 (19 minutes, 24 seconds ago) > > In package debbugs, I try to use Emacs Lisp threads when retrieving SOAP > data from the debbugs server. However, ocaasionally I run into the error > > --8<---------------cut here---------------start------------->8--- > (error "Attempt to accept output from process debbugs.gnu.org locked to thread #") > --8<---------------cut here---------------end--------------->8--- > > My work around is to advice url-http-create-request > > --8<---------------cut here---------------start------------->8--- > (advice-add > 'url-http-create-request :around > (lambda (orig-fun) > "Set `url-http-attempt-keepalives' to nil." > (setq url-http-attempt-keepalives nil) > (funcall orig-fun)) > '(name debbugs-advice)) > --8<---------------cut here---------------end--------------->8--- > > However, it would be great if soap-invoke-internal could care. I am not able to test Excorporate's usage of soap-client anymore to check if a candidate patch would break anything. I will ask on emacs-devel if anyone wants to take over maintenance of Excorporate and its dependencies. A starting point for adding thread safety would be a minimal test case that calls soap-invoke-internal against the debbugs server from multiple different threads. Are you able to extract such a test case? If the resulting patch is obviously safe for single-threaded usage by Excorporate, then I could push it to soap-client.el. Thanks, Thomas