Re: Segmentation fault while running some applications!

Greg Ungerer <[email protected]>
Newsgroups gmane.linux.uclinux.devel
Message-ID <[email protected]>
Hi Arshan,

On 12/13/2012 12:11 AM, Arshan Awais wrote:
> I have tried to compile the kernel by disabling the MMU, but it gives
> following errors during compilation:

No, you don't want to do that. Having the MMU enabled is fine in
this case.

I would guess from your original dump that the code is most
likely executing code in uClibc (I assume that is what you are
using if you are building with the uClinux-dist).

Try this from the command line of your AT91SAM9X platform:

     cat /proc/self/maps

I expect you will see something like:

00008000-00085000 r-xp 00000000 1f:02 1141       /bin/sh
0008d000-00092000 rw-p 0007d000 1f:02 1141       /bin/sh
00092000-0009e000 rwxp 00092000 00:00 0          [heap]
40000000-40005000 r-xp 00000000 1f:02 1286522    /lib/ld-uClibc-0.9.29.so
40005000-40006000 rw-p 40005000 00:00 0
4000c000-4000d000 r--p 00004000 1f:02 1286522    /lib/ld-uClibc-0.9.29.so
4000d000-4000e000 rw-p 00005000 1f:02 1286522    /lib/ld-uClibc-0.9.29.so
4000e000-4005b000 r-xp 00000000 1f:02 1287024    /lib/libuClibc-0.9.29.so
4005b000-40062000 ---p 4005b000 00:00 0
40062000-40063000 r--p 0004c000 1f:02 1287024    /lib/libuClibc-0.9.29.so
40063000-40064000 rw-p 0004d000 1f:02 1287024    /lib/libuClibc-0.9.29.so
40064000-40067000 rw-p 40064000 00:00 0
bedce000-bedd0000 rwxp beffe000 00:00 0          [stack]


Compare what you find with your dump addresses.

Regards
Greg


> In file included from arch/arm/mm/proc-arm926.S:36:
> arch/arm/mm/proc-macros.S:81:2: error: #error PTE shared bit mismatch
> arch/arm/mm/proc-macros.S:84:2: error: #error PTE bufferable bit mismatch
> arch/arm/mm/proc-macros.S:87:2: error: #error PTE cacheable bit mismatch
>
> I am a bit confused about disabling the MMU because AT91SAM9X has MMU
> support...can u make me clear about that?
>
> On Wed, Dec 12, 2012 at 2:01 PM, Arshan Awais <[email protected]> wrote:
>> Thanks for reply Greg!
>>
>> No, the MMU is enabled in the kernel configuration.
>>
>> On Tue, Dec 11, 2012 at 6:51 AM, Greg Ungerer
>> <[email protected]> wrote:
>>> Hi Arshan,
>>>
>>>
>>> On 12/04/2012 03:32 PM, Arshan Awais wrote:
>>>>
>>>> hi,
>>>> i m having an issue when i run iptables on AT91SAM9X in uClinux. I get
>>>> following messages when i run iptables command:
>>>>
>>>> # iptables -v
>>>> pgd = c0474000
>>>> [ffff198c] *pgd=203f0031, *pte=00000000, *ppte=00000000
>>>>
>>>> Pid: 372, comm: iptables
>>>> CPU: 0 Not tainted (2.6.30.4-uc0 #195)
>>>> PC is at 0x401446c4
>>>
>>>
>>> You need to figure out where this address is.
>>>
>>> Are you truly running with MMU disabled?
>>> You will pretty easily be able to tell from your kernel .config.
>>>
>>> Regards
>>> Greg
>>>
>>>
>>>> LR is at 0x9ad0
>>>> pc : [<401446c4>] lr : [<00009ad0>] psr: 60000010
>>>> sp : bef16d50 ip : 401446c0 fp : 00000000
>>>> r10: 40025000 r9 : 00000000 r8 : 00000000
>>>> r7 : 00000002 r6 : bef16eb4 r5 : bef16f8f r4 : ffff198c
>>>> r3 : ffff198c r2 : 00000000 r1 : ffff198c r0 : ffff198c
>>>> Flags: nZCv IRQs on FIQs on Mode USER_32 ISA ARM Segment user
>>>> Control: 0005317f Table: 20474000 DAC: 00000015
>>>> [<c00282c4>] (show_regs+0x0/0x50) from [<c002cd64>]
>>>> (__do_user_fault+0x5c/0xa4)
>>>> r5:ffff198c r4:c1c5b9c0
>>>> [<c002cd08>] (__do_user_fault+0x0/0xa4) from [<c002d020>]
>>>> (do_page_fault+0x1f8/0x230)
>>>> r7:c182a214 r6:c1c5b9c0 r5:000000o_Dat0026d40>]
>>>> (ret_from_exception+0x0/0x10)
>>>> Exception sto 0xc12f5ff8)
>>>> 5fa0: ffff198c ffff198c 00000000 ffff198c
>>>> 5fc0: ffff198c bef16f8f bef16eb4 00000002 00000000 00000000 40025000
>>>> 00000000
>>>> 5fe0: 401446c0 bef16d50 00009ad0 401446c4 60000010 ffffffff
>>>> Segmentation fault
>>>>
>>>> Kindly help me solving the issue...
>>>> _______________________________________________
>>>> uClinux-dev mailing list
>>>> [email protected]
>>>> http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
>>>> This message was resent by [email protected]
>>>> To unsubscribe see:
>>>> http://mailman.uclinux.org/mailman/options/uclinux-dev
>>>>
>>>
>

_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.