2010-08-15 10:22:19     :Bad page state in process(uClinux-dist-2009R1.1-RC4)

Document created by Aaronwu Employee on Aug 22, 2013
Version 1Show Document
  • View in full screen mode

2010-08-15 10:22:19     :Bad page state in process(uClinux-dist-2009R1.1-RC4)

macgrady tracy (CHINA)

Message: 92424   

 

hi

 

my trunk is uClinux-dist-2009R1.1-RC4

 

The size of my program is about 500kB, when i run uImage , the program is ok

 

but when i burn vmImage and rootfs.jffs2 to my flash, there is some thing wrong with my program some time,

 

3 times success and 7 times failed when I run 10 times

 

the log msg is

 

 

 

 

 

                           _____________________________________

        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|            -   blackfin.uclinux.org/

\    YP"    `| 8P  `.          -   docs.blackfin.uclinux.org/

/     \.___.d|    .'           -   www.uclinux.org/

`--..__)8888P`._.'  jgs/a:f    -   www.analog.com/blackfin

 

Have a lot of fun...

 

 

BusyBox v1.13.4 (2010-07-23 17:13:54 CST) built-in shell (msh)

Enter 'help' for a list of built-in commands.

 

root:/> Bad page state in process 'httpd'

page:00284160 flags:0x00000001 mapping:00000000 mapcount:0 count:0

Trying to fix it up, but a reboot is needed

Backtrace:

Stack info:

SP: [0x01d0dbd4]

FP: (0x01d0dbf8)

Memory from 0x01d0dbd0 to 01d0e000

01d0dbd0: 0004a000 [01d0dbe0]<00124f9c> 002487f0  0000001f  ffffffff  00000008  00000001

01d0dbf0: 00000000  00000000 (00000000)<001256c0> 00284160  00000001  002a4140  00100100

01d0dc10:<001218d8> 00284160 <00121950> 00284160  01d02a28  0024d618  ffffffef  00000000

01d0dc30: 002a4140  00000000 <0016264c><00121990> 00284160  0000003c  00000020  0000000f

01d0dc50: 00200200  01d02a2c  0000003c  0000001f  000000d0 <00127af4> 00284160  0000000f

01d0dc70: e1013045  00001000  00000003  000000d0  01d0dc84  002a4378  00284178  01d02990

01d0dc90:<001227e8> 002abac0  01d02a28  0026e5a0  00001000  0000001c  00000000  0000001c

01d0dcb0: 01d02a28  0026e5a0 <0012d31e> 00000020  00000020  00000036  0026e5e4  00000000

01d0dcd0: 00000000  01d0dd80  00000000  00000052  01d0ddbc  00001000  0000001b  0001c000

01d0dcf0: 00035060  0181c000  00000000  00051060  00000004 <00131020> 0026e5a0  01d0de60

01d0dd10: 00051060  01d0dd38  01d0ddbc  01851080  000157c8  01ccf000  00000010  00000001

01d0dd30: 00000000  00000000  000b7000  00000007  00000000  00000001  ffffffff  0026e5a0

01d0dd50: 00000000  00000000  00000000  00000000  002d5600  00000000  00000000  01800000

01d0dd70: 002d5600  001181cc  01d0dd78  01d0dd78  00000000  00000000  00000000  000b7fff

01d0dd90: 00000077  0000ffff  00051060  00000000  002c8fe0  002c7ce0  00256600  00000000

01d0ddb0: 01d0c000  00000004 <00155cc8> 01800000  00051060 <0015612a> 0000c8c0  002c9000

01d0ddd0: 01d0de60  00000000  0025706c  002c9000  01d0c000  01d0de60  00000002  00000000

01d0ddf0: 000280d2  00000000  00000000  0025706c  0001ffb6  00000001  00000003  00066828

01d0de10: 00003230  0004fa06  01d0c000  00000010  002ab140  0004fa06  000b7000  00000001

01d0de30: 0004e9a8  01851080  002c907c  0000105e  01800000  00000000  00000000  00000000

01d0de50: 00000000  00000000  00000000  00000000  00000000  00000000 <00133eee> 01d0c000

01d0de70:<001340ce> 00250aa0  002c9000  002506b0  00000000  fffffffe  01d0df24  00000000

01d0de90: 002ab140  01d0df24  0001f000  01d0c000  01c5fa28 <001352c0> 002c9000  0000000b

01d0deb0: 01ce0910  00000000  01e9b000  01ce0924  01ce0910  00246f34  01cd8776  01ce0910

01d0ded0: 00000000 <0010055a> 0010052c  01e9b000  01ce0910  01ce0924  00000000  0026e620

01d0def0: ffffe000  10000000  01d0df24 <ffa0877c> 00000000  ffffe000  01ce0924  01cd8776

01d0df10:<ffa08006> 002de000  00000003  00000000  01ce0924  01c019d2  00008000  00002000

01d0df30: 00000000  01d0e000  01c019d2  01c019d2 <01c2118c><ffa08ce4> 02001025  01c12035

01d0df50: 01c0c2e7  01c1202e  01c0c2e6  00000000  00000000  00000000  00000000  00000000

01d0df70: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000

01d0df90: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  01ce0545

01d0dfb0: 01ce08c0  01c5fa1c  01c5fa28  01c51098  01cd8004  01ce0910  01cd877c  01ce0903

01d0dfd0: 0000000b  00000000  01ce08fc  01ce0924  00000000  00000003  01ce0924  01ce0910

01d0dff0: 01cd8776  01cd8776  0000000b  00000006

Return addresses in stack:

    address :

   frame  1 :

    address :

    address :

    address :

    address :

    address :

    address :

    address :

    address :

    address :

    address :

    address :

    address :

    address :

    address :

    address :

    address :

    address :

    address :

BUG: failure at mm/readahead.c:173/__do_page_cache_readahead()!

Kernel panic - not syncing: BUG!

 

Now my question is: is the kernel or fs problem?

 

thinks!!!

QuoteReplyEditDelete

 

 

2010-08-15 13:19:07     Re: :Bad page state in process(uClinux-dist-2009R1.1-RC4)

Mike Frysinger (UNITED STATES)

Message: 92426   

 

if you dont run httpd, do you see the crash ?

QuoteReplyEditDelete

 

 

2010-08-15 22:00:08     Re: :Bad page state in process(uClinux-dist-2009R1.1-RC4)

macgrady tracy (CHINA)

Message: 92438   

 

no,but when I run the  following command, the kernel crash sometimes:

 

cd /usr/httpd

 

ls

 

run this cmd time after time, the kernel will crash.

 

my rootfs.jffs2 was cutted to about 280K, my httpd is about 500k for the limited of my flash.

 

The httpd was maked by bfin-uclinux-gcc, Does this tools astrict the size of my program or other reason?

 

thanks!!!

QuoteReplyEditDelete

 

 

2010-08-15 22:05:44     Re: :Bad page state in process(uClinux-dist-2009R1.1-RC4)

Mike Frysinger (UNITED STATES)

Message: 92439   

 

post your kernel .config file as an attachment please

 

as for executable format, please review the documentation:

  docs.blackfin.uclinux.org/doku.php?id=toolchain:executable_file_formats

QuoteReplyEditDelete

 

 

2010-08-16 05:38:27     Re: :Bad page state in process(uClinux-dist-2009R1.1-RC4)

Wolfgang Muees (GERMANY)

Message: 92448   

 

MacGrady,

 

I think you are bitten by this bug:

 

https://blackfin.uclinux.org/gf/tracker/6031

 

Fix your ucLibc and test again.

 

regards

 

Wolfgang

TranslateQuoteReplyEditDelete

 

 

2010-08-16 08:49:46     Re: :Bad page state in process(uClinux-dist-2009R1.1-RC4)

Mike Frysinger (UNITED STATES)

Message: 92454   

 

or increase the stack of your httpd app to a much larger value

QuoteReplyEditDelete

 

 

2010-08-16 21:46:04     Re: :Bad page state in process(uClinux-dist-2009R1.1-RC4)

macgrady tracy (CHINA)

Message: 92473   

 

Thank you very much, but i think enhance stack size can't resolve this problem,

 

Yesterday i try to enhance my stack to 8192 by using "-s 8192" In makefile,

 

but the program crached all the same!!!

 

And now run "ls" "cd" "tab" and some other cmd may cause kernel crach,

 

the msg as follow:

 

 

 

 

 

Creating 3 MTD partitions on "physmap-flash.0":

0x00000000-0x00020000 : "bootloader(nor)"

0x00020000-0x00110000 : "linux kernel(nor)"

0x00110000-0x00200000 : "file system(nor)"

TCP cubic registered

NET: Registered protocol family 17

VFS: Mounted root (jffs2 filesystem).

Freeing unused kernel memory: 84k 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|            -   blackfin.uclinux.org/

\    YP"    `| 8P  `.          -   docs.blackfin.uclinux.org/

/     \.___.d|    .'           -   www.uclinux.org/

`--..__)8888P`._.'  jgs/a:f    -   www.analog.com/blackfin

 

 

Have a lot of fun...

 

 

 

 

BusyBox v1.13.4 (2010-07-23 18:24:05 CST) built-in shell (msh)

Enter 'help' for a list of built-in commands.

 

 

root:/>

root:/>

root:/>

root:/> cd /usr/httpd/

 

root:/usr/httpd> ls

tack info:

SP: [0x0183bf24]

Memory from 0x0183bf20 to 0183c000

0183bf20: 0000002a [00302762] 00008000  00002000  00000000  0183c000  00302762  00302762

0183bf40:<0030272e><ffa08ce4> 02002020  00312095  0030c4a7  0031208e  0030c494  00000000

0183bf60: ffffffff  00000000  00000000  00000000  00000000  00000000  00000000  00000000

0183bf80: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000

0183bfa0: 00000000  00000000  00000000  0183c004  003e02fc  00362b6c  00362b78  00353354

0183bfc0: 00000000  00359674  00359c18  00000000  00000072  00000000  003e0394  0000002a

0183bfe0: 00000001  00000000  00000000  00362ba8  ffffffff  ffffffff  00000072  00000006

Return addresses in stack:

    address :

    address :

Kernel panic - not syncing: Kernel exception

 

 

 

sometimes is:

 

root:/> ps

  PIS USERt     aVSZ ScAT COkMAND info:

SP: [0x01e8df24]

Memory from 0x01e8df20 to 01e8e000

01e8df20: 00000000 [0061457a] 00008000  00000000  00000000  01e8e000  0061457a  0061457a

01e8df40:<006115e2><ffa08ce4> 02003025  0060bfe9  00600179  0060bfa2  0060016c  00000000

01e8df60: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000

01e8df80: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000

01e8dfa0: 00000000  00000000  00000000  002dc0f4  0063df80  006498dc  006498e8  00000000

01e8dfc0: 00613cc0  00613cc0  04000021  00000000  000000c0  00649910  00001000  00000000

01e8dfe0: 00000000  04000021  00000003  00001000  00000000  00000000  000000c0  00000006

Return addresses in stack:

    address :

    address :

Kernel panic - not syncing: Kernel exception

 

 

 

And i upgrade my bfin-tools to latest svn version(20100815), kernel not changed: is uClinux-dist-2009R1.1-RC4 

 

my program crached , the  message is the same as yesterday I post;

 

root:/> Bad page state in process 'httpd'

page:00284160 flags:0x00000001 mapping:00000000 mapcount:0 count:0

Trying to fix it up, but a reboot is needed

Backtrace:

Stack info:

SP: [0x01d0dbd4]

FP: (0x01d0dbf8)

Memory from 0x01d0dbd0 to 01d0e000

01d0dbd0: 0004a000 [01d0dbe0]<00124f9c> 002487f0  0000001f  ffffffff  00000008  00000001

01d0dbf0: 00000000  00000000 (00000000)<001256c0> 00284160  00000001  002a4140  00100100

01d0dc10:<001218d8> 00284160 <00121950> 00284160  01d02a28  0024d618  ffffffef  00000000

01d0dc30: 002a4140  00000000 <0016264c><00121990> 00284160  0000003c  00000020  0000000f

01d0dc50: 00200200  01d02a2c  0000003c  0000001f  000000d0 <00127af4> 00284160  0000000f

01d0dc70: e1013045  00001000  00000003  000000d0  01d0dc84  002a4378  00284178  01d02990

01d0dc90:<001227e8> 002abac0  01d02a28  0026e5a0  00001000  0000001c  00000000  0000001c

01d0dcb0: 01d02a28  0026e5a0 <0012d31e> 00000020  00000020  00000036  0026e5e4  00000000

01d0dcd0: 00000000  01d0dd80  00000000  00000052  01d0ddbc  00001000  0000001b  0001c000

01d0dcf0: 00035060  0181c000  00000000  00051060  00000004 <00131020> 0026e5a0  01d0de60

01d0dd10: 00051060  01d0dd38  01d0ddbc  01851080  000157c8  01ccf000  00000010  00000001

01d0dd30: 00000000  00000000  000b7000  00000007  00000000  00000001  ffffffff  0026e5a0

01d0dd50: 00000000  00000000  00000000  00000000  002d5600  00000000  00000000  01800000

01d0dd70: 002d5600  001181cc  01d0dd78  01d0dd78  00000000  00000000  00000000  000b7fff

01d0dd90: 00000077  0000ffff  00051060  00000000  002c8fe0  002c7ce0  00256600  00000000

01d0ddb0: 01d0c000  00000004 <00155cc8> 01800000  00051060 <0015612a> 0000c8c0  002c9000

01d0ddd0: 01d0de60  00000000  0025706c  002c9000  01d0c000  01d0de60  00000002  00000000

01d0ddf0: 000280d2  00000000  00000000  0025706c  0001ffb6  00000001  00000003  00066828

01d0de10: 00003230  0004fa06  01d0c000  00000010  002ab140  0004fa06  000b7000  00000001

01d0de30: 0004e9a8  01851080  002c907c  0000105e  01800000  00000000  00000000  00000000

01d0de50: 00000000  00000000  00000000  00000000  00000000  00000000 <00133eee> 01d0c000

01d0de70:<001340ce> 00250aa0  002c9000  002506b0  00000000  fffffffe  01d0df24  00000000

01d0de90: 002ab140  01d0df24  0001f000  01d0c000  01c5fa28 <001352c0> 002c9000  0000000b

01d0deb0: 01ce0910  00000000  01e9b000  01ce0924  01ce0910  00246f34  01cd8776  01ce0910

01d0ded0: 00000000 <0010055a> 0010052c  01e9b000  01ce0910  01ce0924  00000000  0026e620

01d0def0: ffffe000  10000000  01d0df24 <ffa0877c> 00000000  ffffe000  01ce0924  01cd8776

01d0df10:<ffa08006> 002de000  00000003  00000000  01ce0924  01c019d2  00008000  00002000

01d0df30: 00000000  01d0e000  01c019d2  01c019d2 <01c2118c><ffa08ce4> 02001025  01c12035

01d0df50: 01c0c2e7  01c1202e  01c0c2e6  00000000  00000000  00000000  00000000  00000000

01d0df70: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000

01d0df90: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  01ce0545

01d0dfb0: 01ce08c0  01c5fa1c  01c5fa28  01c51098  01cd8004  01ce0910  01cd877c  01ce0903

01d0dfd0: 0000000b  00000000  01ce08fc  01ce0924  00000000  00000003  01ce0924  01ce0910

01d0dff0: 01cd8776  01cd8776  0000000b  00000006

Return addresses in stack:

    address :

   frame  1 :

    address :

    address :

    address :

    address :

    address :

    address :

    address :

    address :

    address :

    address :

    address :

    address :

    address :

    address :

    address :

    address :

    address :

    address :

BUG: failure at mm/readahead.c:173/__do_page_cache_readahead()!

Kernel panic - not syncing: BUG!

 

 

 

 

 

 

 

my .config is attached, thaks!!!

 

config1

QuoteReplyEditDelete

 

 

2010-08-16 21:50:54     Re: :Bad page state in process(uClinux-dist-2009R1.1-RC4)

Mike Frysinger (UNITED STATES)

Message: 92474   

 

8k is not nearly large enough

QuoteReplyEditDelete

 

 

2010-08-16 22:30:47     Re: :Bad page state in process(uClinux-dist-2009R1.1-RC4)

macgrady tracy (CHINA)

Message: 92475   

 

but i checked my program, the largest stack size merely below 3k

QuoteReplyEditDelete

 

 

2010-08-17 03:10:26     Re: :Bad page state in process(uClinux-dist-2009R1.1-RC4)

Wolfgang Muees (GERMANY)

Message: 92479   

 

MacGrady,

 

it's not YOUR usage of the stack that makes the problem, it is the use of alloca() in the libraries.

 

And even worse, this alloca() may be called in a (P)thread, which has only a minimal stack.

 

As uclibc is a part of the toolchain, your best bet is to get a new toolchain from trunc.

 

regards

 

Wolfgang

TranslateQuoteReplyEditDelete

 

 

2010-08-17 05:37:10     Re: :Bad page state in process(uClinux-dist-2009R1.1-RC4)

macgrady tracy (CHINA)

Message: 92500   

 

Wolfgang,

 

Thank you for your warmhearted suggestion.

 

I have updated my tools to latest version(SVN) Yesterday,but the crach also exist,

 

I am confirming which cause this: the tools or my program.

 

thanks

QuoteReplyEditDelete

 

 

2010-08-17 09:13:49     Re: :Bad page state in process(uClinux-dist-2009R1.1-RC4)

Wolfgang Muees (GERMANY)

Message: 92513   

 

MacGrady,

 

have yo done a clean rebuild of your userland (Busybox) after the installation of the toolchain?

 

A simple "make" will not work, a "make clean" is neccessary.

 

regards

 

Wolfgang

TranslateQuoteReplyEditDelete

 

 

2010-08-17 21:00:17     Re: :Bad page state in process(uClinux-dist-2009R1.1-RC4)

macgrady tracy (CHINA)

Message: 92527   

 

I have make clean and now i found there is something wrong with my mtd driver all the same.

 

The type of my flash is AM29LV160, The kernel seems to support this type of flash.

 

And our kernel seems to support cfi interface, But when i moved the driver form my kernel,

 

the uImage can work normally,

 

but once i make the cfi driver in my kernel driver, the kernel may crash,

 

I will try to find out what cause the problem.

 

regards!

QuoteReplyEditDelete

Attachments

Outcomes