← Back to team overview

desktop-packages team mailing list archive

[Bug 1398859] Re: unmounting NTFS causes mount.ntfs process to get stuck in eternal kernel deep sleep

 

strace of udevd while it's hanging:

10134 open("/dev/sda", O_RDONLY|O_NONBLOCK|O_NOFOLLOW|O_CLOEXEC) = 11
10134 flock(11, LOCK_EX|LOCK_NB)        = 0
10134 ioctl(11, BLKRRPART, 0

Corresponding kernel trace:

[  720.228114] INFO: task systemd-udevd:10134 blocked for more than 120 seconds.
[  720.230656]       Not tainted 3.16.0-28-generic #38-Ubuntu
[  720.232666] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  720.236283] systemd-udevd   D ffff88007fc13840     0 10134      1 0x00000007
[  720.236293]  ffff88007b76fcd0 0000000000000086 ffff880037641e90 0000000000013840
[  720.236298]  ffff88007b76ffd8 0000000000013840 ffff880037641e90 ffff880037641e90
[  720.236302]  ffff8800371c5068 ffff8800371c5080 ffff88007be723c0 0000000000000000
[  720.236306] Call Trace:
[  720.236320]  [<ffffffff81785049>] schedule+0x29/0x70
[  720.236326]  [<ffffffff817888b5>] rwsem_down_read_failed+0xf5/0x190
[  720.236334]  [<ffffffff811fc743>] ? find_inode+0xa3/0xb0
[  720.236341]  [<ffffffff813a9284>] call_rwsem_down_read_failed+0x14/0x30
[  720.236346]  [<ffffffff817881e0>] ? down_read+0x20/0x30
[  720.236351]  [<ffffffff811e3db7>] get_super+0x97/0xe0
[  720.236357]  [<ffffffff812197a4>] fsync_bdev+0x14/0x60
[  720.236363]  [<ffffffff8137b604>] invalidate_partition+0x24/0x50
[  720.236369]  [<ffffffff8137e3cb>] drop_partitions.isra.12+0x1b/0x40
[  720.236373]  [<ffffffff8137e88e>] rescan_partitions+0x3e/0x2a0
[  720.236377]  [<ffffffff8137a4dc>] blkdev_ioctl+0x71c/0x7c0
[  720.236382]  [<ffffffff81218e3d>] block_ioctl+0x3d/0x50
[  720.236386]  [<ffffffff811f5138>] do_vfs_ioctl+0x2c8/0x4a0
[  720.236393]  [<ffffffff81082f30>] ? ptrace_notify+0x60/0x110
[  720.236397]  [<ffffffff811f5391>] SyS_ioctl+0x81/0xa0
[  720.236402]  [<ffffffff8178a0ff>] tracesys+0xe1/0xe6

** Attachment added: "udevd trace for umount"
   https://bugs.launchpad.net/ubuntu/+source/udisks2/+bug/1398859/+attachment/4291284/+files/udevd.trace

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

Title:
  unmounting NTFS causes mount.ntfs process to get stuck in eternal
  kernel deep sleep

Status in udisks2 package in Ubuntu:
  In Progress

Bug description:
  Since Mid-November the udisks2 test (https://jenkins.qa.ubuntu.com/job
  /vivid-adt-udisks2/? shows it happened between Nov 13 and 19) exhibits
  a regression with NTFS: Unmounting causes the ntfs-3g process to go
  into kernel deep sleep and umount hangs forever.

  This can be reproduced with

    sudo apt install ntfs-3g
    sudo modprobe scsi_debug
    # check dmesg which drive this created; e. g. /dev/sda
    sudo mkntfs -F /dev/sda
    sudo mount /dev/sda /mnt

  Now you have a process which is happy:
  root     12821  0.0  0.0  15272  1948 ?        Ss   15:49   0:00 /sbin/mount.ntfs /dev/sda /mnt -o rw

  You can work with /mnt, edit files, etc. But now unmount:

    sudo umount /mnt

  This never returns, and  the process goes into uninterruptible kernel
  sleep ("D"):

  root     12928  0.0  0.0  15272  1948 ?        Ds   15:55   0:00
  /sbin/mount.ntfs /dev/sda /mnt -o rw

  The strace for the umount until the hang is

  ubuntu@autopkgtest:~$ sudo strace -vvtts1024 -p 12928
  Process 12928 attached
  15:56:17.938299 read(4, "0\0\0\0\2\0\0\0\2\0\0\0\0\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\0\0\0\0", 135168) = 48
  15:56:22.338931 read(4, "(\0\0\0&\0\0\0\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 135168) = 40
  15:56:22.339637 sendto(5, "<29>Dec  3 15:56:22 ntfs-3g[12928]: Unmounting /dev/sda ()\n", 59, MSG_NOSIGNAL, NULL, 0) = 59
  15:56:22.340509 fsync(3)                = 0
  15:56:22.341188 fcntl(3, F_SETLK, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0}) = 0
  15:56:22.341759 close(3

  ProblemType: Bug
  DistroRelease: Ubuntu 15.04
  Package: ntfs-3g 1:2013.1.13AR.1-2ubuntu3
  ProcVersionSignature: Ubuntu 3.16.0-25.33-generic 3.16.7
  Uname: Linux 3.16.0-25-generic x86_64
  ApportVersion: 2.15-0ubuntu1
  Architecture: amd64
  CurrentDesktop: Unity
  Date: Wed Dec  3 15:48:12 2014
  EcryptfsInUse: Yes
  InstallationDate: Installed on 2014-11-20 (13 days ago)
  InstallationMedia: Ubuntu 15.04 "Vivid Vervet" - Alpha amd64 (20141119)
  SourcePackage: ntfs-3g
  UpgradeStatus: No upgrade log present (probably fresh install)

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