From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DA06CC6FA82 for ; Thu, 22 Sep 2022 13:18:04 +0000 (UTC) Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.96) (envelope-from ) id 1obM5N-00036Y-2m; Thu, 22 Sep 2022 09:17:49 -0400 Received: from mscreen.etri.re.kr ([129.254.9.16]) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA (Exim 4.96) (envelope-from ) id 1obM5L-000350-1K for kernelnewbies@kernelnewbies.org; Thu, 22 Sep 2022 09:17:48 -0400 Received: from unknown (HELO send001-relay.gov-dooray.com) (211.180.235.152) by 129.254.9.16 with ESMTP; 22 Sep 2022 22:17:37 +0900 X-Original-SENDERIP: 211.180.235.152 X-Original-MAILFROM: ckim@etri.re.kr X-Original-RCPTTO: kernelnewbies@kernelnewbies.org Received: from [10.162.225.106] (HELO smtp001-imp.gov-dooray.com) ([10.162.225.106]) by send001-relay.gov-dooray.com with SMTP id 0b57c958632c6070; Thu, 22 Sep 2022 22:17:36 +0900 DKIM-Signature: a=rsa-sha256; b=lSVN4ydNZvbuUkCUV+r+bD46b4tIiZ0YRBgZpYtwOhy9MlFHVo76yrhM83LNYA4fJcL+CpnFlv O4uI6X93VAxbQeC+hyN7CSi3oQRF2ymxhKkDGRKExgwPcs6QrLLRY78iCnvZXwVW6AYcrHBpJF+6 K+XZ459TE4cc3nRZGLP/KJP+K58IViHa9HPV2bF9UMzia1PDQFUZwCJg/7/SPx7fdHVLcXPv5BEg RxZ6KwVF4wH5F0tL96PETAUYaiO2/CVcjcfMGaE9WH7AI7niFJiAIaQq+kKH51MRINF/6fKqp3X7 mEZ53S5WOu4XhqnA55QSsOdejd9Tysnnqp2RcGRg==; c=relaxed/relaxed; s=selector; d=dooray.com; v=1; bh=ukaReVhATnsJJCGG/3HjP4gtXB7fW9QVyHa10c183ow=; h=From:To:Subject:Message-ID; Received: from [129.254.132.39] (HELO CHANKIMPC) ([129.254.132.39]) by smtp001-imp.gov-dooray.com with SMTP id 39b51e8c632c6070; Thu, 22 Sep 2022 22:17:36 +0900 From: "Chan Kim" To: "'Greg KH'" References: <0ee901d8cda9$b1056ec0$13104c40$@etri.re.kr> In-Reply-To: Subject: RE: how to debug... program hangs while downing for write a rwsem Date: Thu, 22 Sep 2022 22:17:34 +0900 Message-ID: <002a01d8ce85$add8fa00$098aee00$@etri.re.kr> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Content-Language: ko Thread-Index: AQE9Q81cI79TXEdRUEP/7MQlsEV8owHTWFdzrxPkmgA= Cc: kernelnewbies@kernelnewbies.org X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kernelnewbies-bounces@kernelnewbies.org Hi, Greg K-H, I found the scheduler isn't working correct. When I run an application instead of the shell, and when I call sleep() inside the application, it hangs. So I have to investigate about the clock settings first(in dts, etc). (The serial port is 8250 compatible uart that we've been using). Thank you. Chan Kim >-----Original Message----- >From: Greg KH >Sent: Wednesday, September 21, 2022 8:16 PM >To: Chan Kim >Cc: kernelnewbies@kernelnewbies.org >Subject: Re: how to debug... program hangs while downing for write a rwsem > >On Wed, Sep 21, 2022 at 08:02:50PM +0900, Chan Kim wrote: >> Hello kernel experts and users, >> >> I'm trying to boot linux-5.10.0-rc5 on our arm64 board (using >> neoverse-v1 core). > >5.10-rc5 is very very very old and obsolete, and not even a real release. >Why are you using that specific kernel version? > >At the very least, use a released and supported 5.10.y tree, but even >better, use the latest 5.19.y release. > >> After the shell comes up, when I press enter key at the prompt, it >> gives me another prompt. >> But when I press enter key again, it stops responding. >> After inspecting where the program hangs, I found it hangs in function >> tty_set_termios while downing the rwsem. >> Please see below where I marked "<===== this line "". (in file >> drivers/tty/tty_ioctl.c) >> >> int tty_set_termios(struct tty_struct *tty, struct ktermios >> *new_termios) { >> struct ktermios old_termios; >> struct tty_ldisc *ld; >> >> WARN_ON(tty->driver->type == TTY_DRIVER_TYPE_PTY && >> tty->driver->subtype == PTY_TYPE_MASTER); >> /* >> * Perform the actual termios internal changes under lock. >> */ >> >> >> /* FIXME: we need to decide on some locking/ordering semantics >> for the set_termios notification eventually */ >> down_write(&tty->termios_rwsem); <====== this >> line > >What serial driver are you using that is causing this problem? > >thanks, > >greg k-h _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies