[Touch-packages] [Bug 1496163] Re: i915 firmware is not copied to initrd
Yep, that's good. Thanks! ** Tags added: verification-done ** Tags removed: verification-needed -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to initramfs-tools in Ubuntu. https://bugs.launchpad.net/bugs/1496163 Title: i915 firmware is not copied to initrd Status in initramfs-tools package in Ubuntu: Fix Released Status in initramfs-tools source package in Trusty: Fix Committed Status in initramfs-tools source package in Vivid: Won't Fix Status in initramfs-tools source package in Wily: Fix Released Bug description: [ Impact ] On Skylake, skl_dmc firmware is not incorporated into the initramfs. This is because it is a symlink to a versioned blob and the initramfs- tools hook does not dereference symlinks. As the driver is actually loaded from the initramfs, the firmware is missing for the lifetime of the boot, which means that the GPU cannot enter its lowest available power states plus some hotplugging scenarios are broken. This all manifests itself as such in dmesg: [0.728803] i915 :00:02.0: Direct firmware load for i915/skl_dmc_ver1.bin failed with error -2 [0.728817] [drm:i915_firmware_load_error_print [i915]] *ERROR* failed to load firmware i915/skl_dmc_ver1.bin (0) [ Test Case ] After the fix has been applied and the initrd regenerates, the firmware should load successfully after a reboot. [ Regression Potential ] Unlikely, as the fix is part of Ubuntu since Wily. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/1496163/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1500751] Re: Cryptsetup Keyboard not working on Xubuntu 3.19.0-30
Any idea when this will be released to Trusty? -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to initramfs-tools in Ubuntu. https://bugs.launchpad.net/bugs/1500751 Title: Cryptsetup Keyboard not working on Xubuntu 3.19.0-30 Status in cryptsetup package in Ubuntu: Invalid Status in initramfs-tools package in Ubuntu: Fix Released Status in cryptsetup source package in Trusty: Invalid Status in initramfs-tools source package in Trusty: Fix Committed Status in cryptsetup source package in Vivid: Invalid Status in initramfs-tools source package in Vivid: Won't Fix Bug description: I am running Xubuntu 15.04 and just upgraded to the latest kernel (3.19.0-30). After upgrading the boot time is longer (what is negligible) but the more severe error is, that I cannot enter my passphrase when I see the crypt dialog. I just see the dialog to enter my passphrase, but when I try to enter it, nothing appears in the textfield. I tried with the builtin laptop keyboard but also with an external USB keyboard. I thought about supplying more information, but things like the syslog are not helping apparently (I was not able to boot until the syslog would capture information...). If you need anything I can provide, I gladly help. [Test case] 1. On an affected system boot into kernel 3.19.0-30 [Solution] The "solution" for now is booting the older Kernel 3.19.0-28 (which isn't a real solution). PS.: Bugs like the following are either not applicable or the solution is not working for me: https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/229732 https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1359689 https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/1238194 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cryptsetup/+bug/1500751/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1500751] Re: Cryptsetup Keyboard not working on Xubuntu 3.19.0-30
i915 drivers are now in the initramfs, as required. ** Tags added: verification-done -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to initramfs-tools in Ubuntu. https://bugs.launchpad.net/bugs/1500751 Title: Cryptsetup Keyboard not working on Xubuntu 3.19.0-30 Status in cryptsetup package in Ubuntu: Invalid Status in initramfs-tools package in Ubuntu: Fix Released Status in cryptsetup source package in Trusty: Invalid Status in initramfs-tools source package in Trusty: Fix Committed Status in cryptsetup source package in Vivid: Invalid Status in initramfs-tools source package in Vivid: Won't Fix Bug description: I am running Xubuntu 15.04 and just upgraded to the latest kernel (3.19.0-30). After upgrading the boot time is longer (what is negligible) but the more severe error is, that I cannot enter my passphrase when I see the crypt dialog. I just see the dialog to enter my passphrase, but when I try to enter it, nothing appears in the textfield. I tried with the builtin laptop keyboard but also with an external USB keyboard. I thought about supplying more information, but things like the syslog are not helping apparently (I was not able to boot until the syslog would capture information...). If you need anything I can provide, I gladly help. [Test case] 1. On an affected system boot into kernel 3.19.0-30 [Solution] The "solution" for now is booting the older Kernel 3.19.0-28 (which isn't a real solution). PS.: Bugs like the following are either not applicable or the solution is not working for me: https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/229732 https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1359689 https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/1238194 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cryptsetup/+bug/1500751/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1642704] Re: initramfs-tools on Trusty doesn't handle symlinks in newer linux-firmware packages correctly
*** This bug is a duplicate of bug 1496163 *** https://bugs.launchpad.net/bugs/1496163 This duplicate mark is true, but that bug isn't gaining much traction. We really need this fixed. -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to initramfs-tools in Ubuntu. https://bugs.launchpad.net/bugs/1642704 Title: initramfs-tools on Trusty doesn't handle symlinks in newer linux- firmware packages correctly Status in initramfs-tools package in Ubuntu: Confirmed Bug description: $ update-initramfs -k 4.4.0-47-generic -c update-initramfs: Generating /boot/initrd.img-4.4.0-47-generic $ sudo cat /boot/initrd.img-4.4.0-47-generic |unxz |cpio -i --no-absolute-filenames 185780 blocks $ ls lib/firmware/i915/ $ ls /lib/firmware/i915/ bxt_dmc_ver1_04.bin bxt_dmc_ver1.bin@skl_dmc_ver1.bin@ skl_guc_ver4_3.bin bxt_dmc_ver1_05.bin skl_dmc_ver1_23.bin skl_guc_ver1_1059.bin skl_guc_ver4.bin@ bxt_dmc_ver1_06.bin skl_dmc_ver1_26.bin skl_guc_ver1.bin@ $ To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/1642704/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1642707] Re: initramfs-tools on Trusty doesn't include i915_bpo.ko
*** This bug is a duplicate of bug 1500751 *** https://bugs.launchpad.net/bugs/1500751 Checked, and this is fixed in the version in -proposed- from that bug. -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to initramfs-tools in Ubuntu. https://bugs.launchpad.net/bugs/1642707 Title: initramfs-tools on Trusty doesn't include i915_bpo.ko Status in initramfs-tools package in Ubuntu: Fix Released Status in initramfs-tools source package in Trusty: New Bug description: initramfs-tools on Trusty doesn't include i915_bpo.ko, causing problems on Skylake To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/1642707/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1642707] Re: initramfs-tools on Trusty doesn't include i915_bpo.ko
*** This bug is a duplicate of bug 1500751 *** https://bugs.launchpad.net/bugs/1500751 Trusty is the one I care about, not Zesty. What does a "test case" mean in detail? Happy to help, I just want to know exactly what I need to do. -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to initramfs-tools in Ubuntu. https://bugs.launchpad.net/bugs/1642707 Title: initramfs-tools on Trusty doesn't include i915_bpo.ko Status in initramfs-tools package in Ubuntu: Fix Released Status in initramfs-tools source package in Trusty: New Bug description: initramfs-tools on Trusty doesn't include i915_bpo.ko, causing problems on Skylake To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/1642707/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1496163] Re: i915 firmware is not copied to initrd
Hi guys, This is still biting us. Can we please have this fixed? See LP #1642704 for details. The fix is one character. Justin -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to initramfs-tools in Ubuntu. https://bugs.launchpad.net/bugs/1496163 Title: i915 firmware is not copied to initrd Status in Skylinux: Invalid Status in initramfs-tools package in Ubuntu: Fix Released Status in initramfs-tools source package in Trusty: In Progress Status in initramfs-tools source package in Vivid: In Progress Status in initramfs-tools source package in Wily: Fix Released Bug description: On Skylake, the skl_dmc firmware is failing to load. From dmesg: [0.728803] i915 :00:02.0: Direct firmware load for i915/skl_dmc_ver1.bin failed with error -2 [0.728817] [drm:i915_firmware_load_error_print [i915]] *ERROR* failed to load firmware i915/skl_dmc_ver1.bin (0) This means the GPU can't enter its lowest available power states, plus many display hotplugging scenarios (that only the skl_dmc firmware can handle) are broken. On a whim I tried some other firmware versions: 1) pointed the skl_dmc_ver1.bin symlink to skl_dmc_ver1_18.bin (instead of skl_dmc_ver1_19.bin) 2) downloaded the latest (skl_dmc_ver1_21.bin) and pointed the skl_dmc_ver1.bin symlink to it But neither corrected the situation. Thanks! ProblemType: Bug DistroRelease: Ubuntu 15.10 Package: linux-image-4.2.0-10-generic 4.2.0-10.11 ProcVersionSignature: Ubuntu 4.2.0-10.11-generic 4.2.0 Uname: Linux 4.2.0-10-generic x86_64 ApportVersion: 2.18.1-0ubuntu1 Architecture: amd64 AudioDevicesInUse: USERPID ACCESS COMMAND /dev/snd/controlC0: oem1251 F pulseaudio CurrentDesktop: Unity Date: Tue Sep 15 16:21:24 2015 HibernationDevice: RESUME=UUID=637df075-0afa-420f-a3ca-342be8bf297f IwConfig: enp4s0no wireless extensions. lono wireless extensions. Lsusb: Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 003: ID 04f2:0833 Chicony Electronics Co., Ltd Bus 001 Device 002: ID 046d:c05a Logitech, Inc. M90/M100 Optical Mouse Bus 001 Device 004: ID 058f:6364 Alcor Micro Corp. AU6477 Card Reader Controller Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub MachineType: System manufacturer System Product Name ProcFB: 0 inteldrmfb ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.2.0-10-generic root=UUID=f967534a-9cc3-4d1a-a7f3-72d28959e3c6 ro i915.verbose_state_checks=1 quiet splash vt.handoff=7 RelatedPackageVersions: linux-restricted-modules-4.2.0-10-generic N/A linux-backports-modules-4.2.0-10-generic N/A linux-firmware1.147 RfKill: SourcePackage: linux UdevLog: Error: [Errno 2] No such file or directory: '/var/log/udev' UpgradeStatus: No upgrade log present (probably fresh install) dmi.bios.date: 08/19/2015 dmi.bios.vendor: American Megatrends Inc. dmi.bios.version: 0403 dmi.board.asset.tag: Default string dmi.board.name: Z170-P D3 dmi.board.vendor: ASUSTeK COMPUTER INC. dmi.board.version: Rev X.0x dmi.chassis.asset.tag: Default string dmi.chassis.type: 3 dmi.chassis.vendor: Default string dmi.chassis.version: Default string dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr0403:bd08/19/2015:svnSystemmanufacturer:pnSystemProductName:pvrSystemVersion:rvnASUSTeKCOMPUTERINC.:rnZ170-PD3:rvrRevX.0x:cvnDefaultstring:ct3:cvrDefaultstring: dmi.product.name: System Product Name dmi.product.version: System Version dmi.sys.vendor: System manufacturer To manage notifications about this bug go to: https://bugs.launchpad.net/linux/+bug/1496163/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1447756] Re: [SRU] segfault in log.c code causes phone reboot loops
Not really. The bug is hugely intermittent as it stands. However, I can confirm we're experiencing this on our fleet. -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to upstart in Ubuntu. https://bugs.launchpad.net/bugs/1447756 Title: [SRU] segfault in log.c code causes phone reboot loops Status in Canonical System Image: Fix Released Status in upstart : Fix Committed Status in upstart package in Ubuntu: Fix Released Status in upstart source package in Utopic: Won't Fix Status in upstart source package in Vivid: Won't Fix Status in upstart source package in Wily: Fix Released Status in upstart package in Ubuntu RTM: Fix Released Bug description: = Summary = The version of Upstart in vivid is affected by a coule of bugs relating to the flushing data from early-boot jobs to disk which can both result in a crash: == Problem 1 == An internal list is mishandled meaning a crash could occur randomly. == Problem 2 == Jobs which spawn processes in the background then themselves exit can cause a crash due. = Explanation of how Upstart flushes early job output = If an Upstart job starts *and ends* early in the boot sequence (before the log partition is mounted and writable) and produces output to its stdout/stderr, Upstart will cache the output for later flushing by adding the 'Log' object associated with the 'Job' to a list. When the log partition is mounted writable, the /etc/init/flush-early-job-log.conf job is run which calls "initctl notify-disk-writeable". This is a signal to Upstart to flush its cache of early-boot job output which takes the form of iterating the 'log_unflushed_files' list and flushing all the 'Log' entries to disk. = Code Specifics = There are 2 issues (note that the numbers used below match those used in the Summary). == Problem 1 detail == Due to a bug in the way the 'log_unflushed_files' list is handled (the 'Log' cannot be added to the list directly, so is added via an intermediary ('NihListElem') node), a crash can result when iterating the list since the 'Log' is freed, but NOT the intermediary node. The implication is that it is possible for the intermediary node to be attempt to dereference already-freed data, resulting in a crash. == Problem 2 detail == If a job spawns a process in the background, then itself exits, that jobs 'Log' entry will be added to the 'log_unflushed_files' list. But, if the background process produces output and then exits before Upstart attempts to flush the original jobs data to disk, the 'NihIo' corresponding to the log will be serviced automatically and the data flushed to disk. The problem comes when Upstart receives the notification to flush the 'log_unflushed_files' list, since that list now contains an entry which has already been freed (since all its data has already been flushed). The result is an assertion failure. = Fix = == Problem 1 fix == Correct the 'log_unflushed_files' list handling by freeing the 'NihListElem' (which will automatically free the 'Log' object), not by simply freeing the 'Log' object itself. * Branch: lp:~jamesodhunt/ubuntu/vivid/upstart/bug-1447756/ * New Upstart test added to avoid regression?: Yes. == Problem 2 fix == Correct the assumption that the only entries in the 'log_unflushed_files' list will always have data to flush by checking if there is in fact any data to flush; if not, remove the entry from the 'log_unflushed_files' list since it has already been handled automatically by the 'NihIo'. * Branch: lp:~jamesodhunt/upstart/bug-1447756-the-actual-fix * New Upstart test added to avoid regression?: Yes. = Workarounds = If a system is affected by this bug, it will be manifested by a crash early in the boot sequence. To overcome the issue, either: a) Boot by adding "--no-log" to the kernel command-line. b) Disable the flush-early-job-log job (assuming the machine is bootable) by running the following: $ echo manual | sudo tee -a /etc/init/flush-early-job-log.override = Impact = The issue has been present in Upstart since logging was introduced but no known instances of crashes relating to these problems have been reported prior to this bug being reported (which relates the the issue being seen on a very small subset of specific Ubuntu Touch phone hardware where Upstart is used as the system init daemon). Note that vivid still uses Upstart for managing the graphical session, but now uses systemd by default for the system init daemon. Since the session (Upstart) init does not even require a flush-early-job-log, the exposure to both the bug and the updated fix codepath is extremely limited. = Test Case = This bug is extremely hard to surface so the approach is simply to check that the internal list can be iterated correctly by: 1) Booting the system
[Touch-packages] [Bug 1642704] [NEW] initramfs-tools on Trusty doesn't handle symlinks in newer linux-firmware packages correctly
Public bug reported: $ update-initramfs -k 4.4.0-47-generic -c update-initramfs: Generating /boot/initrd.img-4.4.0-47-generic $ sudo cat /boot/initrd.img-4.4.0-47-generic |unxz |cpio -i --no-absolute-filenames 185780 blocks $ ls lib/firmware/i915/ $ ls /lib/firmware/i915/ bxt_dmc_ver1_04.bin bxt_dmc_ver1.bin@skl_dmc_ver1.bin@ skl_guc_ver4_3.bin bxt_dmc_ver1_05.bin skl_dmc_ver1_23.bin skl_guc_ver1_1059.bin skl_guc_ver4.bin@ bxt_dmc_ver1_06.bin skl_dmc_ver1_26.bin skl_guc_ver1.bin@ $ ** Affects: initramfs-tools (Ubuntu) Importance: Undecided Status: Confirmed ** Tags: trusty -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to initramfs-tools in Ubuntu. https://bugs.launchpad.net/bugs/1642704 Title: initramfs-tools on Trusty doesn't handle symlinks in newer linux- firmware packages correctly Status in initramfs-tools package in Ubuntu: Confirmed Bug description: $ update-initramfs -k 4.4.0-47-generic -c update-initramfs: Generating /boot/initrd.img-4.4.0-47-generic $ sudo cat /boot/initrd.img-4.4.0-47-generic |unxz |cpio -i --no-absolute-filenames 185780 blocks $ ls lib/firmware/i915/ $ ls /lib/firmware/i915/ bxt_dmc_ver1_04.bin bxt_dmc_ver1.bin@skl_dmc_ver1.bin@ skl_guc_ver4_3.bin bxt_dmc_ver1_05.bin skl_dmc_ver1_23.bin skl_guc_ver1_1059.bin skl_guc_ver4.bin@ bxt_dmc_ver1_06.bin skl_dmc_ver1_26.bin skl_guc_ver1.bin@ $ To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/1642704/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1642707] Re: initramfs-tools on Trusty doesn't include i915_bpo.ko
Bug is on hooks/framebuffer: add a line "copy_modules_dir kernel/ubuntu/i915" -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to initramfs-tools in Ubuntu. https://bugs.launchpad.net/bugs/1642707 Title: initramfs-tools on Trusty doesn't include i915_bpo.ko Status in initramfs-tools package in Ubuntu: Confirmed Bug description: initramfs-tools on Trusty doesn't include i915_bpo.ko, causing problems on Skylake To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/1642707/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1642707] [NEW] initramfs-tools on Trusty doesn't include i915_bpo.ko
Public bug reported: initramfs-tools on Trusty doesn't include i915_bpo.ko, causing problems on Skylake ** Affects: initramfs-tools (Ubuntu) Importance: Undecided Status: Confirmed ** Tags: trusty ** Tags added: trusty -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to initramfs-tools in Ubuntu. https://bugs.launchpad.net/bugs/1642707 Title: initramfs-tools on Trusty doesn't include i915_bpo.ko Status in initramfs-tools package in Ubuntu: Confirmed Bug description: initramfs-tools on Trusty doesn't include i915_bpo.ko, causing problems on Skylake To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/1642707/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1447756] Re: [SRU] segfault in log.c code causes phone reboot loops
Yep, this is definitely affecting Trusty as well. Is there any chance the fix will be backported? -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to upstart in Ubuntu. https://bugs.launchpad.net/bugs/1447756 Title: [SRU] segfault in log.c code causes phone reboot loops Status in Canonical System Image: Fix Released Status in upstart : Fix Committed Status in upstart package in Ubuntu: Fix Released Status in upstart source package in Utopic: Won't Fix Status in upstart source package in Vivid: Won't Fix Status in upstart source package in Wily: Fix Released Status in upstart package in Ubuntu RTM: Fix Released Bug description: = Summary = The version of Upstart in vivid is affected by a coule of bugs relating to the flushing data from early-boot jobs to disk which can both result in a crash: == Problem 1 == An internal list is mishandled meaning a crash could occur randomly. == Problem 2 == Jobs which spawn processes in the background then themselves exit can cause a crash due. = Explanation of how Upstart flushes early job output = If an Upstart job starts *and ends* early in the boot sequence (before the log partition is mounted and writable) and produces output to its stdout/stderr, Upstart will cache the output for later flushing by adding the 'Log' object associated with the 'Job' to a list. When the log partition is mounted writable, the /etc/init/flush-early-job-log.conf job is run which calls "initctl notify-disk-writeable". This is a signal to Upstart to flush its cache of early-boot job output which takes the form of iterating the 'log_unflushed_files' list and flushing all the 'Log' entries to disk. = Code Specifics = There are 2 issues (note that the numbers used below match those used in the Summary). == Problem 1 detail == Due to a bug in the way the 'log_unflushed_files' list is handled (the 'Log' cannot be added to the list directly, so is added via an intermediary ('NihListElem') node), a crash can result when iterating the list since the 'Log' is freed, but NOT the intermediary node. The implication is that it is possible for the intermediary node to be attempt to dereference already-freed data, resulting in a crash. == Problem 2 detail == If a job spawns a process in the background, then itself exits, that jobs 'Log' entry will be added to the 'log_unflushed_files' list. But, if the background process produces output and then exits before Upstart attempts to flush the original jobs data to disk, the 'NihIo' corresponding to the log will be serviced automatically and the data flushed to disk. The problem comes when Upstart receives the notification to flush the 'log_unflushed_files' list, since that list now contains an entry which has already been freed (since all its data has already been flushed). The result is an assertion failure. = Fix = == Problem 1 fix == Correct the 'log_unflushed_files' list handling by freeing the 'NihListElem' (which will automatically free the 'Log' object), not by simply freeing the 'Log' object itself. * Branch: lp:~jamesodhunt/ubuntu/vivid/upstart/bug-1447756/ * New Upstart test added to avoid regression?: Yes. == Problem 2 fix == Correct the assumption that the only entries in the 'log_unflushed_files' list will always have data to flush by checking if there is in fact any data to flush; if not, remove the entry from the 'log_unflushed_files' list since it has already been handled automatically by the 'NihIo'. * Branch: lp:~jamesodhunt/upstart/bug-1447756-the-actual-fix * New Upstart test added to avoid regression?: Yes. = Workarounds = If a system is affected by this bug, it will be manifested by a crash early in the boot sequence. To overcome the issue, either: a) Boot by adding "--no-log" to the kernel command-line. b) Disable the flush-early-job-log job (assuming the machine is bootable) by running the following: $ echo manual | sudo tee -a /etc/init/flush-early-job-log.override = Impact = The issue has been present in Upstart since logging was introduced but no known instances of crashes relating to these problems have been reported prior to this bug being reported (which relates the the issue being seen on a very small subset of specific Ubuntu Touch phone hardware where Upstart is used as the system init daemon). Note that vivid still uses Upstart for managing the graphical session, but now uses systemd by default for the system init daemon. Since the session (Upstart) init does not even require a flush-early-job-log, the exposure to both the bug and the updated fix codepath is extremely limited. = Test Case = This bug is extremely hard to surface so the approach is simply to check that the internal list can be iterated correctly by: 1) Booting the system with upstart (se