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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 29208 invoked from network); 17 Jun 2022 09:38:15 -0000 Received: from tb-ob21.topicbox.com (173.228.157.67) by inbox.vuxu.org with ESMTPUTF8; 17 Jun 2022 09:38:15 -0000 Received: from tb-mx0.topicbox.com (tb-mx0.nyi.icgroup.com [10.90.30.73]) by tb-ob21.topicbox.com (Postfix) with ESMTP id 274CB1C4E6 for ; Fri, 17 Jun 2022 05:37:53 -0400 (EDT) (envelope-from bounce.mM6b9bfae581b00133c66b93c2.r522be890-2105-11eb-b15e-8d699134e1fa@9fans.bounce.topicbox.com) Received: by tb-mx0.topicbox.com (Postfix, from userid 1132) id BD4CE1CD318B; Fri, 17 Jun 2022 05:37:52 -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=YfBsYTiL 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-f173.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:from:to:date:content-type :content-transfer-encoding:mime-version:list-help:list-id :list-post:list-subscribe:reply-to:subject:list-unsubscribe; s= sysmsg-1; t=1655458672; bh=7NbiNUmdABUYq7IQuCATIg4dnUqIUyWJH9i7F +OvVIc=; b=sAkjWzdXhMZp8chOE7jxJeCs9amd2IWWiUzASVgFVJJHDurQxsGnf htwAboXEIz5QyGstLf3b3J+gxxJ7SG+x87B8zOhbQfWuxV23jD3YxVJeLxQ03Lcp E1qZ5brpeTBcTdxcxEDMgAmI6ud1t0lgrigC5TxrCFTkiKw8fxCS8w= ARC-Seal: i=2; a=rsa-sha256; cv=pass; d=topicbox.com; s=sysmsg-1; t= 1655458672; b=k1j2U450GJBioXRFzmK0X9QpetsvikTmb3y2wCD6CQUrVdIk3p BDFv5At3XRAAMtj8/a2//QiyUvLSLpgT4o6JgB0Rfh5slE8CXayPGHLd0OXLbgdV aSGmvOKkmYVbsR45Enq7PlcKjvG28iMNNaRrEaQ+ASd3BycbxMiriFO6Q= Authentication-Results: topicbox.com; arc=pass; dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=YfBsYTiL 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-f173.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=YfBsYTiL 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.173 (mail-lj1-f173.google.com); spf=pass smtp.mailfrom=andrey100100100@gmail.com smtp.helo=mail-lj1-f173.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=Cd5yKcq2; x-me-sender=none; x-ptr=pass smtp.helo=mail-lj1-f173.google.com policy.ptr=mail-lj1-f173.google.com; x-return-mx=pass header.domain=gmail.com policy.is_org=yes (MX Records found: 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,alt4.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,alt1.gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com,alt4.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 :from:to:date:content-type:content-transfer-encoding :mime-version:list-help:list-id:list-post:list-subscribe :reply-to:subject:list-unsubscribe; s=dkim-1; t=1655458672; x= 1655545072; bh=Ncg9HkkU9p8wL1yB8ZSXTYTm76MyntGYVWi0/04ygHw=; b=b QqSH25M+Xx8k7Xkal/coKrEoMI2VjQTsyydyFb4Rl8ffPXcSGtTqpj6bQhIZVOsG lAYpYx6SbphzEXWo7CO9xHxr8WBkD2w9kAllcW5LMwNvKwddCjwx7ZhxeN8625KL wJ1lEBie28XR4jGow7LyTV42u6Kvt4QohO39YZdPwQ= Received: from tb-mx0.topicbox.com (localhost.local [127.0.0.1]) by tb-mx0.topicbox.com (Postfix) with ESMTP id CFB7D1CD2D5B for <9fans@9fans.net>; Fri, 17 Jun 2022 05:37:35 -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 3E720E89369; Fri, 17 Jun 2022 05:37:35 -0400 ARC-Seal: i=1; a=rsa-sha256; cv=none; d=topicbox.com; s=arcseal; t= 1655458655; b=whPEDwprrJfdA9uRCgChZBMkvWgmAN3fsYiNxZuABb6bI1xT+X QmCl4zNJe6Dp5RjrwlNHRR/HOQFu1YsjwvfINWVi3i4jatAvhD68aw7uKp5nwV6J Hp067SGMj2EP3f7r1IgCj2Td4ChX+pFJrglMmwI19FpbPP0oBOcu4O30Sco9fpsR l3UHAOeyhQSB8YZKRhJZ3StDV06P3YiKhMp2GkNEVZ2ruEFzcIqxcHD7D62MtxtH XRk320rD4VXWM7IZRkHdrDzN30iqF9lT0WybYtx8/TKwC3eXw+10RYCjZ0bCmcrk 0YXo+AF/6vvMiPnf1cL7dIKLgryMxN5W4rXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=message-id:subject:from:to:date:content-type :content-transfer-encoding:mime-version; s=arcseal; t= 1655458655; bh=D1wBBjygfKvA8qmK565+YbFgIfCdGSHCWV6eEgOnxmY=; b=v dawvCY8+xQ+A0JTP0CL2Dv4hJRtUKOBF7FwqVWPYlPt+UE046lYzXEffkx7jfAIN 9blOSaz7gVDDGKj2KVC/tvb8BLPYbwXQ9R/TGJ8Y4ha+5qTm24JPdkhIYWMP6uDt oShCwjyy6VCJdv1UM/Cyy+RPjxti0Ia4626FMfbSKd/QOeLedQFCPSV36MplrWDJ j/ePjPUg1sh6ya3XIGurDQAL6uaDA7BcQ0LFWHEzvo2huEy//gKH2rhId9yNoZh6 hOdduAGmWL+GpYgED59tskt/lHtGtHy/j+7ybK9HapqbSKRNWs5wgZP5d5JxrClH l236tarpnubMEEvj/GvpA== 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=YfBsYTiL 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.173 (mail-lj1-f173.google.com); spf=pass smtp.mailfrom=andrey100100100@gmail.com smtp.helo=mail-lj1-f173.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=Cd5yKcq2; x-me-sender=none; x-ptr=pass smtp.helo=mail-lj1-f173.google.com policy.ptr=mail-lj1-f173.google.com; x-return-mx=pass header.domain=gmail.com policy.is_org=yes (MX Records found: 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,alt4.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,alt1.gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com,alt4.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: gggruggvucftvghtrhhoucdtuddrgedvfedruddvhedgudeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefkuffhvf fftgfgfgggsehtqhertddtreejnecuhfhrohhmpegrnhgurhgvhidutddtuddttddutddt sehgmhgrihhlrdgtohhmnecuggftrfgrthhtvghrnheplefgieetieduvdfhffehhfffvd ejvddtudeghfdutdevhedviedvffdvhefhiedunecukfhppedvtdelrdekhedrvddtkedr udejfedpkeehrddujeegrdduledvrddufeefnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehinhgvthepvddtledrkeehrddvtdekrddujeefpdhhvghlohepmhgrihhl qdhljhduqdhfudejfedrghhoohhglhgvrdgtohhmpdhmrghilhhfrhhomhepoegrnhgurh gvhidutddtuddttddutddtsehgmhgrihhlrdgtohhmqe 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-f173.google.com; client-ip=209.85.208.173 Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com [209.85.208.173]) (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 05:37:35 -0400 (EDT) (envelope-from andrey100100100@gmail.com) Received: by mail-lj1-f173.google.com with SMTP id d19so4130724lji.10 for <9fans@9fans.net>; Fri, 17 Jun 2022 02:37:34 -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 :content-transfer-encoding:user-agent:mime-version; bh=D1wBBjygfKvA8qmK565+YbFgIfCdGSHCWV6eEgOnxmY=; b=Cd5yKcq2B6RMEggka3iItpNKuYeJEUSp/2IHLlIgQWU8T9FCk6yo3s0Z/HofVxJj53 mSVDIx6C1GX1jq7QGMVq0wuauy9w+GqPqtjW35ZSx9ZVhmZwTw3rkWrq3t3/sOkv13s/ xhpzwYAO752FBwqc0vBboSaora9lVAmgCr/8yRK6A/Mjl3DGtr0CyEN5XcaZNMXwErx8 m0H9dVuhYhPLUukZsODFhdwU3j1NL+saAY6aUIqv78NSbtIMJVVpC/P5tbPq6lvVwKz+ pKtNISQrrvl5yh8gdr0r/owHA945P1GG/lUmZeygolBkYqZgWRfWYwE8V+lNWohnEiPN ca7Q== X-Gm-Message-State: AJIora/0HzcQwbADFRTaTJ+26jQ764i8KX/LQGYTfoYtYg8Srh/Mc3iQ pP1uLIlZh/yBHgHeTAvXJe/WdRKCqjc= X-Google-Smtp-Source: AGRyM1u3NIT0sSYoqPYw2iGB+wdJI160f2NXX9vZoTgC8GnL7+bIOcjX7LUTg2oC8vrn3/BGTaFidw== X-Received: by 2002:a05:651c:b21:b0:255:7a45:82d2 with SMTP id b33-20020a05651c0b2100b002557a4582d2mr4369073ljr.198.1655458653217; Fri, 17 Jun 2022 02:37:33 -0700 (PDT) Received: from [10.33.77.10] ([85.174.192.133]) by smtp.gmail.com with ESMTPSA id l4-20020a2e9084000000b0025580d79d6csm481956ljg.29.2022.06.17.02.37.32 for <9fans@9fans.net> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jun 2022 02:37:32 -0700 (PDT) Message-ID: <79286caa2ca77ea9b9a1cd64918bdc5f28c8f180.camel@gmail.com> From: andrey100100100@gmail.com To: 9fans <9fans@9fans.net> Date: Fri, 17 Jun 2022 12:37:30 +0300 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: 21a9235a-ee21-11ec-90f4-a5c0248eabdf Archived-At: =?UTF-8?B?PGh0dHBzOi8vOWZhbnMudG9waWNib3guY29tL2dyb3Vwcy85?= =?UTF-8?B?ZmFucy9UZmE2ODIzMDQ4YWQ5MGEyMS1NNmI5YmZhZTU4MWIwMDEzM2M2NmI5?= =?UTF-8?B?M2MyPg==?= 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] syscall silently kill processes List-Unsubscribe: , Topicbox-Delivery-ID: 2:9fans:437d30aa-c441-11e9-8a57-d036212d11b0:522be890-2105-11eb-b15e-8d699134e1fa:M6b9bfae581b00133c66b93c2:1:sE41EJ3MhLU8kzMocCe8RVWrOEt_lR3zy6jRIDUYJM0 Hi all! Strange behavior of syscall 'read' with signal 'alarm' in followed simple program (ip/port - not matter): ----------------------------------------------------------------------- #include #include #include static int handler_alarm(void *, char *msg) { if(strstr(msg, "alarm")) return 1; return 0; } static void proc_udp(void *) { char resp[512]; char req[] =3D "request"; int fd; threadnotify(handler_alarm, 1); if((fd =3D dial("udp!185.157.221.201!5678", nil, nil, nil)) >=3D 0){ if(write(fd, req, strlen(req)) =3D=3D strlen(req)){ fprint(1, "start\n"); alarm(2000); read(fd, resp, sizeof(resp)); alarm(0); fprint(1, "end\n"); } close(fd); } threadexits(nil); } int mainstacksize =3D 5242880; void threadmain(int argc, char *argv[]) { for(int i =3D 0; i < 80; i++){ proccreate(proc_udp, nil, 10240); } sleep(5000); threadexitsall(nil); } ----------------------------------------------------------------------- cpu% 6.out | grep end | wc -l 33 sometimes little more or less but cpu% 6.out | grep start | wc -l 80 =20=20=20=20=20 always. Testing on Miller's RPi and 9front (amd64 & RPi 2) Why does read() kill process? Why not always? Why number of 'ended' processes arond 33? This is normal behavior? How to fix the program so that the processes do not lost? Can someone point me in the right direction? Thanks! Andrey ------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/Tfa6823048ad90a21-M6b9bf= ae581b00133c66b93c2 Delivery options: https://9fans.topicbox.com/groups/9fans/subscription