From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HTML_MESSAGE,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 26157 invoked from network); 5 Nov 2023 01:35:15 -0000 Received: from tb-ob20.topicbox.com (173.228.157.66) by inbox.vuxu.org with ESMTPUTF8; 5 Nov 2023 01:35:15 -0000 Received: from tb-mx1.topicbox.com (tb-mx1.nyi.icgroup.com [10.90.30.61]) by tb-ob20.topicbox.com (Postfix) with ESMTP id D2C0329F82 for ; Sat, 4 Nov 2023 21:35:12 -0400 (EDT) (envelope-from bounce.mMeba86a2cee63818883e31403.r522be890-2105-11eb-b15e-8d699134e1fa@9fans.bounce.topicbox.com) Received: by tb-mx1.topicbox.com (Postfix, from userid 1132) id AB7B329700B; Sat, 4 Nov 2023 21:35:12 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=9fans.net; h=to :message-id:date:mime-version:content-type :content-transfer-encoding:list-help:list-id:list-post :list-subscribe:reply-to:subject:from:list-unsubscribe; s= dkim-1; t=1699148112; x=1699234512; bh=gVVoNmL0CSy7BZzU7uy4T8c/Y zsF76OoGaWMmHGm44M=; b=N9o0g3fEHFm/183G+QXDh+FP0svegb27EHhg8E3Ti JAfZExEj27ZkQeYXFM74bQBj69OVwr0S53NUXrpKGX+EFdLW7cs7XFoVhJWuoNWI fwxEYTz3UmtdsMKwS/kMXH/fyf9sMJlavzsbfb04r5KvqRDbrsJmKFeC02pL9Jo8 TM= To: 9fans <9fans@9fans.net> Message-Id: <16991481040.88FDBb.122754@composer.9fans.topicbox.com> Date: Sat, 4 Nov 2023 21:35:04 -0400 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary=16991481041.9c7850a.122754 Content-Transfer-Encoding: 7bit Topicbox-Policy-Reasoning: allow: sender is a member Topicbox-Message-UUID: 8b467c48-7b7b-11ee-9496-1783232d11b0 Archived-At: =?UTF-8?B?PGh0dHBzOi8vOWZhbnMudG9waWNib3guY29tL2dyb3Vwcy85?= =?UTF-8?B?ZmFucy9UN2E1YmIzY2RlNTBhOGE5YS1NZWJhODZhMmNlZTYzODE4ODgzZTMx?= =?UTF-8?B?NDAzPg==?= List-Help: List-Id: "9fans" <9fans.9fans.net> List-Post: List-Software: Topicbox v0 List-Subscribe: Precedence: list Reply-To: 9fans <9fans@9fans.net> Subject: [9fans] odd rwakeup qunlock behaviour in 9vx From: "ibrahim via 9fans" <9fans@9fans.net> List-Unsubscribe: , Topicbox-Delivery-ID: 2:9fans:437d30aa-c441-11e9-8a57-d036212d11b0:522be890-2105-11eb-b15e-8d699134e1fa:Meba86a2cee63818883e31403:1:i0StFay1i9rlTqjBKvCeJIS54IEUAOB7lxHuQmLAcYw --16991481041.9c7850a.122754 Date: Sat, 4 Nov 2023 21:35:04 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I have a function chan_send in which : chan_send (...) { qlock() rwakeup(...) qunlock() } If two such chan_send functions are called without a "task-switch" 9vx cras= hes. A work around for this problem is to place a sleep(0) after qunlock to= enforce a task-switch chan_send(...) { qlock() rwakeup(...) qunlock() sleep(0) } This behaviour isn't documented anywhere. I'll test it next on bare metal w= ith a real kernel to find out if this is only a 9vx problem. ------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/T7a5bb3cde50a8a9a-Meba86= a2cee63818883e31403 Delivery options: https://9fans.topicbox.com/groups/9fans/subscription --16991481041.9c7850a.122754 Date: Sat, 4 Nov 2023 21:35:04 -0400 MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I have a function chan_send in which :
chan_send (...) {
qlock()
rwakeup(= ...)
qunlock()
}

If two such chan_send functions are called without a "task-swit= ch" 9vx crashes. A work around for this problem is to place a sleep(0)= after qunlock to enforce a task-switch

ch= an_send(...) {
qlock()
rwakeup(...)
qunlock()
sleep(0)
}

This behaviour isn't documented anywhere. I'll = test it next on bare metal with a real kernel to find out if this is only a= 9vx problem.



= --16991481041.9c7850a.122754-- From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 6631 invoked from network); 8 Nov 2023 21:08:56 -0000 Received: from tb-ob21.topicbox.com (173.228.157.67) by inbox.vuxu.org with ESMTPUTF8; 8 Nov 2023 21:08:56 -0000 Received: from tb-mx1.topicbox.com (tb-mx1.nyi.icgroup.com [10.90.30.61]) by tb-ob21.topicbox.com (Postfix) with ESMTP id AD573341AD for ; Wed, 8 Nov 2023 16:08:52 -0500 (EST) (envelope-from bounce.mM861c10f8be4b323658622f9a.r522be890-2105-11eb-b15e-8d699134e1fa@9fans.bounce.topicbox.com) Received: by tb-mx1.topicbox.com (Postfix, from userid 1132) id 8BB962F5C40; Wed, 8 Nov 2023 16:08:52 -0500 (EST) ARC-Authentication-Results: i=2; topicbox.com; arc=pass; dkim=none (no signatures found); dmarc=pass policy.published-domain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,d=none,d.eval=none) policy.policy-from=p header.from=eigenstate.org; spf=pass smtp.mailfrom=ori@eigenstate.org smtp.helo=mimir.eigenstate.org; x-internal-arc=fail (as.1.topicbox.com=pass, ams.1.topicbox.com=fail (message has been altered)) (Message modified while forwarding at Topicbox) ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=message-id:to:subject:date:from:in-reply-to :mime-version:content-type:content-transfer-encoding:list-help :list-id:list-post:list-subscribe:reply-to:list-unsubscribe; s= sysmsg-1; t=1699477732; bh=X7XnZmm/Doeg2jUnLWgC8RQJWi6QC8j8wtced ILfnic=; b=A8B5cbJSVXCToSWYnPW4M8t8RGZCnl1L1t8lxTNTTK1jaEX8URWQ8 WF+NOb3XwjXDwPb8HY6+VQcTAkk3cWhjg7ogW68tDAgE0Eg6oxebGlHYMa2X1GL6 /ZeZ57fV2YUo7h5Xr7P9n3TvJkNzbpnAu1CIQXWz9N3uBICa89Xed8= ARC-Seal: i=2; a=rsa-sha256; cv=pass; d=topicbox.com; s=sysmsg-1; t= 1699477732; b=VC0VtRo5XKiCaUJw3PXUk46E8VAfChDzQPhnfKBLfNYfW7qAxk k7QvM1dw+0jb8bycCznc1+71dwIrx9FLEF/DjzQxIKoxOguRuNd72TarSRhBNbAr cba7RDrYOKeGmFA0paW4jMrVTqsXQWJpIfkqPRzAQwciCamLZEIjEhOrg= Authentication-Results: topicbox.com; arc=pass; dkim=none (no signatures found); dmarc=pass policy.published-domain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,d=none,d.eval=none) policy.policy-from=p header.from=eigenstate.org; spf=pass smtp.mailfrom=ori@eigenstate.org smtp.helo=mimir.eigenstate.org; x-internal-arc=fail (as.1.topicbox.com=pass, ams.1.topicbox.com=fail (message has been altered)) (Message modified while forwarding at Topicbox) X-Received-Authentication-Results: tb-mx0.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC Policy is not at enforcement); dkim=none (no signatures found); dmarc=pass policy.published-domain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,d=none,d.eval=none) policy.policy-from=p header.from=eigenstate.org; iprev=pass smtp.remote-ip=206.124.132.107 (mimir.eigenstate.org); spf=pass smtp.mailfrom=ori@eigenstate.org smtp.helo=mimir.eigenstate.org; x-aligned-from=pass (Address match); x-me-sender=none; x-ptr=pass smtp.helo=mimir.eigenstate.org policy.ptr=mimir.eigenstate.org; x-return-mx=pass header.domain=eigenstate.org policy.is_org=yes (MX Records found: eigenstate.org,mail.pikopiko.org,kusuri.pikopiko.org,nokogiri.pikopiko.org); x-return-mx=pass smtp.domain=eigenstate.org policy.is_org=yes (MX Records found: eigenstate.org,mail.pikopiko.org,kusuri.pikopiko.org,nokogiri.pikopiko.org); x-tls=pass smtp.version=TLSv1.2 smtp.cipher=ECDHE-RSA-AES256-GCM-SHA384 smtp.bits=256/256; x-vs=clean score=0 state=0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=9fans.net; h=message-id :to:subject:date:from:in-reply-to:mime-version:content-type :content-transfer-encoding:list-help:list-id:list-post :list-subscribe:reply-to:list-unsubscribe; s=dkim-1; t= 1699477732; x=1699564132; bh=X7XnZmm/Doeg2jUnLWgC8RQJWi6QC8j8wtc edILfnic=; b=K5gmNAN/UyDSEb3QpY14FTb26UQEKoO6c2M5nsRwrXztrqOGcl9 8kiIMx7WYTh0MNsbyvl1Yg11nW52hCS3YJbFkrhUJdv+3ewFVs4wjzBcXKhT7KoO laPbQFAzuMVVevuMtWR96vZdZ13r2l2+YOj5SGQt+z4cgzdqleiFAFDw= Received: from tb-mx0.topicbox.com (localhost.local [127.0.0.1]) by tb-mx0.topicbox.com (Postfix) with ESMTP id CFCC92D68F2D for <9fans@9fans.net>; Wed, 8 Nov 2023 16:08:36 -0500 (EST) (envelope-from ori@eigenstate.org) Received: from tb-mx0.topicbox.com (localhost [127.0.0.1]) by tb-mx0.topicbox.com (Authentication Milter) with ESMTP id EF78CA1C893; Wed, 8 Nov 2023 16:08:36 -0500 ARC-Seal: i=1; a=rsa-sha256; cv=none; d=topicbox.com; s=arcseal; t= 1699477716; b=jyZWOofn4NZoBA69RtV+OPrhsbzSgFN27WM+pS8U4UX2IgD1lR iK5/+oT6CIWynA1VN8FAPUpLkTR6DWH6MSMwTWX+smjaKBwp7siUqAZLsoM0PsAa EVFGRKoycGBRdkKqc4SEDXTsjb59huytBn0hZTtDynZHH8K2eavOiDkwPwsDd89U fOHul4cQjqTBNE0TPC9HJwFdapMXTVFA5e5bBnnp2dERG7ulNYvfZcnK2q0IxluI pZi1elRWbvVhlmlVFV7PUsf++jbefsI0PkRkNPcgVCG8JwBzcdJlLIIaPsK5M9oN W584QcN30ARchDccRjKqTsaQsWs7nQxW17xQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=message-id:to:subject:date:from:in-reply-to :mime-version:content-type:content-transfer-encoding; s=arcseal; t=1699477716; bh=Z6B2bcnknrdPaHvOhDCGKKRdrpmov2GF5k8rsBK90yg=; b= c2k9pCjZ5FyEkFv1TE8ZuAm7c5A4zkwX+eb8yShQ/Wqqm160VU3yjmKGXx5SfEQo Xs5Chk+wZoZuXFbpJo86hjaQ0dbYtNcEOqxX0yM1rbgMMFy0FhlN/CJvUsHVQifW ynHXBOjxqtSqvWOZWEFUo7vAt8L34b8ypKXff52OAmcSWWeEP0chT7lo/+Yt12nI kX2UlVLdqDry5HM5VyBOfqPtjtrqOvWgJuwiR42UZG+MM4FCpthalJMqAtP4nMgL FT/mci14eCwaLgQWLYQE6CVqk5TMzusuUCmM2QqWU4yVR8SwdQdjNA9tkuyNohQF EdFf5erDOqR31j2KJjHG5Q== ARC-Authentication-Results: i=1; tb-mx0.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC Policy is not at enforcement); dkim=none (no signatures found); dmarc=pass policy.published-domain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,d=none,d.eval=none) policy.policy-from=p header.from=eigenstate.org; iprev=pass smtp.remote-ip=206.124.132.107 (mimir.eigenstate.org); spf=pass smtp.mailfrom=ori@eigenstate.org smtp.helo=mimir.eigenstate.org; x-aligned-from=pass (Address match); x-me-sender=none; x-ptr=pass smtp.helo=mimir.eigenstate.org policy.ptr=mimir.eigenstate.org; x-return-mx=pass header.domain=eigenstate.org policy.is_org=yes (MX Records found: eigenstate.org,mail.pikopiko.org,kusuri.pikopiko.org,nokogiri.pikopiko.org); x-return-mx=pass smtp.domain=eigenstate.org policy.is_org=yes (MX Records found: eigenstate.org,mail.pikopiko.org,kusuri.pikopiko.org,nokogiri.pikopiko.org); x-tls=pass smtp.version=TLSv1.2 smtp.cipher=ECDHE-RSA-AES256-GCM-SHA384 smtp.bits=256/256; x-vs=clean score=0 state=0 X-ME-VSCause: gggruggvucftvghtrhhoucdtuddrgedvkedrudduledgudegfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecunecujfgurhepkffvuf ffhfgjgggtgfesthejjedttddtvdenucfhrhhomhepohhrihesvghighgvnhhsthgrthgv rdhorhhgnecuggftrfgrthhtvghrnhepvdefgeekieetgeehueefudfhtedvuefhgeelud duvdejhfdukeeiudelhedtgeelnecuffhomhgrihhnpehtohhpihgtsghogidrtghomhen ucfkphepvddtiedruddvgedrudefvddruddtjedpudejvddrheeirdduieehrdduvdekne cuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvddtiedruddvgedr udefvddruddtjedphhgvlhhopehmihhmihhrrdgvihhgvghnshhtrghtvgdrohhrghdpmh grihhlfhhrohhmpeeoohhrihesvghighgvnhhsthgrthgvrdhorhhgqe X-ME-VSScore: 0 X-ME-VSCategory: clean Received-SPF: pass (eigenstate.org: 206.124.132.107 is authorized to use 'ori@eigenstate.org' in 'mfrom' identity (mechanism 'ip4:206.124.132.96/28' matched)) receiver=tb-mx0.topicbox.com; identity=mailfrom; envelope-from="ori@eigenstate.org"; helo=mimir.eigenstate.org; client-ip=206.124.132.107 Received: from mimir.eigenstate.org (mimir.eigenstate.org [206.124.132.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tb-mx0.topicbox.com (Postfix) with ESMTPS for <9fans@9fans.net>; Wed, 8 Nov 2023 16:08:35 -0500 (EST) (envelope-from ori@eigenstate.org) Received: from stockyard.lan ( [172.56.165.128]) by mimir.eigenstate.org (OpenSMTPD) with ESMTPSA id 97eb66b6 (TLSv1.2:ECDHE-RSA-AES256-SHA:256:NO) for <9fans@9fans.net>; Wed, 8 Nov 2023 13:08:34 -0800 (PST) Message-ID: <05DC7BC5698D779E601D2AB8E1882F4B@eigenstate.org> To: 9fans@9fans.net Subject: Re: [9fans] odd rwakeup qunlock behaviour in 9vx Date: Wed, 08 Nov 2023 16:08:31 -0500 From: ori@eigenstate.org In-Reply-To: <16991481040.88FDBb.122754@composer.9fans.topicbox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Topicbox-Policy-Reasoning: allow: sender is a member Topicbox-Message-UUID: fee0d426-7e7a-11ee-8aa7-4f6d078c7b06 Archived-At: =?UTF-8?B?PGh0dHBzOi8vOWZhbnMudG9waWNib3guY29tL2dyb3Vwcy85?= =?UTF-8?B?ZmFucy9UN2E1YmIzY2RlNTBhOGE5YS1NODYxYzEwZjhiZTRiMzIzNjU4NjIy?= =?UTF-8?B?ZjlhPg==?= List-Help: List-Id: "9fans" <9fans.9fans.net> List-Post: List-Software: Topicbox v0 List-Subscribe: Precedence: list Reply-To: 9fans <9fans@9fans.net> List-Unsubscribe: , Topicbox-Delivery-ID: 2:9fans:437d30aa-c441-11e9-8a57-d036212d11b0:522be890-2105-11eb-b15e-8d699134e1fa:M861c10f8be4b323658622f9a:1:FzIGc2GQt9i85LhfXpb_o-W_6uhz3PI45OM4kGu5fdM A complete snippet to reproduce this may be useful. That said, I have code that uses qlock and rendez heavily with no sleeps, and have not had any issues on 9front. Quoth ibrahim via 9fans <9fans@9fans.net>: > I have a function chan_send in which : > chan_send (...) { > qlock() > rwakeup(...) > qunlock() > } >=20 > If two such chan_send functions are called without a "task-switch" 9vx cr= ashes. A work around for this problem is to place a sleep(0) after qunlock = to enforce a task-switch >=20 > chan_send(...) { > qlock() > rwakeup(...) > qunlock() > sleep(0) > } >=20 > This behaviour isn't documented anywhere. I'll test it next on bare metal= with a real kernel to find out if this is only a 9vx problem. >=20 ------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/T7a5bb3cde50a8a9a-M861c1= 0f8be4b323658622f9a Delivery options: https://9fans.topicbox.com/groups/9fans/subscription From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HTML_MESSAGE,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 17506 invoked from network); 8 Nov 2023 23:42:19 -0000 Received: from tb-ob1.topicbox.com (64.147.108.173) by inbox.vuxu.org with ESMTPUTF8; 8 Nov 2023 23:42:19 -0000 Received: from tb-mx0.topicbox.com (tb-mx0.nyi.icgroup.com [10.90.30.73]) by tb-ob1.topicbox.com (Postfix) with ESMTP id BFB211A029 for ; Wed, 8 Nov 2023 18:42:17 -0500 (EST) (envelope-from bounce.mM62c35c1979d8c1e3f89621f0.r522be890-2105-11eb-b15e-8d699134e1fa@9fans.bounce.topicbox.com) Received: by tb-mx0.topicbox.com (Postfix, from userid 1132) id B79FA2D7083A; Wed, 8 Nov 2023 18:42:17 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=9fans.net; h=to:subject :message-id:references:in-reply-to:date:mime-version :content-type:content-transfer-encoding:list-help:list-id :list-post:list-subscribe:reply-to:from:list-unsubscribe; s= dkim-1; t=1699486937; x=1699573337; bh=WR7DyuAG0gltCEMqhFY5CZOOF LZXNfEom6fg99yQ3qI=; b=qhhSNzHey3osNVsz58OMKOrbjxLdC7euuLazcy8Kr 8KKNI3MKUjZfrhcntY1zu3vF02KeRRfa8c5Bfos2aNF6CSby/liSbW3NbDeiC1us Tif3g2UkErntLypkrs90Q7QRCcgBrCP6l2AGycAHi0GgG0uWQR6su49Niy+Z3C9a yY= To: 9fans <9fans@9fans.net> Subject: Re: [9fans] odd rwakeup qunlock behaviour in 9vx Message-Id: <16994869310.bb41deF.62237@composer.9fans.topicbox.com> References: <05DC7BC5698D779E601D2AB8E1882F4B@eigenstate.org> In-Reply-To: <05DC7BC5698D779E601D2AB8E1882F4B@eigenstate.org> Date: Wed, 8 Nov 2023 18:42:11 -0500 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary=16994869311.614e1Ca.62237 Content-Transfer-Encoding: 7bit Topicbox-Policy-Reasoning: allow: sender is a member Topicbox-Message-UUID: 702cbb58-7e90-11ee-a673-34c640decc0b Archived-At: =?UTF-8?B?PGh0dHBzOi8vOWZhbnMudG9waWNib3guY29tL2dyb3Vwcy85?= =?UTF-8?B?ZmFucy9UN2E1YmIzY2RlNTBhOGE5YS1NNjJjMzVjMTk3OWQ4YzFlM2Y4OTYy?= =?UTF-8?B?MWYwPg==?= List-Help: List-Id: "9fans" <9fans.9fans.net> List-Post: List-Software: Topicbox v0 List-Subscribe: Precedence: list Reply-To: 9fans <9fans@9fans.net> From: "ibrahim via 9fans" <9fans@9fans.net> List-Unsubscribe: , Topicbox-Delivery-ID: 2:9fans:437d30aa-c441-11e9-8a57-d036212d11b0:522be890-2105-11eb-b15e-8d699134e1fa:M62c35c1979d8c1e3f89621f0:1:maFWVhSbajRIKzDIaY23H-5Emvsfz5bH35lGwtiAHIc --16994869311.614e1Ca.62237 Date: Wed, 8 Nov 2023 18:42:11 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Thanks for your reply. This behavior only appeared while using shared memor= y in form of segments. I already solved this problem by exchanging qlock, q= unlock by lock (canlock). I also didn't have any problems while using other= forms of memory constellations but while using shared memory segments this= problem surfaced. I need this for my vgafb implementation which makes use of shared physical = and normal shared memory segments. After testing on bare metal I also found= out that qlock, qunlock, rsleep, rwake ... caused kernel crashes on bare m= etal while usual locks work without any problems.=20 On 9vx I had to simulate vgafb with a implementation which provided my fram= ebuffer with a shared segment to transfer changes to devdraw this made deve= lopment easier but the moment I had concurrent access my software crashed. = Debugging made clear the source of the crash was the described call combina= tion while using shared memory segments. If there is interest for reproducing the exact circumstances I can write a = small example app which involves different processes accessing the same sha= red memory segments which are inherited by the rfork methods. ------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/T7a5bb3cde50a8a9a-M62c35= c1979d8c1e3f89621f0 Delivery options: https://9fans.topicbox.com/groups/9fans/subscription --16994869311.614e1Ca.62237 Date: Wed, 8 Nov 2023 18:42:11 -0500 MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thanks for your reply. This behavior only appe= ared while using shared memory in form of segments. I already solved this p= roblem by exchanging qlock, qunlock by lock (canlock). I also didn't ha= ve any problems while using other forms of memory constellations but while = using shared memory segments this problem surfaced.

<= /div>
I need this for my vgafb implementation which makes use of shared= physical and normal shared memory segments. After testing on bare metal I = also found out that qlock, qunlock, rsleep, rwake ... caused kernel crashes= on bare metal while usual locks work without any problems.

On 9vx I had to simulate vgafb with a implementation whi= ch provided my framebuffer with a shared segment to transfer changes to dev= draw this made development easier but the moment I had concurrent access my= software crashed. Debugging made clear the source of the crash was the des= cribed call combination while using shared memory segments.

If there is interest for reproducing the exact circumstan= ces I can write a small example app which involves different processes acce= ssing the same shared memory segments which are inherited by the rfork meth= ods.

= --16994869311.614e1Ca.62237-- From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 30718 invoked from network); 9 Nov 2023 03:17:13 -0000 Received: from tb-ob0.topicbox.com (64.147.108.117) by inbox.vuxu.org with ESMTPUTF8; 9 Nov 2023 03:17:13 -0000 Received: from tb-mx0.topicbox.com (tb-mx0.nyi.icgroup.com [10.90.30.73]) by tb-ob0.topicbox.com (Postfix) with ESMTP id C813C358D8 for ; Wed, 8 Nov 2023 22:17:11 -0500 (EST) (envelope-from bounce.mMcab3b424e9df06fcb544af90.r522be890-2105-11eb-b15e-8d699134e1fa@9fans.bounce.topicbox.com) Received: by tb-mx0.topicbox.com (Postfix, from userid 1132) id C3CE12D78337; Wed, 8 Nov 2023 22:17:11 -0500 (EST) ARC-Authentication-Results: i=2; topicbox.com; arc=pass; dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=F6CksBtv header.a=rsa-sha256 header.s=20230601 x-bits=2048; dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=gmail.com; spf=pass smtp.mailfrom=lucio.dere@gmail.com smtp.helo=mail-wr1-f51.google.com; x-internal-arc=fail (as.1.topicbox.com=pass, ams.1.topicbox.com=fail (message has been altered)) (Message modified while forwarding at Topicbox) ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type:list-help:list-id:list-post :list-subscribe:reply-to:content-transfer-encoding :list-unsubscribe; s=sysmsg-1; t=1699499831; bh=eC+39e09eUxWVxq/ Akve8PHmMk9QoIbrKD5E2dKkPHo=; b=hbrccV3w05bly0JatXM4sIwquu528nV5 b3H99mO9FHBJGpkrXjpSRPqzgEgCLP/CfrDeODivQCctdTOCzhbRgnDCinr8rKVs RVTBBuUxxIqu3Zpj2/qCoDTkOLCm+iN3ky3EdXI9maodsN739LAnNSu6hbMT0qvl tJ+lKYX7cn4= ARC-Seal: i=2; a=rsa-sha256; cv=pass; d=topicbox.com; s=sysmsg-1; t= 1699499831; b=ZFZcNuXds8a8foGGoFkTenPsPJw9KvZf1fQMx864k7mscntDMx onrNpMDPVqa125DcL+E+0NwnDOCsSzW4slW1HoZ1aFvuNdjcgEUPxZehJhuVU8mr UA4l80xH9AHda1WeL4A9pPymQpGs4+fKmkFkBI+lc0Fn32EZCJ20ePBP4= Authentication-Results: topicbox.com; arc=pass; dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=F6CksBtv header.a=rsa-sha256 header.s=20230601 x-bits=2048; dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=gmail.com; spf=pass smtp.mailfrom=lucio.dere@gmail.com smtp.helo=mail-wr1-f51.google.com; x-internal-arc=fail (as.1.topicbox.com=pass, ams.1.topicbox.com=fail (message has been altered)) (Message modified while forwarding at Topicbox) X-Received-Authentication-Results: tb-mx0.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC Policy is not at enforcement); dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=F6CksBtv header.a=rsa-sha256 header.s=20230601 x-bits=2048; dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=gmail.com; iprev=pass smtp.remote-ip=209.85.221.51 (mail-wr1-f51.google.com); spf=pass smtp.mailfrom=lucio.dere@gmail.com smtp.helo=mail-wr1-f51.google.com; x-aligned-from=pass (Address match); x-google-dkim=pass (2048-bit rsa key) header.d=1e100.net header.i=@1e100.net header.b=XdWvdMUR; x-me-sender=none; x-ptr=pass smtp.helo=mail-wr1-f51.google.com policy.ptr=mail-wr1-f51.google.com; x-return-mx=pass header.domain=gmail.com policy.is_org=yes (MX Records found: gmail-smtp-in.l.google.com,alt4.gmail-smtp-in.l.google.com,alt1.gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com); x-return-mx=pass smtp.domain=gmail.com policy.is_org=yes (MX Records found: gmail-smtp-in.l.google.com,alt4.gmail-smtp-in.l.google.com,alt1.gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com); x-tls=pass smtp.version=TLSv1.2 smtp.cipher=ECDHE-RSA-AES256-GCM-SHA384 smtp.bits=256/256; x-vs=clean score=0 state=0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=9fans.net; h= mime-version:in-reply-to:references:from:date:message-id:subject :to:content-type:list-help:list-id:list-post:list-subscribe :reply-to:content-transfer-encoding:list-unsubscribe; s=dkim-1; t=1699499831; x=1699586231; bh=eC+39e09eUxWVxq/Akve8PHmMk9QoIbr KD5E2dKkPHo=; b=bQ/D7uMmiRDvv+jpyPMGDANBa8YlPKQ4AnYybGBUkm/fW8b8 dJkrMBejwDUHUdTzzE2wa239AUxYB1hR2AVO4JAlw7ysS4OsxNwWcc1ayG5o/B5G ucgidgLrEv9lQx27Bv0uohon+quZlrkuoTId1TdOTYKnh/wAq7J2fmvQ9H0= Received: from tb-mx0.topicbox.com (localhost.local [127.0.0.1]) by tb-mx0.topicbox.com (Postfix) with ESMTP id 1857E2D77EFD for <9fans@9fans.net>; Wed, 8 Nov 2023 22:16:55 -0500 (EST) (envelope-from lucio.dere@gmail.com) Received: from tb-mx0.topicbox.com (localhost [127.0.0.1]) by tb-mx0.topicbox.com (Authentication Milter) with ESMTP id 158FAF14215; Wed, 8 Nov 2023 22:16:54 -0500 ARC-Seal: i=1; a=rsa-sha256; cv=none; d=topicbox.com; s=arcseal; t= 1699499814; b=sMmLWrY8jddNgATthzva4EtVk+L/EL91nXnfTBWZcCurnua1lC CJMoIooQCJRStkAWszFoPbst/R9kkUJzOVYAhSl7SjV/1YraEZ+X2UcAeGvUFVd0 dMQxsrZmJCOlR+Cfacrc8yXCZ7ZXnwRgwcZYJd8a0MexC/VV2eoHqoGS0HPV/HFA d6vjzO/zC7dopPD8SIFoKv1bBWj9MJbZnKIUFtI9E/tsQxp2T8oH757c/YVbC1xT 2KNAOQKyUzeEZwNp05nqEpPAMH+/TeIAcvk1eP4IRRVSOzQgPTy3EmjM969AuVG/ geCeew/OZNIqj1+3n0PL4HaugpQBZadmA62A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; s=arcseal; t=1699499814; bh=u9bVf2eNJyiGdSPYkk12Hbw+JFABxDHdEIRChnpRuLk=; b=RJKOgeIdOyr9 wbUCQaDAHUyBC9MaTY9K0PX95khl17YaOOJv+A5OZunyMsUfoFWFD0c5pUyy4dPD HVbUaR/d52A3tL29TriyDBBjiDl0o/QEKmG4QRpRE6y/mfrr63pONkL2xEOCfwYw sglgsy7nlBUHRTTcBbWMeW8JQVO6cDTSQcPFoL2TvHaXz/bJiPwZdy6QCwTs7onn 2L0nG1WNE82em5gVtTpb/h4HWLSVT0E5hk1k6kyy24tWhsapT5XNn9ocMCWH/VWs BoPpKzmlIkDDPzNe+ue2JTYAyaZky+qhi9X7W/A//4770WPE9zuRCkeZU7UM2re3 TxSCcWfLbQ== ARC-Authentication-Results: i=1; tb-mx0.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC Policy is not at enforcement); dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=F6CksBtv header.a=rsa-sha256 header.s=20230601 x-bits=2048; dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=gmail.com; iprev=pass smtp.remote-ip=209.85.221.51 (mail-wr1-f51.google.com); spf=pass smtp.mailfrom=lucio.dere@gmail.com smtp.helo=mail-wr1-f51.google.com; x-aligned-from=pass (Address match); x-google-dkim=pass (2048-bit rsa key) header.d=1e100.net header.i=@1e100.net header.b=XdWvdMUR; x-me-sender=none; x-ptr=pass smtp.helo=mail-wr1-f51.google.com policy.ptr=mail-wr1-f51.google.com; x-return-mx=pass header.domain=gmail.com policy.is_org=yes (MX Records found: gmail-smtp-in.l.google.com,alt4.gmail-smtp-in.l.google.com,alt1.gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com); x-return-mx=pass smtp.domain=gmail.com policy.is_org=yes (MX Records found: gmail-smtp-in.l.google.com,alt4.gmail-smtp-in.l.google.com,alt1.gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com); x-tls=pass smtp.version=TLSv1.2 smtp.cipher=ECDHE-RSA-AES256-GCM-SHA384 smtp.bits=256/256; x-vs=clean score=0 state=0 X-ME-VSCause: gggruggvucftvghtrhhoucdtuddrgedvkedruddvtddgheehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpegjfhfhff fkuffvtgesthdtredttddtjeenucfhrhhomhepnfhutghiohcuffgvucftvgcuoehluhgt ihhordguvghrvgesghhmrghilhdrtghomheqnecuggftrfgrthhtvghrnhepffdvgeeike ettdekhfehvdehveehtefhhfdthfejgedtudduieehledtfeefiedvnecukfhppedvtdel rdekhedrvddvuddrhedunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinh gvthepvddtledrkeehrddvvddurdehuddphhgvlhhopehmrghilhdqfihruddqfhehuddr ghhoohhglhgvrdgtohhmpdhmrghilhhfrhhomhepoehluhgtihhordguvghrvgesghhmrg hilhdrtghomheq X-ME-VSScore: 0 X-ME-VSCategory: clean Received-SPF: pass (gmail.com ... _spf.google.com: Sender is authorized to use 'lucio.dere@gmail.com' in 'mfrom' identity (mechanism 'include:_netblocks.google.com' matched)) receiver=tb-mx0.topicbox.com; identity=mailfrom; envelope-from="lucio.dere@gmail.com"; helo=mail-wr1-f51.google.com; client-ip=209.85.221.51 Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tb-mx0.topicbox.com (Postfix) with ESMTPS for <9fans@9fans.net>; Wed, 8 Nov 2023 22:16:54 -0500 (EST) (envelope-from lucio.dere@gmail.com) Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-32fdc5be26dso216534f8f.2 for <9fans@9fans.net>; Wed, 08 Nov 2023 19:16:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699499813; x=1700104613; h=to:subject:message-id:date:from:references:in-reply-to:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=u9bVf2eNJyiGdSPYkk12Hbw+JFABxDHdEIRChnpRuLk=; b=XdWvdMURi1xzfQMS/0fsj6MFrUFthcL7IyeSMq1aMKNLDnvOEVERlB7NV6SAkfLwVl a6mdQ6pmJoamHNvRrV3Ra7ktVQzXC0GN1l5NByyB8WGG+AsGHlSMdayNvRtPzmywC4lP cjKev9vdBDowmBiEWwvH1bNF8VnW/06rPkSQPlMHbEZi6nlCXX0T9/ZL1UxeYc7ewFcP XJWVtoAjpajg+haNEB+HEaFpIaFXasRIDaktymmXgzTUIX4ZpffcdrPWfRx83fkvwsVj BPUU01qy5W4c+osxa91OiW7Ys6jfbVq8jPskhTGzrS/VkEys4pVM/QwrDNh91t/XS9Sq lhKw== X-Gm-Message-State: AOJu0YytW3z6cDCopL44JU8QwFefwdIavvKiT3q+2Z2/2DQKfL5gIcdZ mAFYtzXZHGmAl7bkwhEHzXsI1hV8ZzM+aKtKm2mstwXu X-Google-Smtp-Source: AGHT+IFGQALM3IusZRx3toKKR3tGaf342TBEQoqY2KYhdIVTb7ahX0+BCw9U35exYvQyAN4D/QeqB39cPzJhV1ldNU0= X-Received: by 2002:a05:6000:1786:b0:32d:a221:446 with SMTP id e6-20020a056000178600b0032da2210446mr3674092wrg.59.1699499812873; Wed, 08 Nov 2023 19:16:52 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a5d:5887:0:b0:321:ed46:eb66 with HTTP; Wed, 8 Nov 2023 19:16:52 -0800 (PST) In-Reply-To: <16994869310.bb41deF.62237@composer.9fans.topicbox.com> References: <05DC7BC5698D779E601D2AB8E1882F4B@eigenstate.org> <16994869310.bb41deF.62237@composer.9fans.topicbox.com> From: Lucio De Re Date: Thu, 9 Nov 2023 05:16:52 +0200 Message-ID: Subject: Re: [9fans] odd rwakeup qunlock behaviour in 9vx To: 9fans <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Topicbox-Policy-Reasoning: allow: sender is a member Topicbox-Message-UUID: 721ac856-7eae-11ee-9b33-bfe0fc8b7b06 Archived-At: =?UTF-8?B?PGh0dHBzOi8vOWZhbnMudG9waWNib3guY29tL2dyb3Vwcy85?= =?UTF-8?B?ZmFucy9UN2E1YmIzY2RlNTBhOGE5YS1NY2FiM2I0MjRlOWRmMDZmY2I1NDRh?= =?UTF-8?B?ZjkwPg==?= List-Help: List-Id: "9fans" <9fans.9fans.net> List-Post: List-Software: Topicbox v0 List-Subscribe: Precedence: list Reply-To: 9fans <9fans@9fans.net> Content-Transfer-Encoding: quoted-printable List-Unsubscribe: , Topicbox-Delivery-ID: 2:9fans:437d30aa-c441-11e9-8a57-d036212d11b0:522be890-2105-11eb-b15e-8d699134e1fa:Mcab3b424e9df06fcb544af90:1:1hHHcfUvjK91xjJQp-KpqxIndadM7cG7llGOhPIT_IY On 11/9/23, ibrahim via 9fans <9fans@9fans.net> wrote: > > If there is interest for reproducing the exact circumstances I can write a > small example app which involves different processes accessing the same > shared memory segments which are inherited by the rfork methods. > I assume that such an example, in this context, would be instructive, if not immediately, certainly in the more distant future. I am sincerely hoping you intend to publish your efforts that certainly sound very promising. Lucio. ------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/T7a5bb3cde50a8a9a-Mcab3b= 424e9df06fcb544af90 Delivery options: https://9fans.topicbox.com/groups/9fans/subscription From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HTML_MESSAGE,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 28166 invoked from network); 10 Nov 2023 02:24:16 -0000 Received: from tb-ob1.topicbox.com (64.147.108.173) by inbox.vuxu.org with ESMTPUTF8; 10 Nov 2023 02:24:16 -0000 Received: from tb-mx1.topicbox.com (tb-mx1.nyi.icgroup.com [10.90.30.61]) by tb-ob1.topicbox.com (Postfix) with ESMTP id 09E4E2DF17 for ; Thu, 9 Nov 2023 21:24:14 -0500 (EST) (envelope-from bounce.mMfe4be6cb472537ea35f1d195.r522be890-2105-11eb-b15e-8d699134e1fa@9fans.bounce.topicbox.com) Received: by tb-mx1.topicbox.com (Postfix, from userid 1132) id 0639A32A1A4; Thu, 9 Nov 2023 21:24:13 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=9fans.net; h=to:subject :message-id:references:in-reply-to:date:mime-version :content-type:content-transfer-encoding:list-help:list-id :list-post:list-subscribe:reply-to:from:list-unsubscribe; s= dkim-1; t=1699583053; x=1699669453; bh=fi+OP6jJhvXYAWJkNSQAXLt79 Lf9SMBLa3cgF5kJBGg=; b=oxrqJImbIFnI5jFRQ/sdIWmu/r2/t2MroPHTzEQik azuST0aYFu2e3xTeQdvv7QlUsPp/VbKvhy29xvStXdHVLzKwIaxYtzxC7roJ/obc /UE5qtLkZ7E/pp85hpzCcYm4jNfdFQE4JGZvKC5c8TDnfpIfGSfIJ3KAaBXtk1Vr nk= To: 9fans <9fans@9fans.net> Subject: Re: [9fans] odd rwakeup qunlock behaviour in 9vx Message-Id: <16995830470.DAEce1.126202@composer.9fans.topicbox.com> References: <05DC7BC5698D779E601D2AB8E1882F4B@eigenstate.org> <16994869310.bb41deF.62237@composer.9fans.topicbox.com> In-Reply-To: Date: Thu, 9 Nov 2023 21:24:07 -0500 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary=16995830471.be29.126202 Content-Transfer-Encoding: 7bit Topicbox-Policy-Reasoning: allow: sender is a member Topicbox-Message-UUID: 3a58787e-7f70-11ee-802f-1783232d11b0 Archived-At: =?UTF-8?B?PGh0dHBzOi8vOWZhbnMudG9waWNib3guY29tL2dyb3Vwcy85?= =?UTF-8?B?ZmFucy9UN2E1YmIzY2RlNTBhOGE5YS1NZmU0YmU2Y2I0NzI1MzdlYTM1ZjFk?= =?UTF-8?B?MTk1Pg==?= List-Help: List-Id: "9fans" <9fans.9fans.net> List-Post: List-Software: Topicbox v0 List-Subscribe: Precedence: list Reply-To: 9fans <9fans@9fans.net> From: "ibrahim via 9fans" <9fans@9fans.net> List-Unsubscribe: , Topicbox-Delivery-ID: 2:9fans:437d30aa-c441-11e9-8a57-d036212d11b0:522be890-2105-11eb-b15e-8d699134e1fa:Mfe4be6cb472537ea35f1d195:1:GOkJEOXdjljM90UPD8HXOI3ZQicNmzbjnQH6ub8lWac --16995830471.be29.126202 Date: Thu, 9 Nov 2023 21:24:07 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Some time ago I wrote an email to p9f for registration of a user account in= the contrib folder but that mail never got delivered. Otherwise I would re= gularly place a binare image for x86 for testing the effect of changes I ma= de to the kernel and userland regarding performance. Regarding code samples : I'm using plan9 compilers as backends for my own C= with Objects dialect which gets preprocessed and generates code understood= by the plan9 compilers. My fork of plan9 isn't of general interest cause i= ts goal is to provide a small (currently 4,8 MB) graphical terminal which c= onnects to a closed area network server over tcp/ip for education purposes.= I avoid using 9p where possible to improve the performance of the system w= hich hasn't the goal to be a network operating system like plan9. I like th= e "everything is a file" model but implemented it in form of a block orient= ed memory file system using shared memory segments which leads to a great p= erformance boost cause interprocess communication between processes on a si= ngle machine are realized in the form of file exchange without any form of = translation to 9p and transfer over bytestreams which is surely necessary f= or a networking operating system like plan9 but not for an isolated machine= which has only a proprietary tcp/ip protocol connection to a well defined = server. For kernel files in /dev I wrote wrapper processes which transfer c= hanges into the shared memory file system realm.=20 In the first versions I used locks (especially lock and canlock) with polli= ng in slave processes. For the next version I tried to avoid polling by usi= ng qlocks rsleep and rwake but while testing under 9vx, qemu and on bare me= tal the above mentioned problems appeared. When a process using Rendez and = QLock structures in a shared memory segment called rwake more than once dur= ing its executing cycle first 9vx crashed than qemu crashed in an absurd wa= y and also the bare metal version crashed. The reasoning behind this thread is only informing others about possible pr= oblems I encountered. I don't need a solution I already have a working work= around using simple locks. My code would be of no benefit for other plan9 u= sers or developers but if there is interest for investigating the problem I= can write a simplified example which reproduces this behavior.=20 P.S. The shared memory is not attached with segattach but provided from rfo= rk/exec which could be one reason behind this problem. rfork copies the par= ent segments into the list which can be accessed using proc/n/segment and u= sing segments in this way is different from using segments by using segatta= ch in many ways.=C2=A0 Perhaps this is also the reason for the crashes. On Wednesday, 8 November 2023, at 10:08 PM, ori wrote: > A complete snippet to reproduce this may be useful. That said, I have code that uses qlock and rendez heavily with no sleeps, and have not had any issues on 9front. I also didn't have problems using qlock rendez without the combination of s= hared memory and rfork based shared segments. On Thursday, 9 November 2023, at 4:16 AM, Lucio De Re wrote: > I am sincerely hoping you intend to publish your efforts that certainly sound very promising. I intend shareing at least a binary version of my forked simple version aft= er porting scintilla to my gui system cause right my system consists mainly= of a viewer for a simplified markup which is used to present lecture notes= , sound and animations (proprietary format). An editor is my minimal expectation towards myself before making such an im= age available for discussions on this mailing list.=20 ------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/T7a5bb3cde50a8a9a-Mfe4be= 6cb472537ea35f1d195 Delivery options: https://9fans.topicbox.com/groups/9fans/subscription --16995830471.be29.126202 Date: Thu, 9 Nov 2023 21:24:07 -0500 MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Some time ago I wrote an email to p9f for regi= stration of a user account in the contrib folder but that mail never got de= livered. Otherwise I would regularly place a binare image for x86 for testi= ng the effect of changes I made to the kernel and userland regarding perfor= mance.

Regarding code samples : I'm us= ing plan9 compilers as backends for my own C with Objects dialect which get= s preprocessed and generates code understood by the plan9 compilers. My for= k of plan9 isn't of general interest cause its goal is to provide a sma= ll (currently 4,8 MB) graphical terminal which connects to a closed area ne= twork server over tcp/ip for education purposes. I avoid using 9p where pos= sible to improve the performance of the system which hasn't the goal to= be a network operating system like plan9. I like the "everything is a= file" model but implemented it in form of a block oriented memory fil= e system using shared memory segments which leads to a great performance bo= ost cause interprocess communication between processes on a single machine = are realized in the form of file exchange without any form of translation t= o 9p and transfer over bytestreams which is surely necessary for a networki= ng operating system like plan9 but not for an isolated machine which has on= ly a proprietary tcp/ip protocol connection to a well defined server. For k= ernel files in /dev I wrote wrapper processes which transfer changes into t= he shared memory file system realm.

In th= e first versions I used locks (especially lock and canlock) with polling in= slave processes. For the next version I tried to avoid polling by using ql= ocks rsleep and rwake but while testing under 9vx, qemu and on bare metal t= he above mentioned problems appeared. When a process using Rendez and QLock= structures in a shared memory segment called rwake more than once during i= ts executing cycle first 9vx crashed than qemu crashed in an absurd way and= also the bare metal version crashed.

The = reasoning behind this thread is only informing others about possible proble= ms I encountered. I don't need a solution I already have a working work= around using simple locks. My code would be of no benefit for other plan9 u= sers or developers but if there is interest for investigating the problem I= can write a simplified example which reproduces this behavior.

P.S. The shared memory is not attached with segattac= h but provided from rfork/exec which could be one reason behind this proble= m. rfork copies the parent segments into the list which can be accessed usi= ng proc/n/segment and using segments in this way is different from using se= gments by using segattach in many ways.  Perhaps this is also the reas= on for the crashes.

On Wednesday, 8 Novemb= er 2023, at 10:08 PM, ori wrote:
A com= plete snippet to reproduce this may be useful. That said, I have code that uses qlock and rendez heavily with no sleeps, and have not had any issues on 9front.
I = also didn't have problems using qlock rendez without the combination of= shared memory and rfork based shared segments.

On Thursday, 9 November 2023, at 4:16 AM, Lucio De Re wrote:
I am sincerely hoping you intend to publish yo= ur efforts that certainly sound very promising.
I intend shareing at= least a binary version of my forked simple version after porting scintilla= to my gui system cause right my system consists mainly of a viewer for a s= implified markup which is used to present lecture notes, sound and animatio= ns (proprietary format).
An editor is my minimal expectatio= n towards myself before making such an image available for discussions on t= his mailing list.



=
= --16995830471.be29.126202-- From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 6770 invoked from network); 10 Nov 2023 06:40:45 -0000 Received: from tb-ob0.topicbox.com (64.147.108.117) by inbox.vuxu.org with ESMTPUTF8; 10 Nov 2023 06:40:45 -0000 Received: from tb-mx1.topicbox.com (tb-mx1.nyi.icgroup.com [10.90.30.61]) by tb-ob0.topicbox.com (Postfix) with ESMTP id 2A19327E9D for ; Fri, 10 Nov 2023 01:40:43 -0500 (EST) (envelope-from bounce.mM34f4254c3d0c1808831f5047.r522be890-2105-11eb-b15e-8d699134e1fa@9fans.bounce.topicbox.com) Received: by tb-mx1.topicbox.com (Postfix, from userid 1132) id 21F9832D935; Fri, 10 Nov 2023 01:40:43 -0500 (EST) ARC-Authentication-Results: i=2; topicbox.com; arc=pass; dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=PSehZi0h header.a=rsa-sha256 header.s=20230601 x-bits=2048; dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=gmail.com; spf=pass smtp.mailfrom=lucio.dere@gmail.com smtp.helo=mail-wm1-f50.google.com; x-internal-arc=fail (as.1.topicbox.com=pass, ams.1.topicbox.com=fail (message has been altered)) (Message modified while forwarding at Topicbox) ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type:list-help:list-id:list-post :list-subscribe:reply-to:content-transfer-encoding :list-unsubscribe; s=sysmsg-1; t=1699598443; bh=M9N0wwqIq7UWZ4r1 yd6Iv1IgNBUXXgaHUe2848TRd+s=; b=ohcM1tXpw/vLJL/fkLNECHOeyxjUgCcK njlAF899cxbG6Oo+o8OG5F+lb1p8VzBnuuLrKfKxFBc8MyJ3tBbiv4godxwWO+e0 Tx/mjRlMY1x/Vo47+QALSQVM36JkQp+PQCmFO48OQP8wTNXQZGNSC+W6F6SSJt4t DMEOA9aPAyU= ARC-Seal: i=2; a=rsa-sha256; cv=pass; d=topicbox.com; s=sysmsg-1; t= 1699598443; b=Mdl6tkTH0KsSAAmi8Pa0xj5lPsr10cVlwPr5k1JnMk7iMRZZXx VhAlYqoSYAx4kxoQ2MHORek/C6jZl5dbNYh17exq9qhTH8pauAL1vqFUlIbMHHBe HcrdnolUReiGJ5FSPJ8MNwOEypDUehgtAtaVv+q4Ht8PW5Gb9+SzWkLR8= Authentication-Results: topicbox.com; arc=pass; dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=PSehZi0h header.a=rsa-sha256 header.s=20230601 x-bits=2048; dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=gmail.com; spf=pass smtp.mailfrom=lucio.dere@gmail.com smtp.helo=mail-wm1-f50.google.com; x-internal-arc=fail (as.1.topicbox.com=pass, ams.1.topicbox.com=fail (message has been altered)) (Message modified while forwarding at Topicbox) X-Received-Authentication-Results: tb-mx1.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC Policy is not at enforcement); dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=PSehZi0h header.a=rsa-sha256 header.s=20230601 x-bits=2048; dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=gmail.com; iprev=pass smtp.remote-ip=209.85.128.50 (mail-wm1-f50.google.com); spf=pass smtp.mailfrom=lucio.dere@gmail.com smtp.helo=mail-wm1-f50.google.com; x-aligned-from=pass (Address match); x-google-dkim=pass (2048-bit rsa key) header.d=1e100.net header.i=@1e100.net header.b=RUTcJZ9z; x-me-sender=none; x-ptr=pass smtp.helo=mail-wm1-f50.google.com policy.ptr=mail-wm1-f50.google.com; x-return-mx=pass header.domain=gmail.com policy.is_org=yes (MX Records found: alt3.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com,alt4.gmail-smtp-in.l.google.com,alt1.gmail-smtp-in.l.google.com); x-return-mx=pass smtp.domain=gmail.com policy.is_org=yes (MX Records found: alt3.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com,alt4.gmail-smtp-in.l.google.com,alt1.gmail-smtp-in.l.google.com); x-tls=pass smtp.version=TLSv1.2 smtp.cipher=ECDHE-RSA-AES256-GCM-SHA384 smtp.bits=256/256; x-vs=clean score=0 state=0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=9fans.net; h= mime-version:in-reply-to:references:from:date:message-id:subject :to:content-type:list-help:list-id:list-post:list-subscribe :reply-to:content-transfer-encoding:list-unsubscribe; s=dkim-1; t=1699598442; x=1699684842; bh=M9N0wwqIq7UWZ4r1yd6Iv1IgNBUXXgaH Ue2848TRd+s=; b=JhP2qutQVens44HmRjeF/WhtyhpCzamasIMmjTILgMWyL/hK Fz4U77y9B6cHrW4Y9UthuMKAXt1BP6Ofo5f1n9RkMiyybljN1fZKhEPNdyRjBir8 hFMEIo/XYXCHntQ2Auci5WyaTZ2oqqQX8Ln5YHZKXyixU1uyI8SyMpR3M5U= Received: from tb-mx1.topicbox.com (localhost.local [127.0.0.1]) by tb-mx1.topicbox.com (Postfix) with ESMTP id C678E32D50D for <9fans@9fans.net>; Fri, 10 Nov 2023 01:40:30 -0500 (EST) (envelope-from lucio.dere@gmail.com) Received: from tb-mx1.topicbox.com (localhost [127.0.0.1]) by tb-mx1.topicbox.com (Authentication Milter) with ESMTP id D10CC4C30AF; Fri, 10 Nov 2023 01:40:30 -0500 ARC-Seal: i=1; a=rsa-sha256; cv=none; d=topicbox.com; s=arcseal; t= 1699598430; b=mgakw7gLbX4j0BQzvhhQ+8ATFZbQ2s9qdZQeSgsGGUf5l0IWeE 13EKYg6ToNNMAqlsNIhrXgoGbESqFcq6BerKWnZkCbbg/4z6YxJabVAQM6jBe33h LtYvP484NcwiAMArFXI03VHWwG69obR6dM/UeYtcxtlef2G7gVTG02U0EkH/Wg5p C1ehahqtsCuSeKcscuDjKeumqp5XeaAbnEsrAwNUlmQHBp+jxs9d3bb2vcfC4vhU N4l85+WGKkavwD1I7bEh6kBaE4G+To93wvS4ef4SpNFkzkeZw+tw26tndJ5Ptysn V3HDWr4Cu/SWnnuI6f+3A/6vRWE1OmxaIOdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; s=arcseal; t=1699598430; bh=AmpB+HLESVsj+XBV0Lg8UjV6alirtTxoNtxpT84mCwE=; b=EewapBks1fKt yPVxqNvq653177Kkh7SvyizjAv4DBh15Ud12wdmniriD3AdHrEdckWzDOQVIKRZc l+d13TAxMiF4oqWIAmFJq2vBi84ic+K7YHyPRWED8QtoI5VF34Mc/bkQEaM2w/H6 3SbooitbhUieKdUXQawUD14rLklNJSnj/q8Ve9PKLSwl+FK2gxvCaOiIw77wXGEl 7MQlUD1eorZj4TAJ29QfYA/tBLknYvocMuroYy+zsj0r262Qzc+g2/mirD1R7+iN yeMzWzX/n5DlZhHCXYTxOjLt4q/vYYux71gotQlLbLtRRcYUiZ3+hwCuO3RqmzRq 9G8+HzJsJQ== ARC-Authentication-Results: i=1; tb-mx1.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC Policy is not at enforcement); dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=PSehZi0h header.a=rsa-sha256 header.s=20230601 x-bits=2048; dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=gmail.com; iprev=pass smtp.remote-ip=209.85.128.50 (mail-wm1-f50.google.com); spf=pass smtp.mailfrom=lucio.dere@gmail.com smtp.helo=mail-wm1-f50.google.com; x-aligned-from=pass (Address match); x-google-dkim=pass (2048-bit rsa key) header.d=1e100.net header.i=@1e100.net header.b=RUTcJZ9z; x-me-sender=none; x-ptr=pass smtp.helo=mail-wm1-f50.google.com policy.ptr=mail-wm1-f50.google.com; x-return-mx=pass header.domain=gmail.com policy.is_org=yes (MX Records found: alt3.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com,alt4.gmail-smtp-in.l.google.com,alt1.gmail-smtp-in.l.google.com); x-return-mx=pass smtp.domain=gmail.com policy.is_org=yes (MX Records found: alt3.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com,alt4.gmail-smtp-in.l.google.com,alt1.gmail-smtp-in.l.google.com); x-tls=pass smtp.version=TLSv1.2 smtp.cipher=ECDHE-RSA-AES256-GCM-SHA384 smtp.bits=256/256; x-vs=clean score=0 state=0 X-ME-VSCause: gggruggvucftvghtrhhoucdtuddrgedvkedruddvvddgleeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpegjfhfhff fkuffvtgesthdtredttddtjeenucfhrhhomhepnfhutghiohcuffgvucftvgcuoehluhgt ihhordguvghrvgesghhmrghilhdrtghomheqnecuggftrfgrthhtvghrnhepffdvgeeike ettdekhfehvdehveehtefhhfdthfejgedtudduieehledtfeefiedvnecukfhppedvtdel rdekhedruddvkedrhedtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinh gvthepvddtledrkeehrdduvdekrdehtddphhgvlhhopehmrghilhdqfihmuddqfhehtddr ghhoohhglhgvrdgtohhmpdhmrghilhhfrhhomhepoehluhgtihhordguvghrvgesghhmrg hilhdrtghomheq X-ME-VSScore: 0 X-ME-VSCategory: clean Received-SPF: pass (gmail.com ... _spf.google.com: Sender is authorized to use 'lucio.dere@gmail.com' in 'mfrom' identity (mechanism 'include:_netblocks.google.com' matched)) receiver=tb-mx1.topicbox.com; identity=mailfrom; envelope-from="lucio.dere@gmail.com"; helo=mail-wm1-f50.google.com; client-ip=209.85.128.50 Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tb-mx1.topicbox.com (Postfix) with ESMTPS for <9fans@9fans.net>; Fri, 10 Nov 2023 01:40:30 -0500 (EST) (envelope-from lucio.dere@gmail.com) Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-40859dee28cso12468625e9.0 for <9fans@9fans.net>; Thu, 09 Nov 2023 22:40:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699598429; x=1700203229; h=to:subject:message-id:date:from:references:in-reply-to:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=AmpB+HLESVsj+XBV0Lg8UjV6alirtTxoNtxpT84mCwE=; b=RUTcJZ9z9kUHuoGwJp6Wh8RRWTHMvAtSIttBwL27CMuIOFAATNpG9nbmqzulp04NmT Q8it7/L6VGPonupSm3t6/HikMjOmfy72By+A6RHWDYtU8JKdQzprLqz7ucqS7YKvonMK mPPj0rWDdRwpufVXlITUp6W0CL1FXZ9S/PwnpLCmuwJoZ9Qvv7B3h+syaAwLmSok9ocg zoDsSPfpyLDPpzmgvFkHSqguTQaIZMpByJtLnFv3q4N4JognJlROP6/7puJSJyoiNCbd Ro0hAYHMARk6AJLmT+Nfh6x02QT6M6WZP9UVIE5DRjSnWEWTQLbS+DHaJ6qfC8n5zEoA Yz6Q== X-Gm-Message-State: AOJu0Yw/QjoeLxVNyZLrkgEfhOxPTiEFxADaiK9GRcwD7OvoX5l4Fcq1 xBqkixG1NcT1p4aMP+gHLDE+N+xPE66FSz5iKyS2OfEY X-Google-Smtp-Source: AGHT+IFIPnAPa1mF4007tlRZ/u9TJRsHfmf6qmXa75l9vyAmuTp7alqDwOymwh71kNb+rAtVUl4Imc3B+m3LlH9QEbQ= X-Received: by 2002:adf:d1c5:0:b0:32d:8872:aacb with SMTP id b5-20020adfd1c5000000b0032d8872aacbmr7266890wrd.53.1699598428685; Thu, 09 Nov 2023 22:40:28 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a5d:50c1:0:b0:321:ed46:eb66 with HTTP; Thu, 9 Nov 2023 22:40:28 -0800 (PST) In-Reply-To: <16995830470.DAEce1.126202@composer.9fans.topicbox.com> References: <05DC7BC5698D779E601D2AB8E1882F4B@eigenstate.org> <16994869310.bb41deF.62237@composer.9fans.topicbox.com> <16995830470.DAEce1.126202@composer.9fans.topicbox.com> From: Lucio De Re Date: Fri, 10 Nov 2023 08:40:28 +0200 Message-ID: Subject: Re: [9fans] odd rwakeup qunlock behaviour in 9vx To: 9fans <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Topicbox-Policy-Reasoning: allow: sender is a member Topicbox-Message-UUID: 0d9b0c24-7f94-11ee-94c8-fbdc6bcf165c Archived-At: =?UTF-8?B?PGh0dHBzOi8vOWZhbnMudG9waWNib3guY29tL2dyb3Vwcy85?= =?UTF-8?B?ZmFucy9UN2E1YmIzY2RlNTBhOGE5YS1NMzRmNDI1NGMzZDBjMTgwODgzMWY1?= =?UTF-8?B?MDQ3Pg==?= List-Help: List-Id: "9fans" <9fans.9fans.net> List-Post: List-Software: Topicbox v0 List-Subscribe: Precedence: list Reply-To: 9fans <9fans@9fans.net> Content-Transfer-Encoding: quoted-printable List-Unsubscribe: , Topicbox-Delivery-ID: 2:9fans:437d30aa-c441-11e9-8a57-d036212d11b0:522be890-2105-11eb-b15e-8d699134e1fa:M34f4254c3d0c1808831f5047:1:a_B1_5IWSbDZ0ifURvbr1h2eVzDg9jSoLwXI5rHiEWk On 11/10/23, ibrahim via 9fans <9fans@9fans.net> wrote: > [ ... ] > > The reasoning behind this thread is only informing others about possible > problems I encountered. I don't need a solution I already have a working > workaround using simple locks. My code would be of no benefit for other > plan9 users or developers but if there is interest for investigating the > problem I can write a simplified example which reproduces this behavior. > This is interesting enough to catch my attention, I'm curious in exactly that way. Thank you for taking the time to compose your reply, which is definitely an improvement on the short, insulting exchanges that seem to pop up in this list most of the time. Lucio. ------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/T7a5bb3cde50a8a9a-M34f42= 54c3d0c1808831f5047 Delivery options: https://9fans.topicbox.com/groups/9fans/subscription