รันโปรแกรมของ windows ที่อยู่บน fat32 ด้วย wine ทำให้เกิด process
wine-preloader ค้างที่ uninterruptible sleep state
ทำให้ kill -9 ไม่ตาย (เมื่อ process ค้างที่ status นี้, ผลที่ตามมาคือ
ทำให้ hibernate ไม่ได้)
จากการตรวจสอบพบว่ามันค้างขณะ อ่าน folder หนึ่งใน fat32
พอสั่ง ls folder นั้น, process ls ก็เข้าสู่ uninterruptible sleep
state ตามไปด้วย.
bug นี้เกิดกับ kernel ของ dapper-security
ลองกลับไปใช้ kernel ของ dapper เฉยๆ ก็ไม่เกิด process hang แบบนี้
dapper และ dapper-security ใช้ kernel version เดียวกัน, ต่างกันที่ release.
หยั่งงี้เป็นที่ patch ของ ubuntu ป่าวที่ทำให้เกิด bug นี้?
แต่ดูจากเลข release แล้ว คงไม่ใช่ ubuntu patch, เพราะเป็น debian release
linux-image-2.6.15-52-386 = 2.6.15-52.67
เฮือก - -'
ผล strace เป็นดังนี้,
$ strace -f wine /windows/t/espeak.exe
6215 execve("/usr/bin/wine", ["wine",
"/windows/Install/ethereal/ethereal-setup-0.10.6.exe"], [/* 29 vars
*/]) = 0
<-- cut -->
...
<-- cut -->
6326 stat64("/home/sysadmin/.wine/dosdevices/d:/t/KERNEL32.dll",
0x7fa6fb88) = -1 ENOENT (No such file or directory)
6326 stat64("/home/sysadmin/.wine/dosdevices/d:/t",
{st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
6326 stat64("/home/sysadmin/.wine/dosdevices/d:/t/KERNEL32.dll",
0x7fa6f8c0) = -1 ENOENT (No such file or directory)
6326 open("/home/sysadmin/.wine/dosdevices/d:/t",
O_RDONLY|O_LARGEFILE|O_DIRECTORY) = 9
6326 ioctl(9, TUNIOCGETINFO or VFAT_IOCTL_READDIR_BOTH <unfinished ...>
ค้างที่ ioctl()
สั่ง ps พบ wine-process ค้างอยู่ที่ status D (uninterruptible sleep)
เมื่อสั่ง ls folder ที่ค้าง,
$ strace ls /windows/t
<-- cut -->
...
<-- cut -->
open("/windows/t", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3
fstat64(3, {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
getdents64(3, <unfinished ...> <-- ค้างตรงนี้
process ls จะเข้าสู่ status D ด้วย เช่นเดียวกัน.
แต่ถ้าสั่ง ls /windows/t ก่อนที่ wine process จะค้างนั้น, จะสามารถ ls ได้ตามปกติ
พฤติกรรมแบบนี้ เป็นกับทุกๆ folder และ ทุกๆ โปรแกรม (native win32 .exe)
ที่อยู่บน fat32
$ dpkg -l wine
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-==============-==============-========================================= ===
ii wine 0.0.20040615-1 Windows Emulator (Binary Emulator)