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 14254 invoked from network); 17 Jun 2022 16:09:25 -0000 Received: from tb-ob20.topicbox.com (173.228.157.66) by inbox.vuxu.org with ESMTPUTF8; 17 Jun 2022 16:09:25 -0000 Received: from tb-mx0.topicbox.com (tb-mx0.nyi.icgroup.com [10.90.30.73]) by tb-ob20.topicbox.com (Postfix) with ESMTP id 9EB3A1EC0C for ; Fri, 17 Jun 2022 12:09:23 -0400 (EDT) (envelope-from bounce.mMb2e0af1ac4067b7f4649d000.r522be890-2105-11eb-b15e-8d699134e1fa@9fans.bounce.topicbox.com) Received: by tb-mx0.topicbox.com (Postfix, from userid 1132) id 4F8E128D5093; Fri, 17 Jun 2022 12:09:23 -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=WNOCpRuL 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-f175.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=1655482163; bh=XQHAAswlLcVYdOH/ xn3nH+mZmCvvfmQ0iWBfTqv+o6k=; b=njAQk1ZA1HAKi6WzOV6jFaWfAbIHES8X /0AuEDTxrHOvr/NoXtLj3w112fmbrfaZ+DpG+nGeJB/IGMhaXlW9pIqgo2wZvaMQ wj8AYiCLyIpMpTdx+ANziVCe6i54/hTbIDBnAVgij9Yf+qrt8nfJjqGylDB0wZnl 2b/LGsOQzs8= ARC-Seal: i=2; a=rsa-sha256; cv=pass; d=topicbox.com; s=sysmsg-1; t= 1655482163; b=Z1I7+gnT//GO2qSjK41myo/NsFhwTWX+7n4JSFUAXFr5ZVHvCk JSFYY42TefKomiV7mdZLEdcChjpVm+gYGCNMsMCoRTzfFwXFHCqxYmLLZTsM3GAK fwhQvx9Nk/KjD9rXcti3vDrkOggiQw3oChW9EFByPavf0jC9Lt2nsUZoc= Authentication-Results: topicbox.com; arc=pass; dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=WNOCpRuL 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-f175.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=WNOCpRuL 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.175 (mail-yb1-f175.google.com); spf=pass smtp.mailfrom=skip.tavakkolian@gmail.com smtp.helo=mail-yb1-f175.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=T8+0EpQA; x-me-sender=none; x-ptr=pass smtp.helo=mail-yb1-f175.google.com policy.ptr=mail-yb1-f175.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=1655482163; x=1655568563; bh=SgVIvyc1itn/WBouycmT5AEs6UTWIUuU 7hdD/PfKKs4=; b=O/3/sO8vrvsz5paWvkrMRuL/B3ecFi9RpGVZ+PR/PSCYbtf4 8/ZHVvFkVBkUdIkqMaHg9pJWYqTrIPMW0+8tOk35PKMmj2CEt/HYIztebFRw65GN e+1ST/ushCLvZBzz0/b61dmFbRTA8Drlb7EG0wCc2hEowKi/95dVbWQucAM= Received: from tb-mx0.topicbox.com (localhost.local [127.0.0.1]) by tb-mx0.topicbox.com (Postfix) with ESMTP id DB5C428D4C77 for <9fans@9fans.net>; Fri, 17 Jun 2022 12:09:09 -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 9494CD5502F; Fri, 17 Jun 2022 12:09:09 -0400 ARC-Seal: i=1; a=rsa-sha256; cv=none; d=topicbox.com; s=arcseal; t= 1655482149; b=QaX5sK4ICu20in/Gbcv+qbg+utUStxwvDgCPKBriMrM+MI1U+C dtW5Xmq0B9Hobzttb9iyALXoMz3K7LbxlbjczMkfGR4GW08Xw9M5qm6qGn8kkxoi +fVD0a0W4KBKNxWxiJ44VtnL28cRclNbZytLOcDK+WFPzY1ifQGQiJGS7L53E7YM 5w9YW1jI0CT0xeJix6Qp3aozZqwBvx7ihNNOZMA25j8psnGy55itgh/7Fk4NuB/t e/W1mpOGOZBDelzVFZ9oKDIljLeFgDuyto8H4p/dlVbwVPD39p5TxjkJKXIKCyg5 fAZ9mN9bj2QY4tnm3ckpiSIt7DH3z4x0Djxw== 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=1655482149; bh=Y47vErfrEDkbTXA8PjNjlImdplDmW3pxVZf p+Co01WE=; b=TUyBt7a6GurvSMwMXuVHT3V3xOddrlu13bDoSgF2fq49RXhV9ly doXAXK0A7lA54ZZk9cxYY42Si+qxOv3php5/5Yi6X8k6fGSH+u1rluD97+yI2vh4 QwES7CnpZ3MCP/sRHBoGGAHiA3QEOnnJRgQrBNi1ka23nhTra+QObKoIT72vljaA HEendrrNB+wrJG7bWutzpuMuCWTXBuEIofgsq3pSv+Tlih/U7rrjkgUeHfe8unYa xkYM5M5cFeVQ26i8bri5PR/Xzh1zPeYlXP6/MpWjaGfx1tXtYxuwrdDoEej/7cP/ 4jQlyTYI2TDvNUNRum25JW/yabHs3+3gSpw== 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=WNOCpRuL 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.175 (mail-yb1-f175.google.com); spf=pass smtp.mailfrom=skip.tavakkolian@gmail.com smtp.helo=mail-yb1-f175.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=T8+0EpQA; x-me-sender=none; x-ptr=pass smtp.helo=mail-yb1-f175.google.com policy.ptr=mail-yb1-f175.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: gggruggvucftvghtrhhoucdtuddrgedvfedruddvhedgleegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpeggfhgjhf ffkffuvfgtgfesthhqredttddtjeenucfhrhhomhepufhkihhpucfvrghvrghkkhholhhi rghnuceoshhkihhprdhtrghvrghkkhholhhirghnsehgmhgrihhlrdgtohhmqeenucggtf frrghtthgvrhhnpeetjeffvdeigedvkedtffevuddvveeviedvjefhledttdffvdeugefh ueehjeefueenucffohhmrghinhepthhophhitggsohigrdgtohhmnecukfhppedvtdelrd ekhedrvdduledrudejheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhn vghtpedvtdelrdekhedrvdduledrudejhedphhgvlhhopehmrghilhdqhigsuddqfhduje ehrdhgohhoghhlvgdrtghomhdpmhgrihhlfhhrohhmpeeoshhkihhprdhtrghvrghkkhho lhhirghnsehgmhgrihhlrdgtohhmqe 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-f175.google.com; client-ip=209.85.219.175 Received: from mail-yb1-f175.google.com (mail-yb1-f175.google.com [209.85.219.175]) (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:09:09 -0400 (EDT) (envelope-from skip.tavakkolian@gmail.com) Received: by mail-yb1-f175.google.com with SMTP id t1so8019654ybd.2 for <9fans@9fans.net>; Fri, 17 Jun 2022 09:09:09 -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=Y47vErfrEDkbTXA8PjNjlImdplDmW3pxVZfp+Co01WE=; b=T8+0EpQAipskUl2C9yTGPjB+5Pvo+pTkT1rIfLPRMjIRUsUna7OUFfnKrUCYNBTY6C 42WFxwfWncMEssYgzj/HFTaqhBfJALlfcD4o4T+TbyesrZDR+nTSsVC6B/2lq6I1YNPR 5d3/eTA8+tp6sMaJyc+Nf4RuHEqKcV6Q0uT4GdGUHPkJoJsZgF0BL/IZD4bBSFlK/GmE YNUHyQv5CoJRxgDhtii8byZ1y0km/8UEfInEu9Oohbb6gYkAsakK+aBZwEhdMFe3SgQX jEUWQQF8xw2aA6x2JHtM7bs+gxxqV+x+v2jPQOaUxH5ByUFQ7hnUObdbtDlGsQS3BaSq mOKQ== X-Gm-Message-State: AJIora/U2pi76D99JnipU0abFqb2UTBqQ9tk+PfSUvfw9JTp0BmrF+bc kZ93mbJ4/BOx7mEdsj4Fh/u/O4fyFLrZ+v/Sd/Qg5+PufK4= X-Google-Smtp-Source: AGRyM1tMjfTAIro/UJbGcknT23NufaLhh0e6oScNZw99DlfD0/6dsznte0o6qEV4nPqJo6J+B/msyjuOicevynZUBgU= X-Received: by 2002:a5b:489:0:b0:655:be22:4757 with SMTP id n9-20020a5b0489000000b00655be224757mr11390568ybp.92.1655482148066; Fri, 17 Jun 2022 09:09:08 -0700 (PDT) MIME-Version: 1.0 References: <79286caa2ca77ea9b9a1cd64918bdc5f28c8f180.camel@gmail.com> <9e922645a598c69ba14b74e18e8669cc068e9717.camel@gmail.com> In-Reply-To: <9e922645a598c69ba14b74e18e8669cc068e9717.camel@gmail.com> From: Skip Tavakkolian Date: Fri, 17 Jun 2022 09:08:57 -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: d549311c-ee57-11ec-8910-9f89972ed7ee Archived-At: =?UTF-8?B?PGh0dHBzOi8vOWZhbnMudG9waWNib3guY29tL2dyb3Vwcy85?= =?UTF-8?B?ZmFucy9UZmE2ODIzMDQ4YWQ5MGEyMS1NYjJlMGFmMWFjNDA2N2I3ZjQ2NDlk?= =?UTF-8?B?MDAwPg==?= 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:Mb2e0af1ac4067b7f4649d000:1:MYuoRxH0u7hznVqBXUFra2JR8EG27guQQ9Y0_wixXjw 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 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 group. > > > > > 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 more) > 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-Mb2e0a= f1ac4067b7f4649d000 Delivery options: https://9fans.topicbox.com/groups/9fans/subscription