LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-17-2011, 04:53 AM   #1
vaishnavi05s
LQ Newbie
 
Registered: Jan 2011
Posts: 1

Rep: Reputation: 0
Memory error -kmap problem


Hi,

1.I have a asynchronous driver which is a loop back driver copying data from input buf to output buf passed from the user space.
2.we use get_user_pages to access the user buffers which are allocated using posix_memalign.
3.I use kmap to get kernel virtual address from those pages.
4. I do a memcpy from input to output buffer using kmap virtual address.
5.first few times after booting there is no problem.
6.afterwards i get one of the 2 errors
a.sometimes during kunmap when kmap maps the address which is out of kernel virtual address range (trace is given below).
b.other times during memcpy the output page pointer points to an invalid memory.



the mapping of input pages is successful ddf9b000
[ 210.010657] the mapping of output pages is successful 5be77000
[ 210.010659] the mapping of input pages is successful dd302000
[ 210.010662] the mapping of output pages is successful e2bff000
[ 210.010665] the mapping of input pages is successful e26f1000
[ 210.010667] the mapping of output pages is successful d23fd000
[ 210.010670] the mapping of input pages is successful d768d000
[ 210.010672] the mapping of output pages is successful df7e8000
[ 210.010675] the mapping of input pages is successful e0432000
[ 210.010677] the mapping of output pages is successful d1bcb000
[ 210.010680] the mapping of input pages is successful e06cd000
[ 210.010682] the mapping of output pages is successful e0c81000
[ 210.010685] the mapping of input pages is successful d4b1d000
[ 210.010687] the mapping of output pages is successful d20dd000
[ 210.010690] the mapping of input pages is successful dda2d000
[ 210.010692] the mapping of output pages is successful e33d3000
[ 210.010695] Before memcpy
[ 210.010714] BUG: unable to handle kernel paging request at 5be77000
[ 210.010720] IP: [<f906239e>] pixfix2t_aio_write+0x73e/0x89c [aio_driver]
[ 210.010731] *pde = 00000000
[ 210.010735] Oops: 0002 [#1] SMP
[ 210.010740] last sysfs file: /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-0:1.0/uevent
[ 210.010746] Modules linked in: aio_driver binfmt_misc snd_intel8x0 snd_es1968 fbcon tileblit font bitblit softcursor gameport vga16fb vgastate snd_ac97_codec ac97_bus snd_mpu401_uart snd_pcm_oss snd_mixer_oss snd_pcm snd_seq_dummy snd_seq_oss snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq snd_timer snd_seq_device i915 ppdev drm_kms_helper radio_maestro v4l2_common snd parport_pc intel_agp lp drm i2c_algo_bit videodev soundcore video v4l1_compat agpgart output snd_page_alloc parport usbhid hid 8139too floppy 8139cp mii
[ 210.010808]
[ 210.010813] Pid: 2190, comm: gst-launch-0.10 Not tainted (2.6.32-24-generic #43-Ubuntu)
[ 210.010817] EIP: 0060:[<f906239e>] EFLAGS: 00010206 CPU: 1
[ 210.010822] EIP is at pixfix2t_aio_write+0x73e/0x89c [aio_driver]
[ 210.010826] EAX: 00000023 EBX: 00000000 ECX: 00000400 EDX: 00000000
[ 210.010829] ESI: ddf9b000 EDI: 5be77000 EBP: ec36deec ESP: ec36de8c
[ 210.010832] DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
[ 210.010836] Process gst-launch-0.10 (pid: 2190, ti=ec36c000 task=ec300000 task.ti=ec36c000)
[ 210.010839] Stack:
[ 210.010842] f9062807 e33d3000 00000004 00000008 00000000 00000001 00000008 00000000
[ 210.010852] <0> ec308f68 00000008 ec308f60 f3c52000 00000000 00112233 00000001 b6d02000
[ 210.010863] <0> 00008000 b6d1c000 00008000 00000004 00000004 f4b50a00 00000000 00008000
[ 210.010875] Call Trace:
[ 210.010888] [<c023d84c>] ? aio_rw_vect_retry+0x6c/0x190
[ 210.010894] [<f9061c60>] ? pixfix2t_aio_write+0x0/0x89c [aio_driver]
[ 210.010899] [<c023d7e0>] ? aio_rw_vect_retry+0x0/0x190
[ 210.010904] [<c023ec77>] ? aio_run_iocb+0x57/0x150
[ 210.010909] [<c023e2dc>] ? aio_setup_iocb+0x15c/0x270
[ 210.010913] [<c023e11e>] ? __aio_get_req+0xbe/0x120
[ 210.010918] [<c023f692>] ? io_submit_one+0x172/0x200
[ 210.010923] [<c023f809>] ? sys_io_submit+0xe9/0x150
[ 210.010930] [<c01033ec>] ? syscall_call+0x7/0xb
[ 210.010933] Code: 07 28 06 f9 31 db e8 cb 83 52 c7 3b 5d c4 7d 39 8b 34 9d 20 3a 06 f9 85 f6 74 29 8b 3c 9d e0 39 06 f9 85 ff 74 1e b9 00 04 00 00 <f3> a5 8b 4d c4 89 5c 24 04 c7 04 24 0c 32 06 f9 89 4c 24 08 e8
[ 210.010997] EIP: [<f906239e>] pixfix2t_aio_write+0x73e/0x89c [aio_driver] SS:ESP 0068:ec36de8c
[ 210.011004] CR2: 000000005be77000
[ 210.011009] ---[ end trace 9828bdacbb334bc2 ]---


Thank you

Last edited by vaishnavi05s; 01-17-2011 at 08:07 AM. Reason: additional info
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Error while saving memory pages of a process- Sleeping in memory from invalid context Deep Narayan Dubey Linux - Kernel 1 04-05-2012 03:58 PM
KMAP Physical Page to Kernel Virtual Address: unable to handle kernel paging request kickuindajunk Linux - Kernel 6 08-21-2010 01:17 PM
Memory error: extended error chipkill ecc error rajivdp Linux - Hardware 1 12-07-2009 09:26 AM
Debian Lenny cf.kmap keyboard bug JPG0J Debian 4 05-27-2009 09:21 PM
Linux shared memory segment access problem and x86 Virtual Memory layout. regmee Linux - Kernel 1 08-23-2008 01:11 AM


All times are GMT -5. The time now is 08:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration