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,RCVD_IN_MSPIKE_H2,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 15284 invoked from network); 17 Jun 2022 16:17:16 -0000 Received: from tb-ob0.topicbox.com (64.147.108.117) by inbox.vuxu.org with ESMTPUTF8; 17 Jun 2022 16:17:16 -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 7BB6F369C1 for ; Fri, 17 Jun 2022 12:17:15 -0400 (EDT) (envelope-from bounce.mM5b827bf9eba38f893c1f67bb.r522be890-2105-11eb-b15e-8d699134e1fa@9fans.bounce.topicbox.com) Received: by tb-mx0.topicbox.com (Postfix, from userid 1132) id 7904828D73FC; Fri, 17 Jun 2022 12:17:15 -0400 (EDT) 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=Mf5tjNe7 header.a=rsa-sha256 header.s=20210112 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=skip.tavakkolian@gmail.com smtp.helo=mail-yb1-f180.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:references:in-reply-to:from:date :message-id:subject:to:content-type:content-transfer-encoding :list-help:list-id:list-post:list-subscribe:reply-to :list-unsubscribe; s=sysmsg-1; t=1655482635; bh=0qjQ9JCJnGEPZdTJ AJfLlddxBSOTKan3yo2o2q+Qiik=; b=sZLWRxxp/MxYsUEX1RfbUBPgWfP04E/M qbmfPyXONG20BlzyE9D0UR+t/gbiG/USrUO+oD94sxHPRNTRKSsXBqh1TjXl3y24 VpU67V0nYReBSgQqUHNZ/hx5CIwXk6R7wLDeUk4HOkULspQ5sv3sVBTY3PDFe71l r/Fl6gVp0w4= ARC-Seal: i=2; a=rsa-sha256; cv=pass; d=topicbox.com; s=sysmsg-1; t= 1655482635; b=PgEUYVGnYLWyIIEl8LZWwD3UkWbLlZm/5+QQNLT24mqgvFEkI8 jl1w10mVFwpxWShzidSnbyESCIeNdb5b254M594prGviooChneo+9/5rGjYHF201 V3jZL3t7fm9rwVMru/hVhTE6sf+sI0CRiIhyq+lSP6BbZpIt18Ez7BVtI= Authentication-Results: topicbox.com; arc=pass; dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=Mf5tjNe7 header.a=rsa-sha256 header.s=20210112 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=skip.tavakkolian@gmail.com smtp.helo=mail-yb1-f180.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=Mf5tjNe7 header.a=rsa-sha256 header.s=20210112 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.219.180 (mail-yb1-f180.google.com); spf=pass smtp.mailfrom=skip.tavakkolian@gmail.com smtp.helo=mail-yb1-f180.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=7EMZmIOs; x-me-sender=none; x-ptr=pass smtp.helo=mail-yb1-f180.google.com policy.ptr=mail-yb1-f180.google.com; x-return-mx=pass header.domain=gmail.com policy.is_org=yes (MX Records found: alt4.gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com,alt1.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: alt4.gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com,alt1.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:references:in-reply-to:from:date:message-id:subject :to:content-type:content-transfer-encoding:list-help:list-id :list-post:list-subscribe:reply-to:list-unsubscribe; s=dkim-1; t=1655482635; x=1655569035; bh=9bfIm048j0lnPGJyAWvVUljpyRMa+Y94 lX4Ro42b6Ig=; b=UU4k6y4mLUvP1saXRSS8laHdGt0eCohL54cw0ZbbYEFAkkwQ +xwqhxVm5jwWhSAgIj+H8bnGw6DYyoOlc+bRBZHJITmfX5CMK5thRdDk2EK+SIG/ vYEnc7d1Ia4Pg0/I/NkskmgduVCi5VQrGCy7U/icBvDjG4NaWKRnlRERwfs= Received: from tb-mx0.topicbox.com (localhost.local [127.0.0.1]) by tb-mx0.topicbox.com (Postfix) with ESMTP id B46AB28D6FC7 for <9fans@9fans.net>; Fri, 17 Jun 2022 12:16:59 -0400 (EDT) (envelope-from skip.tavakkolian@gmail.com) Received: from tb-mx0.topicbox.com (localhost [127.0.0.1]) by tb-mx0.topicbox.com (Authentication Milter) with ESMTP id 8A1847408A9; Fri, 17 Jun 2022 12:16:59 -0400 ARC-Seal: i=1; a=rsa-sha256; cv=none; d=topicbox.com; s=arcseal; t= 1655482619; b=DieFrRK7pCQxvLbebc8evLp+tBTZO7SQzwNFbGvyFEAcZg17Y0 nY1+9gt61vgJqD6Aa5Gru5xN+gj2UZtHfVCOzaKOT0QFBa1v103hpOu13H9lXQg6 YgsOt9wHUeRFjJgNcGxIcGJYQ2s95f+WHhq0GTVAqozrnDxCkcrQped4NNRDm0el OypOyU2yCo8D5Tu4BY15Ixlcv7DmEfEFxWvKL3yyCSPOngChqrAsrr0u+W+5WQK+ 0b5voBeoV3z6gq//GOqTEQrHsu8Mmu6eXyVXbfISJFx52HsDYziBzomd5+bpKViH 7YQkoFMBYopzQsFENbvhhVpZIFMpxIgDatJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=mime-version:references:in-reply-to:from:date :message-id:subject:to:content-type:content-transfer-encoding; s=arcseal; t=1655482619; bh=MV/EIhOOjUyKaJU5xUUasOisluz8IJD/rmq OJv5hJxk=; b=Dk6kUbiGR8umkUscDOCfRAMkGNgVGw4S1LuVpSieuS98e/QQxUX KpS5+kjt4rW6q72WGocGJ1UyBn79Lm929SzfcdZC35aIwjt68GyN45/oKSzbgZLc lnjJzBtLwmxYa4Rxu1Co1BINiJxi+IPRNtQfhyWB96U+lg6fiqNznZkS38DQvnPH RIO098xRoY1PN2wzWDUrn+kPjFtpGEWIxI1Bl8jUwcqw91KaOHHy7Z4h49IKP1Xg L4vZqEArW7TrwttqkEVZdENQO/PbMlOCYxWb6dkm2JpfntLQimEj97n0m8YgwUYA c+C6XIepCHpuc1z3Ac45bAycsWxNWNHH7BA== 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=Mf5tjNe7 header.a=rsa-sha256 header.s=20210112 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.219.180 (mail-yb1-f180.google.com); spf=pass smtp.mailfrom=skip.tavakkolian@gmail.com smtp.helo=mail-yb1-f180.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=7EMZmIOs; x-me-sender=none; x-ptr=pass smtp.helo=mail-yb1-f180.google.com policy.ptr=mail-yb1-f180.google.com; x-return-mx=pass header.domain=gmail.com policy.is_org=yes (MX Records found: alt4.gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com,alt1.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: alt4.gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com,alt1.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: gggruggvucftvghtrhhoucdtuddrgedvfedruddvhedgleeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpeggfhgjhf ffkffuvfgtgfesthhqredttddtjeenucfhrhhomhepufhkihhpucfvrghvrghkkhholhhi rghnuceoshhkihhprdhtrghvrghkkhholhhirghnsehgmhgrihhlrdgtohhmqeenucggtf frrghtthgvrhhnpeeuheehgfdtgfetudegtedugfdtleektefffeehffekieefieehtdff jedtudeggeenucffohhmrghinheplhhisghthhhrvggrugdrtghhpdhtohhpihgtsghogi drtghomhenucfkphepvddtledrkeehrddvudelrddukedtnecuvehluhhsthgvrhfuihii vgeptdenucfrrghrrghmpehinhgvthepvddtledrkeehrddvudelrddukedtpdhhvghloh epmhgrihhlqdihsgduqdhfudektddrghhoohhglhgvrdgtohhmpdhmrghilhhfrhhomhep oehskhhiphdrthgrvhgrkhhkohhlihgrnhesghhmrghilhdrtghomheq X-ME-VSScore: 0 X-ME-VSCategory: clean Received-SPF: pass (gmail.com ... _spf.google.com: Sender is authorized to use 'skip.tavakkolian@gmail.com' in 'mfrom' identity (mechanism 'include:_netblocks.google.com' matched)) receiver=tb-mx0.topicbox.com; identity=mailfrom; envelope-from="skip.tavakkolian@gmail.com"; helo=mail-yb1-f180.google.com; client-ip=209.85.219.180 Received: from mail-yb1-f180.google.com (mail-yb1-f180.google.com [209.85.219.180]) (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>; Fri, 17 Jun 2022 12:16:59 -0400 (EDT) (envelope-from skip.tavakkolian@gmail.com) Received: by mail-yb1-f180.google.com with SMTP id n144so4006283ybf.12 for <9fans@9fans.net>; Fri, 17 Jun 2022 09:16:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:content-transfer-encoding; bh=MV/EIhOOjUyKaJU5xUUasOisluz8IJD/rmqOJv5hJxk=; b=7EMZmIOs6RcS7bKX6Ec2N75Xr/sDgO28BPv4PM+l2Scf4Jyv1iJgQ2ceVabW0tgS3v 56NTaT1zmRiDF+ppE/MErrSRWhZ684K5UIiEh3xxj6njsJKMHOn4uw4QgE6DxWKmyA9C Bt3+uql/5o67QosKQLsIQ7Xt0Iymle6hQZxBglUWT1hYlvZ9AHU43reTyQALIWvX2hEs +UiwzOUDnrm8sr3UuL2qeQbxYgbEd2Z0TgRtaJImJF85Rqf0mv6no78WTPi7fdAEFujY 89vIGXoN5fnylaI1KA01pP5nGG8uboaL/nlN6DvU/OwmIMq8/Npy9X9yspQ6/O37UZCd XKww== X-Gm-Message-State: AJIora9pEp0IHSCj50rVHbc6ism0LPOyPkR7OxMNpyG36XnqBGtRMAAd lwYp/6p10vzzdgx/k4v57i7J5cu00XkTuutHBNNN2TCr6+Q= X-Google-Smtp-Source: AGRyM1tyAD90peJvhNtNli2838VzP7HN5YWk874dq1W5VaZ1DMbik6i0z3UTv5h8HZRqjnaK71xQOMeNfHWas8VXUoU= X-Received: by 2002:a25:2d56:0:b0:668:b4ae:6357 with SMTP id s22-20020a252d56000000b00668b4ae6357mr4684767ybe.346.1655482618497; Fri, 17 Jun 2022 09:16:58 -0700 (PDT) MIME-Version: 1.0 References: <79286caa2ca77ea9b9a1cd64918bdc5f28c8f180.camel@gmail.com> <9e922645a598c69ba14b74e18e8669cc068e9717.camel@gmail.com> In-Reply-To: From: Skip Tavakkolian Date: Fri, 17 Jun 2022 09:16:47 -0700 Message-ID: Subject: Re: [9fans] syscall silently kill processes To: 9fans <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Topicbox-Policy-Reasoning: allow: sender is a member Topicbox-Message-UUID: efaf46da-ee58-11ec-b689-85b5b1aa148d Archived-At: =?UTF-8?B?PGh0dHBzOi8vOWZhbnMudG9waWNib3guY29tL2dyb3Vwcy85?= =?UTF-8?B?ZmFucy9UZmE2ODIzMDQ4YWQ5MGEyMS1NNWI4MjdiZjllYmEzOGY4OTNjMWY2?= =?UTF-8?B?N2JiPg==?= 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:M5b827bf9eba38f893c1f67bb:1:qu5lH0MQjlfr-tqQnNu0AtrgB35rJzPdEZUxyxaBmGg Thanks to Douglas Adams, I think '42' might be a more obvious magic number for a clue: % 8c udpflood.c && 8l -o udpflood udpflood.8 && ./udpflood | grep end | wc = -l 42 % grep 42 /sys/src/libthread/note.c #define NFN 42 On Fri, Jun 17, 2022 at 9:11 AM Skip Tavakkolian wrote: > > it's worth grepping for persistent magic constants: > > % grep 33 /sys/src/libthread/*.[ch] > /sys/src/libthread/note.c:#define NFN 33 > > On Fri, Jun 17, 2022 at 9:08 AM Skip Tavakkolian > wrote: > > > > interesting catch. it seems to be a tunable limit. > > > > % grep NFN /sys/src/libthread/note.c > > #define NFN 33 > > static int (*onnote[NFN])(void*, char*); > > static int onnotepid[NFN]; > > for(i=3D0; i > return i > for(i=3D0; i > if(i=3D=3DNFN){ > > > > On Fri, Jun 17, 2022 at 8:08 AM wrote: > > > > > > =D0=92 =D0=9F=D1=82, 17/06/2022 =D0=B2 08:11 -0600, Jacob Moody =D0= =BF=D0=B8=D1=88=D0=B5=D1=82: > > > > On 6/17/22 07:46, Thaddeus Woskowiak wrote: > > > > > I believe threadnotify() should be called from threadmain() to > > > > > properly register the handler in the rendez group > > > > > > > > This is incorrect, according to thread(2): > > > > > > > > "The thread library depends on all procs > > > > being in the same rendezvous group" > > > > > > > > > From sleep(2): > > > > > > Alarm causes an alarm note (see notify(2)) to be sent to the > > > invoking process after the number of milliseconds given by > > > the argument. > > > > > > Mean to be sent only to the invoking process, NOT to the process grou= p. > > > > > > > > > > > The issue here is that your note handler has to call noted, > > > > you are returning from the handler without actually resuming the > > > > program. > > > > You either need to call noted(NCONT) to resume execution or > > > > noted(NDFLT) > > > > to stop execution. > > > > > > > > An excerpt from notify(2): > > > > > > > > "A notification handler must finish either by exiting the > > > > program or by calling noted; if the handler returns the > > > > behavior is undefined and probably erroneous." > > > > > > > > So you are indeed observing undefined behavior. > > > > > > > > > > With: > > > > > > ------------------------------------ > > > static int > > > handler_alarm(void *, char *msg) > > > { > > > if(strstr(msg, "alarm")){ > > > noted(NCONT); > > > return 1; > > > } > > > > > > return 0; > > > } > > > ------------------------------------ > > > > > > result the same: > > > > > > cpu% 6.out | grep end | wc -l > > > 33 > > > > > > > > > And noted(NCONT) may be needed, when process recieved many (2 and mor= e) > > > notes at once. > > > > > > May be something wrong with interrupted an incomplete system call? > > > > > > > > > > > > > > Hope this helps, > > > > moody > > > > > > >=20 > > >=20 > > > Regards, > > > Andrej > > >=20 ------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/Tfa6823048ad90a21-M5b827= bf9eba38f893c1f67bb Delivery options: https://9fans.topicbox.com/groups/9fans/subscription