[Bug 1824827] Re: tasks doing write()/fsync() hit deadlock in write_cache_pages()

2019-05-14 Thread Launchpad Bug Tracker
This bug was fixed in the package linux - 4.18.0-20.21

---
linux (4.18.0-20.21) cosmic; urgency=medium

  * CVE-2018-12126 // CVE-2018-12127 // CVE-2018-12130
- Documentation/l1tf: Fix small spelling typo
- x86/cpu: Sanitize FAM6_ATOM naming
- kvm: x86: Report STIBP on GET_SUPPORTED_CPUID
- locking/atomics, asm-generic: Move some macros from  to a
  new  file
- tools include: Adopt linux/bits.h
- x86/msr-index: Cleanup bit defines
- x86/speculation: Consolidate CPU whitelists
- x86/speculation/mds: Add basic bug infrastructure for MDS
- x86/speculation/mds: Add BUG_MSBDS_ONLY
- x86/kvm: Expose X86_FEATURE_MD_CLEAR to guests
- x86/speculation/mds: Add mds_clear_cpu_buffers()
- x86/speculation/mds: Clear CPU buffers on exit to user
- x86/kvm/vmx: Add MDS protection when L1D Flush is not active
- x86/speculation/mds: Conditionally clear CPU buffers on idle entry
- x86/speculation/mds: Add mitigation control for MDS
- x86/speculation/mds: Add sysfs reporting for MDS
- x86/speculation/mds: Add mitigation mode VMWERV
- Documentation: Move L1TF to separate directory
- Documentation: Add MDS vulnerability documentation
- x86/speculation/mds: Add mds=full,nosmt cmdline option
- x86/speculation: Move arch_smt_update() call to after mitigation decisions
- x86/speculation/mds: Add SMT warning message
- x86/speculation/mds: Fix comment
- x86/speculation/mds: Print SMT vulnerable on MSBDS with mitigations off
- x86/speculation/mds: Add 'mitigations=' support for MDS

  * CVE-2017-5715 // CVE-2017-5753
- s390/speculation: Support 'mitigations=' cmdline option

  * CVE-2017-5715 // CVE-2017-5753 // CVE-2017-5754 // CVE-2018-3639
- powerpc/speculation: Support 'mitigations=' cmdline option

  * CVE-2017-5715 // CVE-2017-5754 // CVE-2018-3620 // CVE-2018-3639 //
CVE-2018-3646
- cpu/speculation: Add 'mitigations=' cmdline option
- x86/speculation: Support 'mitigations=' cmdline option

  * Packaging resync (LP: #1786013)
- [Packaging] resync git-ubuntu-log

linux (4.18.0-19.20) cosmic; urgency=medium

  * linux: 4.18.0-19.20 -proposed tracker (LP: #1826171)

  * Packaging resync (LP: #1786013)
- [Packaging] resync git-ubuntu-log

  * autopkgtests run too often, too much and don't skip enough (LP: #1823056)
- [Debian] Set +x on rebuild testcase.
- [Debian] Skip rebuild test, for regression-suite deps.
- [Debian] Make ubuntu-regression-suite skippable on unbootable kernels.
- [Debian] make rebuild use skippable error codes when skipping.
- [Debian] Only run regression-suite, if requested to.

  * CVE-2017-5753
- s390/keyboard: sanitize array index in do_kdsk_ioctl
- drm/bufs: Fix Spectre v1 vulnerability
- drivers/misc/sgi-gru: fix Spectre v1 vulnerability
- ipv4: Fix potential Spectre v1 vulnerability
- aio: fix spectre gadget in lookup_ioctx
- ALSA: emux: Fix potential Spectre v1 vulnerabilities
- ALSA: pcm: Fix potential Spectre v1 vulnerability
- ip6mr: Fix potential Spectre v1 vulnerability
- ALSA: rme9652: Fix potential Spectre v1 vulnerability
- ALSA: emu10k1: Fix potential Spectre v1 vulnerabilities
- KVM: arm/arm64: vgic: Fix off-by-one bug in vgic_get_irq()
- drm/ioctl: Fix Spectre v1 vulnerabilities
- net: core: Fix Spectre v1 vulnerability
- phonet: af_phonet: Fix Spectre v1 vulnerability
- nfc: af_nfc: Fix Spectre v1 vulnerability
- can: af_can: Fix Spectre v1 vulnerability
- net: Revert recent Spectre-v1 patches.
- char/mwave: fix potential Spectre v1 vulnerability
- applicom: Fix potential Spectre v1 vulnerabilities
- ipmi: msghandler: Fix potential Spectre v1 vulnerabilities
- powerpc/ptrace: Mitigate potential Spectre v1
- cfg80211: prevent speculation on cfg80211_classify8021d() return
- ALSA: rawmidi: Fix potential Spectre v1 vulnerability
- ALSA: seq: oss: Fix Spectre v1 vulnerability

  * NULL pointer dereference when using z3fold and zswap (LP: #1814874)
- z3fold: fix possible reclaim races

  * The Realtek card reader does not enter PCIe 1.1/1.2 (LP: #1825487)
- misc: rtsx: Enable OCP for rts522a rts524a rts525a rts5260
- SAUCE: misc: rtsx: Fixed rts5260 power saving parameter and sd glitch

  * headset-mic doesn't work on two Dell laptops. (LP: #1825272)
- ALSA: hda/realtek - add two more pin configuration sets to quirk table

  * CVE-2018-16884
- sunrpc: use SVC_NET() in svcauth_gss_* functions
- sunrpc: use-after-free in svc_process_common()

  * AMD Rome :  Minimal support patches (LP: #1816669)
- x86: irq_remapping: Move irq remapping mode enum
- iommu/amd: Add support for higher 64-bit IOMMU Control Register
- iommu/amd: Add support for IOMMU XT mode

  * sky2 ethernet card don't work after returning from suspension (LP: #1798921)
- sky2: Increase D3 delay again

  * CVE-2019-9500
- brcmfmac: assure

[Bug 1824827] Re: tasks doing write()/fsync() hit deadlock in write_cache_pages()

2019-04-26 Thread Mauricio Faria de Oliveira
** Attachment added: "kprobe-test.c"
   
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1824827/+attachment/5259304/+files/kprobe-test.c

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1824827

Title:
  tasks doing write()/fsync() hit deadlock in write_cache_pages()

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1824827/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1824827] Re: tasks doing write()/fsync() hit deadlock in write_cache_pages()

2019-04-26 Thread Mauricio Faria de Oliveira
Verification successful on Cosmic.

Updated the test-case kernel part (attached), and repeated it 20+ times,
without any process hanging.

In all cases, the new function call into write_cache_pages() is observed
in thread 0, between page index 2 and page index 1.

[  150.914872] mod_init():161 :: hello
[  150.917828] mod_init():207 :: kernel version: prop/-19/cosmic

[  150.950322] Program running, TID = 1429
[  150.951566] kp1_pre_handler():073 :: state 0  :: pid =   1429, mapping = 
0x8abcba385570, comm = 'test'
[  150.954205] kp1_pre_handler():082 :: state 0 -> 1 :: pid =   1429, mapping = 
0x8abcba385570
[  150.956518] kp2_pre_handler():122 :: state 1  :: pid =   1429, page 
index = 1
[  150.958410] kp3_pre_handler():147 :: state 1  :: pid =   1429, page 
index = 1, calling writepage()
[  150.961047] kp2_pre_handler():122 :: state 1  :: pid =   1429, page 
index = 2
[  150.964788] kp3_pre_handler():147 :: state 1  :: pid =   1429, page 
index = 2, calling writepage()

[  151.973660] Thread 0 running, TID = 1430!
[  151.977071] kp1_pre_handler():073 :: state 1  :: pid =  7, mapping = 
0x8abcba385570, comm = 'kworker/u8:0'
[  151.984836] kp1_pre_handler():104 :: state 1 -> 2 :: pid =  7, mapping = 
0x8abcba385570, comm ('kworker/u8:0') is kworker AND wbc->range_cyclic 
(0x1) is true AND mapping->writeback_index (0x2) is 0x2.
[  152.017726] kp2_pre_handler():122 :: state 2  :: pid =  7, page 
index = 2
[  152.027193] kp3_pre_handler():147 :: state 2  :: pid =  7, page 
index = 2, calling writepage()
[  152.038466] kp1_pre_handler():073 :: state 2  :: pid =  7, mapping = 
0x8abcba385570, comm = 'kworker/u8:0'
[  152.048736] kp2_pre_handler():122 :: state 2  :: pid =  7, page 
index = 1
[  152.056642] kp2_pre_handler():126 :: state 2 -> 3 :: pid =  7, page 
index = 1, spin 5 seconds before lock_page()...

[  152.973731] Thread 1 running, TID = 1431!
[  152.974943] kp1_pre_handler():073 :: state 3  :: pid =   1431, mapping = 
0x8abcba385570, comm = 'test'
[  152.977489] kp2_pre_handler():122 :: state 3  :: pid =   1431, page 
index = 1
[  152.979140] kp3_pre_handler():147 :: state 3  :: pid =   1431, page 
index = 1, calling writepage()
[  152.981928] kp2_pre_handler():122 :: state 3  :: pid =   1431, page 
index = 2

[  153.973895] Thread 2 running, TID = 1432!
[  153.975160] kp1_pre_handler():073 :: state 3  :: pid =   1432, mapping = 
0x8abcba385570, comm = 'test'
[  153.978573] kp2_pre_handler():122 :: state 3  :: pid =   1432, page 
index = 1
[  157.033588] kp2_pre_handler():130 :: state 3 -> 4 :: pid =  7, page 
index = 1, spun 5 seconds before lock_page().
[  157.036151] kp3_pre_handler():147 :: state 4  :: pid =   1431, page 
index = 2, calling writepage()
[  157.038804] kp3_pre_handler():147 :: state 4  :: pid =   1432, page 
index = 1, calling writepage()
[  157.041212] kp2_pre_handler():122 :: state 4  :: pid =   1432, page 
index = 2
[  157.058880] mod_exit():230 :: bye


** Tags removed: verification-needed-cosmic
** Tags added: verification-done-cosmic

** Attachment removed: "kprobe-test.c"
   
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1824827/+attachment/5255994/+files/kprobe-test.c

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1824827

Title:
  tasks doing write()/fsync() hit deadlock in write_cache_pages()

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1824827/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1824827] Re: tasks doing write()/fsync() hit deadlock in write_cache_pages()

2019-04-25 Thread Ubuntu Kernel Bot
This bug is awaiting verification that the kernel in -proposed solves
the problem. Please test the kernel and update this bug with the
results. If the problem is solved, change the tag 'verification-needed-
cosmic' to 'verification-done-cosmic'. If the problem still exists,
change the tag 'verification-needed-cosmic' to 'verification-failed-
cosmic'.

If verification is not done by 5 working days from today, this fix will
be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how
to enable and use -proposed. Thank you!


** Tags added: verification-needed-cosmic

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1824827

Title:
  tasks doing write()/fsync() hit deadlock in write_cache_pages()

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1824827/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1824827] Re: tasks doing write()/fsync() hit deadlock in write_cache_pages()

2019-04-22 Thread Khaled El Mously
** Changed in: linux (Ubuntu Cosmic)
   Status: In Progress => Fix Committed

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1824827

Title:
  tasks doing write()/fsync() hit deadlock in write_cache_pages()

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1824827/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1824827] Re: tasks doing write()/fsync() hit deadlock in write_cache_pages()

2019-04-15 Thread Mauricio Faria de Oliveira
The change introduced by the patch is evident in the kernel message log for 
Thread 0:
between page indexes 2 and 1 there's now another function call to 
write_cache_pages()
instead of just another iteration of the for-loop inside one call.

Original kernel:

[ 695.276320] Thread 0 running, TID = 3293!
[ 695.281210] kp1_pre_handler():070 :: state 1  :: pid = 1165, mapping = 
0x962333263730, comm = 'kworker/u4:2'
[ 695.299026] kp1_pre_handler():101 :: state 1 -> 2 :: pid = 1165, mapping = 
0x962333263730, comm ('kworker/u4:2') is kworker AND wbc->range_cyclic 
(0x1) is true AND mapping->writeback_index (0x2) is 0x2.
[ 695.314808] kp2_pre_handler():119 :: state 2  :: pid = 1165, page index = 
2
[ 695.322822] kp3_pre_handler():144 :: state 2  :: pid = 1165, page index = 
2, calling writepage()
  << ... HERE ... >>
[ 695.330308] kp2_pre_handler():119 :: state 2  :: pid = 1165, page index = 
1
[ 695.334355] kp2_pre_handler():123 :: state 2 -> 3 :: pid = 1165, page index = 
1, spin 5 seconds before lock_page()...

Test kernel:

[ 170.194880] Thread 0 running, TID = 2498!
[ 170.200011] kp1_pre_handler():070 :: state 1  :: pid = 7, mapping = 
0x993df9136fb0, comm = 'kworker/u4:0'
[ 170.217616] kp1_pre_handler():101 :: state 1 -> 2 :: pid = 7, mapping = 
0x993df9136fb0, comm ('kworker/u4:0') is kworker AND wbc->range_cyclic 
(0x1) is true AND mapping->writeback_index (0x2) is 0x2.
[ 170.238633] kp2_pre_handler():119 :: state 2  :: pid = 7, page index = 2
[ 170.248024] kp3_pre_handler():144 :: state 2  :: pid = 7, page index = 2, 
calling writepage()
[ 170.261141] kp1_pre_handler():070 :: state 2  :: pid = 7, mapping = 
0x993df9136fb0, comm = 'kworker/u4:0'
[ 170.272150] kp2_pre_handler():119 :: state 2  :: pid = 7, page index = 1
[ 170.279860] kp2_pre_handler():123 :: state 2 -> 3 :: pid = 7, page index = 1, 
spin 5 seconds before lock_page()...

** Changed in: linux (Ubuntu Cosmic)
   Status: Confirmed => In Progress

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1824827

Title:
  tasks doing write()/fsync() hit deadlock in write_cache_pages()

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1824827/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1824827] Re: tasks doing write()/fsync() hit deadlock in write_cache_pages()

2019-04-15 Thread Mauricio Faria de Oliveira
Patch posted for SRU:

[C][PATCH 0/1] Fix write()/fsync() deadlock in write_cache_pages()
https://lists.ubuntu.com/archives/kernel-team/2019-April/100084.html

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1824827

Title:
  tasks doing write()/fsync() hit deadlock in write_cache_pages()

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1824827/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1824827] Re: tasks doing write()/fsync() hit deadlock in write_cache_pages()

2019-04-15 Thread Mauricio Faria de Oliveira
testcase, kernel part.

** Attachment added: "kprobe-test.c"
   
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1824827/+attachment/5255994/+files/kprobe-test.c

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1824827

Title:
  tasks doing write()/fsync() hit deadlock in write_cache_pages()

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1824827/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1824827] Re: tasks doing write()/fsync() hit deadlock in write_cache_pages()

2019-04-15 Thread Mauricio Faria de Oliveira
testcase


test kernel :: latest cosmic version + patch:


$ uname -rv
4.18.0-18-generic #19+test20190415b1 SMP Mon Apr 15 15:43:20 UTC 2019

[  169.145212] kprobe_test: loading out-of-tree module taints kernel.
[  169.149144] kprobe_test: module verification failed: signature and/or 
required key missing - tainting kernel

[  169.153539] mod_init():158 :: hello
[  169.154744] mod_init():190 :: kernel version: test/-18/cosmic

[  169.177027] Program running, TID = 2497
[  169.177978] kp1_pre_handler():070 :: state 0  :: pid =   2497, mapping = 
0x993df9136fb0, comm = 'test'
[  169.181080] kp1_pre_handler():079 :: state 0 -> 1 :: pid =   2497, mapping = 
0x993df9136fb0
[  169.183355] kp2_pre_handler():119 :: state 1  :: pid =   2497, page 
index = 1
[  169.185616] kp3_pre_handler():144 :: state 1  :: pid =   2497, page 
index = 1, calling writepage()
[  169.187779] kp2_pre_handler():119 :: state 1  :: pid =   2497, page 
index = 2
[  169.189186] kp3_pre_handler():144 :: state 1  :: pid =   2497, page 
index = 2, calling writepage()

[  170.194880] Thread 0 running, TID = 2498!
[  170.200011] kp1_pre_handler():070 :: state 1  :: pid =  7, mapping = 
0x993df9136fb0, comm = 'kworker/u4:0'
[  170.217616] kp1_pre_handler():101 :: state 1 -> 2 :: pid =  7, mapping = 
0x993df9136fb0, comm ('kworker/u4:0') is kworker AND wbc->range_cyclic 
(0x1) is true AND mapping->writeback_index (0x2) is 0x2.
[  170.238633] kp2_pre_handler():119 :: state 2  :: pid =  7, page 
index = 2
[  170.248024] kp3_pre_handler():144 :: state 2  :: pid =  7, page 
index = 2, calling writepage()
[  170.261141] kp1_pre_handler():070 :: state 2  :: pid =  7, mapping = 
0x993df9136fb0, comm = 'kworker/u4:0'
[  170.272150] kp2_pre_handler():119 :: state 2  :: pid =  7, page 
index = 1
[  170.279860] kp2_pre_handler():123 :: state 2 -> 3 :: pid =  7, page 
index = 1, spin 5 seconds before lock_page()...

[  171.195090] Thread 1 running, TID = 2499!
[  171.196182] kp1_pre_handler():070 :: state 3  :: pid =   2499, mapping = 
0x993df9136fb0, comm = 'test'
[  171.198609] kp2_pre_handler():119 :: state 3  :: pid =   2499, page 
index = 1
[  171.200358] kp3_pre_handler():144 :: state 3  :: pid =   2499, page 
index = 1, calling writepage()
[  171.203717] kp2_pre_handler():119 :: state 3  :: pid =   2499, page 
index = 2

[  172.195297] Thread 2 running, TID = 2500!
[  172.196387] kp1_pre_handler():070 :: state 3  :: pid =   2500, mapping = 
0x993df9136fb0, comm = 'test'
[  172.198673] kp2_pre_handler():119 :: state 3  :: pid =   2500, page 
index = 1
[  175.252161] kp2_pre_handler():127 :: state 3 -> 4 :: pid =  7, page 
index = 1, spun 5 seconds before lock_page().

[  175.254922] kp3_pre_handler():144 :: state 4  :: pid =   2499, page 
index = 2, calling writepage()
[  175.256849] kp3_pre_handler():144 :: state 4  :: pid =   2500, page 
index = 1, calling writepage()
[  175.259166] kp2_pre_handler():119 :: state 4  :: pid =   2500, page 
index = 2
[  175.273178] mod_exit():213 :: bye

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1824827

Title:
  tasks doing write()/fsync() hit deadlock in write_cache_pages()

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1824827/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1824827] Re: tasks doing write()/fsync() hit deadlock in write_cache_pages()

2019-04-15 Thread Mauricio Faria de Oliveira
testcase


original kernel :: latest cosmic version:


$ uname -rv
4.18.0-18-generic #19-Ubuntu SMP Tue Apr 2 18:13:16 UTC 2019

[  654.491029] kprobe_test: loading out-of-tree module taints kernel.
[  654.493322] kprobe_test: module verification failed: signature and/or 
required key missing - tainting kernel

[  654.497033] mod_init():158 :: hello
[  654.497976] mod_init():183 :: kernel version: orig/-18/cosmic

[  694.254271] Program running, TID = 3292
[  694.256600] kp1_pre_handler():070 :: state 0  :: pid =   3292, mapping = 
0x962333263730, comm = 'test'
[  694.260870] kp1_pre_handler():079 :: state 0 -> 1 :: pid =   3292, mapping = 
0x962333263730
[  694.262710] kp2_pre_handler():119 :: state 1  :: pid =   3292, page 
index = 1
[  694.264264] kp3_pre_handler():144 :: state 1  :: pid =   3292, page 
index = 1, calling writepage()
[  694.266641] kp2_pre_handler():119 :: state 1  :: pid =   3292, page 
index = 2
[  694.268456] kp3_pre_handler():144 :: state 1  :: pid =   3292, page 
index = 2, calling writepage()

[  695.276320] Thread 0 running, TID = 3293!
[  695.281210] kp1_pre_handler():070 :: state 1  :: pid =   1165, mapping = 
0x962333263730, comm = 'kworker/u4:2'
[  695.299026] kp1_pre_handler():101 :: state 1 -> 2 :: pid =   1165, mapping = 
0x962333263730, comm ('kworker/u4:2') is kworker AND wbc->range_cyclic 
(0x1) is true AND mapping->writeback_index (0x2) is 0x2.
[  695.314808] kp2_pre_handler():119 :: state 2  :: pid =   1165, page 
index = 2
[  695.322822] kp3_pre_handler():144 :: state 2  :: pid =   1165, page 
index = 2, calling writepage()

[  695.330308] kp2_pre_handler():119 :: state 2  :: pid =   1165, page 
index = 1
[  695.334355] kp2_pre_handler():123 :: state 2 -> 3 :: pid =   1165, page 
index = 1, spin 5 seconds before lock_page()...

[  696.283747] Thread 1 running, TID = 3295!
[  696.284623] kp1_pre_handler():070 :: state 3  :: pid =   3295, mapping = 
0x962333263730, comm = 'test'
[  696.286726] kp2_pre_handler():119 :: state 3  :: pid =   3295, page 
index = 1
[  696.288392] kp3_pre_handler():144 :: state 3  :: pid =   3295, page 
index = 1, calling writepage()
[  696.290018] kp2_pre_handler():119 :: state 3  :: pid =   3295, page 
index = 2

[  697.283941] Thread 2 running, TID = 3296!
[  697.284859] kp1_pre_handler():070 :: state 3  :: pid =   3296, mapping = 
0x962333263730, comm = 'test'
[  697.287246] kp2_pre_handler():119 :: state 3  :: pid =   3296, page 
index = 1
[  700.302756] kp2_pre_handler():127 :: state 3 -> 4 :: pid =   1165, page 
index = 1, spun 5 seconds before lock_page().

[  715.716717] INFO: task kworker/u4:2:1165 blocked for more than 10 seconds.
[  715.725486]   Tainted: G   OE 4.18.0-18-generic #19-Ubuntu
[  715.732832] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this 
message.
[  715.740500] kworker/u4:2D0  1165  2 0x8000
[  715.745615] Workqueue: writeback wb_workfn (flush-7:1)
[  715.750736] Call Trace:
[  715.753270]  __schedule+0x29e/0x840
[  715.756493]  schedule+0x2c/0x80
[  715.759369]  io_schedule+0x16/0x40
[  715.762044]  __lock_page+0x101/0x150
[  715.764729]  ? page_cache_tree_insert+0xe0/0xe0
[  715.773625]  write_cache_pages+0x283/0x4e0
[  715.782547]  ? xfs_vm_readpage+0x80/0x80 [xfs]
[  715.792525]  ? xfs_vm_readpage+0x80/0x80 [xfs]
[  715.798175]  ? write_cache_pages+0x5/0x4e0
[  715.803180]  xfs_vm_writepages+0x6b/0xa0 [xfs]
[  715.807087]  do_writepages+0x41/0xd0
[  715.810416]  __writeback_single_inode+0x40/0x360
[  715.813588]  ? fprop_fraction_percpu+0x26/0x80
[  715.816686]  writeback_sb_inodes+0x211/0x520
[  715.819584]  __writeback_inodes_wb+0x67/0xb0
[  715.822661]  wb_writeback+0x25f/0x2f0
[  715.824963]  ? get_nr_dirty_inodes+0x46/0x70
[  715.827180]  wb_workfn+0x175/0x3f0
[  715.829225]  process_one_work+0x20f/0x410
[  715.830964]  worker_thread+0x34/0x400
[  715.832646]  kthread+0x120/0x140
[  715.834551]  ? pwq_unbound_release_workfn+0xd0/0xd0
[  715.836902]  ? kthread_bind+0x40/0x40
[  715.838772]  ret_from_fork+0x35/0x40
[  715.840579] INFO: task test:3293 blocked for more than 10 seconds.
[  715.842927]   Tainted: G   OE 4.18.0-18-generic #19-Ubuntu
[  715.845279] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this 
message.
[  715.847771] testD0  3293   3291 0x
[  715.849826] Call Trace:
[  715.851266]  __schedule+0x29e/0x840
[  715.853289]  schedule+0x2c/0x80
[  715.855069]  wb_wait_for_completion+0x64/0x90
[  715.857179]  ? wait_woken+0x80/0x80
[  715.858973]  sync_inodes_sb+0xc7/0x290
[  715.860754]  sync_inodes_one_sb+0x15/0x20
[  715.862383]  iterate_supers+0xaa/0x100
[  715.863938]  ? default_file_splice_write+0x30/0x30
[  715.865666]  ksys_sync+0x42/0xb0
[  715.867082]  __ia32_sys_sync+0xe/0x20
[  715.869122]  do_syscall_64+0x5a/0x110
[  715.871041]  entry_SYSCALL_64_after_hw

[Bug 1824827] Re: tasks doing write()/fsync() hit deadlock in write_cache_pages()

2019-04-15 Thread Mauricio Faria de Oliveira
testcase, userspace part.

** Attachment added: "test.c"
   
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1824827/+attachment/5255995/+files/test.c

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1824827

Title:
  tasks doing write()/fsync() hit deadlock in write_cache_pages()

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1824827/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs