From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 11C19A04B0; Fri, 4 Dec 2020 10:10:29 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E3B9A37AF; Fri, 4 Dec 2020 10:10:27 +0100 (CET) Received: from smtp1.iitb.ac.in (smtpd8.iitb.ac.in [103.21.126.63]) by dpdk.org (Postfix) with ESMTP id 12F49C9BA for ; Thu, 3 Dec 2020 01:02:15 +0100 (CET) Received: from ldns2.iitb.ac.in (ldns2.iitb.ac.in [10.200.12.2]) by smtp1.iitb.ac.in (Postfix) with SMTP id 1794E100FEA4 for ; Thu, 3 Dec 2020 05:32:13 +0530 (IST) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.iitb.ac.in 1794E100FEA4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iitb.ac.in; s=mail; t=1606953733; bh=nHTBRlDdoul/4gO5hFDPOkTq/gAnrcZK0hNF4UOew7Y=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ea6Yyz6H4/r+c7ULyel/Zq7o92MJ9oncCkVo/w1A7B8qA4XxTsRkvw8w2g/Q4fKIA cBpX+DaCQqMf+Ap86WH5V6qm4eehlKcjNFUJaLan7e9Giev3/h3PNhMCPHHSaeR/5y s9JhMiEjG78faEZBEm6FIVNyyC2qoY2fctuVcWS4= Received: (qmail 1810 invoked by uid 510); 3 Dec 2020 05:32:13 +0530 X-Qmail-Scanner-Diagnostics: from 10.200.1.25 by ldns2 (envelope-from , uid 501) with qmail-scanner-2.11 spamassassin: 3.4.1. mhr: 1.0. {clamdscan: 0.100.0/26006} Clear:RC:1(10.200.1.25):SA:0(0.0/7.0):. Processed in 3.249423 secs; 03 Dec 2020 05:32:13 +0530 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on ldns2.iitb.ac.in X-Spam-Level: X-Spam-Status: No, score=0.0 required=7.0 tests=BAYES_40,IITB_ORIG, PROPER_IITB_MSGID autolearn=disabled version=3.4.1 X-Spam-Pyzor: Reported 0 times. X-Envelope-From: prateekag@cse.iitb.ac.in X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received: from unknown (HELO ldns2.iitb.ac.in) (10.200.1.25) by ldns2.iitb.ac.in with SMTP; 3 Dec 2020 05:32:09 +0530 Received: from mail.cse.iitb.ac.in (miller.cse.iitb.ac.in [10.129.3.1]) by ldns2.iitb.ac.in (Postfix) with ESMTP id 8ACE93414DA for ; Thu, 3 Dec 2020 05:32:09 +0530 (IST) Received: by mail.cse.iitb.ac.in (Postfix, from userid 5001) id 7FF85F40D16; Thu, 3 Dec 2020 05:32:09 +0530 (IST) Received: from www.cse.iitb.ac.in (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by mail.cse.iitb.ac.in (Postfix) with ESMTPSA id 85A28F40D0D; Thu, 3 Dec 2020 05:32:08 +0530 (IST) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 03 Dec 2020 05:32:08 +0530 From: prateekag To: Thomas Monjalon Cc: dev@dpdk.org, Stephen Hemminger In-Reply-To: <4079538.OZV0JHgpTk@thomas> References: <77fa0d526982e5fd0a15b293599d973c@cse.iitb.ac.in> <7271567.L1mZBfcePy@thomas> <4079538.OZV0JHgpTk@thomas> Message-ID: X-Sender: prateekag@cse.iitb.ac.in User-Agent: Roundcube Webmail/1.3.9 X-Mailman-Approved-At: Fri, 04 Dec 2020 10:10:26 +0100 Subject: Re: [dpdk-dev] Printfs in Signal Handler X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Ok. On 2020-12-03 02:11, Thomas Monjalon wrote: > 01/12/2020 10:24, Thomas Monjalon: >> 01/12/2020 04:39, prateekag: >> > printf is not signal safe and may lead to deadlock if kept in signal handler >> > and >> > signal comes in two quick succession. It will not lead to incorrect behavior >> > and it is a highly unlikely event. And an expert may understand why this >> > issue happened. Is it worthwhile to change these printfs to unix I/O write >> > call? >> >> Thank you for reporting. >> Please could you describe which files and functions you are talking about? > > I've received a private reply: > Filenames: > testpmd.c > test_pmd_perf.c > evt_main.c > pdump/main.c > Function name: > signal_handler > > > I am OK with removing these printfs. > > Do you want to do the patch with the explanation?