** Description changed: + SRU Justification: + Impact: When using VMs with many CPUs on kvm, the module is loaded per CPU which can cause allocation failures. + + Fix: 8d8022e8aba85192e937f1f0f7450e256d66ae5c solves the issue which is + present in 3.8 series and beyond. + + Testcase: Boot a VM with many CPUs, reboot and check if issue occurs. + + -- + The kernel tries to load the KVM module for each CPU even though it really only needs to be loaded once. For each subsequent load, the kernel is trying to allocate the per-cpu area before it checks if the module is loaded already. This can result in the following backtrace: [ 8.294573] PERCPU: allocation failed, size=304 align=32, alloc from reserved chunk failed [ 8.294578] Pid: 1490, comm: modprobe Not tainted 3.5.0-20-generic #31-Ubuntu [ 8.294579] Call Trace: [ 8.294597] [<ffffffff81143924>] pcpu_alloc+0x974/0x9d0 [ 8.294604] [<ffffffff810b185a>] ? each_symbol_section+0x2a/0x70 [ 8.294607] [<ffffffff810b18d1>] ? find_symbol+0x31/0x70 [ 8.294610] [<ffffffff81143c43>] __alloc_reserved_percpu+0x13/0x20 [ 8.294613] [<ffffffff810b413a>] layout_and_allocate+0x2fa/0xaf0 [ 8.294615] [<ffffffff810b4a29>] load_module+0xf9/0x1170 [ 8.294630] [<ffffffff810b5af2>] sys_init_module+0x52/0x230 [ 8.294640] [<ffffffff8168b969>] system_call_fastpath+0x16/0x1b [ 8.294642] kvm: Could not allocate 304 bytes percpu data Reproduced with kernel from quantal-release and quantal-proposed I found this reference on LKML: https://lkml.org/lkml/2012/10/11/198 The following patch solves the issue: 8d8022e8aba85192e937f1f0f7450e256d66ae5c This is in 3.8/3.11 https://lkml.org/lkml/2013/7/11/545 - ProblemType: Bug DistroRelease: Ubuntu 12.10 Package: linux-image-3.5.0-20-generic 3.5.0-20.31 ProcVersionSignature: Ubuntu 3.5.0-20.31-generic 3.5.7.1 Uname: Linux 3.5.0-20-generic x86_64 AlsaDevices: total 0 crw-rw---T 1 root audio 116, 1 Dec 10 10:54 seq crw-rw---T 1 root audio 116, 33 Dec 10 10:54 timer AplayDevices: Error: [Errno 2] No such file or directory: 'aplay' ApportVersion: 2.6.1-0ubuntu6 Architecture: amd64 ArecordDevices: Error: [Errno 2] No such file or directory: 'arecord' AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1: CRDA: Error: [Errno 2] No such file or directory: 'iw' Date: Mon Dec 10 11:03:33 2012 HibernationDevice: RESUME=UUID=c595dd75-dab5-4fcd-a089-302addcaef96 IwConfig: Error: [Errno 2] No such file or directory: 'iwconfig' MachineType: Intel Corporation LH Pass MarkForUpload: True PciMultimedia: ProcEnviron: LANGUAGE=en_US: TERM=screen-bce PATH=(custom, no user) LANG=en_US.UTF-8 SHELL=/bin/bash ProcFB: 0 VESA VGA ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.5.0-20-generic root=UUID=58f9a800-2e0c-4da5-9d94-c4bb4bed4fa2 ro quiet RelatedPackageVersions: linux-restricted-modules-3.5.0-20-generic N/A linux-backports-modules-3.5.0-20-generic N/A linux-firmware 1.95 RfKill: Error: [Errno 2] No such file or directory: 'rfkill' SourcePackage: linux UpgradeStatus: No upgrade log present (probably fresh install) dmi.bios.date: 04/30/2012 dmi.bios.vendor: Intel Corp. dmi.bios.version: SE5C600.86B.99.99.2050.043020121425 dmi.board.asset.tag: .................... dmi.board.name: S4600LH.... dmi.board.vendor: Intel Corporation dmi.board.version: .......... dmi.chassis.asset.tag: .................... dmi.chassis.type: 23 dmi.chassis.vendor: ............................... dmi.chassis.version: .................. dmi.modalias: dmi:bvnIntelCorp.:bvrSE5C600.86B.99.99.2050.043020121425:bd04/30/2012:svnIntelCorporation:pnLHPass:pvr....................:rvnIntelCorporation:rnS4600LH....:rvr..........:cvn...............................:ct23:cvr..................: dmi.product.name: LH Pass dmi.product.version: .................... dmi.sys.vendor: Intel Corporation
-- 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/1088433 Title: PERCPU: allocation failed when loading module kvm Status in “linux” package in Ubuntu: Fix Released Status in “linux” source package in Quantal: In Progress Status in “linux” source package in Raring: Fix Released Bug description: SRU Justification: Impact: When using VMs with many CPUs on kvm, the module is loaded per CPU which can cause allocation failures. Fix: 8d8022e8aba85192e937f1f0f7450e256d66ae5c solves the issue which is present in 3.8 series and beyond. Testcase: Boot a VM with many CPUs, reboot and check if issue occurs. -- The kernel tries to load the KVM module for each CPU even though it really only needs to be loaded once. For each subsequent load, the kernel is trying to allocate the per-cpu area before it checks if the module is loaded already. This can result in the following backtrace: [ 8.294573] PERCPU: allocation failed, size=304 align=32, alloc from reserved chunk failed [ 8.294578] Pid: 1490, comm: modprobe Not tainted 3.5.0-20-generic #31-Ubuntu [ 8.294579] Call Trace: [ 8.294597] [<ffffffff81143924>] pcpu_alloc+0x974/0x9d0 [ 8.294604] [<ffffffff810b185a>] ? each_symbol_section+0x2a/0x70 [ 8.294607] [<ffffffff810b18d1>] ? find_symbol+0x31/0x70 [ 8.294610] [<ffffffff81143c43>] __alloc_reserved_percpu+0x13/0x20 [ 8.294613] [<ffffffff810b413a>] layout_and_allocate+0x2fa/0xaf0 [ 8.294615] [<ffffffff810b4a29>] load_module+0xf9/0x1170 [ 8.294630] [<ffffffff810b5af2>] sys_init_module+0x52/0x230 [ 8.294640] [<ffffffff8168b969>] system_call_fastpath+0x16/0x1b [ 8.294642] kvm: Could not allocate 304 bytes percpu data Reproduced with kernel from quantal-release and quantal-proposed I found this reference on LKML: https://lkml.org/lkml/2012/10/11/198 The following patch solves the issue: 8d8022e8aba85192e937f1f0f7450e256d66ae5c This is in 3.8/3.11 https://lkml.org/lkml/2013/7/11/545 - ProblemType: Bug DistroRelease: Ubuntu 12.10 Package: linux-image-3.5.0-20-generic 3.5.0-20.31 ProcVersionSignature: Ubuntu 3.5.0-20.31-generic 3.5.7.1 Uname: Linux 3.5.0-20-generic x86_64 AlsaDevices: total 0 crw-rw---T 1 root audio 116, 1 Dec 10 10:54 seq crw-rw---T 1 root audio 116, 33 Dec 10 10:54 timer AplayDevices: Error: [Errno 2] No such file or directory: 'aplay' ApportVersion: 2.6.1-0ubuntu6 Architecture: amd64 ArecordDevices: Error: [Errno 2] No such file or directory: 'arecord' AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1: CRDA: Error: [Errno 2] No such file or directory: 'iw' Date: Mon Dec 10 11:03:33 2012 HibernationDevice: RESUME=UUID=c595dd75-dab5-4fcd-a089-302addcaef96 IwConfig: Error: [Errno 2] No such file or directory: 'iwconfig' MachineType: Intel Corporation LH Pass MarkForUpload: True PciMultimedia: ProcEnviron: LANGUAGE=en_US: TERM=screen-bce PATH=(custom, no user) LANG=en_US.UTF-8 SHELL=/bin/bash ProcFB: 0 VESA VGA ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.5.0-20-generic root=UUID=58f9a800-2e0c-4da5-9d94-c4bb4bed4fa2 ro quiet RelatedPackageVersions: linux-restricted-modules-3.5.0-20-generic N/A linux-backports-modules-3.5.0-20-generic N/A linux-firmware 1.95 RfKill: Error: [Errno 2] No such file or directory: 'rfkill' SourcePackage: linux UpgradeStatus: No upgrade log present (probably fresh install) dmi.bios.date: 04/30/2012 dmi.bios.vendor: Intel Corp. dmi.bios.version: SE5C600.86B.99.99.2050.043020121425 dmi.board.asset.tag: .................... dmi.board.name: S4600LH.... dmi.board.vendor: Intel Corporation dmi.board.version: .......... dmi.chassis.asset.tag: .................... dmi.chassis.type: 23 dmi.chassis.vendor: ............................... dmi.chassis.version: .................. dmi.modalias: dmi:bvnIntelCorp.:bvrSE5C600.86B.99.99.2050.043020121425:bd04/30/2012:svnIntelCorporation:pnLHPass:pvr....................:rvnIntelCorporation:rnS4600LH....:rvr..........:cvn...............................:ct23:cvr..................: dmi.product.name: LH Pass dmi.product.version: .................... dmi.sys.vendor: Intel Corporation To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1088433/+subscriptions -- Mailing list: https://launchpad.net/~kernel-packages Post to : kernel-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp