LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices

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

Rep: Reputation: 0
Segmentation fault


Hi,

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/libc.so.6
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


Rgds,
GoGear
 
Old 02-24-2011, 10:08 AM   #2
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 5,953

Rep: Reputation: 496Reputation: 496Reputation: 496Reputation: 496Reputation: 496
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, 10:39 AM   #3
kabars_edge
Member
 
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:

http://www.spinics.net/lists/newbies/msg42631.html

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.

http://stackoverflow.com/questions/6...inux-sys-calls
http://developers.sun.com/solaris/ar...sers_code.html
http://www.jayconrod.com/cgi/view_post.py?23

Yet another technique is to use the linker's wrap capability
http://stackoverflow.com/questions/9...-without-dlsym

Dave Hylands
 
Old 02-25-2011, 05:07 AM   #4
gearonlinux
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 http://www.spinics.net/lists/newbies/msg42631.html 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.
 
  


Reply


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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


All times are GMT -5. The time now is 09:02 PM.

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