Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 02-24-2011, 04:13 AM   #1
LQ Newbie
Registered: Jan 2011
Location: India
Distribution: ubuntu
Posts: 11

Rep: Reputation: 0
Segmentation fault


my system is running with powerpc and linux, i am facing some kernel crash problem.
can any body help me on this crash,i have pasted the trace and log

Program terminated with signal 11, Segmentation fault.
#0 memset (dstpp=0xd2, c=<value optimized out>, len=3374)
at ../../../src/Common/OS/linux/memset.c:20
20 ../../../src/Common/OS/linux/memset.c: No such file or directory.
in ../../../src/Common/OS/linux/memset.c

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(1) Display the backtrace for the thread that crashed.

#0 memset (dstpp=0xd2, c=<value optimized out>, len=3374)
at ../../../src/Common/OS/linux/memset.c:20
#1 0x100e76c4 in LPREncode (pEnc=0x5b1debc8, pRTPPacket=0x5be69ee4)
at ../../../src/Common/comm/lpr/lpr.c:647
#2 0x100dde50 in RTPChanWork (pChan=<value optimized out>)
at ../../../src/Common/comm/rtpchan/rtpchan.c:2699
#3 0x100de5d8 in RTPTxTask (userDefined=<value optimized out>)
at ../../../src/Common/comm/rtpchan/rtpchan.c:2853
#4 0x1051d744 in pthread_entry (args=<value optimized out>)
at ../../../src/Common/OS/linux/psosapi/pthreadapi.c:222
#5 0x0ffaadec in start_thread (arg=<value optimized out>)
at pthread_create.c:298
#6 0x0f892530 in clone () from /lib/
Previous frame inner to this frame (corrupt stack?)

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(2) Display argument parameters and local variables for the thread.

dstpp = (void *) 0xd2
c = <value optimized out>
len = 3374
xlen = <value optimized out>
cccc = <value optimized out>
dstp = 210

Old 02-24-2011, 11:08 AM   #2
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 7,058

Rep: Reputation: 638Reputation: 638Reputation: 638Reputation: 638Reputation: 638Reputation: 638
You don't need us.
You have a segmentation fault. I didn't know PPC did segmentation errors, I thought it was an Intel thing, but it's a memory error, sufficiently glaring for the kernel to laugh at you.

You have debugging symbols, pointing to files and line numbers in your source. Have a look around. What matters in a crash is usually the very first error, which then spawns a dramatic series of other errors as the program goes down in a tailspin. It's the first error you need to fix.
Old 02-24-2011, 11:39 AM   #3
Registered: Apr 2006
Location: Silver Spring, MD
Distribution: Debian
Posts: 38

Rep: Reputation: 8
I found this which seems to specifically identify your problem over at:

The error this guy had is identical to yours.

KaBar's Edge

On Wed, Feb 23, 2011 at 11:58 PM, Praveen kumar <chatpravi@xxxxxxxxx> wrote:
> Hi,
> I have an embedded system on which i get crash (Caused by memset ) at long
> run( Reproducible 2/10 times ),
> I wanted to know efficient ways (materials) to handle memset crashes .
> Program terminated with signal 11, Segmentation fault.
> #0 memset (dstpp=0xd2, c=<value optimized out>, len=3374)
> at ../../../src/Common/OS/linux/memset.c:20
> 20 ../../../src/Common/OS/linux/memset.c: No such file or directory.
> in ../../../src/Common/OS/linux/memset.c

The problem is probably that memset has been passed either a bad
pointer, or a bad size.

>From your backtrace, the dstpp of 0xd2 is almost certainly the
problem. The first 4K (and sometimes 64K) starting at location zero is
invalid. Passing a pointer in that range will cause an page fault (or
segmentation fault).

memset doesn't do any parameter checking, so if you want parameter
checking you'll need to do that yourself. You could add a function
like my_memest and use a macro to map memset to my_memset. Or you
could play with LD_PRELOAD (if your runtime library is in a shared
library) and intercept the calls that way.

Yet another technique is to use the linker's wrap capability

Dave Hylands
Old 02-25-2011, 06:07 AM   #4
LQ Newbie
Registered: Jan 2011
Location: India
Distribution: ubuntu
Posts: 11

Original Poster
Rep: Reputation: 0
Hi all,
Thanks for the response

as per the response
we cont memset from location 0 to 64k, but as a Linux kernel i hope it wont allow user to give such a address which is protected.if at all it shows that dstpp=0xd2 in my log there is a change that this address may be virtual address(i may be wrong). please comment.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
qt segmentation fault binarybob0001 Programming 1 12-09-2007 02:12 AM
yast segmentation fault, system freezing - nvidia driver at fault? BaltikaTroika SUSE / openSUSE 2 12-02-2005 10:34 AM
segmentation fault libriana Linux - Newbie 2 06-10-2005 06:52 PM
Segmentation fault santhosh_o Programming 3 10-26-2004 06:45 AM
Segmentation fault suriyamohan Linux - General 5 10-21-2003 02:37 AM

All times are GMT -5. The time now is 06:16 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration