[Kernel-packages] [Bug 1752742] [NEW] Kernel deadlock when using cachefiles.

2018-03-01 Thread Daniel Ribeiro
Public bug reported:

Was using both a cifs share and a nfs share at the moment of the crash,
both network filesystems get mounted by automount, seems that the bug
happened at the cifs automatic umount. Machine froze and stopped
responding pings from the network, not even sysrq keys worked, needed a
hard power off. Kernel panic (at least what made to syslog) follows:

Mar  1 19:34:04 xps kernel: [ 5497.617469] [ cut here ]
Mar  1 19:34:04 xps kernel: [ 5497.617472] kernel BUG at 
/build/linux-fQ94TU/linux-4.4.0/fs/fscache/cookie.c:639!
Mar  1 19:34:04 xps kernel: [ 5497.617474] invalid opcode:  [#1] SMP 
Mar  1 19:34:04 xps kernel: [ 5497.617475] Modules linked in: rpcsec_gss_krb5 
nfsv4 nfs drbg ansi_cprng md4 nls_utf8 cifs ccm bnep pci_stub vboxpci(OE) 
vboxnetadp(OE) vboxnetflt(OE) vboxdrv(
OE) dm_cache_smq dm_cache dm_persistent_data dm_bio_prison zram dm_bufio 
lz4_compress libcrc32c uvcvideo videobuf2_vmalloc videobuf2_memops 
videobuf2_v4l2 ath3k videobuf2_core btusb v4l2_com
mon btrtl videodev btbcm btintel snd_usb_audio joydev media input_leds 
bluetooth snd_usbmidi_lib snd_hda_codec_hdmi intel_rapl x86_pkg_temp_thermal 
intel_powerclamp coretemp kvm_intel snd_hd
a_codec_realtek snd_hda_codec_generic kvm dcdbas irqbypass snd_hda_intel arc4 
crct10dif_pclmul crc32_pclmul snd_hda_codec ghash_clmulni_intel ath9k 
aesni_intel snd_hda_core aes_x86_64 lrw sn
d_hwdep gf128mul glue_helper snd_pcm ath9k_common ablk_helper ath9k_hw cryptd 
snd_seq_midi ath snd_seq_midi_event snd_rawmidi nvidia_uvm(POE) mac80211 
snd_seq snd_seq_device snd_timer cfg802
11 serio_raw snd mei_me mei soundcore lpc_ich shpchp mac_hid binfmt_misc 
cachefiles nfsd fscache auth_rpcgss parport_pc nfs_acl lockd ppdev lp grace 
sunrpc parport autofs4 btrfs xor uas usb_
storage raid6_pq hid_generic usbhid hid nvidia_drm(POE) nvidia_modeset(POE) 
nvidia(POE) drm_kms_helper syscopyarea sysfillrect sysimgblt psmouse 
fb_sys_fops ahci r8169 drm libahci mii video 
fjes
Mar  1 19:34:04 xps kernel: [ 5497.617515] CPU: 2 PID: 20454 Comm: umount 
Tainted: P   OE   4.4.0-116-generic #140-Ubuntu
Mar  1 19:34:04 xps kernel: [ 5497.617516] Hardware name: Dell Inc. XPS 
8700/0KWVT8, BIOS A08 04/16/2014
Mar  1 19:34:04 xps kernel: [ 5497.617517] task: 88034802c600 ti: 
88029858c000 task.ti: 88029858c000
Mar  1 19:34:04 xps kernel: [ 5497.617518] RIP: 0010:[]  
[] __fscache_cookie_put+0x3a/0x40 [fscache]
Mar  1 19:34:04 xps kernel: [ 5497.617525] RSP: 0018:88029858fd98  EFLAGS: 
00010282
Mar  1 19:34:04 xps kernel: [ 5497.617526] RAX: 0001 RBX: 
8802e00244d0 RCX: 0034
Mar  1 19:34:04 xps kernel: [ 5497.617527] RDX: 0001 RSI: 
8802e0024528 RDI: 8802e0024528
Mar  1 19:34:04 xps kernel: [ 5497.617528] RBP: 88029858fda0 R08: 
88041ec972c0 R09: 0001
Mar  1 19:34:04 xps kernel: [ 5497.617528] R10: 0010 R11: 
 R12: 8802dde8f000
Mar  1 19:34:04 xps kernel: [ 5497.617529] R13: 1f39 R14: 
 R15: 88034802cca0
Mar  1 19:34:04 xps kernel: [ 5497.617531] FS:  7f93632b5840() 
GS:88041ec8() knlGS:
Mar  1 19:34:04 xps kernel: [ 5497.617532] CS:  0010 DS:  ES:  CR0: 
80050033
Mar  1 19:34:04 xps kernel: [ 5497.617533] CR2: 2205d5e14000 CR3: 
000293ff6000 CR4: 00160670
Mar  1 19:34:04 xps kernel: [ 5497.617534] Stack:
Mar  1 19:34:04 xps kernel: [ 5497.617535]  8802e0024528 88029858fdb8 
c10a6517 880348d55800
Mar  1 19:34:04 xps kernel: [ 5497.617536]  88029858fdd0 c1854232 
880348d55800 88029858fdf8
Mar  1 19:34:04 xps kernel: [ 5497.617538]  c182d3e0 8800a1c7ce40 
880348d55000 880348d55008
Mar  1 19:34:04 xps kernel: [ 5497.617548] Call Trace:
Mar  1 19:34:04 xps kernel: [ 5497.617552]  [] 
__fscache_relinquish_cookie+0x87/0x120 [fscache]
Mar  1 19:34:04 xps kernel: [ 5497.617572]  [] 
cifs_fscache_release_super_cookie+0x32/0x90 [cifs]
Mar  1 19:34:04 xps kernel: [ 5497.617580]  [] 
cifs_put_tcon+0x100/0x180 [cifs]
Mar  1 19:34:04 xps kernel: [ 5497.617587]  [] 
cifs_put_tlink+0x47/0x60 [cifs]
Mar  1 19:34:04 xps kernel: [ 5497.617595]  [] 
cifs_umount+0x5b/0xc0 [cifs]
Mar  1 19:34:04 xps kernel: [ 5497.617602]  [] 
cifs_kill_sb+0x1e/0x30 [cifs]
Mar  1 19:34:04 xps kernel: [ 5497.617605]  [] 
deactivate_locked_super+0x48/0x80
Mar  1 19:34:04 xps kernel: [ 5497.617607]  [] 
deactivate_super+0x5c/0x60
Mar  1 19:34:04 xps kernel: [ 5497.617609]  [] 
cleanup_mnt+0x3f/0x90
Mar  1 19:34:04 xps kernel: [ 5497.617611]  [] 
__cleanup_mnt+0x12/0x20
Mar  1 19:34:04 xps kernel: [ 5497.617613]  [] 
task_work_run+0x86/0xb0
Mar  1 19:34:04 xps kernel: [ 5497.617616]  [] 
exit_to_usermode_loop+0xc2/0xd0
Mar  1 19:34:04 xps kernel: [ 5497.617618]  [] 
syscall_return_slowpath+0x4e/0x60
Mar  1 19:34:04 xps kernel: [ 5497.617621]  [] 
int_ret_from_sys_call+0x25/0x9f
Mar  1 19:34:04 x

[Kernel-packages] [Bug 1752742] Re: Kernel deadlock when using cachefiles.

2018-03-01 Thread Daniel Ribeiro
cachefilesd.conf:
dir /cache/fscache
tag mycache
brun 10%
bcull 7%
bstop 3%
frun 10%
fcull 7%
fstop 3%
secctx system_u:system_r:cachefiles_kernel_t:s0

/cache is a separate ext4 partition, currently only cachefiles using it.

the cifs mount was using the following options:
//htpc/rootfs/ on /smb/htpc type cifs 
(rw,relatime,vers=1.0,cache=none,username=wyrm,domain=HTPC,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.1.5,unix,posixpaths,serverino,acl,fsc,noperm,rsize=65536,wsize=65536,echo_interval=60,actimeo=1,user=wyrm)

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1752742

Title:
  Kernel deadlock when using cachefiles.

Status in linux package in Ubuntu:
  Confirmed

Bug description:
  Was using both a cifs share and a nfs share at the moment of the
  crash, both network filesystems get mounted by automount, seems that
  the bug happened at the cifs automatic umount. Machine froze and
  stopped responding pings from the network, not even sysrq keys worked,
  needed a hard power off. Kernel panic (at least what made to syslog)
  follows:

  Mar  1 19:34:04 xps kernel: [ 5497.617469] [ cut here 
]
  Mar  1 19:34:04 xps kernel: [ 5497.617472] kernel BUG at 
/build/linux-fQ94TU/linux-4.4.0/fs/fscache/cookie.c:639!
  Mar  1 19:34:04 xps kernel: [ 5497.617474] invalid opcode:  [#1] SMP 
  Mar  1 19:34:04 xps kernel: [ 5497.617475] Modules linked in: rpcsec_gss_krb5 
nfsv4 nfs drbg ansi_cprng md4 nls_utf8 cifs ccm bnep pci_stub vboxpci(OE) 
vboxnetadp(OE) vboxnetflt(OE) vboxdrv(
  OE) dm_cache_smq dm_cache dm_persistent_data dm_bio_prison zram dm_bufio 
lz4_compress libcrc32c uvcvideo videobuf2_vmalloc videobuf2_memops 
videobuf2_v4l2 ath3k videobuf2_core btusb v4l2_com
  mon btrtl videodev btbcm btintel snd_usb_audio joydev media input_leds 
bluetooth snd_usbmidi_lib snd_hda_codec_hdmi intel_rapl x86_pkg_temp_thermal 
intel_powerclamp coretemp kvm_intel snd_hd
  a_codec_realtek snd_hda_codec_generic kvm dcdbas irqbypass snd_hda_intel arc4 
crct10dif_pclmul crc32_pclmul snd_hda_codec ghash_clmulni_intel ath9k 
aesni_intel snd_hda_core aes_x86_64 lrw sn
  d_hwdep gf128mul glue_helper snd_pcm ath9k_common ablk_helper ath9k_hw cryptd 
snd_seq_midi ath snd_seq_midi_event snd_rawmidi nvidia_uvm(POE) mac80211 
snd_seq snd_seq_device snd_timer cfg802
  11 serio_raw snd mei_me mei soundcore lpc_ich shpchp mac_hid binfmt_misc 
cachefiles nfsd fscache auth_rpcgss parport_pc nfs_acl lockd ppdev lp grace 
sunrpc parport autofs4 btrfs xor uas usb_
  storage raid6_pq hid_generic usbhid hid nvidia_drm(POE) nvidia_modeset(POE) 
nvidia(POE) drm_kms_helper syscopyarea sysfillrect sysimgblt psmouse 
fb_sys_fops ahci r8169 drm libahci mii video 
  fjes
  Mar  1 19:34:04 xps kernel: [ 5497.617515] CPU: 2 PID: 20454 Comm: umount 
Tainted: P   OE   4.4.0-116-generic #140-Ubuntu
  Mar  1 19:34:04 xps kernel: [ 5497.617516] Hardware name: Dell Inc. XPS 
8700/0KWVT8, BIOS A08 04/16/2014
  Mar  1 19:34:04 xps kernel: [ 5497.617517] task: 88034802c600 ti: 
88029858c000 task.ti: 88029858c000
  Mar  1 19:34:04 xps kernel: [ 5497.617518] RIP: 0010:[]  
[] __fscache_cookie_put+0x3a/0x40 [fscache]
  Mar  1 19:34:04 xps kernel: [ 5497.617525] RSP: 0018:88029858fd98  
EFLAGS: 00010282
  Mar  1 19:34:04 xps kernel: [ 5497.617526] RAX: 0001 RBX: 
8802e00244d0 RCX: 0034
  Mar  1 19:34:04 xps kernel: [ 5497.617527] RDX: 0001 RSI: 
8802e0024528 RDI: 8802e0024528
  Mar  1 19:34:04 xps kernel: [ 5497.617528] RBP: 88029858fda0 R08: 
88041ec972c0 R09: 0001
  Mar  1 19:34:04 xps kernel: [ 5497.617528] R10: 0010 R11: 
 R12: 8802dde8f000
  Mar  1 19:34:04 xps kernel: [ 5497.617529] R13: 1f39 R14: 
 R15: 88034802cca0
  Mar  1 19:34:04 xps kernel: [ 5497.617531] FS:  7f93632b5840() 
GS:88041ec8() knlGS:
  Mar  1 19:34:04 xps kernel: [ 5497.617532] CS:  0010 DS:  ES:  CR0: 
80050033
  Mar  1 19:34:04 xps kernel: [ 5497.617533] CR2: 2205d5e14000 CR3: 
000293ff6000 CR4: 00160670
  Mar  1 19:34:04 xps kernel: [ 5497.617534] Stack:
  Mar  1 19:34:04 xps kernel: [ 5497.617535]  8802e0024528 88029858fdb8 
c10a6517 880348d55800
  Mar  1 19:34:04 xps kernel: [ 5497.617536]  88029858fdd0 c1854232 
880348d55800 88029858fdf8
  Mar  1 19:34:04 xps kernel: [ 5497.617538]  c182d3e0 8800a1c7ce40 
880348d55000 880348d55008
  Mar  1 19:34:04 xps kernel: [ 5497.617548] Call Trace:
  Mar  1 19:34:04 xps kernel: [ 5497.617552]  [] 
__fscache_relinquish_cookie+0x87/0x120 [fscache]
  Mar  1 19:34:04 xps kernel: [ 5497.617572]  [] 
cifs_fscache_release_super_cookie+0x32/0x90 [cifs]
  Mar  1 19:34:04 xps kernel: [ 5497.617580]  [] 
cifs_put_tcon+0x100/0x180 [cifs]
  Ma