2008-03-27 00:42:27 2008 SVN -- BUG; failure at mm/nommu.c:861/do_mmap_private()!
david wang (CHINA)
Message: 53090
HI,
I've download the latest kernel and toolchain on Mar 26, and got a kernel panic of do_mmap_private. Even if a simplest helloworld program will cause this failure. The kernel is built with FDPIC type and support FDPIC application by make menuconfig. Is this a bug of the newest kernel? The same program works fine in the older kernel of Dec 2007.
Below is the dump of the boot up and error message,
U-Boot-1.1.3-ADI-R06R2 (Dec 10 2007 - 15:47:37)
CPU: ADSP BF537 Rev.: 0.2
Board: ADI BF537 stamp board
Support: http://blackfin.uclinux.org/
Clock: VCO: 500 MHz, Core: 500 MHz, System: 100 MHz
SDRAM: 64 MB
flash id = INTEL_MANUFACT
device id = INTEL_ID_28F320C3T
info->flash_id = 30009e
FLASH: 4 MB
In: serial
Out: serial
Err: serial
Using MAC Address 00:11:22:33:44:53
Net: ADI BF537 EMAC
I2C: ready
Hit any key to stop autoboot: 0
bf537> run nfsoboot
## Error: "nfsoboot" not defined
bf537> run nfsboot
Using MAC Address 00:11:22:33:44:53
TFTP from server 192.168.1.190; our IP address is 192.168.1.193
Filename 'linux'.
Load address: 0x1000000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################
done
Bytes transferred = 4158354 (3f7392 hex)
Loading .text @ 0x00100000 (1242272 bytes)
Loading .exit.text.refok @ 0x0022f4a0 (276 bytes)
Loading .rodata @ 0x0022f5c0 (338768 bytes)
Loading __ksymtab @ 0x00282110 (16320 bytes)
Loading __ksymtab_gpl @ 0x002860d0 (4448 bytes)
Loading __ksymtab_strings @ 0x00287230 (50024 bytes)
Loading __param @ 0x00293598 (560 bytes)
Clearing .bss @ 0x002937e0 (75776 bytes)
Loading .data @ 0x002a5fe0 (90144 bytes)
Loading .init.text @ 0x002bc000 (94048 bytes)
Loading .init.data @ 0x002d2f60 (13004 bytes)
Loading .init.setup @ 0x002d622c (592 bytes)
Loading .initcall.init @ 0x002d647c (476 bytes)
Loading .con_initcall.init @ 0x002d6658 (4 bytes)
Loading .init.ramfs @ 0x002d665c (1629930 bytes)
Loading .text_l1 @ 0xffa00000 (8160 bytes)
sh_addr: FFA00000, p_paddr: 00464546
Loading from: 01354000 to 00464546, size: 8160
Loading .data_l1 @ 0xff800000 (192 bytes)
sh_addr: FF800000, p_paddr: 00466526
Loading from: 01356000 to 00466526, size: 192
## Starting application at 0x002bc000 ...
Linux version 2.6.24.3-ADI-2008R2-pre-svn4483 (wangyixin@svnhost.imagintech) (gcc version 4.1.2 (ADI svn)) #170 Thu Mar 27 11:41:43 CST 2008
Warning: limiting memory to 56MB due to hardware anomaly 05000263
Board Memory: 64MB
Kernel Managed Memory: 64MB
Memory map:
fixedcode = 0x00000000400-0x00000000490
text = 0x00000000100000-0x0000000022f4a0
rodata = 0x0000000022f5c0-0x000000002937c8
bss = 0x000000002937e0-0x000000002a5fe0
data = 0x000000002a5fe0-0x000000002bc000
stack = 0x000000002ba000-0x000000002bc000
init = 0x000000002bc000-0x00000000467000
available = 0x00000000467000-0x0000000037ff000
DMA Zone = 0x000000003e00000-0x000000004000000
Hardware Trace Active and Enabled
Blackfin support (C) 2004-2008 Analog Devices, Inc.
Compiled for ADSP-BF537 Rev 0.2
Blackfin Linux support by http://blackfin.uclinux.org/
Processor Speed: 600 MHz core clock and 120 MHz System Clock
Instruction Cache Enabled
Data Cache Enabled (write-through)
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 14224
Kernel command line: root=/dev/nfs rw nfsroot=192.168.1.190:/romfs ip=192.168.1.193:192.168.1.190:192.168.1.1:255.255.255.0:BF537:eth0:off
Configuring Blackfin Priority Driven Interrupts
PID hash table entries: 256 (order: 8, 1024 bytes)
console [ttyBF0] enabled
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory available: 52252k/65536k RAM, (1708k init code, 1213k kernel code, 563k data, 2048k dma, 7752k reserved)
Blackfin Scratchpad data SRAM: 4 KB
Blackfin Data A SRAM: 16 KB (15 KB free)
Blackfin Data B SRAM: 32 KB (32 KB free)
Blackfin Instruction SRAM: 48 KB (40 KB free)
Security Framework initialized
Mount-cache hash table entries: 512
net_namespace: 64 bytes
NET: Registered protocol family 16
Blackfin GPIO Controller
Blackfin DMA Controller
stamp_init(): registering device resources
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
JFFS2 version 2.2. (NAND) 漏 2001-2006 Red Hat, Inc.
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler cfq registered
ker_r_w driver, to read/write all registers, V1.00
Complite time: Mar 27 2008 11:39:42
Serial: Blackfin serial driver
bfin-uart.1: ttyBF0 at MMIO 0x00000000ffc00400 (irq = 18) is a BFIN-UART
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
bfin_mac_mdio: probed
bfin_mac: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:00000000d, irq=-1, mdc_clk=2500000Hz(mdc_div=23)@sclk=120MHz)
bfin_mac: Version 1.1, Blackfin BF53[67] BF527 on-chip Ethernet MAC driver
Linux video capture interface: v2.00
I2C Device initial: for bf537
tvp5150a: Ti 5150a i2c driver ready
bfin-spi bfin-spi.0: Blackfin BF5xx on-chip SPI Controller Driver, Version 1.0, regs_base@00000000ffc00500, dma channel@7
i2c /dev entries driver
i2c-bfin-twi i2c-bfin-twi.0: Blackfin BF5xx on-chip I2C TWI Contoller, regs_base@00000000ffc01400
spi_mmc: configure for card detection
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
dma_alloc_init: dma_page @ 0x000000006f2000 - 512 pages at 0x000000003e00000
IP-Config: Complete:
device=eth0, addr=192.168.1.193, mask=255.255.255.0, gw=192.168.1.1,
host=BF537, domain=, nis-domain=(none),
bootserver=192.168.1.190, rootserver=192.168.1.190, rootpath=
Freeing unused kernel memory: 1708k freed
_____________________________________
a8888b. / Welcome to the uClinux distribution \
d888888b. / _ _ \
8P"YP"Y88 / | | |_| __ __ (TM) |
8|o||o|88 _____/ | | _ ____ _ _ \ \/ / |
8' .88 \ | | | | _ \| | | | \ / |
8`._.' Y8. \ | |__ | | | | | |_| | / \ |
d/ `8b. \ \____||_|_| |_|\____|/_/\_\ |
dP . Y8b. \ For embedded processors including |
d8:' " `::88b \ the Analog Devices Blackfin /
d8" 'Y88b \___________________________________/
:8P ' :888
8a. : _a88P For further information, check out:
._/"Yaa_: .| 88P| - http://blackfin.uclinux.org/
\ YP" `| 8P `. - http://docs.blackfin.uclinux.org/
/ \.___.d| .' - http://www.uclinux.org/
`--..__)8888P`._.' jgs/a:f - http://www.analog.com/blackfin
Have a lot of fun...
BusyBox v1.9.1 (2008-03-27 11:19:47 CST) built-in shell (msh)
Enter 'help' for a list of built-in commands.
root:/> PHY: 0:00000000d - Link is Up - 100/Full
root:/> mount -o nolock 192.168.1.100:/share/wangyixin/romfs/usr /mnt
root:/> cd /mnt/bin
root:/mnt/bin> ./test
BUG: failure at mm/nommu.c:861/do_mmap_private()!
Kernel panic - not syncing: BUG!
QuoteReplyEditDelete
2008-03-27 01:38:49 Re: 2008 SVN -- BUG; failure at mm/nommu.c:861/do_mmap_private()!
Yi Li (CHINA)
Message: 53091 Could you post your test app? And how do you build your test?
QuoteReplyEditDelete
2008-03-27 01:51:56 Re: 2008 SVN -- BUG; failure at mm/nommu.c:861/do_mmap_private()!
david wang (CHINA)
Message: 53094
hi, Yi
It's a simplest test program, just print the system clock every 1 seconds.
//////////////////////////test.c/////////////////////////////////////////////////////////////////////////////////////////////
#include <stdio.h>
#include <time.h>
#include <sys/time.h>
#define int64_t long long
static int64_t gettime(void)
{
struct timeval tv;
gettimeofday(&tv, NULL);
return (int64_t)tv.tv_sec * 1000000 + tv.tv_usec;
}
int main(void)
{
while(1)
{
printf("Time now: %lld\n", gettime());
usleep(1000*1000);
}
return 0;
}
//////////////////////////Makefile/////////////////////////////////////////////////////////////////////////////////////////////
bindir = /share/wangyixin/romfs/usr/bin
libdir = /share/wangyixin/romfs/usr/lib
CROSS = bfin-linux-uclibc-
CC = $(CROSS)gcc
CFLAGS += -g -Wall -mfdpic
SRCS = test.c
BINS = test
OBJS = $(SRCS:%.c=%.o)
%.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
all: $(BINS)
$(BINS): $(BINS).o
$(CC) $(CFLAGS) -o $@ $^
clean:
rm -f *.o $(BINS)
install : $(BINS)
install $(BINS) $(bindir)
.PHONY: all clean
QuoteReplyEditDelete
2008-03-27 08:34:46 Re: 2008 SVN -- BUG; failure at mm/nommu.c:861/do_mmap_private()!
Mike Frysinger (UNITED STATES)
Message: 53135 my guess it's because you're executing it over NFS
try copying the program to / and then execute it
QuoteReplyEditDelete
2008-03-27 11:58:04 Re: 2008 SVN -- BUG; failure at mm/nommu.c:861/do_mmap_private()!
david wang (CHINA)
Message: 53148
Hi,Mike
Yes, you're right. I'm executing it over NFS. but it works fine with the older kernel. if I copy it to ram disk like / or /varand it can be running ok.
Is this a bug? or, if I miss anything? How to solve this problem? Thanks!
QuoteReplyEditDelete
2008-03-27 12:43:48 Re: 2008 SVN -- BUG; failure at mm/nommu.c:861/do_mmap_private()!
Mike Frysinger (UNITED STATES)
Message: 53154 it's a bug we'll have to track down and fix. in the meantime you can just copy things from nfs before executing.
QuoteReplyEditDelete
2008-03-27 17:30:18 Re: 2008 SVN -- BUG; failure at mm/nommu.c:861/do_mmap_private()!
Mike Frysinger (UNITED STATES)
Message: 53178 ive opened a detailed report here if you want to follow things: