Re: comedi_do_insn() segmentation fault

Thank you for your help Ian.

On 9/17/07, Ian Abbott <abbotti_at_mev.co.uk> wrote:
>
> On 16/09/2007 02:38, george gomes wrote:
> > Hi all
> >
> > I am having a segmentation fault problem when I execute the line:
> >
> > int ret = comedi_do_insn(dev, &insn);
> >
> > If i reboot i don't get the fault one time but when run it again i do.
>
> Is it a kernel Oops?  I.e., do you see a kernel stacktrace when you run
> 'dmesg'?


I belive the answer to your question is yes.  Here are the tail lines of
dmesg.  "hithere" is the name of the app.  What is the matter?

[17261047.688000] note: hithere[24802] exited with preempt_count 1
[17261277.028000] ------------[ cut here ]------------
[17261277.028000] kernel BUG at
/home/georgegdc/comedi/comedi/drivers/ni_mio_common.c:419!
[17261277.028000] invalid operand: 0000 [#9]
[17261277.028000] PREEMPT
[17261277.028000] Modules linked in: ipv6 ppdev cpufreq_userspace
cpufreq_stats freq_table cpufreq_powersave cpufreq_ondemand
cpufreq_conservative video tc1100_wmi sony_acpi pcc_acpi hotkey dev_acpi
container button acpi_sbs battery ac i2c_acpi_ec dm_mod af_packet md_mod lp
parport_pc parport tsdev snd_seq_dummy snd_seq_oss i2c_viapro i2c_core
snd_seq_midi snd_seq_midi_event snd_seq via_rhine via_ircc floppy mii usbhid
psmouse irda serio_raw crc_ccitt snd_via82xx gameport pcspkr snd_ac97_codec
snd_ac97_bus snd_pcm_oss snd_mixer_oss snd_pcm snd_timer snd_page_alloc
snd_mpu401_uart snd_rawmidi snd_seq_device snd soundcore rtc ni_pcimio
comedi_fc 8255 ni_tio mite comedi via_agp agpgart shpchp pci_hotplug evdev
ext3 jbd ide_generic ehci_hcd uhci_hcd usbcore ide_cd cdrom ide_disk
via82cxxx generic thermal processor fan capability commoncap vga16fb
vgastate fbcon tileblit font bitblit softcursor
[17261277.028000] CPU:    0
[17261277.028000] EIP:    0060:[<e09627b5>]    Tainted: GF     VLI
[17261277.028000] EFLAGS: 00010082   (2.6.15-29-386)
[17261277.028000] EIP is at ni_request_ao_mite_channel+0x145/0x180
[ni_pcimio]
[17261277.028000] eax: ddaabb7c   ebx: d4ac8000   ecx: e0c101a8   edx:
00000001
[17261277.028000] esi: c775a000   edi: dd493000   ebp: c2a02400   esp:
c775beb0
[17261277.028000] ds: 007b   es: 007b   ss: 0068
[17261277.028000] Process hithere (pid: 24878, threadinfo=c775a000
task=d1899570)
[17261277.028000] Stack: 00000283 dd493000 cea88080 dd493000 c2a02400
e0963d02 dd493000 00000246
[17261277.028000]        c775a000 e0965fa2 dd493000 c775bf24 c775bf24
dd493000 e0947141 dd493000
[17261277.028000]        cea88080 00000000 00000046 c775bf24 c775bf24
c2a02400 8020640c 00000003
[17261277.028000] Call Trace:
[17261277.028000]  [<e0963d02>] ni_ao_setup_MITE_dma+0x12/0xa0 [ni_pcimio]
[17261277.028000]  [<e0965fa2>] ni_ao_inttrig+0x82/0x200 [ni_pcimio]
[17261277.028000]  [<e0947141>] parse_insn+0x161/0x360 [comedi]
[17261277.028000]  [<e09473b2>] do_insn_ioctl+0x72/0x100 [comedi]
[17261277.028000]  [<c0172fa7>] do_ioctl+0x67/0x80
[17261277.028000]  [<c0173141>] vfs_ioctl+0x51/0x1f0
[17261277.028000]  [<c017333d>] sys_ioctl+0x5d/0x90
[17261277.028000]  [<c0102feb>] sysenter_past_esp+0x54/0x79
[17261277.028000] Code: b8 05 00 00 00 eb e6 eb 0d 90 90 90 90 90 90 90 90
90 90 90 90 90 b8 03 00 00 00 eb d0 e8 b4 a2 98 df eb ba e8 ad a2 98 df eb
a5 <0f> 0b a3 01 e0 b2 96 e0 e9 d7 fe ff ff ff 34 24 9d ff 4e 14 8b
[17261277.028000]  mite: DMA underrun
[17261277.032000] note: hithere[24878] exited with preempt_count 1
[17281908.856000] eth0: link down
[17281918.668000] eth0: link up, 100Mbps, full-duplex, lpa 0x45E1

george

Received on 2007-09-22Z02:23:07