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 6694 invoked from network); 17 Jun 2022 15:06:38 -0000 Received: from tb-ob0.topicbox.com (64.147.108.117) by inbox.vuxu.org with ESMTPUTF8; 17 Jun 2022 15:06:38 -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 93C963592D for ; Fri, 17 Jun 2022 11:06:37 -0400 (EDT) (envelope-from bounce.mM4fa69df14eff60273727c92b.r522be890-2105-11eb-b15e-8d699134e1fa@9fans.bounce.topicbox.com) Received: by tb-mx0.topicbox.com (Postfix, from userid 1132) id 928BE28CFCBD; Fri, 17 Jun 2022 11:06:37 -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=Un4X0kkD 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=andrey100100100@gmail.com smtp.helo=mail-lj1-f169.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=message-id:subject:from:to:date:in-reply-to :references:content-type:content-transfer-encoding:mime-version :list-help:list-id:list-post:list-subscribe:reply-to :list-unsubscribe; s=sysmsg-1; t=1655478397; bh=a3eWPcecIhPc1yAI c8oYkybRF4QgSd7pZEbGlyR+YwE=; b=T0TUtUJSEHtUoKBCQZsZa7Ub4vRgWHRr JObv/9LBKAnKF0EXwNwD06ssCDV/9xfgqIewQ3aQv+YNR8GJHF0yP/376VFjoajW O7zBOoMZW7FwZfEyi9XVwop4+IJKaQ3FPE/5EJ/zkup/dO0mdy2ETK2qmXdAE6Wg d4Pfd5npW18= ARC-Seal: i=2; a=rsa-sha256; cv=pass; d=topicbox.com; s=sysmsg-1; t= 1655478397; b=Dk/k5Z25O3IKy1CHWEHhFFrc3HSsjckB5ljzuTovOJncnwWXRn +OQfytmyiJuq0DFJmSbvkLxa959LhQXuDq7TdXSczIAh4KdCBMlLcCl6y+C8mqjj 9asTwkr9HHyTXfbs1vZN204dWJ54qrY4YcLujrzB5f9FFhfst/4ekayEg= Authentication-Results: topicbox.com; arc=pass; dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=Un4X0kkD 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=andrey100100100@gmail.com smtp.helo=mail-lj1-f169.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=Un4X0kkD 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.208.169 (mail-lj1-f169.google.com); spf=pass smtp.mailfrom=andrey100100100@gmail.com smtp.helo=mail-lj1-f169.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=HnNhrabS; x-me-sender=none; x-ptr=pass smtp.helo=mail-lj1-f169.google.com policy.ptr=mail-lj1-f169.google.com; x-return-mx=pass header.domain=gmail.com policy.is_org=yes (MX Records found: gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com,alt4.gmail-smtp-in.l.google.com,alt2.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: gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com,alt4.gmail-smtp-in.l.google.com,alt2.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=message-id :subject:from:to:date:in-reply-to:references:content-type :content-transfer-encoding:mime-version:list-help:list-id :list-post:list-subscribe:reply-to:list-unsubscribe; s=dkim-1; t=1655478397; x=1655564797; bh=RTWSshGrrWX83YbwfFx0v6M5r/q0+1z/ /SNQwNFa+aQ=; b=nhx5TwO3TURO0FxKaCsD6fNWWkE32X4e5OyFor4iWixT3vOo I4TS8RAVeja77PCqLyC3XyNp1VhH9NV0coH5LIF1qL6qlADNI9j0b07zygy59jkt 6ac+RHF4Kf3Xd2JWFS/Dzk5eGK1wRtLCJz1Hez2piIySZk6padJuFVTvTDc= Received: from tb-mx0.topicbox.com (localhost.local [127.0.0.1]) by tb-mx0.topicbox.com (Postfix) with ESMTP id 60CDB28CF8A3 for <9fans@9fans.net>; Fri, 17 Jun 2022 11:06:25 -0400 (EDT) (envelope-from andrey100100100@gmail.com) Received: from tb-mx0.topicbox.com (localhost [127.0.0.1]) by tb-mx0.topicbox.com (Authentication Milter) with ESMTP id EEDD477849A; Fri, 17 Jun 2022 11:06:25 -0400 ARC-Seal: i=1; a=rsa-sha256; cv=none; d=topicbox.com; s=arcseal; t= 1655478385; b=J0E8JTmRreYdPOtJFuP4on5JwgJa8URAAV44hDzYUTmw22OkI7 +OOx4pxNnfypaqEIx/twEW5qqA7Mfx8hl77EV8drgq6DPOWgiAjcI3F+vrnzaCVL rG/sv+Al4zekfJNqrySdaXElGsOvAA94IbCp2vLviXNMKDK6g2GMJ4n65lgcnVpX HagLSg/nlYAEr6e+vyKQP6GkF71PT4Ua+cgukoXajJxt4SadyD6v21N1NECyq1j2 d1rIZ1+WFjapZ8KEQPUbbYGoYFW4CVhfX1RRkl/RShVtoSe6oX/Z1V3VZVfcHIlM Szc9Cm0h7XLgllaOS8VTMJZpSTek0VIGXnNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=message-id:subject:from:to:date:in-reply-to :references:content-type:content-transfer-encoding:mime-version; s=arcseal; t=1655478385; bh=0zIdEUQ0bFVfyNM1Jz2SxP5anx7TdygcouY XOAlNQSY=; b=Jr8m10afCqWhpmeHRZMm5dJX9GDoqQwH7q4FtlkUjx6f3oZSEND XaQ5/gPzCBTi3sqrsT6TjonSzJpLVCTu7CJ98j/9HxAi3CrdikdIfo0q1wwkSg33 9o4VCg2vyO/eFhVVW81JsZPIZn8HstRdL2HanY4Ieg8qzEPJvl2/DJ47SdI6r/BS m6+wrSUoi7AkAtVglu2B2BaNKzEDC/8gWguYYlS5xaRw/+nQviay68RRysuNftlh WAFtPSJaidNAsR1/oAQrxxWj0Dr6JQjEpknV0ub4NMMWqV/9V32Jv/YIfhxFfXWM QL9O6rVRSvOxaE/qdwqScWnZLRyjBiEMtRA== 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=Un4X0kkD 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.208.169 (mail-lj1-f169.google.com); spf=pass smtp.mailfrom=andrey100100100@gmail.com smtp.helo=mail-lj1-f169.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=HnNhrabS; x-me-sender=none; x-ptr=pass smtp.helo=mail-lj1-f169.google.com policy.ptr=mail-lj1-f169.google.com; x-return-mx=pass header.domain=gmail.com policy.is_org=yes (MX Records found: gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com,alt4.gmail-smtp-in.l.google.com,alt2.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: gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com,alt4.gmail-smtp-in.l.google.com,alt2.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: gggruggvucftvghtrhhoucdtuddrgedvfedruddvhedgkeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefkuffhvf ffjghftgfgfgggsehtqhertddtreejnecuhfhrohhmpegrnhgurhgvhidutddtuddttddu tddtsehgmhgrihhlrdgtohhmnecuggftrfgrthhtvghrnhepffehvdeitdekleegledvke fguefgieffuefgffdvvdehgfffiedthefgheefudejnecukfhppedvtdelrdekhedrvddt kedrudeiledpkeehrddujeegrdduledvrddufeefnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehinhgvthepvddtledrkeehrddvtdekrdduieelpdhhvghlohepmhgr ihhlqdhljhduqdhfudeiledrghhoohhglhgvrdgtohhmpdhmrghilhhfrhhomhepoegrnh gurhgvhidutddtuddttddutddtsehgmhgrihhlrdgtohhmqe X-ME-VSScore: 0 X-ME-VSCategory: clean Received-SPF: pass (gmail.com ... _spf.google.com: Sender is authorized to use 'andrey100100100@gmail.com' in 'mfrom' identity (mechanism 'include:_netblocks.google.com' matched)) receiver=tb-mx0.topicbox.com; identity=mailfrom; envelope-from="andrey100100100@gmail.com"; helo=mail-lj1-f169.google.com; client-ip=209.85.208.169 Received: from mail-lj1-f169.google.com (mail-lj1-f169.google.com [209.85.208.169]) (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 11:06:24 -0400 (EDT) (envelope-from andrey100100100@gmail.com) Received: by mail-lj1-f169.google.com with SMTP id h23so5045243ljl.3 for <9fans@9fans.net>; Fri, 17 Jun 2022 08:06:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:content-transfer-encoding:user-agent:mime-version; bh=0zIdEUQ0bFVfyNM1Jz2SxP5anx7TdygcouYXOAlNQSY=; b=HnNhrabSLjxovCUPkZofvf3ciA0lsMr69cMTLjiprWgK/SOGItkkzEsfycDamjekP3 jDytBrxtN6ZJnlL9JNN5qrZJYze43YSPrBKDh1u7t6RE49AVP3S/JmAcYNfdszkgUM/s PvvsA7JEhse3X5l4+TeTONF9QDy5yBqLuYIBqCiSiVHJmajvh9jb0Q+SgYf+jUPPloKg /S1DNpk1uBh4NuX8ZTpuVckdOUzmrvZYMhbnaoujRqnlRaUSn/UKSjnmCr12MbwuV7mL XibM3KgUypftFb5wHnIbVOa2qJIIrtmKLu0b+S8GChx3i2jIt6H2vEJN8PGH07p/cqYw rXew== X-Gm-Message-State: AJIora+BOKmC1zxwyN9t5StikRqg6vZghMfbEYBHKisDoeEMZSVaVDT6 cTzkIv6w5rj5GeMaYeyBVhS0yFnHRkEV2w== X-Google-Smtp-Source: AGRyM1sXn7yVL4JfFDHs4CU8Pkb8XTpnJFErxhZUEE6rX2Iw7Ktmn9bmGwRnhm5mujkYsYe4o9aDkA== X-Received: by 2002:a05:651c:b28:b0:259:108f:766c with SMTP id b40-20020a05651c0b2800b00259108f766cmr5193250ljr.256.1655478382778; Fri, 17 Jun 2022 08:06:22 -0700 (PDT) Received: from [10.33.77.10] ([85.174.192.133]) by smtp.gmail.com with ESMTPSA id k5-20020a192d05000000b0047956e49934sm668949lfj.48.2022.06.17.08.06.21 for <9fans@9fans.net> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jun 2022 08:06:22 -0700 (PDT) Message-ID: <9e922645a598c69ba14b74e18e8669cc068e9717.camel@gmail.com> Subject: Re: [9fans] syscall silently kill processes From: andrey100100100@gmail.com To: 9fans@9fans.net Date: Fri, 17 Jun 2022 18:06:20 +0300 In-Reply-To: References: <79286caa2ca77ea9b9a1cd64918bdc5f28c8f180.camel@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.1 MIME-Version: 1.0 Topicbox-Policy-Reasoning: allow: sender is a member Topicbox-Message-UUID: 1128ffd6-ee4f-11ec-a9bf-da14d68fd606 Archived-At: =?UTF-8?B?PGh0dHBzOi8vOWZhbnMudG9waWNib3guY29tL2dyb3Vwcy85?= =?UTF-8?B?ZmFucy9UZmE2ODIzMDQ4YWQ5MGEyMS1NNGZhNjlkZjE0ZWZmNjAyNzM3Mjdj?= =?UTF-8?B?OTJiPg==?= 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:M4fa69df14eff60273727c92b:1:-69rOuZxCjbktzQyyRZu9WQ9Scpk1mJwbOlBPgLp8J4 =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 >=20 > This is incorrect, according to thread(2): >=20 > "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. >=20 > 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. >=20 > An excerpt from notify(2): >=20 > "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." >=20 > So you are indeed observing undefined behavior. >=20 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? >=20 > Hope this helps, > moody >=20 Regards, Andrej ------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/Tfa6823048ad90a21-M4fa69= df14eff60273727c92b Delivery options: https://9fans.topicbox.com/groups/9fans/subscription