Hi all,
Li Wang and I are constantly seeing ppc64le hosts crashing due to bad
page access. But it's not reproducing on every ppc64le host we've
tested, but it usually happened in filesystem testings.
[ 207.403459] Unable to handle kernel paging request for unaligned access at address 0xc0000001c52c5e7f
[ 207.403470] Faulting instruction address: 0xc0000000004d470c
[ 207.403475] Oops: Kernel access of bad area, sig: 7 [#1]
[ 207.403477] SMP NR_CPUS=2048
[ 207.403478] NUMA
[ 207.403480] pSeries
[ 207.403483] Modules linked in: ext4 jbd2 mbcache sg pseries_rng ghash_generic gf128mul xts vmx_crypto nfsd auth_rpcgss nfs_acl lockd grace sunrpc ip_tables xfs libcrc32c sd_mod ibmveth ibmvscsi scsi_transport_srp
[ 207.403503] CPU: 0 PID: 2263 Comm: mount Not tainted 4.12.0-rc7 #26
[ 207.403506] task: c0000003ef2fde00 task.stack: c0000003de394000
[ 207.403509] NIP: c0000000004d470c LR: c00000000011cd24 CTR: c000000000130de0
[ 207.403512] REGS: c0000003de397450 TRAP: 0600 Not tainted (4.12.0-rc7)
[ 207.403515] MSR: 800000010280b033 <SF,VEC,VSX,EE,FP,ME,IR,DR,RI,LE,TM[E]>
[ 207.403521] CR: 28028844 XER: 00000001
[ 207.403525] CFAR: c00000000011cd20 DAR: c0000001c52c5e7f DSISR: 00000000 SOFTE: 0
[ 207.403525] GPR00: c00000000011cce8 c0000003de3976d0 c000000001049500 c0000003f2c6ec20
[ 207.403525] GPR04: c0000003f2c6ec20 c0000001c52c5e7f 0000000000000000 0000000000000001
[ 207.403525] GPR08: 000c5543cab19830 0000000198e19900 0000000000000008 0000000000000000
[ 207.403525] GPR12: c000000000130de0 c00000000fac0000 0000000000000000 c0000003f1328000
[ 207.403525] GPR16: 0000000000000000 c0000003de700400 0000000000000000 c0000003de700594
[ 207.403525] GPR20: 0000000000000002 0000000000000000 0000000000004000 c000000000cc5780
[ 207.403525] GPR24: 00000001c45ffc5f 0000000000000000 00000001c45ffc5f c00000000107dd00
[ 207.403525] GPR28: c0000003f2c6f434 0000000000000004 0000000000000800 c0000003f2c6ec00
[ 207.403567] NIP [c0000000004d470c] llist_add_batch+0xc/0x40
[ 207.403571] LR [c00000000011cd24] try_to_wake_up+0x4a4/0x5b0
[ 207.403573] Call Trace:
[ 207.403576] [c0000003de3976d0] [c00000000011cce8] try_to_wake_up+0x468/0x5b0 (unreliable)
[ 207.403581] [c0000003de397750] [c000000000102cc8] create_worker+0x148/0x250
[ 207.403585] [c0000003de3977f0] [c000000000105e7c] alloc_unbound_pwq+0x3bc/0x4c0
[ 207.403589] [c0000003de397850] [c0000000001064bc] apply_wqattrs_prepare+0x2ac/0x320
[ 207.403593] [c0000003de3978c0] [c00000000010656c] apply_workqueue_attrs_locked+0x3c/0xa0
[ 207.403597] [c0000003de3978f0] [c000000000106acc] apply_workqueue_attrs+0x4c/0x80
[ 207.403601] [c0000003de397930] [c00000000010866c] __alloc_workqueue_key+0x16c/0x4e0
[ 207.403615] [c0000003de3979f0] [d000000013de5ce0] ext4_fill_super+0x1c70/0x3390 [ext4]
[ 207.403620] [c0000003de397b30] [c00000000031739c] mount_bdev+0x21c/0x250
[ 207.403633] [c0000003de397bd0] [d000000013dddb80] ext4_mount+0x20/0x40 [ext4]
[ 207.403637] [c0000003de397bf0] [c000000000318944] mount_fs+0x74/0x210
[ 207.403641] [c0000003de397ca0] [c000000000340638] vfs_kern_mount+0x68/0x1d0
[ 207.403644] [c0000003de397d10] [c000000000345348] do_mount+0x278/0xef0
[ 207.403648] [c0000003de397de0] [c0000000003463e4] SyS_mount+0x94/0x100
[ 207.403652] [c0000003de397e30] [c00000000000af84] system_call+0x38/0xe0
[ 207.403655] Instruction dump:
[ 207.403658] 60420000 38600000 4e800020 60000000 60420000 7c832378 4e800020 60000000
[ 207.403663] 60000000 e9250000 f9240000 7c0004ac <7d4028a8> 7c2a4800 40c20010 7c6029ad
[ 207.403669] ---[ end trace 4fa94bf890f28f69 ]---
Today I've finally found a host that could reliably trigger the crash by
mounting an ext4 filesystem and I've done a git bisect. The first bad
pointed to this commit:
commit 9c355917fcf006af47ffaa5ae43a1a804764a6f6
Author: Balbir Singh [off-list ref]
Date: Wed Apr 12 16:35:19 2017 +1000
powerpc/tracing: Allow tracing of mmap syscalls
Currently sys_mmap() and sys_mmap2() (32-bit only), are not visible to the
syscall tracing machinery. This means users are not able to see the execution of
mmap() syscalls using the syscall tracer.
Fix that by using SYSCALL_DEFINE6 for sys_mmap() and sys_mmap2() so that the
meta-data associated with these syscalls is visible to the syscall tracer.
A side-effect of this change is that the return type has changed from unsigned
long to long. However this should have no effect, the only code in the kernel
which uses the result of these syscalls is in the syscall return path, which is
written in asm and treats the result as unsigned regardless.
Example output:
cat-3399 [001] .... 196.542410: sys_mmap(addr: 7fff922a0000, len: 20000, prot: 3, flags: 812, fd: 3, offset: 1b0000)
cat-3399 [001] .... 196.542443: sys_mmap -> 0x7fff922a0000
cat-3399 [001] .... 196.542668: sys_munmap(addr: 7fff922c0000, len: 6d2c)
cat-3399 [001] .... 196.542677: sys_munmap -> 0x0
Signed-off-by: Balbir Singh [off-list ref]
[mpe: Massage change log, add detail on return type change]
Signed-off-by: Michael Ellerman [off-list ref]
And I've confirmed that reverting above commit 'resolves' the crash. I
appended memory and cpu information of the host to the end of this
email, if you need more detailed information please let me know.
Thanks,
Eryu
[root@ibm-p8-03-lp6 ~]# free
total used free shared buff/cache available
Mem: 18756864 399552 17880704 12672 476608 17470592
Swap: 7864256 0 7864256
[root@ibm-p8-03-lp6 ~]# lscpu
Architecture: ppc64le
Byte Order: Little Endian
CPU(s): 16
On-line CPU(s) list: 0-15
Thread(s) per core: 8
Core(s) per socket: 1
Socket(s): 2
NUMA node(s): 3
Model: 2.1 (pvr 004b 0201)
Model name: POWER8 (architected), altivec supported
Hypervisor vendor: (null)
Virtualization type: full
L1d cache: 64K
L1i cache: 32K
NUMA node0 CPU(s): 0-7
NUMA node2 CPU(s): 8-15
NUMA node3 CPU(s):
On Wed, Jun 28, 2017 at 6:32 PM, Eryu Guan [off-list ref] wrote:
Hi all,
Li Wang and I are constantly seeing ppc64le hosts crashing due to bad
page access. But it's not reproducing on every ppc64le host we've
tested, but it usually happened in filesystem testings.
[ 207.403459] Unable to handle kernel paging request for unaligned access at address 0xc0000001c52c5e7f
[ 207.403470] Faulting instruction address: 0xc0000000004d470c
[ 207.403475] Oops: Kernel access of bad area, sig: 7 [#1]
[ 207.403477] SMP NR_CPUS=2048
[ 207.403478] NUMA
[ 207.403480] pSeries
[ 207.403483] Modules linked in: ext4 jbd2 mbcache sg pseries_rng ghash_generic gf128mul xts vmx_crypto nfsd auth_rpcgss nfs_acl lockd grace sunrpc ip_tables xfs libcrc32c sd_mod ibmveth ibmvscsi scsi_transport_srp
[ 207.403503] CPU: 0 PID: 2263 Comm: mount Not tainted 4.12.0-rc7 #26
[ 207.403506] task: c0000003ef2fde00 task.stack: c0000003de394000
[ 207.403509] NIP: c0000000004d470c LR: c00000000011cd24 CTR: c000000000130de0
[ 207.403512] REGS: c0000003de397450 TRAP: 0600 Not tainted (4.12.0-rc7)
[ 207.403515] MSR: 800000010280b033 <SF,VEC,VSX,EE,FP,ME,IR,DR,RI,LE,TM[E]>
[ 207.403521] CR: 28028844 XER: 00000001
[ 207.403525] CFAR: c00000000011cd20 DAR: c0000001c52c5e7f DSISR: 00000000 SOFTE: 0
[ 207.403525] GPR00: c00000000011cce8 c0000003de3976d0 c000000001049500 c0000003f2c6ec20
[ 207.403525] GPR04: c0000003f2c6ec20 c0000001c52c5e7f 0000000000000000 0000000000000001
[ 207.403525] GPR08: 000c5543cab19830 0000000198e19900 0000000000000008 0000000000000000
[ 207.403525] GPR12: c000000000130de0 c00000000fac0000 0000000000000000 c0000003f1328000
[ 207.403525] GPR16: 0000000000000000 c0000003de700400 0000000000000000 c0000003de700594
[ 207.403525] GPR20: 0000000000000002 0000000000000000 0000000000004000 c000000000cc5780
[ 207.403525] GPR24: 00000001c45ffc5f 0000000000000000 00000001c45ffc5f c00000000107dd00
[ 207.403525] GPR28: c0000003f2c6f434 0000000000000004 0000000000000800 c0000003f2c6ec00
[ 207.403567] NIP [c0000000004d470c] llist_add_batch+0xc/0x40
[ 207.403571] LR [c00000000011cd24] try_to_wake_up+0x4a4/0x5b0
[ 207.403573] Call Trace:
[ 207.403576] [c0000003de3976d0] [c00000000011cce8] try_to_wake_up+0x468/0x5b0 (unreliable)
[ 207.403581] [c0000003de397750] [c000000000102cc8] create_worker+0x148/0x250
[ 207.403585] [c0000003de3977f0] [c000000000105e7c] alloc_unbound_pwq+0x3bc/0x4c0
[ 207.403589] [c0000003de397850] [c0000000001064bc] apply_wqattrs_prepare+0x2ac/0x320
[ 207.403593] [c0000003de3978c0] [c00000000010656c] apply_workqueue_attrs_locked+0x3c/0xa0
[ 207.403597] [c0000003de3978f0] [c000000000106acc] apply_workqueue_attrs+0x4c/0x80
[ 207.403601] [c0000003de397930] [c00000000010866c] __alloc_workqueue_key+0x16c/0x4e0
[ 207.403615] [c0000003de3979f0] [d000000013de5ce0] ext4_fill_super+0x1c70/0x3390 [ext4]
[ 207.403620] [c0000003de397b30] [c00000000031739c] mount_bdev+0x21c/0x250
[ 207.403633] [c0000003de397bd0] [d000000013dddb80] ext4_mount+0x20/0x40 [ext4]
[ 207.403637] [c0000003de397bf0] [c000000000318944] mount_fs+0x74/0x210
[ 207.403641] [c0000003de397ca0] [c000000000340638] vfs_kern_mount+0x68/0x1d0
[ 207.403644] [c0000003de397d10] [c000000000345348] do_mount+0x278/0xef0
[ 207.403648] [c0000003de397de0] [c0000000003463e4] SyS_mount+0x94/0x100
[ 207.403652] [c0000003de397e30] [c00000000000af84] system_call+0x38/0xe0
[ 207.403655] Instruction dump:
[ 207.403658] 60420000 38600000 4e800020 60000000 60420000 7c832378 4e800020 60000000
[ 207.403663] 60000000 e9250000 f9240000 7c0004ac <7d4028a8> 7c2a4800 40c20010 7c6029ad
[ 207.403669] ---[ end trace 4fa94bf890f28f69 ]---
Today I've finally found a host that could reliably trigger the crash by
mounting an ext4 filesystem and I've done a git bisect. The first bad
pointed to this commit:
Thanks for the excellent bug report, I am a little lost on the stack
trace, it shows a bad page access that we think is triggered by the
mmap changes? The patch changed the return type to integrate the call
into trace-cmd. Could you point me to the tests that can help
reproduce the crash. Could you also suggest how long to try the test
cases for?
Balbir Singh
On Thu, Jun 29, 2017 at 03:16:10AM +1000, Balbir Singh wrote:
On Wed, Jun 28, 2017 at 6:32 PM, Eryu Guan [off-list ref] wrote:
quoted
Hi all,
Li Wang and I are constantly seeing ppc64le hosts crashing due to bad
page access. But it's not reproducing on every ppc64le host we've
tested, but it usually happened in filesystem testings.
[ 207.403459] Unable to handle kernel paging request for unaligned access at address 0xc0000001c52c5e7f
[ 207.403470] Faulting instruction address: 0xc0000000004d470c
[ 207.403475] Oops: Kernel access of bad area, sig: 7 [#1]
[ 207.403477] SMP NR_CPUS=2048
[ 207.403478] NUMA
[ 207.403480] pSeries
[ 207.403483] Modules linked in: ext4 jbd2 mbcache sg pseries_rng ghash_generic gf128mul xts vmx_crypto nfsd auth_rpcgss nfs_acl lockd grace sunrpc ip_tables xfs libcrc32c sd_mod ibmveth ibmvscsi scsi_transport_srp
[ 207.403503] CPU: 0 PID: 2263 Comm: mount Not tainted 4.12.0-rc7 #26
[ 207.403506] task: c0000003ef2fde00 task.stack: c0000003de394000
[ 207.403509] NIP: c0000000004d470c LR: c00000000011cd24 CTR: c000000000130de0
[ 207.403512] REGS: c0000003de397450 TRAP: 0600 Not tainted (4.12.0-rc7)
[ 207.403515] MSR: 800000010280b033 <SF,VEC,VSX,EE,FP,ME,IR,DR,RI,LE,TM[E]>
[ 207.403521] CR: 28028844 XER: 00000001
[ 207.403525] CFAR: c00000000011cd20 DAR: c0000001c52c5e7f DSISR: 00000000 SOFTE: 0
[ 207.403525] GPR00: c00000000011cce8 c0000003de3976d0 c000000001049500 c0000003f2c6ec20
[ 207.403525] GPR04: c0000003f2c6ec20 c0000001c52c5e7f 0000000000000000 0000000000000001
[ 207.403525] GPR08: 000c5543cab19830 0000000198e19900 0000000000000008 0000000000000000
[ 207.403525] GPR12: c000000000130de0 c00000000fac0000 0000000000000000 c0000003f1328000
[ 207.403525] GPR16: 0000000000000000 c0000003de700400 0000000000000000 c0000003de700594
[ 207.403525] GPR20: 0000000000000002 0000000000000000 0000000000004000 c000000000cc5780
[ 207.403525] GPR24: 00000001c45ffc5f 0000000000000000 00000001c45ffc5f c00000000107dd00
[ 207.403525] GPR28: c0000003f2c6f434 0000000000000004 0000000000000800 c0000003f2c6ec00
[ 207.403567] NIP [c0000000004d470c] llist_add_batch+0xc/0x40
[ 207.403571] LR [c00000000011cd24] try_to_wake_up+0x4a4/0x5b0
[ 207.403573] Call Trace:
[ 207.403576] [c0000003de3976d0] [c00000000011cce8] try_to_wake_up+0x468/0x5b0 (unreliable)
[ 207.403581] [c0000003de397750] [c000000000102cc8] create_worker+0x148/0x250
[ 207.403585] [c0000003de3977f0] [c000000000105e7c] alloc_unbound_pwq+0x3bc/0x4c0
[ 207.403589] [c0000003de397850] [c0000000001064bc] apply_wqattrs_prepare+0x2ac/0x320
[ 207.403593] [c0000003de3978c0] [c00000000010656c] apply_workqueue_attrs_locked+0x3c/0xa0
[ 207.403597] [c0000003de3978f0] [c000000000106acc] apply_workqueue_attrs+0x4c/0x80
[ 207.403601] [c0000003de397930] [c00000000010866c] __alloc_workqueue_key+0x16c/0x4e0
[ 207.403615] [c0000003de3979f0] [d000000013de5ce0] ext4_fill_super+0x1c70/0x3390 [ext4]
[ 207.403620] [c0000003de397b30] [c00000000031739c] mount_bdev+0x21c/0x250
[ 207.403633] [c0000003de397bd0] [d000000013dddb80] ext4_mount+0x20/0x40 [ext4]
[ 207.403637] [c0000003de397bf0] [c000000000318944] mount_fs+0x74/0x210
[ 207.403641] [c0000003de397ca0] [c000000000340638] vfs_kern_mount+0x68/0x1d0
[ 207.403644] [c0000003de397d10] [c000000000345348] do_mount+0x278/0xef0
[ 207.403648] [c0000003de397de0] [c0000000003463e4] SyS_mount+0x94/0x100
[ 207.403652] [c0000003de397e30] [c00000000000af84] system_call+0x38/0xe0
[ 207.403655] Instruction dump:
[ 207.403658] 60420000 38600000 4e800020 60000000 60420000 7c832378 4e800020 60000000
[ 207.403663] 60000000 e9250000 f9240000 7c0004ac <7d4028a8> 7c2a4800 40c20010 7c6029ad
[ 207.403669] ---[ end trace 4fa94bf890f28f69 ]---
Today I've finally found a host that could reliably trigger the crash by
mounting an ext4 filesystem and I've done a git bisect. The first bad
pointed to this commit:
Thanks for the excellent bug report, I am a little lost on the stack
trace, it shows a bad page access that we think is triggered by the
mmap changes? The patch changed the return type to integrate the call
into trace-cmd. Could you point me to the tests that can help
reproduce the crash. Could you also suggest how long to try the test
cases for?
Sorry, I should have provided it in the first place. It's as simple as
mounting an ext4 filesystem on my test ppc64le host, i.e.
mkdir -p /mnt/ext4
mkfs -t ext4 -F /dev/sda5
mount /dev/sda5 /mnt/ext4
Kernel crash happened right after the mount command, and it's 100%
reproduced for me. I've tried the same reproducer on other ppc64 or
ppc64le hosts but not all of them could reproduce.
BTW, I just reverted the commit in question (9c355917fc) on top of
v4.12-rc7 kernel and the crash is gone.
Thanks,
Eryu
From: Michael Ellerman <mpe@ellerman.id.au> Date: 2017-06-29 04:54:47
Hi Eryu,
Thanks for the bug report.
Eryu Guan [off-list ref] writes:
Hi all,
Li Wang and I are constantly seeing ppc64le hosts crashing due to bad
I'm curious why you're seeing this and not other folks. What compiler
are you using?
page access. But it's not reproducing on every ppc64le host we've
tested, but it usually happened in filesystem testings.
[ 207.403459] Unable to handle kernel paging request for unaligned access at address 0xc0000001c52c5e7f
bool llist_add_batch(struct llist_node *new_first, struct llist_node *new_last,
struct llist_head *head)
{
struct llist_node *first;
do {
new_last->next = first = ACCESS_ONCE(head->first);
} while (cmpxchg(&head->first, first, new_first) != first);
So it's the cmpxchg().
__cmpxchg_u64(volatile unsigned long *p, unsigned long old, unsigned long new)
{
unsigned long prev;
__asm__ __volatile__ (
PPC_ATOMIC_ENTRY_BARRIER
"1: ldarx %0,0,%2 # __cmpxchg_u64\n\
[ 207.403571] LR [c00000000011cd24] try_to_wake_up+0x4a4/0x5b0
try_to_wake_up(p, ..)
-> ttwu_queue(p, cpu, wake_flags);
-> ttwu_queue_remote(p, cpu, wake_flags);
static void ttwu_queue_remote(struct task_struct *p, int cpu, int wake_flags)
{
struct rq *rq = cpu_rq(cpu);
p->sched_remote_wakeup = !!(wake_flags & WF_MIGRATED);
if (llist_add(&p->wake_entry, &cpu_rq(cpu)->wake_list)) {
static inline bool llist_add(struct llist_node *new, struct llist_head *head)
{
return llist_add_batch(new, new, head);
}
So the cmpxchg is:
cmpxchg(&head->first, first, new_first) != first)
Where head is &cpu_rq(cpu)->wake_list.
cpu came from try_to_wake_up() which did:
cpu = select_task_rq(p, p->wake_cpu, SD_BALANCE_WAKE, wake_flags);
So possibly the cpu value is bogus. Or ..
#define cpu_rq(cpu) (&per_cpu(runqueues, (cpu)))
That runqueues variable has become corrupted?
You might be able to work it out from the register dump, and the full
disassembly of the kernel. Or you could add some printks() in there and
reproduce it.
cheers
[ 207.403573] Call Trace:
[ 207.403576] [c0000003de3976d0] [c00000000011cce8] try_to_wake_up+0x468/0x5b0 (unreliable)
[ 207.403581] [c0000003de397750] [c000000000102cc8] create_worker+0x148/0x250
[ 207.403585] [c0000003de3977f0] [c000000000105e7c] alloc_unbound_pwq+0x3bc/0x4c0
[ 207.403589] [c0000003de397850] [c0000000001064bc] apply_wqattrs_prepare+0x2ac/0x320
[ 207.403593] [c0000003de3978c0] [c00000000010656c] apply_workqueue_attrs_locked+0x3c/0xa0
[ 207.403597] [c0000003de3978f0] [c000000000106acc] apply_workqueue_attrs+0x4c/0x80
[ 207.403601] [c0000003de397930] [c00000000010866c] __alloc_workqueue_key+0x16c/0x4e0
[ 207.403615] [c0000003de3979f0] [d000000013de5ce0] ext4_fill_super+0x1c70/0x3390 [ext4]
[ 207.403620] [c0000003de397b30] [c00000000031739c] mount_bdev+0x21c/0x250
[ 207.403633] [c0000003de397bd0] [d000000013dddb80] ext4_mount+0x20/0x40 [ext4]
[ 207.403637] [c0000003de397bf0] [c000000000318944] mount_fs+0x74/0x210
[ 207.403641] [c0000003de397ca0] [c000000000340638] vfs_kern_mount+0x68/0x1d0
[ 207.403644] [c0000003de397d10] [c000000000345348] do_mount+0x278/0xef0
[ 207.403648] [c0000003de397de0] [c0000000003463e4] SyS_mount+0x94/0x100
[ 207.403652] [c0000003de397e30] [c00000000000af84] system_call+0x38/0xe0
[ 207.403655] Instruction dump:
[ 207.403658] 60420000 38600000 4e800020 60000000 60420000 7c832378 4e800020 60000000
[ 207.403663] 60000000 e9250000 f9240000 7c0004ac <7d4028a8> 7c2a4800 40c20010 7c6029ad
[ 207.403669] ---[ end trace 4fa94bf890f28f69 ]---
Today I've finally found a host that could reliably trigger the crash by
mounting an ext4 filesystem and I've done a git bisect. The first bad
pointed to this commit:
commit 9c355917fcf006af47ffaa5ae43a1a804764a6f6
Author: Balbir Singh [off-list ref]
Date: Wed Apr 12 16:35:19 2017 +1000
powerpc/tracing: Allow tracing of mmap syscalls
Currently sys_mmap() and sys_mmap2() (32-bit only), are not visible to the
syscall tracing machinery. This means users are not able to see the execution of
mmap() syscalls using the syscall tracer.
Fix that by using SYSCALL_DEFINE6 for sys_mmap() and sys_mmap2() so that the
meta-data associated with these syscalls is visible to the syscall tracer.
A side-effect of this change is that the return type has changed from unsigned
long to long. However this should have no effect, the only code in the kernel
which uses the result of these syscalls is in the syscall return path, which is
written in asm and treats the result as unsigned regardless.
Example output:
cat-3399 [001] .... 196.542410: sys_mmap(addr: 7fff922a0000, len: 20000, prot: 3, flags: 812, fd: 3, offset: 1b0000)
cat-3399 [001] .... 196.542443: sys_mmap -> 0x7fff922a0000
cat-3399 [001] .... 196.542668: sys_munmap(addr: 7fff922c0000, len: 6d2c)
cat-3399 [001] .... 196.542677: sys_munmap -> 0x0
Signed-off-by: Balbir Singh [off-list ref]
[mpe: Massage change log, add detail on return type change]
Signed-off-by: Michael Ellerman [off-list ref]
And I've confirmed that reverting above commit 'resolves' the crash. I
appended memory and cpu information of the host to the end of this
email, if you need more detailed information please let me know.
Thanks,
Eryu
[root@ibm-p8-03-lp6 ~]# free
total used free shared buff/cache available
Mem: 18756864 399552 17880704 12672 476608 17470592
Swap: 7864256 0 7864256
[root@ibm-p8-03-lp6 ~]# lscpu
Architecture: ppc64le
Byte Order: Little Endian
CPU(s): 16
On-line CPU(s) list: 0-15
Thread(s) per core: 8
Core(s) per socket: 1
Socket(s): 2
NUMA node(s): 3
Model: 2.1 (pvr 004b 0201)
Model name: POWER8 (architected), altivec supported
Hypervisor vendor: (null)
Virtualization type: full
L1d cache: 64K
L1i cache: 32K
NUMA node0 CPU(s): 0-7
NUMA node2 CPU(s): 8-15
NUMA node3 CPU(s):
On Thu, Jun 29, 2017 at 1:41 PM, Eryu Guan [off-list ref] wrote:
On Thu, Jun 29, 2017 at 03:16:10AM +1000, Balbir Singh wrote:
quoted
On Wed, Jun 28, 2017 at 6:32 PM, Eryu Guan [off-list ref] wrote:
<snip>
quoted
Thanks for the excellent bug report, I am a little lost on the stack
trace, it shows a bad page access that we think is triggered by the
mmap changes? The patch changed the return type to integrate the call
into trace-cmd. Could you point me to the tests that can help
reproduce the crash. Could you also suggest how long to try the test
cases for?
Sorry, I should have provided it in the first place. It's as simple as
mounting an ext4 filesystem on my test ppc64le host, i.e.
mkdir -p /mnt/ext4
mkfs -t ext4 -F /dev/sda5
mount /dev/sda5 /mnt/ext4
I tried this test a few times with the kernel and could not reproduce it.
Could you please share the config and compiler details, I'll retry with -rc7.
In the meanwhile, does enabling kmemleak, DEBUG_PAGE_ALLOC,
slub/slab debug, list corruption, etc catch anything at the time of the
corruption?
Thanks,
Balbir Singh.
On Thu, Jun 29, 2017 at 06:47:50PM +1000, Balbir Singh wrote:
On Thu, Jun 29, 2017 at 1:41 PM, Eryu Guan [off-list ref] wrote:
quoted
On Thu, Jun 29, 2017 at 03:16:10AM +1000, Balbir Singh wrote:
quoted
On Wed, Jun 28, 2017 at 6:32 PM, Eryu Guan [off-list ref] wrote:
<snip>
quoted
quoted
Thanks for the excellent bug report, I am a little lost on the stack
trace, it shows a bad page access that we think is triggered by the
mmap changes? The patch changed the return type to integrate the call
into trace-cmd. Could you point me to the tests that can help
reproduce the crash. Could you also suggest how long to try the test
cases for?
Sorry, I should have provided it in the first place. It's as simple as
mounting an ext4 filesystem on my test ppc64le host, i.e.
mkdir -p /mnt/ext4
mkfs -t ext4 -F /dev/sda5
mount /dev/sda5 /mnt/ext4
I tried this test a few times with the kernel and could not reproduce it.
Yes, it's not reproduced on every host, I'm not sure what makes my test
host so unique yet.
Could you please share the config and compiler details, I'll retry with -rc7.
[root@ibm-p8-03-lp6 ~]# gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
[root@ibm-p8-03-lp6 ~]# rpm -q gcc
gcc-4.8.5-16.el7.ppc64le
I attached kernel config file.
In the meanwhile, does enabling kmemleak, DEBUG_PAGE_ALLOC,
slub/slab debug, list corruption, etc catch anything at the time of the
corruption?
OK, I'll retry with a debug kernel and report back.
Thanks,
Eryu
On Thu, Jun 29, 2017 at 06:47:50PM +1000, Balbir Singh wrote:
On Thu, Jun 29, 2017 at 1:41 PM, Eryu Guan [off-list ref] wrote:
quoted
On Thu, Jun 29, 2017 at 03:16:10AM +1000, Balbir Singh wrote:
quoted
On Wed, Jun 28, 2017 at 6:32 PM, Eryu Guan [off-list ref] wrote:
<snip>
quoted
quoted
Thanks for the excellent bug report, I am a little lost on the stack
trace, it shows a bad page access that we think is triggered by the
mmap changes? The patch changed the return type to integrate the call
into trace-cmd. Could you point me to the tests that can help
reproduce the crash. Could you also suggest how long to try the test
cases for?
Sorry, I should have provided it in the first place. It's as simple as
mounting an ext4 filesystem on my test ppc64le host, i.e.
mkdir -p /mnt/ext4
mkfs -t ext4 -F /dev/sda5
mount /dev/sda5 /mnt/ext4
I tried this test a few times with the kernel and could not reproduce it.
Could you please share the config and compiler details, I'll retry with -rc7.
In the meanwhile, does enabling kmemleak, DEBUG_PAGE_ALLOC,
slub/slab debug, list corruption, etc catch anything at the time of the
corruption?
From: Michael Ellerman <mpe@ellerman.id.au> Date: 2017-06-29 10:27:12
Eryu Guan [off-list ref] writes:
Hi all,
Li Wang and I are constantly seeing ppc64le hosts crashing due to bad
page access. But it's not reproducing on every ppc64le host we've
tested, but it usually happened in filesystem testings.
<snip>
And I've confirmed that reverting above commit 'resolves' the crash.
Do you mean ~v4.12-rc7 with that commit reverted still triggers the
crash?
cheers
On Thu, Jun 29, 2017 at 08:27:11PM +1000, Michael Ellerman wrote:
Eryu Guan [off-list ref] writes:
quoted
Hi all,
Li Wang and I are constantly seeing ppc64le hosts crashing due to bad
page access. But it's not reproducing on every ppc64le host we've
tested, but it usually happened in filesystem testings.
<snip>
quoted
And I've confirmed that reverting above commit 'resolves' the crash.
Do you mean ~v4.12-rc7 with that commit reverted still triggers the
crash?
Correct. I also confirmed that reverting it when it was HEAD also fixed
the crash.
Thanks,
Eryu
From: Michael Ellerman <mpe@ellerman.id.au> Date: 2017-06-29 11:12:56
Eryu Guan [off-list ref] writes:
On Thu, Jun 29, 2017 at 06:47:50PM +1000, Balbir Singh wrote:
quoted
On Thu, Jun 29, 2017 at 1:41 PM, Eryu Guan [off-list ref] wrote:
quoted
On Thu, Jun 29, 2017 at 03:16:10AM +1000, Balbir Singh wrote:
quoted
On Wed, Jun 28, 2017 at 6:32 PM, Eryu Guan [off-list ref] wrote:
<snip>
quoted
quoted
Thanks for the excellent bug report, I am a little lost on the stack
trace, it shows a bad page access that we think is triggered by the
mmap changes? The patch changed the return type to integrate the call
into trace-cmd. Could you point me to the tests that can help
reproduce the crash. Could you also suggest how long to try the test
cases for?
Sorry, I should have provided it in the first place. It's as simple as
mounting an ext4 filesystem on my test ppc64le host, i.e.
mkdir -p /mnt/ext4
mkfs -t ext4 -F /dev/sda5
mount /dev/sda5 /mnt/ext4
I tried this test a few times with the kernel and could not reproduce it.
Could you please share the config and compiler details, I'll retry with -rc7.
In the meanwhile, does enabling kmemleak, DEBUG_PAGE_ALLOC,
slub/slab debug, list corruption, etc catch anything at the time of the
corruption?
Testing with debug kernel (config file attached) didn't trigger kernel
crash, but only warnings
But the warning says try_to_wake_up() is using a CPU number that's out
of bounds, which means when you lookup the runqueue for that CPU you
just get junk, and that's what was triggering the crash in your previous
report.
So at least that part of the mystery is solved.
[ 99.686770] ------------[ cut here ]------------
[ 99.686868] WARNING: CPU: 1 PID: 2272 at ./include/linux/cpumask.h:121 try_to_wake_up+0x17c/0x8f0
static inline unsigned int cpumask_check(unsigned int cpu)
{
#ifdef CONFIG_DEBUG_PER_CPU_MAPS
WARN_ON_ONCE(cpu >= nr_cpumask_bits);
#endif /* CONFIG_DEBUG_PER_CPU_MAPS */
return cpu;
}
We had a similar bug a few months back, caused by task->cpus_allowed
being fubar.
This looks similar, but different.
Can you try this debug patch? It might get us one step closer to the culprit.
cheers
@@ -1565,6 +1565,14 @@ int select_task_rq(struct task_struct *p, int cpu, int sd_flags, int wake_flags)elsecpu=cpumask_any(&p->cpus_allowed);+if(cpu>=nr_cpumask_bits){+printk("%s: CPU %d out of range for task %p (%s)\n",__func__,+cpu,p,p->comm);+printk("p->cpus_allowed: %*pbl\n",cpumask_pr_args(&p->cpus_allowed));+dump_stack();+cpu=0;+}+/**Inordernottocallset_task_cpu()onablockingtaskweneed*torelyonttwu()toplacethetaskonavalid->cpus_allowed
On Thu, Jun 29, 2017 at 09:12:55PM +1000, Michael Ellerman wrote:
Eryu Guan [off-list ref] writes:
quoted
On Thu, Jun 29, 2017 at 06:47:50PM +1000, Balbir Singh wrote:
quoted
On Thu, Jun 29, 2017 at 1:41 PM, Eryu Guan [off-list ref] wrote:
quoted
On Thu, Jun 29, 2017 at 03:16:10AM +1000, Balbir Singh wrote:
quoted
On Wed, Jun 28, 2017 at 6:32 PM, Eryu Guan [off-list ref] wrote:
<snip>
quoted
quoted
Thanks for the excellent bug report, I am a little lost on the stack
trace, it shows a bad page access that we think is triggered by the
mmap changes? The patch changed the return type to integrate the call
into trace-cmd. Could you point me to the tests that can help
reproduce the crash. Could you also suggest how long to try the test
cases for?
Sorry, I should have provided it in the first place. It's as simple as
mounting an ext4 filesystem on my test ppc64le host, i.e.
mkdir -p /mnt/ext4
mkfs -t ext4 -F /dev/sda5
mount /dev/sda5 /mnt/ext4
I tried this test a few times with the kernel and could not reproduce it.
Could you please share the config and compiler details, I'll retry with -rc7.
In the meanwhile, does enabling kmemleak, DEBUG_PAGE_ALLOC,
slub/slab debug, list corruption, etc catch anything at the time of the
corruption?
Testing with debug kernel (config file attached) didn't trigger kernel
crash, but only warnings
But the warning says try_to_wake_up() is using a CPU number that's out
of bounds, which means when you lookup the runqueue for that CPU you
just get junk, and that's what was triggering the crash in your previous
report.
So at least that part of the mystery is solved.
quoted
[ 99.686770] ------------[ cut here ]------------
[ 99.686868] WARNING: CPU: 1 PID: 2272 at ./include/linux/cpumask.h:121 try_to_wake_up+0x17c/0x8f0
static inline unsigned int cpumask_check(unsigned int cpu)
{
#ifdef CONFIG_DEBUG_PER_CPU_MAPS
WARN_ON_ONCE(cpu >= nr_cpumask_bits);
#endif /* CONFIG_DEBUG_PER_CPU_MAPS */
return cpu;
}
We had a similar bug a few months back, caused by task->cpus_allowed
being fubar.
This looks similar, but different.
Can you try this debug patch? It might get us one step closer to the culprit.
[ 69.039219] select_task_rq: CPU 160 out of range for task c0000003f0772780 (kworker/u321:0)
[ 69.039312] p->cpus_allowed:
[ 69.039317] CPU: 11 PID: 2230 Comm: mount Not tainted 4.12.0-rc7.debug+ #29
[ 69.039322] Call Trace:
[ 69.039328] [c0000003eee1b620] [c000000000a55f28] dump_stack+0xe8/0x154 (unreliable)
[ 69.039338] [c0000003eee1b660] [c000000000135a2c] try_to_wake_up+0x1bc/0x940
[ 69.039345] [c0000003eee1b730] [c000000000114ea8] create_worker+0x148/0x220
[ 69.039352] [c0000003eee1b7d0] [c00000000011a418] alloc_unbound_pwq+0x4c8/0x620
[ 69.039358] [c0000003eee1b830] [c00000000011a9c4] apply_wqattrs_prepare+0x1f4/0x340
[ 69.039365] [c0000003eee1b8a0] [c00000000011ab4c] apply_workqueue_attrs_locked+0x3c/0xa0
[ 69.039372] [c0000003eee1b8d0] [c00000000011b094] apply_workqueue_attrs+0x54/0x90
[ 69.039378] [c0000003eee1b910] [c00000000011d674] __alloc_workqueue_key+0x184/0x5b0
[ 69.039399] [c0000003eee1b9d0] [d0000000141f1768] ext4_fill_super+0x1c68/0x33e0 [ext4]
[ 69.039406] [c0000003eee1bb10] [c00000000039101c] mount_bdev+0x22c/0x260
[ 69.039425] [c0000003eee1bbb0] [d0000000141e9020] ext4_mount+0x20/0x40 [ext4]
[ 69.039431] [c0000003eee1bbd0] [c000000000392464] mount_fs+0x74/0x210
[ 69.039438] [c0000003eee1bc80] [c0000000003c0728] vfs_kern_mount+0x78/0x220
[ 69.039444] [c0000003eee1bd00] [c0000000003c60e4] do_mount+0x254/0xf70
[ 69.039451] [c0000003eee1bde0] [c0000000003c7224] SyS_mount+0x94/0x100
[ 69.039458] [c0000003eee1be30] [c00000000000b190] system_call+0x38/0xe0
[ 69.044301] EXT4-fs (sda5): mounted filesystem with ordered data mode. Opts: (null)
I applied this patch on top of 4.12-rc7 kernel, built with debug options
enabled. And kernel didn't print warning messages, didn't crash either.
Thanks,
Eryu
@@ -1565,6 +1565,14 @@ int select_task_rq(struct task_struct *p, int cpu, int sd_flags, int wake_flags)elsecpu=cpumask_any(&p->cpus_allowed);+if(cpu>=nr_cpumask_bits){+printk("%s: CPU %d out of range for task %p (%s)\n",__func__,+cpu,p,p->comm);+printk("p->cpus_allowed: %*pbl\n",cpumask_pr_args(&p->cpus_allowed));+dump_stack();+cpu=0;+}+/**Inordernottocallset_task_cpu()onablockingtaskweneed*torelyonttwu()toplacethetaskonavalid->cpus_allowed
From: Michael Ellerman <mpe@ellerman.id.au> Date: 2017-06-29 12:06:32
Eryu Guan [off-list ref] writes:
On Thu, Jun 29, 2017 at 09:12:55PM +1000, Michael Ellerman wrote:
quoted
Eryu Guan [off-list ref] writes:
quoted
On Thu, Jun 29, 2017 at 06:47:50PM +1000, Balbir Singh wrote:
quoted
On Thu, Jun 29, 2017 at 1:41 PM, Eryu Guan [off-list ref] wrote:
quoted
On Thu, Jun 29, 2017 at 03:16:10AM +1000, Balbir Singh wrote:
quoted
On Wed, Jun 28, 2017 at 6:32 PM, Eryu Guan [off-list ref] wrote:
<snip>
quoted
quoted
Thanks for the excellent bug report, I am a little lost on the stack
trace, it shows a bad page access that we think is triggered by the
mmap changes? The patch changed the return type to integrate the call
into trace-cmd. Could you point me to the tests that can help
reproduce the crash. Could you also suggest how long to try the test
cases for?
Sorry, I should have provided it in the first place. It's as simple as
mounting an ext4 filesystem on my test ppc64le host, i.e.
mkdir -p /mnt/ext4
mkfs -t ext4 -F /dev/sda5
mount /dev/sda5 /mnt/ext4
I tried this test a few times with the kernel and could not reproduce it.
Could you please share the config and compiler details, I'll retry with -rc7.
In the meanwhile, does enabling kmemleak, DEBUG_PAGE_ALLOC,
slub/slab debug, list corruption, etc catch anything at the time of the
corruption?
Testing with debug kernel (config file attached) didn't trigger kernel
crash, but only warnings
But the warning says try_to_wake_up() is using a CPU number that's out
of bounds, which means when you lookup the runqueue for that CPU you
just get junk, and that's what was triggering the crash in your previous
report.
So at least that part of the mystery is solved.
quoted
[ 99.686770] ------------[ cut here ]------------
[ 99.686868] WARNING: CPU: 1 PID: 2272 at ./include/linux/cpumask.h:121 try_to_wake_up+0x17c/0x8f0
static inline unsigned int cpumask_check(unsigned int cpu)
{
#ifdef CONFIG_DEBUG_PER_CPU_MAPS
WARN_ON_ONCE(cpu >= nr_cpumask_bits);
#endif /* CONFIG_DEBUG_PER_CPU_MAPS */
return cpu;
}
We had a similar bug a few months back, caused by task->cpus_allowed
being fubar.
This looks similar, but different.
Can you try this debug patch? It might get us one step closer to the culprit.
[ 69.039219] select_task_rq: CPU 160 out of range for task c0000003f0772780 (kworker/u321:0)
[ 69.039312] p->cpus_allowed:
[ 69.039317] CPU: 11 PID: 2230 Comm: mount Not tainted 4.12.0-rc7.debug+ #29
[ 69.039322] Call Trace:
[ 69.039328] [c0000003eee1b620] [c000000000a55f28] dump_stack+0xe8/0x154 (unreliable)
[ 69.039338] [c0000003eee1b660] [c000000000135a2c] try_to_wake_up+0x1bc/0x940
[ 69.039345] [c0000003eee1b730] [c000000000114ea8] create_worker+0x148/0x220
[ 69.039352] [c0000003eee1b7d0] [c00000000011a418] alloc_unbound_pwq+0x4c8/0x620
[ 69.039358] [c0000003eee1b830] [c00000000011a9c4] apply_wqattrs_prepare+0x1f4/0x340
[ 69.039365] [c0000003eee1b8a0] [c00000000011ab4c] apply_workqueue_attrs_locked+0x3c/0xa0
[ 69.039372] [c0000003eee1b8d0] [c00000000011b094] apply_workqueue_attrs+0x54/0x90
[ 69.039378] [c0000003eee1b910] [c00000000011d674] __alloc_workqueue_key+0x184/0x5b0
[ 69.039399] [c0000003eee1b9d0] [d0000000141f1768] ext4_fill_super+0x1c68/0x33e0 [ext4]
[ 69.039406] [c0000003eee1bb10] [c00000000039101c] mount_bdev+0x22c/0x260
[ 69.039425] [c0000003eee1bbb0] [d0000000141e9020] ext4_mount+0x20/0x40 [ext4]
[ 69.039431] [c0000003eee1bbd0] [c000000000392464] mount_fs+0x74/0x210
[ 69.039438] [c0000003eee1bc80] [c0000000003c0728] vfs_kern_mount+0x78/0x220
[ 69.039444] [c0000003eee1bd00] [c0000000003c60e4] do_mount+0x254/0xf70
[ 69.039451] [c0000003eee1bde0] [c0000000003c7224] SyS_mount+0x94/0x100
[ 69.039458] [c0000003eee1be30] [c00000000000b190] system_call+0x38/0xe0
[ 69.044301] EXT4-fs (sda5): mounted filesystem with ordered data mode. Opts: (null)
I applied this patch on top of 4.12-rc7 kernel, built with debug options
enabled.
So the question is why does kworker/u321:0 have an empty task->cpus_allowed ?
It's late here, but can you try this as well?
cheers
@@ -1780,9 +1780,14 @@ static struct worker *create_worker(struct worker_pool *pool)if(IS_ERR(worker->task))gotofail;+WARN_ON(cpumask_empty(worker->task->cpus_allowed));+set_user_nice(worker->task,pool->attrs->nice);kthread_bind_mask(worker->task,pool->attrs->cpumask);+WARN_ON(cpumask_empty(worker->task->cpus_allowed));+WARN_ON(cpumask_empty(pool->attrs->cpumask));+/* successful, attach the worker to the pool */worker_attach_to_pool(worker,pool);
From: Michael Ellerman <mpe@ellerman.id.au> Date: 2017-06-29 12:13:09
Eryu Guan [off-list ref] writes:
On Thu, Jun 29, 2017 at 08:27:11PM +1000, Michael Ellerman wrote:
quoted
Eryu Guan [off-list ref] writes:
quoted
Hi all,
Li Wang and I are constantly seeing ppc64le hosts crashing due to bad
page access. But it's not reproducing on every ppc64le host we've
tested, but it usually happened in filesystem testings.
<snip>
quoted
And I've confirmed that reverting above commit 'resolves' the crash.
Do you mean ~v4.12-rc7 with that commit reverted still triggers the
crash?
Correct. I also confirmed that reverting it when it was HEAD also fixed
the crash.
OK. The former, reverting it on top of mainline is more informative.
cheers
On Thu, Jun 29, 2017 at 10:06:31PM +1000, Michael Ellerman wrote:
Eryu Guan [off-list ref] writes:
quoted
On Thu, Jun 29, 2017 at 09:12:55PM +1000, Michael Ellerman wrote:
quoted
Eryu Guan [off-list ref] writes:
quoted
On Thu, Jun 29, 2017 at 06:47:50PM +1000, Balbir Singh wrote:
quoted
On Thu, Jun 29, 2017 at 1:41 PM, Eryu Guan [off-list ref] wrote:
quoted
On Thu, Jun 29, 2017 at 03:16:10AM +1000, Balbir Singh wrote:
quoted
On Wed, Jun 28, 2017 at 6:32 PM, Eryu Guan [off-list ref] wrote:
<snip>
quoted
quoted
Thanks for the excellent bug report, I am a little lost on the stack
trace, it shows a bad page access that we think is triggered by the
mmap changes? The patch changed the return type to integrate the call
into trace-cmd. Could you point me to the tests that can help
reproduce the crash. Could you also suggest how long to try the test
cases for?
Sorry, I should have provided it in the first place. It's as simple as
mounting an ext4 filesystem on my test ppc64le host, i.e.
mkdir -p /mnt/ext4
mkfs -t ext4 -F /dev/sda5
mount /dev/sda5 /mnt/ext4
I tried this test a few times with the kernel and could not reproduce it.
Could you please share the config and compiler details, I'll retry with -rc7.
In the meanwhile, does enabling kmemleak, DEBUG_PAGE_ALLOC,
slub/slab debug, list corruption, etc catch anything at the time of the
corruption?
Testing with debug kernel (config file attached) didn't trigger kernel
crash, but only warnings
But the warning says try_to_wake_up() is using a CPU number that's out
of bounds, which means when you lookup the runqueue for that CPU you
just get junk, and that's what was triggering the crash in your previous
report.
So at least that part of the mystery is solved.
quoted
[ 99.686770] ------------[ cut here ]------------
[ 99.686868] WARNING: CPU: 1 PID: 2272 at ./include/linux/cpumask.h:121 try_to_wake_up+0x17c/0x8f0
static inline unsigned int cpumask_check(unsigned int cpu)
{
#ifdef CONFIG_DEBUG_PER_CPU_MAPS
WARN_ON_ONCE(cpu >= nr_cpumask_bits);
#endif /* CONFIG_DEBUG_PER_CPU_MAPS */
return cpu;
}
We had a similar bug a few months back, caused by task->cpus_allowed
being fubar.
This looks similar, but different.
Can you try this debug patch? It might get us one step closer to the culprit.
[ 69.039219] select_task_rq: CPU 160 out of range for task c0000003f0772780 (kworker/u321:0)
[ 69.039312] p->cpus_allowed:
[ 69.039317] CPU: 11 PID: 2230 Comm: mount Not tainted 4.12.0-rc7.debug+ #29
[ 69.039322] Call Trace:
[ 69.039328] [c0000003eee1b620] [c000000000a55f28] dump_stack+0xe8/0x154 (unreliable)
[ 69.039338] [c0000003eee1b660] [c000000000135a2c] try_to_wake_up+0x1bc/0x940
[ 69.039345] [c0000003eee1b730] [c000000000114ea8] create_worker+0x148/0x220
[ 69.039352] [c0000003eee1b7d0] [c00000000011a418] alloc_unbound_pwq+0x4c8/0x620
[ 69.039358] [c0000003eee1b830] [c00000000011a9c4] apply_wqattrs_prepare+0x1f4/0x340
[ 69.039365] [c0000003eee1b8a0] [c00000000011ab4c] apply_workqueue_attrs_locked+0x3c/0xa0
[ 69.039372] [c0000003eee1b8d0] [c00000000011b094] apply_workqueue_attrs+0x54/0x90
[ 69.039378] [c0000003eee1b910] [c00000000011d674] __alloc_workqueue_key+0x184/0x5b0
[ 69.039399] [c0000003eee1b9d0] [d0000000141f1768] ext4_fill_super+0x1c68/0x33e0 [ext4]
[ 69.039406] [c0000003eee1bb10] [c00000000039101c] mount_bdev+0x22c/0x260
[ 69.039425] [c0000003eee1bbb0] [d0000000141e9020] ext4_mount+0x20/0x40 [ext4]
[ 69.039431] [c0000003eee1bbd0] [c000000000392464] mount_fs+0x74/0x210
[ 69.039438] [c0000003eee1bc80] [c0000000003c0728] vfs_kern_mount+0x78/0x220
[ 69.039444] [c0000003eee1bd00] [c0000000003c60e4] do_mount+0x254/0xf70
[ 69.039451] [c0000003eee1bde0] [c0000000003c7224] SyS_mount+0x94/0x100
[ 69.039458] [c0000003eee1be30] [c00000000000b190] system_call+0x38/0xe0
[ 69.044301] EXT4-fs (sda5): mounted filesystem with ordered data mode. Opts: (null)
I applied this patch on top of 4.12-rc7 kernel, built with debug options
enabled.
So the question is why does kworker/u321:0 have an empty task->cpus_allowed ?
It's late here, but can you try this as well?
cheers
I have to update the patch a bit to make it compile.
OK thanks.
Can you try this patch and see if it changes anything? (with the debug
still applied).
We've been trying to reproduce the bug here but haven't had any luck so far.
cheers
OK thanks.
Can you try this patch and see if it changes anything? (with the debug
still applied).
This patch fixes the crash for me. After appliying this patch (with all
other debug patches still applied), kernel didn't print any warnings or
calltraces or debug messages.
We've been trying to reproduce the bug here but haven't had any luck so far.
I'm using this reproducer:
for i in `seq 5`; do
mkfs -t ext4 -F /dev/sda5 && sleep 3 && mount /dev/sda5 /mnt/ext4 && umount /dev/sda5
done
Thanks,
Eryu
From: Michael Ellerman <mpe@ellerman.id.au> Date: 2017-07-04 06:26:15
Eryu Guan [off-list ref] writes:
On Fri, Jun 30, 2017 at 08:07:02PM +1000, Michael Ellerman wrote:
quoted
Can you try this patch and see if it changes anything? (with the debug
still applied).
This patch fixes the crash for me. After appliying this patch (with all
other debug patches still applied), kernel didn't print any warnings or
calltraces or debug messages.
OK. It's not meant to fix it :)
I can't form any connection between your bisection result and that
patch, nothing is making any sense TBH.
What hardware are you on? And are you doing CPU hotplug or anything like that?
Can you back out the last patch I sent and try this?
cheers
@@ -3338,6 +3338,8 @@ static struct worker_pool *get_unbound_pool(const struct workqueue_attrs *attrs)lockdep_assert_held(&wq_pool_mutex);+WARN_ON(cpumask_empty(attrs->cpumask));+/* do we already have a matching pool? */hash_for_each_possible(unbound_pool_hash,pool,hash_node,hash){if(wqattrs_equal(pool->attrs,attrs)){
@@ -5494,6 +5498,7 @@ static void __init wq_numa_init(void)for_each_possible_cpu(cpu){node=cpu_to_node(cpu);+printk("%s: setting cpu %d on node %d present? %d\n",__func__,cpu,node,cpu_present(cpu));if(WARN_ON(node==NUMA_NO_NODE)){pr_warn("workqueue: NUMA node mapping not available for cpu%d, disabling NUMA support\n",cpu);/* happens iff arch is bonkers, let's just proceed */
@@ -5502,6 +5507,16 @@ static void __init wq_numa_init(void)cpumask_set_cpu(cpu,tbl[node]);}+for_each_possible_cpu(cpu){+structworker_pool*pool;++for_each_cpu_worker_pool(pool,cpu){+if(cpumask_empty(pool->attrs->cpumask))+printk("%s: cpumask EMPTY! for pool %p on cpu %d\n",__func__,pool,cpu);+printk("%s: pool %p on cpu %d node = %d\n",__func__,pool,cpu,pool->node);+}+}+wq_numa_possible_cpumask=tbl;wq_numa_enabled=true;}
On Tue, Jul 04, 2017 at 04:26:11PM +1000, Michael Ellerman wrote:
Eryu Guan [off-list ref] writes:
quoted
On Fri, Jun 30, 2017 at 08:07:02PM +1000, Michael Ellerman wrote:
quoted
Can you try this patch and see if it changes anything? (with the debug
still applied).
This patch fixes the crash for me. After appliying this patch (with all
other debug patches still applied), kernel didn't print any warnings or
calltraces or debug messages.
OK. It's not meant to fix it :)
Understand.
I can't form any connection between your bisection result and that
patch, nothing is making any sense TBH.
What hardware are you on? And are you doing CPU hotplug or anything like that?
It's a "PowerVM" guest (I'm not familiar with powerpc, I don't know what
does that mean..) running on Power8 host. I didn't do any CPU hotplug or
anything like that.
lscpu output:
Architecture: ppc64le
Byte Order: Little Endian
CPU(s): 16
On-line CPU(s) list: 0-15
Thread(s) per core: 8
Core(s) per socket: 1
Socket(s): 2
NUMA node(s): 3
Model: 2.1 (pvr 004b 0201)
Model name: POWER8 (architected), altivec supported
Hypervisor vendor: (null)
Virtualization type: full
L1d cache: 64K
L1i cache: 32K
NUMA node0 CPU(s): 0-7
NUMA node2 CPU(s): 8-15
NUMA node3 CPU(s):
Can you back out the last patch I sent and try this?
@@ -3338,6 +3338,8 @@ static struct worker_pool *get_unbound_pool(const struct workqueue_attrs *attrs)lockdep_assert_held(&wq_pool_mutex);+WARN_ON(cpumask_empty(attrs->cpumask));+/* do we already have a matching pool? */hash_for_each_possible(unbound_pool_hash,pool,hash_node,hash){if(wqattrs_equal(pool->attrs,attrs)){
@@ -5494,6 +5498,7 @@ static void __init wq_numa_init(void)for_each_possible_cpu(cpu){node=cpu_to_node(cpu);+printk("%s: setting cpu %d on node %d present? %d\n",__func__,cpu,node,cpu_present(cpu));if(WARN_ON(node==NUMA_NO_NODE)){pr_warn("workqueue: NUMA node mapping not available for cpu%d, disabling NUMA support\n",cpu);/* happens iff arch is bonkers, let's just proceed */
@@ -5502,6 +5507,16 @@ static void __init wq_numa_init(void)cpumask_set_cpu(cpu,tbl[node]);}+for_each_possible_cpu(cpu){+structworker_pool*pool;++for_each_cpu_worker_pool(pool,cpu){+if(cpumask_empty(pool->attrs->cpumask))+printk("%s: cpumask EMPTY! for pool %p on cpu %d\n",__func__,pool,cpu);+printk("%s: pool %p on cpu %d node = %d\n",__func__,pool,cpu,pool->node);+}+}+wq_numa_possible_cpumask=tbl;wq_numa_enabled=true;}
From: Michael Ellerman <mpe@ellerman.id.au> Date: 2017-07-04 11:06:56
Eryu Guan [off-list ref] writes:
On Tue, Jul 04, 2017 at 04:26:11PM +1000, Michael Ellerman wrote:
quoted
Eryu Guan [off-list ref] writes:
quoted
On Fri, Jun 30, 2017 at 08:07:02PM +1000, Michael Ellerman wrote:
quoted
Can you try this patch and see if it changes anything? (with the debug
still applied).
This patch fixes the crash for me. After appliying this patch (with all
other debug patches still applied), kernel didn't print any warnings or
calltraces or debug messages.
OK. It's not meant to fix it :)
Understand.
quoted
I can't form any connection between your bisection result and that
patch, nothing is making any sense TBH.
What hardware are you on? And are you doing CPU hotplug or anything like that?
It's a "PowerVM" guest (I'm not familiar with powerpc, I don't know what
does that mean..) running on Power8 host. I didn't do any CPU hotplug or
anything like that.
OK thanks.
We might have to try and sync up on irc so we can debug this a bit faster.
Can you try this hunk also?
cheers
On Tue, Jul 04, 2017 at 09:06:55PM +1000, Michael Ellerman wrote:
Eryu Guan [off-list ref] writes:
quoted
On Tue, Jul 04, 2017 at 04:26:11PM +1000, Michael Ellerman wrote:
quoted
Eryu Guan [off-list ref] writes:
quoted
On Fri, Jun 30, 2017 at 08:07:02PM +1000, Michael Ellerman wrote:
quoted
Can you try this patch and see if it changes anything? (with the debug
still applied).
This patch fixes the crash for me. After appliying this patch (with all
other debug patches still applied), kernel didn't print any warnings or
calltraces or debug messages.
OK. It's not meant to fix it :)
Understand.
quoted
I can't form any connection between your bisection result and that
patch, nothing is making any sense TBH.
What hardware are you on? And are you doing CPU hotplug or anything like that?
It's a "PowerVM" guest (I'm not familiar with powerpc, I don't know what
does that mean..) running on Power8 host. I didn't do any CPU hotplug or
anything like that.
OK thanks.
We might have to try and sync up on irc so we can debug this a bit faster.
Sure, where can I find you? I'm in #xfs at freenode, nick eguan. But
maybe tomorrow, I have to take off today.
Can you try this hunk also?
This new WARN_ON didn't trigger (I skipped the other warning messages,
they're the same warnings as in my last reply).
Thanks,
Eryu