lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 21 Nov 2017 19:53:29 +0800
From:   Fengguang Wu <fengguang.wu@...el.com>
To:     dri-devel@...ts.freedesktop.org
Cc:     Daniel Vetter <daniel.vetter@...el.com>,
        Jani Nikula <jani.nikula@...ux.intel.com>,
        Sean Paul <seanpaul@...omium.org>,
        David Airlie <airlied@...ux.ie>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        linux-kernel@...r.kernel.org, lkp@...org
Subject: [vga_arb_device_init] WARNING: possible circular locking dependency
 detected

Hello,

FYI this happens in mainline kernel 4.14.0-12891-gc8a0739.
It looks like a new regression after 4.14.

It occurs in 1 out of 2 boots.

[   79.460969] run-job /lkp/scheduled/vm-lkp-wsx03-yocto-x86_64-18/trinity-300s-yocto-minimal-x86_64-2016-04-22.cgz-c8a0739b185d11d6e2ca7ad9f5835841d1cfc765-20171120-97995-o5usht-0.yaml
[   79.460969] /bin/busybox wget -q http://inn:80/~lkp/cgi-bin/lkp-jobfile-append-var?job_file=/lkp/scheduled/vm-lkp-wsx03-yocto-x86_64-18/trinity-300s-yocto-minimal-x86_64-2016-04-22.cgz-c8a0739b185d11d6e2ca7ad9f5835841d1cfc765-20171120-97995-o5usht-0.yaml&job_state=running -O /dev/null
[   80.864966] Seeding trinity based on x86_64-allyesdebian
[   91.375399]
[   91.380720] ======================================================
[   91.394163] WARNING: possible circular locking dependency detected
[   91.407453] 4.14.0-12891-gc8a0739 #14 Not tainted
[   91.417852] ------------------------------------------------------
[   91.431493] trinity/648 is trying to acquire lock:
[   91.442608]  (misc_mtx){+.+.}, at: [<ffffffffb59c099b>] misc_seq_start+0x17/0x27:
						misc_seq_start at drivers/char/misc.c:70
[   91.583377]
[   91.583377] but task is already holding lock:
[   91.603418]  (&p->lock){+.+.}, at: [<ffffffffb5252d01>] seq_read+0x3a/0x341:
						seq_read at fs/seq_file.c:178
[   91.613890]
[   91.613890] which lock already depends on the new lock.
[   91.613890]
[   91.627926]
[   91.627926] the existing dependency chain (in reverse order) is:
[   91.639723]
[   91.639723] -> #3 (&p->lock){+.+.}:
[   91.649763]        __mutex_lock+0x83/0x3cc:
						__mutex_lock_common at kernel/locking/mutex.c:758
						 (inlined by) __mutex_lock at kernel/locking/mutex.c:893
[   91.657191]        seq_read+0x3a/0x341:
						seq_read at fs/seq_file.c:178
[   91.665614]        proc_reg_read+0x5a/0x71:
						proc_reg_read at fs/proc/inode.c:217
[   91.672805]        do_loop_readv_writev+0x65/0x9b:
						do_loop_readv_writev at fs/read_write.c:673
[   91.682458]        do_iter_read+0x83/0x9e:
						do_iter_read at fs/read_write.c:899
[   91.689986]        vfs_readv+0x71/0x9f:
						vfs_readv at fs/read_write.c:960
[   91.696981]        default_file_splice_read+0x20a/0x2a5:
						set_fs at arch/x86/include/asm/uaccess.h:32
						 (inlined by) kernel_readv at fs/splice.c:362
						 (inlined by) default_file_splice_read at fs/splice.c:416
[   91.706631]        splice_direct_to_actor+0xc4/0x198:
						splice_direct_to_actor at fs/splice.c:953
[   91.714215]        do_splice_direct+0x8e/0xa2:
						do_splice_direct at fs/splice.c:1062
[   91.722327]        do_sendfile+0x172/0x22e:
						do_sendfile at fs/read_write.c:1414
[   91.730159]        SyS_sendfile64+0x85/0x94
[   91.739616]        entry_SYSCALL_64_fastpath+0x1f/0x96:
						entry_SYSCALL_64_fastpath at arch/x86/entry/entry_64.S:206
[   91.749981]
[   91.749981] -> #2 (sb_writers){.+.+}:
[   91.761322]        get_page_from_freelist+0x4e9/0xa18:
						rmqueue at mm/page_alloc.c:2877
						 (inlined by) get_page_from_freelist at mm/page_alloc.c:3216
[   91.771794]
[   91.771794] -> #1 ((completion)&req.done){+.+.}:
[   91.787011]        __wait_for_common+0x55/0x1fe:
						spin_lock_irq at include/linux/spinlock.h:340
						 (inlined by) __wait_for_common at kernel/sched/completion.c:111
[   91.796573]        devtmpfs_create_node+0x139/0x155:
						devtmpfs_create_node at drivers/base/devtmpfs.c:117
[   91.806749]        device_add+0x3b3/0x4ec:
						device_add at drivers/base/core.c:1830
[   91.815072]        device_create_groups_vargs+0x98/0xca:
						device_create_groups_vargs at drivers/base/core.c:2431
[   91.825957]        device_create_with_groups+0x30/0x33:
						device_create_with_groups at drivers/base/core.c:2552
[   91.836527]        misc_register+0xb8/0x13f:
						misc_register at drivers/char/misc.c:221
[   91.845436]        vga_arb_device_init+0x1f/0x219:
						vga_arb_device_init at drivers/gpu/vga/vgaarb.c:1485
[   91.855096]        do_one_initcall+0x89/0x129:
						do_one_initcall at init/main.c:826
[   91.864269]        kernel_init_freeable+0x1c0/0x241:
						do_initcall_level at init/main.c:892
						 (inlined by) do_initcalls at init/main.c:900
						 (inlined by) do_basic_setup at init/main.c:918
						 (inlined by) kernel_init_freeable at init/main.c:1066
[   91.874443]        kernel_init+0xa/0xf5:
						kernel_init at init/main.c:995
[   91.882739]        ret_from_fork+0x24/0x30:
						ret_from_fork at arch/x86/entry/entry_64.S:443
[   91.891353]
[   91.891353] -> #0 (misc_mtx){+.+.}:
[   91.902179]        lock_acquire+0x128/0x1ca:
						get_current at arch/x86/include/asm/current.h:15
						 (inlined by) lock_acquire at kernel/locking/lockdep.c:4006
[   91.911192]        __mutex_lock+0x83/0x3cc:
						__mutex_lock_common at kernel/locking/mutex.c:758
						 (inlined by) __mutex_lock at kernel/locking/mutex.c:893
[   91.919812]        misc_seq_start+0x17/0x27:
						misc_seq_start at drivers/char/misc.c:70
[   91.929008]        seq_read+0x14d/0x341:
						seq_read at fs/seq_file.c:229
[   91.937209]        proc_reg_read+0x5a/0x71:
						proc_reg_read at fs/proc/inode.c:217
[   91.945795]        __vfs_read+0x21/0x9f:
						__vfs_read at fs/read_write.c:411
[   91.954124]        vfs_read+0xad/0xe2:
						vfs_read at fs/read_write.c:448
[   91.962029]        SyS_read+0x50/0x7e
[   91.970173]        entry_SYSCALL_64_fastpath+0x1f/0x96:
						entry_SYSCALL_64_fastpath at arch/x86/entry/entry_64.S:206
[   91.977844]
[   91.977844] other info that might help us debug this:
[   91.977844]
[   91.988643] Chain exists of:
[   91.988643]   misc_mtx --> sb_writers --> &p->lock
[   91.988643]
[   92.000927]  Possible unsafe locking scenario:
[   92.000927]
[   92.009081]        CPU0                    CPU1
[   92.015152]        ----                    ----
[   92.021367]   lock(&p->lock);
[   92.025806]                                lock(sb_writers);
[   92.033201]                                lock(&p->lock);
[   92.044927]   lock(misc_mtx);
[   92.052352]
[   92.052352]  *** DEADLOCK ***
[   92.052352]
[   92.066900] 1 lock held by trinity/648:
[   92.088647]  #0:  (&p->lock){+.+.}, at: [<ffffffffb5252d01>] seq_read+0x3a/0x341:
						seq_read at fs/seq_file.c:178
[   92.105431]
[   92.105431] stack backtrace:
[   92.117324] CPU: 0 PID: 648 Comm: trinity Not tainted 4.14.0-12891-gc8a0739 #14
[   92.133653] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014
[   92.151902] Call Trace:
[   92.158542]  dump_stack+0x79/0xab:
						dump_stack at lib/dump_stack.c:55
[   92.166772]  print_circular_bug+0x2a1/0x2af:
						print_circular_bug at kernel/locking/lockdep.c:1274
[   92.176535]  check_prev_add+0x88/0x217:
						check_prev_add at kernel/locking/lockdep.c:1914
[   92.185666]  ? look_up_lock_class+0xa1/0x11f:
						look_up_lock_class at kernel/locking/lockdep.c:726 (discriminator 1)
[   92.195517]  ? look_up_lock_class+0x11f/0x11f:
						save_trace at kernel/locking/lockdep.c:413
[   92.205657]  ? register_lock_class+0x5c/0x302:
						IS_ERR_OR_NULL at include/linux/err.h:41 (discriminator 13)
						 (inlined by) register_lock_class at kernel/locking/lockdep.c:770 (discriminator 13)
[   92.215608]  ? look_up_lock_class+0x11f/0x11f:
						save_trace at kernel/locking/lockdep.c:413
[   92.225824]  ? __lock_acquire+0xacc/0xd02:
						check_prevs_add at kernel/locking/lockdep.c:2033
						 (inlined by) validate_chain at kernel/locking/lockdep.c:2473
						 (inlined by) __lock_acquire at kernel/locking/lockdep.c:3500
[   92.235379]  __lock_acquire+0xacc/0xd02:
						check_prevs_add at kernel/locking/lockdep.c:2033
						 (inlined by) validate_chain at kernel/locking/lockdep.c:2473
						 (inlined by) __lock_acquire at kernel/locking/lockdep.c:3500
[   92.244544]  ? misc_seq_start+0x17/0x27:
						misc_seq_start at drivers/char/misc.c:70
[   92.253918]  lock_acquire+0x128/0x1ca:
						get_current at arch/x86/include/asm/current.h:15
						 (inlined by) lock_acquire at kernel/locking/lockdep.c:4006
[   92.262735]  ? misc_seq_start+0x17/0x27:
						misc_seq_start at drivers/char/misc.c:70
[   92.271938]  __mutex_lock+0x83/0x3cc:
						__mutex_lock_common at kernel/locking/mutex.c:758
						 (inlined by) __mutex_lock at kernel/locking/mutex.c:893
[   92.280484]  ? misc_seq_start+0x17/0x27:
						misc_seq_start at drivers/char/misc.c:70
[   92.289659]  ? misc_seq_start+0x17/0x27:
						misc_seq_start at drivers/char/misc.c:70
[   92.298867]  ? rcu_read_lock_sched_held+0x54/0x5a:
						rcu_read_lock_sched_held at kernel/rcu/update.c:118
[   92.309588]  ? kmem_cache_alloc_node_trace+0x196/0x237:
						trace_kmalloc_node at include/trace/events/kmem.h:100
						 (inlined by) kmem_cache_alloc_node_trace at mm/slab.c:3657
[   92.321089]  ? kvmalloc_node+0x48/0x71:
						kvmalloc_node at mm/util.c:403
[   92.330136]  ? misc_seq_start+0x17/0x27:
						misc_seq_start at drivers/char/misc.c:70
[   92.339271]  misc_seq_start+0x17/0x27:
						misc_seq_start at drivers/char/misc.c:70
[   92.348154]  seq_read+0x14d/0x341:
						seq_read at fs/seq_file.c:229
[   92.356313]  proc_reg_read+0x5a/0x71:
						proc_reg_read at fs/proc/inode.c:217
[   92.365128]  __vfs_read+0x21/0x9f:
						__vfs_read at fs/read_write.c:411
[   92.373262]  vfs_read+0xad/0xe2:
						vfs_read at fs/read_write.c:448
[   92.381178]  SyS_read+0x50/0x7e
[   92.389117]  entry_SYSCALL_64_fastpath+0x1f/0x96:
						entry_SYSCALL_64_fastpath at arch/x86/entry/entry_64.S:206
[   92.399616] RIP: 0033:0x454d00
[   92.407193] RSP: 002b:00007ffe38245f68 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
[   92.424140] RAX: ffffffffffffffda RBX: 0000000000000046 RCX: 0000000000454d00
[   92.439443] RDX: 0000000000000400 RSI: 00000000022c0440 RDI: 0000000000000004
[   92.454869] RBP: 00000000004e2720 R08: 0000000001046108 R09: 0000000000000410
[   92.470254] R10: 0000000000000020 R11: 0000000000000246 R12: 0000000000000000
[   92.485615] R13: 00000000004b7c09 R14: 0000000000000001 R15: 00000000004b7c19
[  148.722159] do_dccp_setsockopt: sockopt(CHANGE_L/R) is deprecated: fix your app
[  148.756602] kernel msg: ebtables bug: please report to author: Wrong len argument
[  148.773493] trinity-main uses obsolete (PF_INET,SOCK_PACKET)

Attached the full dmesg, kconfig and reproduce scripts.

Thanks,
Fengguang

View attachment "dmesg-vm-lkp-wsx03-yocto-x86_64-18:20171120165752:x86_64-allyesdebian:4.14.0-12891-gc8a0739:14" of type "text/plain" (106919 bytes)

View attachment ".config" of type "text/plain" (164866 bytes)

View attachment "job-script" of type "text/plain" (3861 bytes)

View attachment "reproduce-vm-lkp-wsx03-yocto-x86_64-18:20171120165752:x86_64-allyesdebian:4.14.0-12891-gc8a0739:14" of type "text/plain" (2049 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ