Re: Segmentation fault loading comedi.ko

On 19/09/2006 16:06, Marcel Boehm wrote:
> Hello,
> 
> I installed RTAI 3.4 and comedi-0.7.73 and also the CVS snapshot on a system 
> running Suse 10.1.
> When I trie to load the comedi modul I get a segmentation fault..
> Here is the dmesg output
> 
> I-pipe: Domain RTAI registered.
> RTAI[hal]: <3.4> mounted over IPIPE-NOTHREADS 1.3-00.
> RTAI[hal]: compiled with gcc version 4.1.0 (SUSE Linux).
> RTAI[hal]: mounted (IPIPE-NOTHREADS, IMMEDIATE (INTERNAL IRQs VECTORED), 
> ISOL_CPUS_MASK: 0).
> PIPELINE layers:
> d1328400 9ac15d93 RTAI 200
> c02cad00 0 Linux 100
> RTAI[malloc]: vmalloced extent d135d000, size 2097152.
> RTAI[malloc]: loaded (global heap size=2097152 bytes).
> RTAI[sched]: loaded (IMMEDIATE, UP, USER/KERNEL SPACE<with RTAI TASKs>: ).
> RTAI[sched]: hard timer type/freq = APIC/16746500(Hz); default timing mode is 
> periodic; linear ordering of timed lists.
> RTAI[sched]: Linux timer freq = 250 (Hz), CPU freq = 1741723000 hz.
> RTAI[sched]: timer setup = 999 ns, resched latency = 2944 ns.
> comedi: version 0.7.73 - David Schleef <ds_at_schleef.org>
> Unable to handle kernel NULL pointer dereference at virtual address 00000000
>  printing eip:
> c01ab367
> *pde = 00000000
> Oops: 0000 [#1]
> Modules linked in: comedi rtai_sched rtai_hal xt_pkttype ipt_LOG xt_limit 
> snd_pcm_oss snd_mixer_oss snd_seq af_packet edd button battery ac ip6t_REJECT 
> xt_tcpudp ipt_REJECT xt_state iptable_mangle iptable_nat ip_nat 
> iptable_filter ip6table_mangle ip_conntrack nfnetlink ip_tables 
> ip6table_filter ip6_tables x_tables ipv6 nls_utf8 ntfs loop dm_mod shpchp 
> pci_hotplug snd_via82xx gameport snd_ac97_codec snd_ac97_bus snd_pcm 
> snd_timer snd_page_alloc snd_mpu401_uart i2c_viapro snd_rawmidi i2c_core 
> snd_seq_device via_agp agpgart snd ohci1394 via_ircc 8139too ieee1394 mii 
> soundcore ehci_hcd uhci_hcd usbcore irda ide_cd crc_ccitt cdrom lp parport_pc 
> ppdev parport reiserfs fan thermal processor via82cxxx ide_disk ide_core
> CPU:    0
> EIP:    0060:[<c01ab367>]    Not tainted VLI
> EFLAGS: 00010216   (2.6.16.13-adeos #1)
> EIP is at vsnprintf+0x442/0x473
> eax: 00000000   ebx: cd7eddc0   ecx: 00000000   edx: 00000014
> esi: cd7ede30   edi: ca2e3e48   ebp: d133b2c8   esp: ca2e3de8
> ds: 007b   es: 007b   ss: 0068
> Process modprobe (pid: 3903, threadinfo=ca2e2000 task=cf59d560)
> Stack: <0>c0299374 c014b9c6 cd7ede43 c9d8a800 cd7edec0 cd7eddc0 fffffff4 
> cd7edec0
>        d133b2c8 c0207041 cd7ede30 00000014 00000000 ca2e3e48 ca2e3e48 00000001
>        c9d8a800 cfc35d80 d12ee112 cd7edec0 00000000 00000000 06200000 00000000
> Call Trace:
>  [<c014b9c6>] __kmalloc+0x92/0x9d
>  [<c0207041>] class_device_create+0x6f/0x97
>  [<d12ee112>] comedi_init+0x112/0x127 [comedi]
>  [<c012d172>] sys_init_module+0x12c8/0x145d
>  [<c0127603>] autoremove_wake_function+0x0/0x3a
>  [<c01333c9>] audit_syscall_entry+0xf5/0x11a
>  [<c0105420>] do_syscall_trace+0x134/0x180
>  [<c0102af8>] syscall_call+0x7/0xb
> Code: f9 1f ff 74 24 10 ff 74 24 10 55 ff 74 24 10 51 52 8b 54 24 20 89 f0 89 
> df e8 20 f5 ff ff 89 c6 83 c4 18 ff 44 24 30 8b 44 24 30 <8a> 00 84 c0 0f 85 
> 39 fc ff ff 3b 74 24 08 77 05 c6 06 00 eb 0e
> 
> 
> Any ideas what to do?
> Thanks in advance,

It's due to a clash between RTAI and Comedi solving the same 
compatibility problem in slightly different, incompatible ways. Please 
see this thread: http://thread.gmane.org/gmane.linux.comedi/5034/focus=5034

You can follow the advice in that thread (rename CLASS_DEVICE_CREATE to 
class_device_create in comedi/comedi_fops.c), or you can build the CVS 
version which renames the CLASS_DEVICE_CREATE macro to avoid the clash.

-- 
-=( Ian Abbott _at_ MEV Ltd.    E-mail: <abbotti_at_mev.co.uk>        )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587         )=-

Received on 2006-09-20Z08:28:54