Merge branch 'bugfix/git-https' into experimental
[tails-test.git] / wiki / src / bugs / sdmem_on_eject_broken_for_CD.mdwn
blob3ab6885d0b052b041aba0eaff353df37c0be7fbc
1 In Tails 0.8-rc1, sdmem on eject works when booting from USB, but has
2 no visible effect when booting from CD.
4 The problems seem to have something to to with udev not sending events
5 (e.g. the "change" uevent we wait for) until the device is unmounted.
6 The following was tested on a secondary CD-ROM drive (so not the boot
7 device which may or may not invalidate this theory):
9 1. Insert a CD in the seconday CD-ROM drive (say it's /dev/sr1) and
10 mount it.
11 2. Run: udev-watchdog <udev path for /dev/sr1> cd
12 3. Eject the CD.
13 4. Observe that the watchdog sees nothing and that the device remains
14 mounted. Trying to access the mounted filesystem will produce I/O
15 errors.
16 4. Run: umount /dev/sr1
17 5. Observe that the watchdog finally sees the "change" action.
19 Furthermore, in lack of hardware, I tested this in VirtualBox, which
20 may behave different than real hardware. So YMMV.
22 When building 0.8-rc1 with the stable kernel (2.6.32-5-486) this issue
23 does not arise, which suggests that the issue is with the linux kernel
24 and was introduced somewhere after 2.6.32. Otoh, on my up-to-date
25 wheezy system (linux 3.0.0-1-amd64, udev 172-1, etc.) I do not have
26 this issue using udev-watchdog, wich could suggest a compatibility
27 issue with some other package (we also have i386 vs amd64, of course).
28 Updating to unstable's udev (172-1) in hope of it playing better with
29 linux 3.0.0-1 from unstable did not solve the issue either, however.
31 > Indeed, linux 2.6.38-rc1 [[reworked disk event handling|http://lwn.net/Articles/423619/]]
32 > and adds block.events_dfl_poll_msecs that can be used to set the
33 > interval for polling block devices for events. This does not seem
34 > to work properly though: settings it to 1000 makes it work in
35 > VirtualBox with its virtual CD-ROM drive, but no value seems to work
36 > on the one real machine I have available with a CD-ROM drive.
38 >> This was half-workaround'd for 0.8 => the eject button now triggers
39 >> shutdown/sdmem sequence, but the CD is not ejected, which is a
40 >> regression.
42 >>> Should be fixed in d5353b5 in devel.
44 >>>> This appears to not work on all CD ROM drives. We still need a
45 >>>> proper fix.
47 Fixing process is tracked on [[todo/fix DVD eject at shutdown]].
49 [[done]]