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 X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2E7D6C04EBF for ; Mon, 23 Sep 2019 10:21:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D6644206C2 for ; Mon, 23 Sep 2019 10:21:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IDEfImop" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2439438AbfIWKVH (ORCPT ); Mon, 23 Sep 2019 06:21:07 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:45447 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2439425AbfIWKVG (ORCPT ); Mon, 23 Sep 2019 06:21:06 -0400 Received: by mail-pg1-f193.google.com with SMTP id 4so7749586pgm.12 for ; Mon, 23 Sep 2019 03:21:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=CXvbstD2m08lCzQh36duEA5ws0bxBPn6LqTdvVcfkS4=; b=IDEfImopZM+uhUkTwx6z6NBrJo2aMW0JluC4He2eeVrx3Enr+nqtwDcFdQ90gDWTN7 f5dKe1J5zyEesLT/TIMB4N9k8Aznfh1hRu0K2ice0sEUQzsNEF7ABYH54cBkC2nMXvCW sOEWLqL9bIDP0KhdmDg8oMuztPgg2t0TBvAvacpuoYYybqc7ifYt0XYAu6L+Zyd3z5kW AZtM2lEo9LHDl2+lBZtV8y9kTSYWg7XUzBemMsMa829ubhzUNkhxh6GFy4h8boT+hRpI Y9IKxnj2RBhQ1dlbaypEXmmru6Jm0bnYfcFZfEa/fq9AXS7EE/PczhtK5F/PBdR0hzAB 9rOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=CXvbstD2m08lCzQh36duEA5ws0bxBPn6LqTdvVcfkS4=; b=ehuSGyYH3cB8dqOKWTnfNjQmWelJckAlYTeKjKce5/4QjztAKWW+/NOZ/seSv5qZVa ICEeeoBtyOZqRfXXpZkRKcQdaEIPQ6EDceiWl11VEfrn7jRBPkGHvuQyLF/zXGTD+9n2 qiBwIeABHZwHHTw9AH1yB/PtazsemrpM1K//2L9gbV7kxgjHNmw7hDthCb/OqUXuziA7 QcDKYpWskKqBAGd7w5h0FuVXo05SKEvSz0e0bK7FbdpuC0A1KmCBOrM9OQm8NARCKn5a Z8Rn2NPN/KN2/Cw5DPbDznH7/lbE/kfh9avVFEv3y/odV1/PylaTXu2uhCh8JwOyJz3/ nHTw== X-Gm-Message-State: APjAAAWVVuw++5FscFliqxRGlz+7TATIbYxrHwQjHCptxCdpL9ayhFvE 2ui1uIVQPJ2NHvu/YoMHZgs= X-Google-Smtp-Source: APXvYqwgTjx/Ho05abUBRZtOqhFdPYqvJK1KmpHYQN3e+VYW1sen0LuZHG10cGI6bBC7ftaWS4s/8w== X-Received: by 2002:a62:8702:: with SMTP id i2mr32616605pfe.187.1569234065362; Mon, 23 Sep 2019 03:21:05 -0700 (PDT) Received: from localhost ([110.70.15.104]) by smtp.gmail.com with ESMTPSA id q71sm11380351pjb.26.2019.09.23.03.21.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Sep 2019 03:21:04 -0700 (PDT) Date: Mon, 23 Sep 2019 19:21:00 +0900 From: Sergey Senozhatsky To: Qian Cai Cc: Sergey Senozhatsky , Steven Rostedt , Sergey Senozhatsky , Petr Mladek , Catalin Marinas , Will Deacon , Dan Williams , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Peter Zijlstra , Waiman Long , Thomas Gleixner , Theodore Ts'o , Arnd Bergmann , Greg Kroah-Hartman Subject: Re: printk() + memory offline deadlock (WAS Re: page_alloc.shuffle=1 + CONFIG_PROVE_LOCKING=y = arm64 hang) Message-ID: <20190923102100.GA1171@jagdpanzerIV> References: <1566509603.5576.10.camel@lca.pw> <1567717680.5576.104.camel@lca.pw> <1568128954.5576.129.camel@lca.pw> <20190911011008.GA4420@jagdpanzerIV> <1568289941.5576.140.camel@lca.pw> <20190916104239.124fc2e5@gandalf.local.home> <1568817579.5576.172.camel@lca.pw> <20190918155059.GA158834@tigerII.localdomain> <1568823006.5576.178.camel@lca.pw> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1568823006.5576.178.camel@lca.pw> User-Agent: Mutt/1.12.2 (2019-09-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (09/18/19 12:10), Qian Cai wrote: [..] > > So you have debug objects enabled. Right? This thing does not behave > > when it comes to printing. debug_objects are slightly problematic. > > Yes, but there is an also a similar splat without the debug_objects. It looks > like anything try to allocate memory in that path will trigger it anyway. Appears to be different, yet somehow very familiar. > [  297.425908] WARNING: possible circular locking dependency detected > [  297.425908] 5.3.0-next-20190917 #8 Not tainted > [  297.425909] ------------------------------------------------------ > [  297.425910] test.sh/8653 is trying to acquire lock: > [  297.425911] ffffffff865a4460 (console_owner){-.-.}, at: > console_unlock+0x207/0x750 > > [  297.425914] but task is already holding lock: > [  297.425915] ffff88883fff3c58 (&(&zone->lock)->rlock){-.-.}, at: > __offline_isolated_pages+0x179/0x3e0 > > [  297.425919] which lock already depends on the new lock. > > > [  297.425920] the existing dependency chain (in reverse order) is: > > [  297.425922] -> #3 (&(&zone->lock)->rlock){-.-.}: > [  297.425925]        __lock_acquire+0x5b3/0xb40 > [  297.425925]        lock_acquire+0x126/0x280 > [  297.425926]        _raw_spin_lock+0x2f/0x40 > [  297.425927]        rmqueue_bulk.constprop.21+0xb6/0x1160 > [  297.425928]        get_page_from_freelist+0x898/0x22c0 > [  297.425928]        __alloc_pages_nodemask+0x2f3/0x1cd0 > [  297.425929]        alloc_pages_current+0x9c/0x110 > [  297.425930]        allocate_slab+0x4c6/0x19c0 > [  297.425931]        new_slab+0x46/0x70 > [  297.425931]        ___slab_alloc+0x58b/0x960 > [  297.425932]        __slab_alloc+0x43/0x70 > [  297.425933]        __kmalloc+0x3ad/0x4b0 > [  297.425933]        __tty_buffer_request_room+0x100/0x250 > [  297.425934]        tty_insert_flip_string_fixed_flag+0x67/0x110 > [  297.425935]        pty_write+0xa2/0xf0 > [  297.425936]        n_tty_write+0x36b/0x7b0 > [  297.425936]        tty_write+0x284/0x4c0 > [  297.425937]        __vfs_write+0x50/0xa0 > [  297.425938]        vfs_write+0x105/0x290 > [  297.425939]        redirected_tty_write+0x6a/0xc0 > [  297.425939]        do_iter_write+0x248/0x2a0 > [  297.425940]        vfs_writev+0x106/0x1e0 > [  297.425941]        do_writev+0xd4/0x180 > [  297.425941]        __x64_sys_writev+0x45/0x50 > [  297.425942]        do_syscall_64+0xcc/0x76c > [  297.425943]        entry_SYSCALL_64_after_hwframe+0x49/0xbe > > [  297.425944] -> #2 (&(&port->lock)->rlock){-.-.}: > [  297.425946]        __lock_acquire+0x5b3/0xb40 > [  297.425947]        lock_acquire+0x126/0x280 > [  297.425948]        _raw_spin_lock_irqsave+0x3a/0x50 > [  297.425949]        tty_port_tty_get+0x20/0x60 > [  297.425949]        tty_port_default_wakeup+0xf/0x30 > [  297.425950]        tty_port_tty_wakeup+0x39/0x40 > [  297.425951]        uart_write_wakeup+0x2a/0x40 > [  297.425952]        serial8250_tx_chars+0x22e/0x440 > [  297.425952]        serial8250_handle_irq.part.8+0x14a/0x170 > [  297.425953]        serial8250_default_handle_irq+0x5c/0x90 > [  297.425954]        serial8250_interrupt+0xa6/0x130 > [  297.425955]        __handle_irq_event_percpu+0x78/0x4f0 > [  297.425955]        handle_irq_event_percpu+0x70/0x100 > [  297.425956]        handle_irq_event+0x5a/0x8b > [  297.425957]        handle_edge_irq+0x117/0x370 > [  297.425958]        do_IRQ+0x9e/0x1e0 > [  297.425958]        ret_from_intr+0x0/0x2a > [  297.425959]        cpuidle_enter_state+0x156/0x8e0 > [  297.425960]        cpuidle_enter+0x41/0x70 > [  297.425960]        call_cpuidle+0x5e/0x90 > [  297.425961]        do_idle+0x333/0x370 > [  297.425962]        cpu_startup_entry+0x1d/0x1f > [  297.425962]        start_secondary+0x290/0x330 > [  297.425963]        secondary_startup_64+0xb6/0xc0 > > [  297.425964] -> #1 (&port_lock_key){-.-.}: > [  297.425967]        __lock_acquire+0x5b3/0xb40 > [  297.425967]        lock_acquire+0x126/0x280 > [  297.425968]        _raw_spin_lock_irqsave+0x3a/0x50 > [  297.425969]        serial8250_console_write+0x3e4/0x450 > [  297.425970]        univ8250_console_write+0x4b/0x60 > [  297.425970]        console_unlock+0x501/0x750 > [  297.425971]        vprintk_emit+0x10d/0x340 > [  297.425972]        vprintk_default+0x1f/0x30 > [  297.425972]        vprintk_func+0x44/0xd4 > [  297.425973]        printk+0x9f/0xc5 > [  297.425974]        register_console+0x39c/0x520 > [  297.425975]        univ8250_console_init+0x23/0x2d > [  297.425975]        console_init+0x338/0x4cd > [  297.425976]        start_kernel+0x534/0x724 > [  297.425977]        x86_64_start_reservations+0x24/0x26 > [  297.425977]        x86_64_start_kernel+0xf4/0xfb > [  297.425978]        secondary_startup_64+0xb6/0xc0 > > [  297.425979] -> #0 (console_owner){-.-.}: > [  297.425982]        check_prev_add+0x107/0xea0 > [  297.425982]        validate_chain+0x8fc/0x1200 > [  297.425983]        __lock_acquire+0x5b3/0xb40 > [  297.425984]        lock_acquire+0x126/0x280 > [  297.425984]        console_unlock+0x269/0x750 > [  297.425985]        vprintk_emit+0x10d/0x340 > [  297.425986]        vprintk_default+0x1f/0x30 > [  297.425987]        vprintk_func+0x44/0xd4 > [  297.425987]        printk+0x9f/0xc5 > [  297.425988]        __offline_isolated_pages.cold.52+0x2f/0x30a > [  297.425989]        offline_isolated_pages_cb+0x17/0x30 > [  297.425990]        walk_system_ram_range+0xda/0x160 > [  297.425990]        __offline_pages+0x79c/0xa10 > [  297.425991]        offline_pages+0x11/0x20 > [  297.425992]        memory_subsys_offline+0x7e/0xc0 > [  297.425992]        device_offline+0xd5/0x110 > [  297.425993]        state_store+0xc6/0xe0 > [  297.425994]        dev_attr_store+0x3f/0x60 > [  297.425995]        sysfs_kf_write+0x89/0xb0 > [  297.425995]        kernfs_fop_write+0x188/0x240 > [  297.425996]        __vfs_write+0x50/0xa0 > [  297.425997]        vfs_write+0x105/0x290 > [  297.425997]        ksys_write+0xc6/0x160 > [  297.425998]        __x64_sys_write+0x43/0x50 > [  297.425999]        do_syscall_64+0xcc/0x76c > [  297.426000]        entry_SYSCALL_64_after_hwframe+0x49/0xbe I suppose you run with CONFIG_DEBUG_VM... So we have port->lock -> MM -> zone->lock // from pty_write()->__tty_buffer_request_room()->kmalloc() vs zone->lock -> printk() -> port->lock // from __offline_pages()->__offline_isolated_pages()->printk() A number of debugging options make the kernel less stable. Sad but true. -ss 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 X-Spam-Level: X-Spam-Status: No, score=-2.1 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5C825C04EBF for ; Mon, 23 Sep 2019 10:21:10 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 30219206C2 for ; Mon, 23 Sep 2019 10:21:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="sdAKCOZ2"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IDEfImop" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 30219206C2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=hQ4G/xmfu0nzwwFwGAgoM0cUZ40Sr/Rz0QKpngd35K4=; b=sdAKCOZ2Cc61Vv l2wtj0mrfjq5t3gX2KG1ZWf8uxtWxtv/vExauuincuItRS3rjlg8VhIsuZIQGoVvtpx9bGfyxnhRU y1G4kDNsAMe0FWAWOKZ+WxX1rcaNKmsgwJXOPAjG/pV2PyNWChfy45ppYGjqTDwJ+j6++PMy+XUBq idCZXHLdv2DpCPtenTC6h/SCz4T709nr8CUXFIvlUH2U9MExNWeOMsSqMjmqvhzI3kXSLiXn+ozli mnzlT9eZlAY8BerjJ0UoNNhfcX9CnKWiWRL1gCr57ryCs2J0FoDx9SXOTFWTfpc2feNTUkOvqBPor iLM1MALz+PqGL/apMKBQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1iCLSv-0000ZH-LY; Mon, 23 Sep 2019 10:21:09 +0000 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]) by bombadil.infradead.org with esmtps (Exim 4.92.2 #3 (Red Hat Linux)) id 1iCLSs-0000Yv-Lp for linux-arm-kernel@lists.infradead.org; Mon, 23 Sep 2019 10:21:08 +0000 Received: by mail-pg1-x543.google.com with SMTP id h17so5229377pgb.3 for ; Mon, 23 Sep 2019 03:21:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=CXvbstD2m08lCzQh36duEA5ws0bxBPn6LqTdvVcfkS4=; b=IDEfImopZM+uhUkTwx6z6NBrJo2aMW0JluC4He2eeVrx3Enr+nqtwDcFdQ90gDWTN7 f5dKe1J5zyEesLT/TIMB4N9k8Aznfh1hRu0K2ice0sEUQzsNEF7ABYH54cBkC2nMXvCW sOEWLqL9bIDP0KhdmDg8oMuztPgg2t0TBvAvacpuoYYybqc7ifYt0XYAu6L+Zyd3z5kW AZtM2lEo9LHDl2+lBZtV8y9kTSYWg7XUzBemMsMa829ubhzUNkhxh6GFy4h8boT+hRpI Y9IKxnj2RBhQ1dlbaypEXmmru6Jm0bnYfcFZfEa/fq9AXS7EE/PczhtK5F/PBdR0hzAB 9rOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=CXvbstD2m08lCzQh36duEA5ws0bxBPn6LqTdvVcfkS4=; b=HI80PJEtbPfGQwpDWkPFrFr6XlPpUHpeBp9aHhFy32gAv3oPZifJXCMZsDapB++73c 7EIYNfwZtwdzzQTzUR6PC+Coh4pGswdPW3af4cNfcdIuLod6aWJhRyuLI19eibBH0SAV XgjKDQZ8sJCv8vlQaxv5FFuTQJuQm9AslHsuQvUSAk0d5dfcdP4WRydrJQtBRBd4O1jI RCKAWHcxsfBf5dof/Bub47aeSrqpD9n+0Ct192BdzqOeWH0HH+S4hMZUtJLDUspLJwAw tD7MVg6mhJw9Mo/YzJSr2mrLU1J3dc1fUKv7Hox7mlNB4xGyBxzrsQmzqWzY+ugzFtGK U0nA== X-Gm-Message-State: APjAAAX4q57/nPICdLjNxSEqdCOtPFoAqYGmthJu5ETssARxW33F6fD2 JWhGncgBDvYnmMNPBfu7i6Y= X-Google-Smtp-Source: APXvYqwgTjx/Ho05abUBRZtOqhFdPYqvJK1KmpHYQN3e+VYW1sen0LuZHG10cGI6bBC7ftaWS4s/8w== X-Received: by 2002:a62:8702:: with SMTP id i2mr32616605pfe.187.1569234065362; Mon, 23 Sep 2019 03:21:05 -0700 (PDT) Received: from localhost ([110.70.15.104]) by smtp.gmail.com with ESMTPSA id q71sm11380351pjb.26.2019.09.23.03.21.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Sep 2019 03:21:04 -0700 (PDT) Date: Mon, 23 Sep 2019 19:21:00 +0900 From: Sergey Senozhatsky To: Qian Cai Subject: Re: printk() + memory offline deadlock (WAS Re: page_alloc.shuffle=1 + CONFIG_PROVE_LOCKING=y = arm64 hang) Message-ID: <20190923102100.GA1171@jagdpanzerIV> References: <1566509603.5576.10.camel@lca.pw> <1567717680.5576.104.camel@lca.pw> <1568128954.5576.129.camel@lca.pw> <20190911011008.GA4420@jagdpanzerIV> <1568289941.5576.140.camel@lca.pw> <20190916104239.124fc2e5@gandalf.local.home> <1568817579.5576.172.camel@lca.pw> <20190918155059.GA158834@tigerII.localdomain> <1568823006.5576.178.camel@lca.pw> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1568823006.5576.178.camel@lca.pw> User-Agent: Mutt/1.12.2 (2019-09-21) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190923_032106_743365_67874A39 X-CRM114-Status: GOOD ( 13.96 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Petr Mladek , Theodore Ts'o , Sergey Senozhatsky , Arnd Bergmann , linux-mm@kvack.org, Peter Zijlstra , Catalin Marinas , linux-kernel@vger.kernel.org, Steven Rostedt , Sergey Senozhatsky , Greg Kroah-Hartman , Waiman Long , Dan Williams , Will Deacon , Thomas Gleixner , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On (09/18/19 12:10), Qian Cai wrote: [..] > > So you have debug objects enabled. Right? This thing does not behave > > when it comes to printing. debug_objects are slightly problematic. > = > Yes, but there is an also a similar splat without the debug_objects. It l= ooks > like anything try to allocate memory in that path will trigger it anyway. Appears to be different, yet somehow very familiar. > [=A0=A0297.425908] WARNING: possible circular locking dependency detected > [=A0=A0297.425908] 5.3.0-next-20190917 #8 Not tainted > [=A0=A0297.425909] ------------------------------------------------------ > [=A0=A0297.425910] test.sh/8653 is trying to acquire lock: > [=A0=A0297.425911] ffffffff865a4460 (console_owner){-.-.}, at: > console_unlock+0x207/0x750 > = > [=A0=A0297.425914] but task is already holding lock: > [=A0=A0297.425915] ffff88883fff3c58 (&(&zone->lock)->rlock){-.-.}, at: > __offline_isolated_pages+0x179/0x3e0 > = > [=A0=A0297.425919] which lock already depends on the new lock. > = > = > [=A0=A0297.425920] the existing dependency chain (in reverse order) is: > = > [=A0=A0297.425922] -> #3 (&(&zone->lock)->rlock){-.-.}: > [=A0=A0297.425925]=A0=A0=A0=A0=A0=A0=A0=A0__lock_acquire+0x5b3/0xb40 > [=A0=A0297.425925]=A0=A0=A0=A0=A0=A0=A0=A0lock_acquire+0x126/0x280 > [=A0=A0297.425926]=A0=A0=A0=A0=A0=A0=A0=A0_raw_spin_lock+0x2f/0x40 > [=A0=A0297.425927]=A0=A0=A0=A0=A0=A0=A0=A0rmqueue_bulk.constprop.21+0xb6/= 0x1160 > [=A0=A0297.425928]=A0=A0=A0=A0=A0=A0=A0=A0get_page_from_freelist+0x898/0x= 22c0 > [=A0=A0297.425928]=A0=A0=A0=A0=A0=A0=A0=A0__alloc_pages_nodemask+0x2f3/0x= 1cd0 > [=A0=A0297.425929]=A0=A0=A0=A0=A0=A0=A0=A0alloc_pages_current+0x9c/0x110 > [=A0=A0297.425930]=A0=A0=A0=A0=A0=A0=A0=A0allocate_slab+0x4c6/0x19c0 > [=A0=A0297.425931]=A0=A0=A0=A0=A0=A0=A0=A0new_slab+0x46/0x70 > [=A0=A0297.425931]=A0=A0=A0=A0=A0=A0=A0=A0___slab_alloc+0x58b/0x960 > [=A0=A0297.425932]=A0=A0=A0=A0=A0=A0=A0=A0__slab_alloc+0x43/0x70 > [=A0=A0297.425933]=A0=A0=A0=A0=A0=A0=A0=A0__kmalloc+0x3ad/0x4b0 > [=A0=A0297.425933]=A0=A0=A0=A0=A0=A0=A0=A0__tty_buffer_request_room+0x100= /0x250 > [=A0=A0297.425934]=A0=A0=A0=A0=A0=A0=A0=A0tty_insert_flip_string_fixed_fl= ag+0x67/0x110 > [=A0=A0297.425935]=A0=A0=A0=A0=A0=A0=A0=A0pty_write+0xa2/0xf0 > [=A0=A0297.425936]=A0=A0=A0=A0=A0=A0=A0=A0n_tty_write+0x36b/0x7b0 > [=A0=A0297.425936]=A0=A0=A0=A0=A0=A0=A0=A0tty_write+0x284/0x4c0 > [=A0=A0297.425937]=A0=A0=A0=A0=A0=A0=A0=A0__vfs_write+0x50/0xa0 > [=A0=A0297.425938]=A0=A0=A0=A0=A0=A0=A0=A0vfs_write+0x105/0x290 > [=A0=A0297.425939]=A0=A0=A0=A0=A0=A0=A0=A0redirected_tty_write+0x6a/0xc0 > [=A0=A0297.425939]=A0=A0=A0=A0=A0=A0=A0=A0do_iter_write+0x248/0x2a0 > [=A0=A0297.425940]=A0=A0=A0=A0=A0=A0=A0=A0vfs_writev+0x106/0x1e0 > [=A0=A0297.425941]=A0=A0=A0=A0=A0=A0=A0=A0do_writev+0xd4/0x180 > [=A0=A0297.425941]=A0=A0=A0=A0=A0=A0=A0=A0__x64_sys_writev+0x45/0x50 > [=A0=A0297.425942]=A0=A0=A0=A0=A0=A0=A0=A0do_syscall_64+0xcc/0x76c > [=A0=A0297.425943]=A0=A0=A0=A0=A0=A0=A0=A0entry_SYSCALL_64_after_hwframe+= 0x49/0xbe > = > [=A0=A0297.425944] -> #2 (&(&port->lock)->rlock){-.-.}: > [=A0=A0297.425946]=A0=A0=A0=A0=A0=A0=A0=A0__lock_acquire+0x5b3/0xb40 > [=A0=A0297.425947]=A0=A0=A0=A0=A0=A0=A0=A0lock_acquire+0x126/0x280 > [=A0=A0297.425948]=A0=A0=A0=A0=A0=A0=A0=A0_raw_spin_lock_irqsave+0x3a/0x50 > [=A0=A0297.425949]=A0=A0=A0=A0=A0=A0=A0=A0tty_port_tty_get+0x20/0x60 > [=A0=A0297.425949]=A0=A0=A0=A0=A0=A0=A0=A0tty_port_default_wakeup+0xf/0x30 > [=A0=A0297.425950]=A0=A0=A0=A0=A0=A0=A0=A0tty_port_tty_wakeup+0x39/0x40 > [=A0=A0297.425951]=A0=A0=A0=A0=A0=A0=A0=A0uart_write_wakeup+0x2a/0x40 > [=A0=A0297.425952]=A0=A0=A0=A0=A0=A0=A0=A0serial8250_tx_chars+0x22e/0x440 > [=A0=A0297.425952]=A0=A0=A0=A0=A0=A0=A0=A0serial8250_handle_irq.part.8+0x= 14a/0x170 > [=A0=A0297.425953]=A0=A0=A0=A0=A0=A0=A0=A0serial8250_default_handle_irq+0= x5c/0x90 > [=A0=A0297.425954]=A0=A0=A0=A0=A0=A0=A0=A0serial8250_interrupt+0xa6/0x130 > [=A0=A0297.425955]=A0=A0=A0=A0=A0=A0=A0=A0__handle_irq_event_percpu+0x78/= 0x4f0 > [=A0=A0297.425955]=A0=A0=A0=A0=A0=A0=A0=A0handle_irq_event_percpu+0x70/0x= 100 > [=A0=A0297.425956]=A0=A0=A0=A0=A0=A0=A0=A0handle_irq_event+0x5a/0x8b > [=A0=A0297.425957]=A0=A0=A0=A0=A0=A0=A0=A0handle_edge_irq+0x117/0x370 > [=A0=A0297.425958]=A0=A0=A0=A0=A0=A0=A0=A0do_IRQ+0x9e/0x1e0 > [=A0=A0297.425958]=A0=A0=A0=A0=A0=A0=A0=A0ret_from_intr+0x0/0x2a > [=A0=A0297.425959]=A0=A0=A0=A0=A0=A0=A0=A0cpuidle_enter_state+0x156/0x8e0 > [=A0=A0297.425960]=A0=A0=A0=A0=A0=A0=A0=A0cpuidle_enter+0x41/0x70 > [=A0=A0297.425960]=A0=A0=A0=A0=A0=A0=A0=A0call_cpuidle+0x5e/0x90 > [=A0=A0297.425961]=A0=A0=A0=A0=A0=A0=A0=A0do_idle+0x333/0x370 > [=A0=A0297.425962]=A0=A0=A0=A0=A0=A0=A0=A0cpu_startup_entry+0x1d/0x1f > [=A0=A0297.425962]=A0=A0=A0=A0=A0=A0=A0=A0start_secondary+0x290/0x330 > [=A0=A0297.425963]=A0=A0=A0=A0=A0=A0=A0=A0secondary_startup_64+0xb6/0xc0 > = > [=A0=A0297.425964] -> #1 (&port_lock_key){-.-.}: > [=A0=A0297.425967]=A0=A0=A0=A0=A0=A0=A0=A0__lock_acquire+0x5b3/0xb40 > [=A0=A0297.425967]=A0=A0=A0=A0=A0=A0=A0=A0lock_acquire+0x126/0x280 > [=A0=A0297.425968]=A0=A0=A0=A0=A0=A0=A0=A0_raw_spin_lock_irqsave+0x3a/0x50 > [=A0=A0297.425969]=A0=A0=A0=A0=A0=A0=A0=A0serial8250_console_write+0x3e4/= 0x450 > [=A0=A0297.425970]=A0=A0=A0=A0=A0=A0=A0=A0univ8250_console_write+0x4b/0x60 > [=A0=A0297.425970]=A0=A0=A0=A0=A0=A0=A0=A0console_unlock+0x501/0x750 > [=A0=A0297.425971]=A0=A0=A0=A0=A0=A0=A0=A0vprintk_emit+0x10d/0x340 > [=A0=A0297.425972]=A0=A0=A0=A0=A0=A0=A0=A0vprintk_default+0x1f/0x30 > [=A0=A0297.425972]=A0=A0=A0=A0=A0=A0=A0=A0vprintk_func+0x44/0xd4 > [=A0=A0297.425973]=A0=A0=A0=A0=A0=A0=A0=A0printk+0x9f/0xc5 > [=A0=A0297.425974]=A0=A0=A0=A0=A0=A0=A0=A0register_console+0x39c/0x520 > [=A0=A0297.425975]=A0=A0=A0=A0=A0=A0=A0=A0univ8250_console_init+0x23/0x2d > [=A0=A0297.425975]=A0=A0=A0=A0=A0=A0=A0=A0console_init+0x338/0x4cd > [=A0=A0297.425976]=A0=A0=A0=A0=A0=A0=A0=A0start_kernel+0x534/0x724 > [=A0=A0297.425977]=A0=A0=A0=A0=A0=A0=A0=A0x86_64_start_reservations+0x24/= 0x26 > [=A0=A0297.425977]=A0=A0=A0=A0=A0=A0=A0=A0x86_64_start_kernel+0xf4/0xfb > [=A0=A0297.425978]=A0=A0=A0=A0=A0=A0=A0=A0secondary_startup_64+0xb6/0xc0 > = > [=A0=A0297.425979] -> #0 (console_owner){-.-.}: > [=A0=A0297.425982]=A0=A0=A0=A0=A0=A0=A0=A0check_prev_add+0x107/0xea0 > [=A0=A0297.425982]=A0=A0=A0=A0=A0=A0=A0=A0validate_chain+0x8fc/0x1200 > [=A0=A0297.425983]=A0=A0=A0=A0=A0=A0=A0=A0__lock_acquire+0x5b3/0xb40 > [=A0=A0297.425984]=A0=A0=A0=A0=A0=A0=A0=A0lock_acquire+0x126/0x280 > [=A0=A0297.425984]=A0=A0=A0=A0=A0=A0=A0=A0console_unlock+0x269/0x750 > [=A0=A0297.425985]=A0=A0=A0=A0=A0=A0=A0=A0vprintk_emit+0x10d/0x340 > [=A0=A0297.425986]=A0=A0=A0=A0=A0=A0=A0=A0vprintk_default+0x1f/0x30 > [=A0=A0297.425987]=A0=A0=A0=A0=A0=A0=A0=A0vprintk_func+0x44/0xd4 > [=A0=A0297.425987]=A0=A0=A0=A0=A0=A0=A0=A0printk+0x9f/0xc5 > [=A0=A0297.425988]=A0=A0=A0=A0=A0=A0=A0=A0__offline_isolated_pages.cold.5= 2+0x2f/0x30a > [=A0=A0297.425989]=A0=A0=A0=A0=A0=A0=A0=A0offline_isolated_pages_cb+0x17/= 0x30 > [=A0=A0297.425990]=A0=A0=A0=A0=A0=A0=A0=A0walk_system_ram_range+0xda/0x160 > [=A0=A0297.425990]=A0=A0=A0=A0=A0=A0=A0=A0__offline_pages+0x79c/0xa10 > [=A0=A0297.425991]=A0=A0=A0=A0=A0=A0=A0=A0offline_pages+0x11/0x20 > [=A0=A0297.425992]=A0=A0=A0=A0=A0=A0=A0=A0memory_subsys_offline+0x7e/0xc0 > [=A0=A0297.425992]=A0=A0=A0=A0=A0=A0=A0=A0device_offline+0xd5/0x110 > [=A0=A0297.425993]=A0=A0=A0=A0=A0=A0=A0=A0state_store+0xc6/0xe0 > [=A0=A0297.425994]=A0=A0=A0=A0=A0=A0=A0=A0dev_attr_store+0x3f/0x60 > [=A0=A0297.425995]=A0=A0=A0=A0=A0=A0=A0=A0sysfs_kf_write+0x89/0xb0 > [=A0=A0297.425995]=A0=A0=A0=A0=A0=A0=A0=A0kernfs_fop_write+0x188/0x240 > [=A0=A0297.425996]=A0=A0=A0=A0=A0=A0=A0=A0__vfs_write+0x50/0xa0 > [=A0=A0297.425997]=A0=A0=A0=A0=A0=A0=A0=A0vfs_write+0x105/0x290 > [=A0=A0297.425997]=A0=A0=A0=A0=A0=A0=A0=A0ksys_write+0xc6/0x160 > [=A0=A0297.425998]=A0=A0=A0=A0=A0=A0=A0=A0__x64_sys_write+0x43/0x50 > [=A0=A0297.425999]=A0=A0=A0=A0=A0=A0=A0=A0do_syscall_64+0xcc/0x76c > [=A0=A0297.426000]=A0=A0=A0=A0=A0=A0=A0=A0entry_SYSCALL_64_after_hwframe+= 0x49/0xbe I suppose you run with CONFIG_DEBUG_VM... So we have port->lock -> MM -> zone->lock // from pty_write()->__tty_buffer_request_room()->kmalloc() vs zone->lock -> printk() -> port->lock // from __offline_pages()->__offline_isolated_pages()->printk() A number of debugging options make the kernel less stable. Sad but true. -ss _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel