* Re: BUG: soft lockup - CPU#0 stuck for 61s! [swapper:0]
@ 2011-08-13 15:33 Mark Schneider
2011-08-24 15:30 ` Konrad Rzeszutek Wilk
0 siblings, 1 reply; 4+ messages in thread
From: Mark Schneider @ 2011-08-13 15:33 UTC (permalink / raw)
To: konrad.wilk, Xen-devel
Thanks a lot for your answer Konrad.
I use xen 4.1.2* (sources from the site of Boris with patches based on
xen 4.1.1 I guess).
I have created debian packages and deployed them on the xen debian live
image (kernel 3.0.1 final with such kernel config:
http://www.it-infrastrukturen.com/fileadmin/linux/debian-live-xen/config-3.0.1)
You could easy test it on another hardware booting the image from USB
stick. I use for tests HP DL385 g7 servers with 32GB RAM and RAID5 (4 x
15k SAS drives) or RADI50 (8 x 15k SAS drives)
rsync -avP rsync://www.it-infrastrukturen.ch/ftp/xen411-wheezy-kernel3-amd64-live-gnome-binary-hybrid.iso .
dd if=./xen411-wheezy-kernel3-amd64-live-gnome-binary-hybrid.iso of=/dev/sdX bs=1M
more details at:
http://www.it-infrastrukturen.com/fileadmin/linux/debian-live-xen/README.xen-live
In live mode you can add additional packages however after reboot they
are gone.
It is possible to prepare persistent USB stick (script) to save addons
on the stick.
I use HVM domU domain for squeeze 6.0.2.1. DomU (HVM) domains for wheezy
don't have such limits.
Thank you / regars, Mark
Ps. I hope to start a new thread with this mail (no reference header inside)
Am 13.08.2011 17:15, schrieb Konrad Rzeszutek Wilk:
> On Wed, Aug 10, 2011 at 10:59:55PM +0200, Mark Schneider wrote:
>
>> Hello,
>>
>> I can't boot HVM with debian squeeze 6.0.2.1 when I use more than
>> 4VCPUs in the hvm.cfg file (s. some error messages from the console
>> are below)
>>
> Mark, what version of Xen are you using? Did you try using 4.1.1?
>
>
>> I am wondering about the following lines:
>> # ---
>> #root@xen411dom0:/etc/xen# xm console 7
>> [ 134.220058] BUG: soft lockup - CPU#0 stuck for 61s! [swapper:0]
>> [ 134.220058] Modules linked in: uhci_hcd thermal ehci_hcd ata_piix
>> xen_netfront libata xen_blkfront floppy usbcore thermal_sys nls_base
>> scsi_mod
>> [ 134.292664] CPU 0:
>> [ 134.292664] Modules linked in: uhci_hcd thermal ehci_hcd ata_piix
>> xen_netfront libata xen_blkfront floppy usbcore thermal_sys nls_base
>> scsi_mod
>> [ 134.319566] Pid: 0, comm: swapper Not tainted 2.6.32-5-amd64 #1 HVM domU
>> # ---
>>
>> Do I need some patches or special additional setting of my the squeezy HVM?
>>
>> Thank you / regards,
>> Mark
>>
>> --
>> ms@it-infrastrukturen.org
>>
>> # ---
>> root@xen411dom0:/etc/xen# xm console 7
>> [ 134.220058] BUG: soft lockup - CPU#0 stuck for 61s! [swapper:0]
>> [ 134.220058] Modules linked in: uhci_hcd thermal ehci_hcd ata_piix xen_netfront libata xen_blkfront floppy usbcore thermal_sys nls_base scsi_mod
>> [ 134.292664] CPU 0:
>> [ 134.292664] Modules linked in: uhci_hcd thermal ehci_hcd ata_piix xen_netfront libata xen_blkfront floppy usbcore thermal_sys nls_base scsi_mod
>> [ 134.319566] Pid: 0, comm: swapper Not tainted 2.6.32-5-amd64 #1 HVM domU
>> [ 134.369933] RIP: 0010:[<ffffffff8102c58c>] [<ffffffff8102c58c>] native_safe_halt+0x2/0x3
>> [ 134.369933] RSP: 0018:ffffffff8142ded0 EFLAGS: 00000246
>> [ 134.420796] RAX: ffffffff8142dfd8 RBX: ffffffff814d67d0 RCX: 0000000000000000
>> [ 134.420796] RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000001
>> [ 134.420796] RBP: ffffffff81011dce R08: 0000000000000000 R09: 0000000081528d90
>> [ 134.470673] R10: 00000000fffede31 R11: 0000000000000001 R12: ffffffff814d4dc0
>> [ 134.470673] R13: ffffffff8102cdcc R14: ffffffff8102cdcc R15: ffff88020bd80710
>> [ 134.521042] FS: 00007f6b183817a0(0000) GS:ffff880008c00000(0000) knlGS:0000000000000000
>> [ 134.521042] CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b
>> [ 134.521042] CR2: 00007f6b17c6de10 CR3: 000000020c797000 CR4: 00000000000006f0
>> [ 134.571410] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
>> [ 134.571410] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
>> [ 134.571410] Call Trace:
>> [ 134.571410] [<ffffffff81017201>] ? default_idle+0x34/0x51
>> [ 134.571410] [<ffffffff8101758d>] ? c1e_idle+0xf5/0xfb
>> [ 134.621779] [<ffffffff8100feb1>] ? cpu_idle+0xa2/0xda
>> [ 134.621779] [<ffffffff814f3140>] ? early_idt_handler+0x0/0x71
>> [ 134.621779] [<ffffffff814f3cdd>] ? start_kernel+0x3dc/0x3e8
>> [ 134.621779] [<ffffffff814f33b7>] ? x86_64_start_kernel+0xf9/0x106
>> udevd[98]: worker [107] unexpectedly returned with status 0x0100
>>
>> udevd[98]: worker [107] failed while handling '/devices/pci0000:00/0000:00:01.1'
>>
>> udevd[98]: worker [109] unexpectedly returned with status 0x0100
>>
>> udevd[98]: worker [109] failed while handling '/devices/pci0000:00/0000:00:01.2'
>>
>>
>> udevadm settle - timeout of 180 seconds reached, the event queue contains:
>> /sys/devices/vif-0 (509)
>> /sys/devices/vif-0/net/eth0 (629)
>> /sys/devices/pci0000:00/0000:00:01.1/host0 (636)
>> /sys/devices/pci0000:00/0000:00:01.1/host0/scsi_host/host0 (637)
>> /sys/devices/pci0000:00/0000:00:01.1/host1 (638)
>> /sys/devices/pci0000:00/0000:00:01.1/host1/scsi_host/host1 (639)
>> [ 199.716053] BUG: soft lockup - CPU#0 stuck for 61s! [swapper:0]
>> [ 199.716053] Modules linked in: scsi_wait_scan(+) uhci_hcd thermal ehci_hcd ata_piix xen_netfront libata xen_blkfront floppy usbcore thermal_sys nls_base scsi_mod
>> [ 199.792417] CPU 0:
>> [ 199.804323] Modules linked in: scsi_wait_scan(+) uhci_hcd thermal ehci_hcd ata_piix xen_netfront libata xen_blkfront floppy usbcore thermal_sys nls_base scsi_mod
>> [ 199.828661] Pid: 0, comm: swapper Not tainted 2.6.32-5-amd64 #1 HVM domU
>> [ 199.828661] RIP: 0010:[<ffffffff8102c58c>] [<ffffffff8102c58c>] native_safe_halt+0x2/0x3
>> [ 199.828661] RSP: 0018:ffffffff8142ded0 EFLAGS: 00000246
>> [ 199.828661] RAX: ffffffff8142dfd8 RBX: ffffffff814d67d0 RCX: 0000000000000000
>> [ 199.828661] RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000001
>> [ 199.828661] RBP: ffffffff81011dce R08: 0000000000000000 R09: 0000000081528d90
>> [ 199.828661] R10: 00000000fffede31 R11: 0000000000000001 R12: ffffffff814d4dc0
>> [ 199.828661] R13: ffffffff8102cdcc R14: ffffffff8102cdcc R15: ffff88020bd80710
>> [ 199.828661] FS: 00007f6b183817a0(0000) GS:ffff880008c00000(0000) knlGS:0000000000000000
>> [ 199.828661] CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b
>> [ 199.828661] CR2: 00007f6b17c6de10 CR3: 000000020c797000 CR4: 00000000000006f0
>> [ 199.828661] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
>> [ 199.828661] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
>> [ 199.828661] Call Trace:
>> [ 199.828661] [<ffffffff81017201>] ? default_idle+0x34/0x51
>> [ 199.828661] [<ffffffff8101758d>] ? c1e_idle+0xf5/0xfb
>> [ 199.828661] [<ffffffff8100feb1>] ? cpu_idle+0xa2/0xda
>> [ 199.828661] [<ffffffff814f3140>] ? early_idt_handler+0x0/0x71
>> [ 199.828661] [<ffffffff814f3cdd>] ? start_kernel+0x3dc/0x3e8
>> [ 199.828661] [<ffffffff814f33b7>] ? x86_64_start_kernel+0xf9/0x106
>> [ 242.368420] INFO: task modprobe:110 blocked for more than 120 seconds.
>> [ 242.397772] "echo 0> /proc/sys/kernel/hung_task_timeout_secs" disables this message.
>> [ 242.433087] modprobe D ffff88020c750000 0 110 1 0x00000008
>> [ 242.467191] ffff88020c750000 0000000000000086 ffff88020bc31eb8 ffff88020bc31eb4
>> [ 242.529192] 0000000000000001 ffffffff8114017a 000000000000f9e0 ffff88020bc31fd8
>> [ 242.580440] 0000000000015780 0000000000015780 ffff88020c7e0710 ffff88020c7e0a08
>> [ 242.643053] Call Trace:
>> [ 242.655368] [<ffffffff8114017a>] ? sysfs_addrm_finish+0x1d/0x20a
>> [ 242.682685] [<ffffffff812fbab6>] ? mutex_lock+0xd/0x31
>> [ 242.706564] [<ffffffff812fbab6>] ? mutex_lock+0xd/0x31
>> [ 242.730188] [<ffffffff8106a173>] ? async_synchronize_cookie_domain+0xac/0x106
>> [ 242.770192] [<ffffffff81064f1a>] ? autoremove_wake_function+0x0/0x2e
>> [ 242.801989] [<ffffffff810689cd>] ? __blocking_notifier_call_chain+0x51/0x5f
>> [ 242.839526] [<ffffffff8106a1e9>] ? async_synchronize_full+0x10/0x2c
>> [ 242.853035] [<ffffffff8107aa93>] ? sys_init_module+0x18c/0x21a
>> [ 242.865641] [<ffffffff81010b42>] ? system_call_fastpath+0x16/0x1b
>> [ 242.878727] INFO: task modprobe:114 blocked for more than 120 seconds.
>> [ 242.892536] "echo 0> /proc/sys/kernel/hung_task_timeout_secs" disables this message.
>> [ 242.923819] modprobe D ffff88020c750000 0 114 1 0x00000008
>> [ 242.950968] ffff88020c750000 0000000000000086 ffff88020bc7feb8 ffff88020bc7feb4
>> [ 242.980742] 0000000000000001 ffffffff8114017a 000000000000f9e0 ffff88020bc7ffd8
>> [ 243.010580] 0000000000015780 0000000000015780 ffff88020c7e0e20 ffff88020c7e1118
>> [ 243.045486] Call Trace:
>> [ 243.056195] [<ffffffff8114017a>] ? sysfs_addrm_finish+0x1d/0x20a
>> [ 243.079447] [<ffffffff812fbab6>] ? mutex_lock+0xd/0x31
>> [ 243.101785] [<ffffffff812fbab6>] ? mutex_lock+0xd/0x31
>> [ 243.120773] [<ffffffff8106a173>] ? async_synchronize_cookie_domain+0xac/0x106
>> [ 243.144224] [<ffffffff81064f1a>] ? autoremove_wake_function+0x0/0x2e
>> [ 243.157902] [<ffffffff810689cd>] ? __blocking_notifier_call_chain+0x51/0x5f
>> [ 243.179377] [<ffffffff8106a1e9>] ? async_synchronize_full+0x10/0x2c
>> [ 243.199721] [<ffffffff8107aa93>] ? sys_init_module+0x18c/0x21a
>> [ 243.220748] [<ffffffff81010b42>] ? system_call_fastpath+0x16/0x1b
>> [ 243.243504] INFO: task modprobe:156 blocked for more than 120 seconds.
>> [ 243.266942] "echo 0> /proc/sys/kernel/hung_task_timeout_secs" disables this message.
>> [ 243.292222] modprobe D 0000000000000000 0 156 1 0x00000000
>> [ 243.323701] ffff88020f097100 0000000000000082 0000000000000000 ffffffff8105a8dc
>> [ 243.359538] 0000000000000000 0000000000000292 000000000000f9e0 ffff88020bf15fd8
>> [ 243.378636] 0000000000015780 0000000000015780 ffff88020bed8710 ffff88020bed8a08
>> [ 243.397627] Call Trace:
>> [ 243.403676] [<ffffffff8105a8dc>] ? try_to_del_timer_sync+0x63/0x6c
>> [ 243.416619] [<ffffffff812fbab6>] ? mutex_lock+0xd/0x31
>> [ 243.427784] [<ffffffff812fbab6>] ? mutex_lock+0xd/0x31
>> [ 243.444511] [<ffffffff812e7966>] ? klist_next+0x3c/0xa7
>> [ 243.462728] [<ffffffff8106a173>] ? async_synchronize_cookie_domain+0xac/0x106
>> [ 243.488071] [<ffffffff81064f1a>] ? autoremove_wake_function+0x0/0x2e
>> [ 243.501905] [<ffffffff810689cd>] ? __blocking_notifier_call_chain+0x51/0x5f
>> [ 243.516667] [<ffffffff8106a1e9>] ? async_synchronize_full+0x10/0x2c
>> [ 243.529964] [<ffffffff8107aa93>] ? sys_init_module+0x18c/0x21a
>> [ 243.542466] [<ffffffff81010b42>] ? system_call_fastpath+0x16/0x1b
>>
>>
>>
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@lists.xensource.com
>> http://lists.xensource.com/xen-devel
>>
--
ms@it-infrastrukturen.org
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: BUG: soft lockup - CPU#0 stuck for 61s! [swapper:0] 2011-08-13 15:33 BUG: soft lockup - CPU#0 stuck for 61s! [swapper:0] Mark Schneider @ 2011-08-24 15:30 ` Konrad Rzeszutek Wilk 0 siblings, 0 replies; 4+ messages in thread From: Konrad Rzeszutek Wilk @ 2011-08-24 15:30 UTC (permalink / raw) To: Mark Schneider; +Cc: Xen-devel On Sat, Aug 13, 2011 at 05:33:24PM +0200, Mark Schneider wrote: > Thanks a lot for your answer Konrad. Mark, I am just getting to this email. You are still experiencing this issue right? > > I use xen 4.1.2* (sources from the site of Boris with patches based > on xen 4.1.1 I guess). > I have created debian packages and deployed them on the xen debian > live image (kernel 3.0.1 final with such kernel config: http://www.it-infrastrukturen.com/fileadmin/linux/debian-live-xen/config-3.0.1) > > You could easy test it on another hardware booting the image from > USB stick. I use for tests HP DL385 g7 servers with 32GB RAM and > RAID5 (4 x 15k SAS drives) or RADI50 (8 x 15k SAS drives) > > rsync -avP rsync://www.it-infrastrukturen.ch/ftp/xen411-wheezy-kernel3-amd64-live-gnome-binary-hybrid.iso . > dd if=./xen411-wheezy-kernel3-amd64-live-gnome-binary-hybrid.iso of=/dev/sdX bs=1M > > more details at: > http://www.it-infrastrukturen.com/fileadmin/linux/debian-live-xen/README.xen-live > > In live mode you can add additional packages however after reboot > they are gone. > It is possible to prepare persistent USB stick (script) to save > addons on the stick. > > I use HVM domU domain for squeeze 6.0.2.1. DomU (HVM) domains for > wheezy don't have such limits. OK, so if I use http://cdimage.debian.org/debian-cd/6.0.2.1/amd64/iso-dvd/debian-6.0.2.1-amd64-DVD-1.iso I should be able to reproduce what you have. Can you also send me your guest config file please? ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <CACeEFf77eOLLNgsJwEYdzeiuxm+qDcO2zs09FK-Waas0sxcwLQ@mail.gmail.com>]
* mmap in PV xen-4.0.1 [not found] <CACeEFf77eOLLNgsJwEYdzeiuxm+qDcO2zs09FK-Waas0sxcwLQ@mail.gmail.com> @ 2011-08-10 6:29 ` Eric Camachat 2011-08-10 9:12 ` Wei Liu 0 siblings, 1 reply; 4+ messages in thread From: Eric Camachat @ 2011-08-10 6:29 UTC (permalink / raw) To: xen-devel [-- Attachment #1: Type: text/plain, Size: 9318 bytes --] Hi, I have a problem to map kernel memory to userspace via /dev/mem. The mmap() succeeded, but when I try to access it, the program will hang forever (until press ctrl-c to terminate it). # memtest-user memtest_vma_open: virt 0x7fbc90085000, phys 0x3eee8000 paddr = 0x3eee8000 mem = 0x7fbc90089000 map = 0x7fbc90085000 map[0]= 4c4c4c4c map[1]= 4c4c4c4c *** Hang here, it cannot (finish) access the memory mapped via /dev/mem *** My test source below, and it runs properly on HVM, VirtualBox, QEM and physical machines. What mistake I did? My kernel module look like this: ================================================================================= #include <linux/module.h> #include <linux/moduleparam.h> #include <linux/types.h> #include <linux/kernel.h> #include <linux/fs.h> #include <linux/mm.h> #include <asm/io.h> #include <asm/page.h> #define MEMTEST_MAJOR 886 #define MEMTEST_NAME "memtest" #define MEMTEST_MAGIC 'M' #define MEMTEST_DMA_SIZE _IO(MEMTEST_MAGIC, 0) #define MEMTEST_DMA_PADDR _IO(MEMTEST_MAGIC, 1) #define MEMTEST_DMA_VADDR _IO(MEMTEST_MAGIC, 2) #define SIZE_ORDER 2 static uint32_t _size = (PAGE_SIZE << SIZE_ORDER); static unsigned long _vbase = 0; static phys_addr_t _pbase = 0; static int memtest_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) { int ret = -ENOIOCTLCMD; phys_addr_t *paddr; unsigned long *vaddr; uint32_t *size; switch(cmd) { case MEMTEST_DMA_SIZE: size = (uint32_t*)arg; *size = _size; ret = 0; break; case MEMTEST_DMA_PADDR: paddr = (phys_addr_t*)arg; *paddr = _pbase; ret = 0; break; case MEMTEST_DMA_VADDR: vaddr = (unsigned long*)arg; *vaddr = _vbase; ret = 0; break; } return ret; } static void memtest_vma_open(struct vm_area_struct *vma) { printk("%s: virt %#lx, phys %#lx\n", __func__, vma->vm_start, vma->vm_pgoff << PAGE_SHIFT); } static void memtest_vma_close(struct vm_area_struct *vma) { printk("%s\n", __func__); } static struct vm_operations_struct memtest_vm_ops = { .open = memtest_vma_open, .close = memtest_vma_close, }; static int memtest_mmap(struct file * file, struct vm_area_struct * vma) { /* Remap-pfn-range will mark the range VM_IO and VM_RESERVED */ if (remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff, vma->vm_end - vma->vm_start, vma->vm_page_prot)) { return -EAGAIN; } vma->vm_ops = &memtest_vm_ops; memtest_vma_open(vma); return 0; } static struct file_operations memtest_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .ioctl = memtest_ioctl, .mmap = memtest_mmap, }; static int __init memtest_init(void) { int retval; printk(MEMTEST_NAME ": registering /dev/" MEMTEST_NAME " (%d)\n",MEMTEST_MAJOR ); retval = register_chrdev(MEMTEST_MAJOR, MEMTEST_NAME, &memtest_fops); if (retval < 0) { printk(MEMTEST_NAME ": failed to register /dev/" MEMTEST_NAME "\n"); } printk(MEMTEST_NAME ": size of phys_addr_t is %lu bytes\n", sizeof(phys_addr_t)); //_vbase = get_zeroed_page(GFP_KERNEL); _vbase = __get_free_pages(GFP_KERNEL, SIZE_ORDER); if (_vbase == 0) { printk(MEMTEST_NAME ": kmalloc(%d, GFP_KERNEL) failed\n", _size); } else { memset((void*)_vbase, 'L', _size); ((uint32_t*)_vbase)[0] = 0x1234; ((uint32_t*)_vbase)[1] = 0xabcd; ((uint32_t*)_vbase)[2] = 0xeeee; ((uint32_t*)_vbase)[3] = 0xffff; _pbase = virt_to_bus((void*)_vbase); } printk(MEMTEST_NAME ": _vbase = %#lx\n", _vbase); printk(MEMTEST_NAME ": _pbase = %#lx\n", (unsigned long)_pbase); return retval; } static void __exit memtest_exit(void) { if (_vbase != 0) free_page(_vbase); unregister_chrdev(MEMTEST_MAJOR, MEMTEST_NAME); } MODULE_LICENSE("GPL"); module_init(memtest_init); module_exit(memtest_exit); ================================================================================= Here is my user program: ================================================================================= #include <stdio.h> #include <stdlib.h> #include <sys/mman.h> #include <unistd.h> #include <sys/ioctl.h> #include <fcntl.h> #include <errno.h> #include <stdint.h> #define MEMTEST_MAGIC 'M' #define MEMTEST_DMA_SIZE _IO(MEMTEST_MAGIC, 0) #define MEMTEST_DMA_PADDR _IO(MEMTEST_MAGIC, 1) #define MEMTEST_DMA_VADDR _IO(MEMTEST_MAGIC, 2) #define DEVDIAG "/dev/memtest" #define DEVMEM "/dev/mem" uint32_t get_size(void); unsigned long get_paddr(void); unsigned int * mmap_memtest(unsigned long paddr, uint32_t size); unsigned int * mmap_mem(unsigned long paddr, uint32_t size); uint32_t get_size(void) { int diagfd, rv; uint32_t size; diagfd = open( DEVDIAG, O_RDWR | O_SYNC | O_DSYNC | O_RSYNC ); if (diagfd < 0) { perror("Error : fail to open" DEVDIAG); return 0; } rv = ioctl( diagfd, MEMTEST_DMA_SIZE, &size); if (rv < 0) { perror("Fail to perform ioctl"); return 0; } close(diagfd); return size; } unsigned long get_paddr(void) { int diagfd, rv; unsigned long paddr; diagfd = open( DEVDIAG, O_RDWR | O_SYNC | O_DSYNC | O_RSYNC ); if (diagfd < 0) { perror("Error : fail to open" DEVDIAG); return 0; } rv = ioctl( diagfd, MEMTEST_DMA_PADDR, &paddr); if ( rv < 0 ) { perror("Fail to perform ioctl"); return 0; } close(diagfd); return paddr; } unsigned int * mmap_memtest(unsigned long paddr, uint32_t size) { int diagfd; unsigned int page_size = getpagesize(); unsigned int page_mask = ~(page_size - 1); unsigned int *vaddr = NULL; /** test mmap */ if ( paddr & ~page_mask ) { printf("Error : not algined %#lxx & %08x\n", paddr, ~page_mask ); return NULL; } diagfd = open( DEVDIAG, O_RDWR | O_SYNC | O_DSYNC | O_RSYNC ); if (diagfd < 0) { printf("Error : fail to open "DEVDIAG); return NULL; } vaddr = (unsigned int*) mmap(NULL, size, PROT_READ, MAP_SHARED, diagfd, paddr); close(diagfd); return vaddr; } unsigned int * mmap_mem(unsigned long paddr, uint32_t size) { int memfd; unsigned int page_size = getpagesize(); unsigned int page_mask = ~(page_size - 1); unsigned int *vaddr = NULL; /** test mmap */ if ( paddr & ~page_mask ) { printf("Error : not algined %#lxx & %08x\n", paddr, ~page_mask ); return NULL; } memfd = open(DEVMEM, O_RDWR | O_SYNC | O_DSYNC | O_RSYNC); if (memfd < 0) { perror("Error : fail to open "DEVMEM); return NULL; } vaddr = (unsigned int*) mmap(NULL, size, PROT_READ, MAP_SHARED, memfd, paddr); close(memfd); return vaddr; } int main(int argc, char **argv) { uint32_t size = get_size(); unsigned long paddr = get_paddr(); unsigned int *mem = mmap_mem(paddr, size); unsigned int *map = mmap_memtest(paddr, size); printf("paddr = %#lx\n", paddr); printf(" mem = %p\n", mem); printf(" map = %p\n", map); if (map) { printf("map[0]= %x\n", map[0]); printf("map[1]= %x\n", map[1]); } if (mem) { printf("mem[0]= %x\n", mem[0]); printf("mem[1]= %x\n", mem[1]); } return 0; } ================================================================================= [-- Attachment #2: memtest-module.c --] [-- Type: text/x-csrc, Size: 3131 bytes --] #include <linux/module.h> #include <linux/moduleparam.h> #include <linux/types.h> #include <linux/kernel.h> #include <linux/fs.h> #include <linux/mm.h> #include <asm/io.h> #include <asm/page.h> #define MEMTEST_MAJOR 886 #define MEMTEST_NAME "memtest" #define MEMTEST_MAGIC 'M' #define MEMTEST_DMA_SIZE _IO(MEMTEST_MAGIC, 0) #define MEMTEST_DMA_PADDR _IO(MEMTEST_MAGIC, 1) #define MEMTEST_DMA_VADDR _IO(MEMTEST_MAGIC, 2) #define SIZE_ORDER 2 static uint32_t _size = (PAGE_SIZE << SIZE_ORDER); static unsigned long _vbase = 0; static phys_addr_t _pbase = 0; static int memtest_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) { int ret = -ENOIOCTLCMD; phys_addr_t *paddr; unsigned long *vaddr; uint32_t *size; switch(cmd) { case MEMTEST_DMA_SIZE: size = (uint32_t*)arg; *size = _size; ret = 0; break; case MEMTEST_DMA_PADDR: paddr = (phys_addr_t*)arg; *paddr = _pbase; ret = 0; break; case MEMTEST_DMA_VADDR: vaddr = (unsigned long*)arg; *vaddr = _vbase; ret = 0; break; } return ret; } static void memtest_vma_open(struct vm_area_struct *vma) { printk("%s: virt %#lx, phys %#lx\n", __func__, vma->vm_start, vma->vm_pgoff << PAGE_SHIFT); } static void memtest_vma_close(struct vm_area_struct *vma) { printk("%s\n", __func__); } static struct vm_operations_struct memtest_vm_ops = { .open = memtest_vma_open, .close = memtest_vma_close, }; static int memtest_mmap(struct file * file, struct vm_area_struct * vma) { /* Remap-pfn-range will mark the range VM_IO and VM_RESERVED */ if (remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff, vma->vm_end - vma->vm_start, vma->vm_page_prot)) { return -EAGAIN; } vma->vm_ops = &memtest_vm_ops; memtest_vma_open(vma); return 0; } static struct file_operations memtest_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .ioctl = memtest_ioctl, .mmap = memtest_mmap, }; static int __init memtest_init(void) { int retval; printk(MEMTEST_NAME ": registering /dev/" MEMTEST_NAME " (%d)\n",MEMTEST_MAJOR ); retval = register_chrdev(MEMTEST_MAJOR, MEMTEST_NAME, &memtest_fops); if (retval < 0) { printk(MEMTEST_NAME ": failed to register /dev/" MEMTEST_NAME "\n"); } printk(MEMTEST_NAME ": size of phys_addr_t is %lu bytes\n", sizeof(phys_addr_t)); //_vbase = get_zeroed_page(GFP_KERNEL); _vbase = __get_free_pages(GFP_KERNEL, SIZE_ORDER); if (_vbase == 0) { printk(MEMTEST_NAME ": kmalloc(%d, GFP_KERNEL) failed\n", _size); } else { memset((void*)_vbase, 'L', _size); ((uint32_t*)_vbase)[0] = 0x1234; ((uint32_t*)_vbase)[1] = 0xabcd; ((uint32_t*)_vbase)[2] = 0xeeee; ((uint32_t*)_vbase)[3] = 0xffff; _pbase = virt_to_bus((void*)_vbase); } printk(MEMTEST_NAME ": _vbase = %#lx\n", _vbase); printk(MEMTEST_NAME ": _pbase = %#lx\n", (unsigned long)_pbase); return retval; } static void __exit memtest_exit(void) { if (_vbase != 0) free_page(_vbase); unregister_chrdev(MEMTEST_MAJOR, MEMTEST_NAME); } MODULE_LICENSE("GPL"); module_init(memtest_init); module_exit(memtest_exit); [-- Attachment #3: memtest-user.c --] [-- Type: text/x-csrc, Size: 2993 bytes --] #include <stdio.h> #include <stdlib.h> #include <sys/mman.h> #include <unistd.h> #include <sys/ioctl.h> #include <fcntl.h> #include <errno.h> #include <stdint.h> #define MEMTEST_MAGIC 'M' #define MEMTEST_DMA_SIZE _IO(MEMTEST_MAGIC, 0) #define MEMTEST_DMA_PADDR _IO(MEMTEST_MAGIC, 1) #define MEMTEST_DMA_VADDR _IO(MEMTEST_MAGIC, 2) #define DEVDIAG "/dev/memtest" #define DEVMEM "/dev/mem" uint32_t get_size(void); unsigned long get_paddr(void); unsigned int * mmap_memtest(unsigned long paddr, uint32_t size); unsigned int * mmap_mem(unsigned long paddr, uint32_t size); uint32_t get_size(void) { int diagfd, rv; uint32_t size; diagfd = open( DEVDIAG, O_RDWR | O_SYNC | O_DSYNC | O_RSYNC ); if (diagfd < 0) { perror("Error : fail to open" DEVDIAG); return 0; } rv = ioctl( diagfd, MEMTEST_DMA_SIZE, &size); if (rv < 0) { perror("Fail to perform ioctl"); return 0; } close(diagfd); return size; } unsigned long get_paddr(void) { int diagfd, rv; unsigned long paddr; diagfd = open( DEVDIAG, O_RDWR | O_SYNC | O_DSYNC | O_RSYNC ); if (diagfd < 0) { perror("Error : fail to open" DEVDIAG); return 0; } rv = ioctl( diagfd, MEMTEST_DMA_PADDR, &paddr); if ( rv < 0 ) { perror("Fail to perform ioctl"); return 0; } close(diagfd); return paddr; } unsigned int * mmap_memtest(unsigned long paddr, uint32_t size) { int diagfd; unsigned int page_size = getpagesize(); unsigned int page_mask = ~(page_size - 1); unsigned int *vaddr = NULL; /** test mmap */ if ( paddr & ~page_mask ) { printf("Error : not algined %#lxx & %08x\n", paddr, ~page_mask ); return NULL; } diagfd = open( DEVDIAG, O_RDWR | O_SYNC | O_DSYNC | O_RSYNC ); if (diagfd < 0) { printf("Error : fail to open "DEVDIAG); return NULL; } vaddr = (unsigned int*) mmap(NULL, size, PROT_READ, MAP_SHARED, diagfd, paddr); close(diagfd); return vaddr; } unsigned int * mmap_mem(unsigned long paddr, uint32_t size) { int memfd; unsigned int page_size = getpagesize(); unsigned int page_mask = ~(page_size - 1); unsigned int *vaddr = NULL; /** test mmap */ if ( paddr & ~page_mask ) { printf("Error : not algined %#lxx & %08x\n", paddr, ~page_mask ); return NULL; } memfd = open(DEVMEM, O_RDWR | O_SYNC | O_DSYNC | O_RSYNC); if (memfd < 0) { perror("Error : fail to open "DEVMEM); return NULL; } vaddr = (unsigned int*) mmap(NULL, size, PROT_READ, MAP_SHARED, memfd, paddr); close(memfd); return vaddr; } int main(int argc, char **argv) { uint32_t size = get_size(); unsigned long paddr = get_paddr(); unsigned int *mem = mmap_mem(paddr, size); unsigned int *map = mmap_memtest(paddr, size); printf("paddr = %#lx\n", paddr); printf(" mem = %p\n", mem); printf(" map = %p\n", map); if (map) { printf("map[0]= %x\n", map[0]); printf("map[1]= %x\n", map[1]); } if (mem) { printf("mem[0]= %x\n", mem[0]); printf("mem[1]= %x\n", mem[1]); } return 0; } [-- Attachment #4: Type: text/plain, Size: 138 bytes --] _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: mmap in PV xen-4.0.1 2011-08-10 6:29 ` mmap in PV xen-4.0.1 Eric Camachat @ 2011-08-10 9:12 ` Wei Liu 2011-08-10 18:31 ` Eric Camachat 0 siblings, 1 reply; 4+ messages in thread From: Wei Liu @ 2011-08-10 9:12 UTC (permalink / raw) To: Eric Camachat; +Cc: xen-devel On Tue, Aug 09, 2011 at 11:29:51PM -0700, Eric Camachat wrote: > Hi, > > I have a problem to map kernel memory to userspace via /dev/mem. > The mmap() succeeded, but when I try to access it, the program will > hang forever (until press ctrl-c to terminate it). > > # memtest-user > memtest_vma_open: virt 0x7fbc90085000, phys 0x3eee8000 > paddr = 0x3eee8000 > mem = 0x7fbc90089000 > map = 0x7fbc90085000 > map[0]= 4c4c4c4c > map[1]= 4c4c4c4c > *** Hang here, it cannot (finish) access the memory mapped via /dev/mem *** > > My test source below, and it runs properly on HVM, VirtualBox, QEM and > physical machines. > What mistake I did? > > My kernel module look like this: > ================================================================================= [...snip...] > memtest_ioctl(struct inode *inode, struct file *file, unsigned int cmd, > unsigned long arg) > { > int ret = -ENOIOCTLCMD; > phys_addr_t *paddr; > unsigned long *vaddr; > uint32_t *size; > > switch(cmd) { > case MEMTEST_DMA_SIZE: > size = (uint32_t*)arg; > *size = _size; Though your output shows that this assignment works, shouldn't this kind of direct assignment across kernel space and user land be avoided? It is bad practice to do direct assignment I think. copy_{from,to}_user should do the job. > ret = 0; > break; > case MEMTEST_DMA_PADDR: > paddr = (phys_addr_t*)arg; > *paddr = _pbase; > ret = 0; > break; > case MEMTEST_DMA_VADDR: > vaddr = (unsigned long*)arg; > *vaddr = _vbase; > ret = 0; > break; > } > return ret; > } > > [...snip...] > static struct file_operations memtest_fops = { > .owner = THIS_MODULE, > .llseek = no_llseek, > .ioctl = memtest_ioctl, My kernel doesn't have field called 'ioctl' in file_operations. So which kernel do you use? 2.6.18? I don't have old kernel at the moment so I can't help you much... > .mmap = memtest_mmap, > }; > > [...snip...] > static void __exit memtest_exit(void) > { > if (_vbase != 0) > free_page(_vbase); I suppose you should use free_pages here, since you use __get_free_pages when allocating. > unregister_chrdev(MEMTEST_MAJOR, MEMTEST_NAME); > } > > > MODULE_LICENSE("GPL"); > > module_init(memtest_init); > module_exit(memtest_exit); > ================================================================================= > > Here is my user program: > > ================================================================================= > [...snip...] > if (map) > { > printf("map[0]= %x\n", map[0]); > printf("map[1]= %x\n", map[1]); This confuses me. You did write different values in _vbase[0], _vbase[1]. But the output '4C4C4C4C' shows that the value is 'L'. I just skimmed the output and the code. I don't run your code since I don't have a suitible environment at the moment... Wei. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: mmap in PV xen-4.0.1 2011-08-10 9:12 ` Wei Liu @ 2011-08-10 18:31 ` Eric Camachat 2011-08-10 19:25 ` Konrad Rzeszutek Wilk 0 siblings, 1 reply; 4+ messages in thread From: Eric Camachat @ 2011-08-10 18:31 UTC (permalink / raw) To: Wei Liu; +Cc: xen-devel [-- Attachment #1: Type: text/plain, Size: 3738 bytes --] On Wed, Aug 10, 2011 at 2:12 AM, Wei Liu <liuw@liuw.name> wrote: > On Tue, Aug 09, 2011 at 11:29:51PM -0700, Eric Camachat wrote: >> Hi, >> >> I have a problem to map kernel memory to userspace via /dev/mem. >> The mmap() succeeded, but when I try to access it, the program will >> hang forever (until press ctrl-c to terminate it). >> >> # memtest-user >> memtest_vma_open: virt 0x7fbc90085000, phys 0x3eee8000 >> paddr = 0x3eee8000 >> mem = 0x7fbc90089000 >> map = 0x7fbc90085000 >> map[0]= 4c4c4c4c >> map[1]= 4c4c4c4c >> *** Hang here, it cannot (finish) access the memory mapped via /dev/mem *** >> >> My test source below, and it runs properly on HVM, VirtualBox, QEM and >> physical machines. >> What mistake I did? >> >> My kernel module look like this: >> ================================================================================= > > [...snip...] > >> memtest_ioctl(struct inode *inode, struct file *file, unsigned int cmd, >> unsigned long arg) >> { >> int ret = -ENOIOCTLCMD; >> phys_addr_t *paddr; >> unsigned long *vaddr; >> uint32_t *size; >> >> switch(cmd) { >> case MEMTEST_DMA_SIZE: >> size = (uint32_t*)arg; >> *size = _size; > > Though your output shows that this assignment works, shouldn't this > kind of direct assignment across kernel space and user land be > avoided? It is bad practice to do direct assignment I think. > > copy_{from,to}_user should do the job. > I want share some memory between kernel and user applications, so I am trying to use mmap instead of copy_{from,to} multiple times. >> ret = 0; >> break; >> case MEMTEST_DMA_PADDR: >> paddr = (phys_addr_t*)arg; >> *paddr = _pbase; >> ret = 0; >> break; >> case MEMTEST_DMA_VADDR: >> vaddr = (unsigned long*)arg; >> *vaddr = _vbase; >> ret = 0; >> break; >> } >> return ret; >> } >> >> > > [...snip...] > >> static struct file_operations memtest_fops = { >> .owner = THIS_MODULE, >> .llseek = no_llseek, >> .ioctl = memtest_ioctl, > > My kernel doesn't have field called 'ioctl' in file_operations. > > So which kernel do you use? 2.6.18? I don't have old kernel at the > moment so I can't help you much... I am using linux-2.5.32.24 kernel. > >> .mmap = memtest_mmap, >> }; >> >> > > [...snip...] > >> static void __exit memtest_exit(void) >> { >> if (_vbase != 0) >> free_page(_vbase); > > I suppose you should use free_pages here, since you use > __get_free_pages when allocating. > >> unregister_chrdev(MEMTEST_MAJOR, MEMTEST_NAME); >> } >> >> >> MODULE_LICENSE("GPL"); >> >> module_init(memtest_init); >> module_exit(memtest_exit); >> ================================================================================= >> >> Here is my user program: >> >> ================================================================================= >> > > [...snip...] > >> if (map) >> { >> printf("map[0]= %x\n", map[0]); >> printf("map[1]= %x\n", map[1]); > > This confuses me. You did write different values in _vbase[0], > _vbase[1]. But the output '4C4C4C4C' shows that the value is 'L'. > > I just skimmed the output and the code. I don't run your code since I > don't have a suitible environment at the moment... > > Wei. > [-- Attachment #2: Type: text/plain, Size: 138 bytes --] _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: mmap in PV xen-4.0.1 2011-08-10 18:31 ` Eric Camachat @ 2011-08-10 19:25 ` Konrad Rzeszutek Wilk 2011-08-10 19:42 ` Ian Campbell 0 siblings, 1 reply; 4+ messages in thread From: Konrad Rzeszutek Wilk @ 2011-08-10 19:25 UTC (permalink / raw) To: Eric Camachat; +Cc: xen-devel, Wei Liu > I am using linux-2.5.32.24 kernel. whoa.. Can't help you there. That is so ancient I've no idea how the Xen MMU works there. Why don't you update to something more recent? Say 3.0? ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: mmap in PV xen-4.0.1 2011-08-10 19:25 ` Konrad Rzeszutek Wilk @ 2011-08-10 19:42 ` Ian Campbell 2011-08-10 19:45 ` Eric Camachat 0 siblings, 1 reply; 4+ messages in thread From: Ian Campbell @ 2011-08-10 19:42 UTC (permalink / raw) To: Konrad Rzeszutek Wilk Cc: xen-devel@lists.xensource.com, Eric Camachat, Wei Liu On Wed, 2011-08-10 at 20:25 +0100, Konrad Rzeszutek Wilk wrote: > > I am using linux-2.5.32.24 kernel. > > whoa.. Can't help you there. That is so ancient I've no idea how the Xen MMU works there. I presume he meant 2.6.32.24 ;-) > Why don't you update to something more recent? Say 3.0? ...and confirm it works on native as well... Ian. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: mmap in PV xen-4.0.1 2011-08-10 19:42 ` Ian Campbell @ 2011-08-10 19:45 ` Eric Camachat 2011-08-10 20:59 ` BUG: soft lockup - CPU#0 stuck for 61s! [swapper:0] Mark Schneider 0 siblings, 1 reply; 4+ messages in thread From: Eric Camachat @ 2011-08-10 19:45 UTC (permalink / raw) To: Ian Campbell Cc: Wei Liu, xen-devel@lists.xensource.com, Konrad Rzeszutek Wilk On Wed, Aug 10, 2011 at 12:42 PM, Ian Campbell <Ian.Campbell@citrix.com> wrote: > On Wed, 2011-08-10 at 20:25 +0100, Konrad Rzeszutek Wilk wrote: >> > I am using linux-2.5.32.24 kernel. >> >> whoa.. Can't help you there. That is so ancient I've no idea how the Xen MMU works there. > > I presume he meant 2.6.32.24 ;-) Thanks! Should be 2.6.32.24, I made a typo. > >> Why don't you update to something more recent? Say 3.0? > > ...and confirm it works on native as well... > > Ian. > > > ^ permalink raw reply [flat|nested] 4+ messages in thread
* BUG: soft lockup - CPU#0 stuck for 61s! [swapper:0] 2011-08-10 19:45 ` Eric Camachat @ 2011-08-10 20:59 ` Mark Schneider 2011-08-13 15:15 ` Konrad Rzeszutek Wilk 0 siblings, 1 reply; 4+ messages in thread From: Mark Schneider @ 2011-08-10 20:59 UTC (permalink / raw) To: xen-devel Hello, I can't boot HVM with debian squeeze 6.0.2.1 when I use more than 4VCPUs in the hvm.cfg file (s. some error messages from the console are below) I am wondering about the following lines: # --- #root@xen411dom0:/etc/xen# xm console 7 [ 134.220058] BUG: soft lockup - CPU#0 stuck for 61s! [swapper:0] [ 134.220058] Modules linked in: uhci_hcd thermal ehci_hcd ata_piix xen_netfront libata xen_blkfront floppy usbcore thermal_sys nls_base scsi_mod [ 134.292664] CPU 0: [ 134.292664] Modules linked in: uhci_hcd thermal ehci_hcd ata_piix xen_netfront libata xen_blkfront floppy usbcore thermal_sys nls_base scsi_mod [ 134.319566] Pid: 0, comm: swapper Not tainted 2.6.32-5-amd64 #1 HVM domU # --- Do I need some patches or special additional setting of my the squeezy HVM? Thank you / regards, Mark -- ms@it-infrastrukturen.org # --- root@xen411dom0:/etc/xen# xm console 7 [ 134.220058] BUG: soft lockup - CPU#0 stuck for 61s! [swapper:0] [ 134.220058] Modules linked in: uhci_hcd thermal ehci_hcd ata_piix xen_netfront libata xen_blkfront floppy usbcore thermal_sys nls_base scsi_mod [ 134.292664] CPU 0: [ 134.292664] Modules linked in: uhci_hcd thermal ehci_hcd ata_piix xen_netfront libata xen_blkfront floppy usbcore thermal_sys nls_base scsi_mod [ 134.319566] Pid: 0, comm: swapper Not tainted 2.6.32-5-amd64 #1 HVM domU [ 134.369933] RIP: 0010:[<ffffffff8102c58c>] [<ffffffff8102c58c>] native_safe_halt+0x2/0x3 [ 134.369933] RSP: 0018:ffffffff8142ded0 EFLAGS: 00000246 [ 134.420796] RAX: ffffffff8142dfd8 RBX: ffffffff814d67d0 RCX: 0000000000000000 [ 134.420796] RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000001 [ 134.420796] RBP: ffffffff81011dce R08: 0000000000000000 R09: 0000000081528d90 [ 134.470673] R10: 00000000fffede31 R11: 0000000000000001 R12: ffffffff814d4dc0 [ 134.470673] R13: ffffffff8102cdcc R14: ffffffff8102cdcc R15: ffff88020bd80710 [ 134.521042] FS: 00007f6b183817a0(0000) GS:ffff880008c00000(0000) knlGS:0000000000000000 [ 134.521042] CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b [ 134.521042] CR2: 00007f6b17c6de10 CR3: 000000020c797000 CR4: 00000000000006f0 [ 134.571410] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 134.571410] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 [ 134.571410] Call Trace: [ 134.571410] [<ffffffff81017201>] ? default_idle+0x34/0x51 [ 134.571410] [<ffffffff8101758d>] ? c1e_idle+0xf5/0xfb [ 134.621779] [<ffffffff8100feb1>] ? cpu_idle+0xa2/0xda [ 134.621779] [<ffffffff814f3140>] ? early_idt_handler+0x0/0x71 [ 134.621779] [<ffffffff814f3cdd>] ? start_kernel+0x3dc/0x3e8 [ 134.621779] [<ffffffff814f33b7>] ? x86_64_start_kernel+0xf9/0x106 udevd[98]: worker [107] unexpectedly returned with status 0x0100 udevd[98]: worker [107] failed while handling '/devices/pci0000:00/0000:00:01.1' udevd[98]: worker [109] unexpectedly returned with status 0x0100 udevd[98]: worker [109] failed while handling '/devices/pci0000:00/0000:00:01.2' udevadm settle - timeout of 180 seconds reached, the event queue contains: /sys/devices/vif-0 (509) /sys/devices/vif-0/net/eth0 (629) /sys/devices/pci0000:00/0000:00:01.1/host0 (636) /sys/devices/pci0000:00/0000:00:01.1/host0/scsi_host/host0 (637) /sys/devices/pci0000:00/0000:00:01.1/host1 (638) /sys/devices/pci0000:00/0000:00:01.1/host1/scsi_host/host1 (639) [ 199.716053] BUG: soft lockup - CPU#0 stuck for 61s! [swapper:0] [ 199.716053] Modules linked in: scsi_wait_scan(+) uhci_hcd thermal ehci_hcd ata_piix xen_netfront libata xen_blkfront floppy usbcore thermal_sys nls_base scsi_mod [ 199.792417] CPU 0: [ 199.804323] Modules linked in: scsi_wait_scan(+) uhci_hcd thermal ehci_hcd ata_piix xen_netfront libata xen_blkfront floppy usbcore thermal_sys nls_base scsi_mod [ 199.828661] Pid: 0, comm: swapper Not tainted 2.6.32-5-amd64 #1 HVM domU [ 199.828661] RIP: 0010:[<ffffffff8102c58c>] [<ffffffff8102c58c>] native_safe_halt+0x2/0x3 [ 199.828661] RSP: 0018:ffffffff8142ded0 EFLAGS: 00000246 [ 199.828661] RAX: ffffffff8142dfd8 RBX: ffffffff814d67d0 RCX: 0000000000000000 [ 199.828661] RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000001 [ 199.828661] RBP: ffffffff81011dce R08: 0000000000000000 R09: 0000000081528d90 [ 199.828661] R10: 00000000fffede31 R11: 0000000000000001 R12: ffffffff814d4dc0 [ 199.828661] R13: ffffffff8102cdcc R14: ffffffff8102cdcc R15: ffff88020bd80710 [ 199.828661] FS: 00007f6b183817a0(0000) GS:ffff880008c00000(0000) knlGS:0000000000000000 [ 199.828661] CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b [ 199.828661] CR2: 00007f6b17c6de10 CR3: 000000020c797000 CR4: 00000000000006f0 [ 199.828661] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 199.828661] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 [ 199.828661] Call Trace: [ 199.828661] [<ffffffff81017201>] ? default_idle+0x34/0x51 [ 199.828661] [<ffffffff8101758d>] ? c1e_idle+0xf5/0xfb [ 199.828661] [<ffffffff8100feb1>] ? cpu_idle+0xa2/0xda [ 199.828661] [<ffffffff814f3140>] ? early_idt_handler+0x0/0x71 [ 199.828661] [<ffffffff814f3cdd>] ? start_kernel+0x3dc/0x3e8 [ 199.828661] [<ffffffff814f33b7>] ? x86_64_start_kernel+0xf9/0x106 [ 242.368420] INFO: task modprobe:110 blocked for more than 120 seconds. [ 242.397772] "echo 0> /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 242.433087] modprobe D ffff88020c750000 0 110 1 0x00000008 [ 242.467191] ffff88020c750000 0000000000000086 ffff88020bc31eb8 ffff88020bc31eb4 [ 242.529192] 0000000000000001 ffffffff8114017a 000000000000f9e0 ffff88020bc31fd8 [ 242.580440] 0000000000015780 0000000000015780 ffff88020c7e0710 ffff88020c7e0a08 [ 242.643053] Call Trace: [ 242.655368] [<ffffffff8114017a>] ? sysfs_addrm_finish+0x1d/0x20a [ 242.682685] [<ffffffff812fbab6>] ? mutex_lock+0xd/0x31 [ 242.706564] [<ffffffff812fbab6>] ? mutex_lock+0xd/0x31 [ 242.730188] [<ffffffff8106a173>] ? async_synchronize_cookie_domain+0xac/0x106 [ 242.770192] [<ffffffff81064f1a>] ? autoremove_wake_function+0x0/0x2e [ 242.801989] [<ffffffff810689cd>] ? __blocking_notifier_call_chain+0x51/0x5f [ 242.839526] [<ffffffff8106a1e9>] ? async_synchronize_full+0x10/0x2c [ 242.853035] [<ffffffff8107aa93>] ? sys_init_module+0x18c/0x21a [ 242.865641] [<ffffffff81010b42>] ? system_call_fastpath+0x16/0x1b [ 242.878727] INFO: task modprobe:114 blocked for more than 120 seconds. [ 242.892536] "echo 0> /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 242.923819] modprobe D ffff88020c750000 0 114 1 0x00000008 [ 242.950968] ffff88020c750000 0000000000000086 ffff88020bc7feb8 ffff88020bc7feb4 [ 242.980742] 0000000000000001 ffffffff8114017a 000000000000f9e0 ffff88020bc7ffd8 [ 243.010580] 0000000000015780 0000000000015780 ffff88020c7e0e20 ffff88020c7e1118 [ 243.045486] Call Trace: [ 243.056195] [<ffffffff8114017a>] ? sysfs_addrm_finish+0x1d/0x20a [ 243.079447] [<ffffffff812fbab6>] ? mutex_lock+0xd/0x31 [ 243.101785] [<ffffffff812fbab6>] ? mutex_lock+0xd/0x31 [ 243.120773] [<ffffffff8106a173>] ? async_synchronize_cookie_domain+0xac/0x106 [ 243.144224] [<ffffffff81064f1a>] ? autoremove_wake_function+0x0/0x2e [ 243.157902] [<ffffffff810689cd>] ? __blocking_notifier_call_chain+0x51/0x5f [ 243.179377] [<ffffffff8106a1e9>] ? async_synchronize_full+0x10/0x2c [ 243.199721] [<ffffffff8107aa93>] ? sys_init_module+0x18c/0x21a [ 243.220748] [<ffffffff81010b42>] ? system_call_fastpath+0x16/0x1b [ 243.243504] INFO: task modprobe:156 blocked for more than 120 seconds. [ 243.266942] "echo 0> /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 243.292222] modprobe D 0000000000000000 0 156 1 0x00000000 [ 243.323701] ffff88020f097100 0000000000000082 0000000000000000 ffffffff8105a8dc [ 243.359538] 0000000000000000 0000000000000292 000000000000f9e0 ffff88020bf15fd8 [ 243.378636] 0000000000015780 0000000000015780 ffff88020bed8710 ffff88020bed8a08 [ 243.397627] Call Trace: [ 243.403676] [<ffffffff8105a8dc>] ? try_to_del_timer_sync+0x63/0x6c [ 243.416619] [<ffffffff812fbab6>] ? mutex_lock+0xd/0x31 [ 243.427784] [<ffffffff812fbab6>] ? mutex_lock+0xd/0x31 [ 243.444511] [<ffffffff812e7966>] ? klist_next+0x3c/0xa7 [ 243.462728] [<ffffffff8106a173>] ? async_synchronize_cookie_domain+0xac/0x106 [ 243.488071] [<ffffffff81064f1a>] ? autoremove_wake_function+0x0/0x2e [ 243.501905] [<ffffffff810689cd>] ? __blocking_notifier_call_chain+0x51/0x5f [ 243.516667] [<ffffffff8106a1e9>] ? async_synchronize_full+0x10/0x2c [ 243.529964] [<ffffffff8107aa93>] ? sys_init_module+0x18c/0x21a [ 243.542466] [<ffffffff81010b42>] ? system_call_fastpath+0x16/0x1b ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: BUG: soft lockup - CPU#0 stuck for 61s! [swapper:0] 2011-08-10 20:59 ` BUG: soft lockup - CPU#0 stuck for 61s! [swapper:0] Mark Schneider @ 2011-08-13 15:15 ` Konrad Rzeszutek Wilk 0 siblings, 0 replies; 4+ messages in thread From: Konrad Rzeszutek Wilk @ 2011-08-13 15:15 UTC (permalink / raw) To: Mark Schneider; +Cc: xen-devel On Wed, Aug 10, 2011 at 10:59:55PM +0200, Mark Schneider wrote: > Hello, > > I can't boot HVM with debian squeeze 6.0.2.1 when I use more than > 4VCPUs in the hvm.cfg file (s. some error messages from the console > are below) Mark, what version of Xen are you using? Did you try using 4.1.1? > > I am wondering about the following lines: > # --- > #root@xen411dom0:/etc/xen# xm console 7 > [ 134.220058] BUG: soft lockup - CPU#0 stuck for 61s! [swapper:0] > [ 134.220058] Modules linked in: uhci_hcd thermal ehci_hcd ata_piix > xen_netfront libata xen_blkfront floppy usbcore thermal_sys nls_base > scsi_mod > [ 134.292664] CPU 0: > [ 134.292664] Modules linked in: uhci_hcd thermal ehci_hcd ata_piix > xen_netfront libata xen_blkfront floppy usbcore thermal_sys nls_base > scsi_mod > [ 134.319566] Pid: 0, comm: swapper Not tainted 2.6.32-5-amd64 #1 HVM domU > # --- > > Do I need some patches or special additional setting of my the squeezy HVM? > > Thank you / regards, > Mark > > -- > ms@it-infrastrukturen.org > > # --- > root@xen411dom0:/etc/xen# xm console 7 > [ 134.220058] BUG: soft lockup - CPU#0 stuck for 61s! [swapper:0] > [ 134.220058] Modules linked in: uhci_hcd thermal ehci_hcd ata_piix xen_netfront libata xen_blkfront floppy usbcore thermal_sys nls_base scsi_mod > [ 134.292664] CPU 0: > [ 134.292664] Modules linked in: uhci_hcd thermal ehci_hcd ata_piix xen_netfront libata xen_blkfront floppy usbcore thermal_sys nls_base scsi_mod > [ 134.319566] Pid: 0, comm: swapper Not tainted 2.6.32-5-amd64 #1 HVM domU > [ 134.369933] RIP: 0010:[<ffffffff8102c58c>] [<ffffffff8102c58c>] native_safe_halt+0x2/0x3 > [ 134.369933] RSP: 0018:ffffffff8142ded0 EFLAGS: 00000246 > [ 134.420796] RAX: ffffffff8142dfd8 RBX: ffffffff814d67d0 RCX: 0000000000000000 > [ 134.420796] RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000001 > [ 134.420796] RBP: ffffffff81011dce R08: 0000000000000000 R09: 0000000081528d90 > [ 134.470673] R10: 00000000fffede31 R11: 0000000000000001 R12: ffffffff814d4dc0 > [ 134.470673] R13: ffffffff8102cdcc R14: ffffffff8102cdcc R15: ffff88020bd80710 > [ 134.521042] FS: 00007f6b183817a0(0000) GS:ffff880008c00000(0000) knlGS:0000000000000000 > [ 134.521042] CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b > [ 134.521042] CR2: 00007f6b17c6de10 CR3: 000000020c797000 CR4: 00000000000006f0 > [ 134.571410] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 > [ 134.571410] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 > [ 134.571410] Call Trace: > [ 134.571410] [<ffffffff81017201>] ? default_idle+0x34/0x51 > [ 134.571410] [<ffffffff8101758d>] ? c1e_idle+0xf5/0xfb > [ 134.621779] [<ffffffff8100feb1>] ? cpu_idle+0xa2/0xda > [ 134.621779] [<ffffffff814f3140>] ? early_idt_handler+0x0/0x71 > [ 134.621779] [<ffffffff814f3cdd>] ? start_kernel+0x3dc/0x3e8 > [ 134.621779] [<ffffffff814f33b7>] ? x86_64_start_kernel+0xf9/0x106 > udevd[98]: worker [107] unexpectedly returned with status 0x0100 > > udevd[98]: worker [107] failed while handling '/devices/pci0000:00/0000:00:01.1' > > udevd[98]: worker [109] unexpectedly returned with status 0x0100 > > udevd[98]: worker [109] failed while handling '/devices/pci0000:00/0000:00:01.2' > > > udevadm settle - timeout of 180 seconds reached, the event queue contains: > /sys/devices/vif-0 (509) > /sys/devices/vif-0/net/eth0 (629) > /sys/devices/pci0000:00/0000:00:01.1/host0 (636) > /sys/devices/pci0000:00/0000:00:01.1/host0/scsi_host/host0 (637) > /sys/devices/pci0000:00/0000:00:01.1/host1 (638) > /sys/devices/pci0000:00/0000:00:01.1/host1/scsi_host/host1 (639) > [ 199.716053] BUG: soft lockup - CPU#0 stuck for 61s! [swapper:0] > [ 199.716053] Modules linked in: scsi_wait_scan(+) uhci_hcd thermal ehci_hcd ata_piix xen_netfront libata xen_blkfront floppy usbcore thermal_sys nls_base scsi_mod > [ 199.792417] CPU 0: > [ 199.804323] Modules linked in: scsi_wait_scan(+) uhci_hcd thermal ehci_hcd ata_piix xen_netfront libata xen_blkfront floppy usbcore thermal_sys nls_base scsi_mod > [ 199.828661] Pid: 0, comm: swapper Not tainted 2.6.32-5-amd64 #1 HVM domU > [ 199.828661] RIP: 0010:[<ffffffff8102c58c>] [<ffffffff8102c58c>] native_safe_halt+0x2/0x3 > [ 199.828661] RSP: 0018:ffffffff8142ded0 EFLAGS: 00000246 > [ 199.828661] RAX: ffffffff8142dfd8 RBX: ffffffff814d67d0 RCX: 0000000000000000 > [ 199.828661] RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000001 > [ 199.828661] RBP: ffffffff81011dce R08: 0000000000000000 R09: 0000000081528d90 > [ 199.828661] R10: 00000000fffede31 R11: 0000000000000001 R12: ffffffff814d4dc0 > [ 199.828661] R13: ffffffff8102cdcc R14: ffffffff8102cdcc R15: ffff88020bd80710 > [ 199.828661] FS: 00007f6b183817a0(0000) GS:ffff880008c00000(0000) knlGS:0000000000000000 > [ 199.828661] CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b > [ 199.828661] CR2: 00007f6b17c6de10 CR3: 000000020c797000 CR4: 00000000000006f0 > [ 199.828661] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 > [ 199.828661] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 > [ 199.828661] Call Trace: > [ 199.828661] [<ffffffff81017201>] ? default_idle+0x34/0x51 > [ 199.828661] [<ffffffff8101758d>] ? c1e_idle+0xf5/0xfb > [ 199.828661] [<ffffffff8100feb1>] ? cpu_idle+0xa2/0xda > [ 199.828661] [<ffffffff814f3140>] ? early_idt_handler+0x0/0x71 > [ 199.828661] [<ffffffff814f3cdd>] ? start_kernel+0x3dc/0x3e8 > [ 199.828661] [<ffffffff814f33b7>] ? x86_64_start_kernel+0xf9/0x106 > [ 242.368420] INFO: task modprobe:110 blocked for more than 120 seconds. > [ 242.397772] "echo 0> /proc/sys/kernel/hung_task_timeout_secs" disables this message. > [ 242.433087] modprobe D ffff88020c750000 0 110 1 0x00000008 > [ 242.467191] ffff88020c750000 0000000000000086 ffff88020bc31eb8 ffff88020bc31eb4 > [ 242.529192] 0000000000000001 ffffffff8114017a 000000000000f9e0 ffff88020bc31fd8 > [ 242.580440] 0000000000015780 0000000000015780 ffff88020c7e0710 ffff88020c7e0a08 > [ 242.643053] Call Trace: > [ 242.655368] [<ffffffff8114017a>] ? sysfs_addrm_finish+0x1d/0x20a > [ 242.682685] [<ffffffff812fbab6>] ? mutex_lock+0xd/0x31 > [ 242.706564] [<ffffffff812fbab6>] ? mutex_lock+0xd/0x31 > [ 242.730188] [<ffffffff8106a173>] ? async_synchronize_cookie_domain+0xac/0x106 > [ 242.770192] [<ffffffff81064f1a>] ? autoremove_wake_function+0x0/0x2e > [ 242.801989] [<ffffffff810689cd>] ? __blocking_notifier_call_chain+0x51/0x5f > [ 242.839526] [<ffffffff8106a1e9>] ? async_synchronize_full+0x10/0x2c > [ 242.853035] [<ffffffff8107aa93>] ? sys_init_module+0x18c/0x21a > [ 242.865641] [<ffffffff81010b42>] ? system_call_fastpath+0x16/0x1b > [ 242.878727] INFO: task modprobe:114 blocked for more than 120 seconds. > [ 242.892536] "echo 0> /proc/sys/kernel/hung_task_timeout_secs" disables this message. > [ 242.923819] modprobe D ffff88020c750000 0 114 1 0x00000008 > [ 242.950968] ffff88020c750000 0000000000000086 ffff88020bc7feb8 ffff88020bc7feb4 > [ 242.980742] 0000000000000001 ffffffff8114017a 000000000000f9e0 ffff88020bc7ffd8 > [ 243.010580] 0000000000015780 0000000000015780 ffff88020c7e0e20 ffff88020c7e1118 > [ 243.045486] Call Trace: > [ 243.056195] [<ffffffff8114017a>] ? sysfs_addrm_finish+0x1d/0x20a > [ 243.079447] [<ffffffff812fbab6>] ? mutex_lock+0xd/0x31 > [ 243.101785] [<ffffffff812fbab6>] ? mutex_lock+0xd/0x31 > [ 243.120773] [<ffffffff8106a173>] ? async_synchronize_cookie_domain+0xac/0x106 > [ 243.144224] [<ffffffff81064f1a>] ? autoremove_wake_function+0x0/0x2e > [ 243.157902] [<ffffffff810689cd>] ? __blocking_notifier_call_chain+0x51/0x5f > [ 243.179377] [<ffffffff8106a1e9>] ? async_synchronize_full+0x10/0x2c > [ 243.199721] [<ffffffff8107aa93>] ? sys_init_module+0x18c/0x21a > [ 243.220748] [<ffffffff81010b42>] ? system_call_fastpath+0x16/0x1b > [ 243.243504] INFO: task modprobe:156 blocked for more than 120 seconds. > [ 243.266942] "echo 0> /proc/sys/kernel/hung_task_timeout_secs" disables this message. > [ 243.292222] modprobe D 0000000000000000 0 156 1 0x00000000 > [ 243.323701] ffff88020f097100 0000000000000082 0000000000000000 ffffffff8105a8dc > [ 243.359538] 0000000000000000 0000000000000292 000000000000f9e0 ffff88020bf15fd8 > [ 243.378636] 0000000000015780 0000000000015780 ffff88020bed8710 ffff88020bed8a08 > [ 243.397627] Call Trace: > [ 243.403676] [<ffffffff8105a8dc>] ? try_to_del_timer_sync+0x63/0x6c > [ 243.416619] [<ffffffff812fbab6>] ? mutex_lock+0xd/0x31 > [ 243.427784] [<ffffffff812fbab6>] ? mutex_lock+0xd/0x31 > [ 243.444511] [<ffffffff812e7966>] ? klist_next+0x3c/0xa7 > [ 243.462728] [<ffffffff8106a173>] ? async_synchronize_cookie_domain+0xac/0x106 > [ 243.488071] [<ffffffff81064f1a>] ? autoremove_wake_function+0x0/0x2e > [ 243.501905] [<ffffffff810689cd>] ? __blocking_notifier_call_chain+0x51/0x5f > [ 243.516667] [<ffffffff8106a1e9>] ? async_synchronize_full+0x10/0x2c > [ 243.529964] [<ffffffff8107aa93>] ? sys_init_module+0x18c/0x21a > [ 243.542466] [<ffffffff81010b42>] ? system_call_fastpath+0x16/0x1b > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-08-24 15:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-13 15:33 BUG: soft lockup - CPU#0 stuck for 61s! [swapper:0] Mark Schneider
2011-08-24 15:30 ` Konrad Rzeszutek Wilk
[not found] <CACeEFf77eOLLNgsJwEYdzeiuxm+qDcO2zs09FK-Waas0sxcwLQ@mail.gmail.com>
2011-08-10 6:29 ` mmap in PV xen-4.0.1 Eric Camachat
2011-08-10 9:12 ` Wei Liu
2011-08-10 18:31 ` Eric Camachat
2011-08-10 19:25 ` Konrad Rzeszutek Wilk
2011-08-10 19:42 ` Ian Campbell
2011-08-10 19:45 ` Eric Camachat
2011-08-10 20:59 ` BUG: soft lockup - CPU#0 stuck for 61s! [swapper:0] Mark Schneider
2011-08-13 15:15 ` Konrad Rzeszutek Wilk
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).