This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Segmentation Fault during modprobe

Other Parts Discussed in Thread: TVP5146

Hi to all,

On DM6446 EVM I have succesfully load modules for davinci_vpfe with the below command
"modprobe davinci_capture device_type=0"
and then run ./prev_vga_example which captures data from my MT9V113 sensor and displays on my 4.3" LCD.

While I am trying to add resizer function to the prev_vga_example application I got a "Segmentation Fault". After that I can not load modules again with "modprobe davinci_capture device_type=0". There is no change on the modules, kernel and filesys ;only application changes but I can not load modules which gives the below error:

root@192.168.184.70:/opt/dvsdk/Leopard_imaging# ./load_modules.sh

kobject_register failed for vpfe (-17)
Unable to handle kernel NULL pointer dereference at virtual address 00000070
pgd = c5300000
[00000070] *pgd=852da031, *pte=00000000, *ppte=00000000
Internal error: Oops: 17 [#1]
Modules linked in: davinci_capture mt9t001 tvp5146
CPU: 0
PC is at vpfe_init+0x228/0x674 [davinci_capture]
LR is at bus_add_driver+0x6c/0x12c
pc : [<bf00c650>]    lr : [<c0169f44>]    Not tainted
sp : c6c49f40  ip : c6c49f18  fp : c6c49f74
r10: 003f4800  r9 : bf00fc04  r8 : 00000000
r7 : bf00fc14  r6 : bf00fc08  r5 : 003f47ff  r4 : 00000003
r3 : 00000000  r2 : bf00fc00  r1 : c6c48000  r0 : ffffffef
Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  Segment user
Control: 5317F  Table: 85300000  DAC: 00000015
Process modprobe (pid: 1066, stack limit = 0xc6c481a0)
Stack: (0xc6c49f40 to 0xc6c4a000)
9f40: c003c55c c6c48000 c6c48000 bf00fb00 c02d3ff0 c6c48000 c02d3fe0 00000000
9f60: c6c48000 00000002 c6c49fa4 c6c49f78 c00681ec bf00c438 4b1fb5ea 00009190
9f80: 00000000 00000000 00000080 c0036154 c6c48000 00900080 00000000 c6c49fa8
9fa0: c00359c0 c006802c 00009190 00000000 4012d000 00007cf4 00015490 00015490
9fc0: 00009190 00000000 00000000 00015210 00015270 00000000 4012d000 0001527c
9fe0: 000148b4 befff98c 0000a070 400d074c 60000010 4012d000 00000010 00000000
Backtrace:
[<bf00c428>] (vpfe_init+0x0/0x674 [davinci_capture]) from [<c00681ec>] (sys_init_module+0x1d0/0x3e0)
[<c006801c>] (sys_init_module+0x0/0x3e0) from [<c00359c0>] (ret_fast_syscall+0x0/0x2c)
Code: e3500000 0a00000b e59f2408 e5923000 (e5931070)
./load_modules.sh: line 1:  1066 Segmentation fault      modprobe davinci_capture device_type=0

 ***********************************************TOTAL LOG***********************************************



U-Boot code: 81080000 -> 81097628  BSS: -> 810A0018
RAM Configuration:
Bank #0: 80000000 256 MB
Flash: 16 MB
In:    serial
Out:   serial
Err:   serial
ARM Clock :- 297MHz
DDR Clock :- 162MHz
Hit any key to stop autoboot:  0
BOOTP broadcast 1
DHCP client bound to address 192.168.184.70
TFTP from server 192.168.170.238; our IP address is 192.168.184.70
Filename 'uImage'.
Load address: 0x80700000
Loading: #################################################################
        #################################################################
        #################################################################
        #################################################################
        #########################################
done
Bytes transferred = 1538584 (177a18 hex)
## Booting image at 80700000 ...
  Image Name:   Linux-2.6.10_mvl401
  Image Type:   ARM Linux Kernel Image (uncompressed)
  Data Size:    1538520 Bytes =  1.5 MB
  Load Address: 80008000
  Entry Point:  80008000
  Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linu...................................................................................................... done, bootiLinux version 2.6.10_mvl401 (root@localhost.localdomain) (gcc version 3.4.3 (MontaVista 3.4.3-25.0.104.0600975 2006-07-06)) #15 Thu Jul 23 17:34:39 EEST 2009
CPU: ARM926EJ-Sid(wb) [41069265] revision 5 (ARMv5TEJ)
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
CPU0: D cache: 8192 bytes, associativity 4, 32 byte lines, 64 sets
Machine: DaVinci EVM
Memory policy: ECC disabled, Data cache writeback
DM6443
Built 1 zonelists
Kernel command line: console=ttyS0,115200n8 noinitrd rw ip=dhcp root=/dev/nfs nfsroot=192.168.171.89:/home/ferhat_olgun/workdir/filesys,nolock mem=116M video=davincifb:vid0=480x272x16,765K:vid1=480x272x16,765K:osd0=480x272x16,765K davinci_enc_mngr.ch0_output=LCD davinci_enc_mngr.ch0_mode=640x480
PID hash table entries: 512 (order: 9, 8192 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 116MB = 116MB total
Memory: 114304KB available (2656K code, 529K data, 180K init)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
spawn_desched_task(00000000)
desched cpu_callback 3/00000000
ksoftirqd started up.
desched cpu_callback 2/00000000
desched thread 0 started up.
NET: Registered protocol family 16
DaVinci: 71 gpio irqs
Registering platform device 'serial8250.0'. Parent at platform
Registering platform device 'musb_hdrc'. Parent at platform
Registering platform device 'mmc.0'. Parent at platform
DaVinci I2C DEBUG: 10:01:56 Jun 16 2009
Registering platform device 'i2c'. Parent at platform
ch0 default output "LCD", mode "NTSC"
MUX: initialized LOEEN
MUX: initialized LFLDEN
VPBE Encoder Initialized
Invalid id...
Set output or mode failed, reset to encoder default...
MUX: initialized GPIO0
MUX: initialized RGB666
MUX: initialized LOEEN
MUX: initialized GPIO3
LogicPD encoder initialized
SCSI subsystem initialized
usbcore: registered new driver usbfs
usbcore: registered new driver hub
musb_hdrc: version 2.2a/db-0.4.8 [cppi-dma] [host] [debug=0]
musb_hdrc: ConfigData=0x06 (UTMI-8, dyn FIFOs, SoftConn)
musb_hdrc: MHDRC RTL version 1.300
musb_hdrc: USB Host mode controller at c7802000 using DMA, IRQ 12
musb_hdrc musb_hdrc: new USB bus registered, assigned bus number 1
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
MUX: initialized MCBSP0
JFFS2 version 2.2. (NAND) (C) 2001-2003 Red Hat, Inc.
yaffs Jun 16 2009 10:00:34 Installing.
Registering platform device 'davincifb.0'. Parent at platform
davincifb davincifb.0: dm_osd0_fb: 480x272x16@0,0 with framebuffer size 765KB
davincifb davincifb.0: dm_vid0_fb: 480x272x16@0,0 with framebuffer size 765KB
davincifb davincifb.0: dm_osd1_fb: 480x272x4@0,0 with framebuffer size 255KB
davincifb davincifb.0: dm_vid1_fb: 480x272x16@0,0 with framebuffer size 765KB
watchdog: TI DaVinci Watchdog Timer: timer margin 64 sec
Registering platform device 'davinci_resizer.2'. Parent at platform
Registering platform device 'davinci_previewer.2'. Parent at platform
Serial: 8250/16550 driver $Revision: 1.90 $ 2 ports, IRQ sharing disabled
Registering platform device 'serial8250'. Parent at platform
ttyS0 at MMIO 0x1c20000 (irq = 40) is a 16550A
io scheduler noop registered
io scheduler anticipatory registered
RAMDISK driver initialized: 1 RAM disks of 32768K size 1024 blocksize
loop: loaded (max 8 devices)
Registering platform device 'ti_davinci_emac'. Parent at platform
TI DaVinci EMAC: MAC address is 00:0e:99:02:5a:92
TI DaVinci EMAC Linux version updated 5.0
TI DaVinci EMAC: Installed 1 instances.
netconsole: not configured, aborting
i2c /dev entries driver
Linux video capture interface: v1.00
Registering platform device 'vpfe.1'. Parent at platform
DaVinci I2C WARNING: i2c: NACK detected
DaVinci I2C WARNING: i2c: NACK detected
DaVinci I2C WARNING: i2c: NACK detected
DaVinci I2C WARNING: i2c: NACK detected
DaVinci I2C WARNING: i2c: NACK detected
vpfe vpfe.1: DaVinci v4l2 capture driver V1.0 loaded
Registering platform device 'DavinciDisplay.1'. Parent at platform
Trying to register davinci display video device.
layer=c70e4c00,layer->video_dev=c70e4d64
Trying to register davinci display video device.
layer=c70e4a00,layer->video_dev=c70e4b64
davinci_init:DaVinci V4L2 Display Driver V1.0 loaded

Davici AEW Driver cannot be loaded
VIDEO PORT is not enabledData Flow path from CCDC is disabled

Davinci AF driver cannot be loaded
VIDEO PORT is not enabled
CCDC needs to be configured<6>Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
MUX: initialized HDIREN
MUX: initialized ATAEN
hda: TOSHIBA MK4032GAX, ATA DISK drive
elevator: using anticipatory as default io scheduler
ide0 at 0xe10661f0-0xe10661f7,0xe10663f6 on irq 22
hda: max request size: 1024KiB
hda: 78140160 sectors (40007 MB), CHS=16383/255/63
hda: hda1 hda2
   ide0: BM-DMA at 0xe1066000-0xe1066007, BIOS settings: hda:pio, hdb:pio
Initializing USB Mass Storage driver...
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
usbcore: registered new driver usbhid
drivers/usb/input/hid-core.c: v2.0:USB HID core driver
mice: PS/2 mouse device common for all mice
mmc mmc.0: Supporting 4-bit mode
mmc mmc.0: Using DMA mode
Registering platform device 'davinci-audio.0'. Parent at platform
NET: Registered protocol family 2
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 8192 bind 16384)
NET: Registered protocol family 1
NET: Registered protocol family 10
IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
Sending DHCP requests ., OK
IP-Config: Got DHCP answer from 0.0.0.0, my address is 192.168.184.70
IP-Config: Complete:
     device=eth0, addr=192.168.184.70, mask=255.255.192.0, gw=192.168.128.200,
    host=192.168.184.70, domain=karelarge.com, nis-domain=(none),
    bootserver=0.0.0.0, rootserver=192.168.171.89, rootpath=
Looking up port of RPC 100003/2 on 192.168.171.89
Looking up port of RPC 100005/1 on 192.168.171.89
VFS: Mounted root (nfs filesystem).
Freeing init memory: 180K
INIT: version 2.85 booting
Mounting a tmpfs over /dev...done.
Creating initial device nodes...done.
Activating swap...done.
Remounting root filesystem...done.
Calculating module dependencies
Loading modules:
Checking all file systems: fsck
fsck 1.35 (28-Feb-2004)
Mounting local filesystems: mount nothing was mounted
Cleaning: /tmp /var/lock /var/run done.
Setting up networking (ifupdown) ..
Cleaning: /etc/network/run/ifstate done.
Starting network interfaces: done.
Starting hotplug subsystem:
  pci      pci      [success]
  usb      usb      [success]
  isapnp   isapnp   [success]
  ide      ide      [success]
  input    input    [success]
  scsi     scsi     [success]
done.
Starting portmap daemon: portmap.
done.
Setting pseudo-terminal access permissions...done.
Updating /etc/motd...done.
INIT: Entering runlevel: 3
Starting NFS common utilities: statd lockd.
Starting internet superserver: inetd.
Starting MontaVista target tools daemon: mvltdmvltd version 2.1 MontaVista Software,Inc.
mvltd[1053]: started on port 34577
.
MontaVista(R) Linux(R) Professional Edition 4.0.1 (0600980)

192.168.184.70 login: root
Last login: Sun Feb  1 02:21:24 2004 on console
Linux 192.168.184.70 2.6.10_mvl401 #15 Thu Jul 23 17:34:39 EEST 2009 armv5tejl GNU/Linux
root@192.168.184.70:~# cd /opt/dvsdk/Leopard_imaging/
root@192.168.184.70:/opt/dvsdk/Leopard_imaging# ./load_modules.sh

ccdc_init()<6>
ccdc_get_frame_format<6>
vpfe_device.fbuffers[i]<6>
vpfe_device.fbuffers[i]<6>
vpfe_device.fbuffers[i]kobject_register failed for vpfe (-17)
Unable to handle kernel NULL pointer dereference at virtual address 00000070
pgd = c5300000
[00000070] *pgd=852da031, *pte=00000000, *ppte=00000000
Internal error: Oops: 17 [#1]
Modules linked in: davinci_capture mt9t001 tvp5146
CPU: 0
PC is at vpfe_init+0x228/0x674 [davinci_capture]
LR is at bus_add_driver+0x6c/0x12c
pc : [<bf00c650>]    lr : [<c0169f44>]    Not tainted
sp : c6c49f40  ip : c6c49f18  fp : c6c49f74
r10: 003f4800  r9 : bf00fc04  r8 : 00000000
r7 : bf00fc14  r6 : bf00fc08  r5 : 003f47ff  r4 : 00000003
r3 : 00000000  r2 : bf00fc00  r1 : c6c48000  r0 : ffffffef
Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  Segment user
Control: 5317F  Table: 85300000  DAC: 00000015
Process modprobe (pid: 1066, stack limit = 0xc6c481a0)
Stack: (0xc6c49f40 to 0xc6c4a000)
9f40: c003c55c c6c48000 c6c48000 bf00fb00 c02d3ff0 c6c48000 c02d3fe0 00000000
9f60: c6c48000 00000002 c6c49fa4 c6c49f78 c00681ec bf00c438 4b1fb5ea 00009190
9f80: 00000000 00000000 00000080 c0036154 c6c48000 00900080 00000000 c6c49fa8
9fa0: c00359c0 c006802c 00009190 00000000 4012d000 00007cf4 00015490 00015490
9fc0: 00009190 00000000 00000000 00015210 00015270 00000000 4012d000 0001527c
9fe0: 000148b4 befff98c 0000a070 400d074c 60000010 4012d000 00000010 00000000
Backtrace:
[<bf00c428>] (vpfe_init+0x0/0x674 [davinci_capture]) from [<c00681ec>] (sys_init_module+0x1d0/0x3e0)
[<c006801c>] (sys_init_module+0x0/0x3e0) from [<c00359c0>] (ret_fast_syscall+0x0/0x2c)
Code: e3500000 0a00000b e59f2408 e5923000 (e5931070)
./load_modules.sh: line 1:  1066 Segmentation fault      modprobe davinci_capture device_type=0


What may be the reason for the Segmentation fault during modprobe?

Ferhat