gnokii-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: smsd segmentation fault!


From: tasos
Subject: Re: smsd segmentation fault!
Date: Thu, 31 Mar 2005 01:18:23 -0800 (PST)

I delete some entries from the outbox table and now it
works BUT i would like to know what was wrong.Can i
send you a dump of the previous state of the outbox
table in your email?(the one that didn't work).
About debugging i would like more help.I suppose a
good how-to about gdb would be nice.
Again thank you all for answering!
ps:i have another question about greek characters
support but i would create a new post
--- Jan Derfinak <address@hidden> wrote:
> On Mon, 28 Mar 2005, Pawel Kot wrote:
> 
> Hi.
> 
> > On Mon, 28 Mar 2005, tasos wrote:
> > 
> > > Program received signal SIGSEGV, Segmentation
> fault.
> > > [Switching to Thread -1220138064 (LWP 3299)]
> > > 0xb7d9c290 in strncpy () from /lib/tls/libc.so.6
> > > (gdb) bt
> > > #0  0xb7d9c290 in strncpy () from
> /lib/tls/libc.so.6
> > > #1  0xb7fe74fe in DB_Look () from
> > > /usr/share/smsd/libmysql.so
> > 
> > Could you please show the contents of the
> database? Apperently it seems that
> > some row has inconsistant values.
> > 
> > This is either in
> >     strncpy (sms.remote.number, row[1], sizeof
> (sms.remote.number) - 1);
> > or
> >     strncpy (sms.user_data[0].u.text, row[2],
> GN_SMS_MAX_LENGTH + 1);
> > and I think either row[1] or row[2] is null
> 
> Database query is:
> SELECT id, number, text, dreport FROM outbox WHERE
> processed='0';
> 
> row[1] is "number"
> row[2] is "text"
> 
> sms is stack variable defined in "while" loop.
> 
> The smsd gets sigseg in "strncpy" function. strncpy
> tries to access results
> from "mysql_fetch_row". With information you give us
> it looks that row[1] or
> row[2] points to address outside of smsd address
> space.
> 
> Without original content of your "outbox" table I
> cannot debug the bug, you
> must do it yourself. Please recompile smsd with
> debug information (-g switch
> for gcc must be turned on), run smsd in gdb with
> breakpoint just after 
> mysql.c:171: while ((row = mysql_fetch_row (res1)))
> and before any strncpy function.
> Then examine content of row variable.
> 
> jan
> 
> -- 
> 
> 
> _______________________________________________
> gnokii-users mailing list
> address@hidden
>
http://lists.nongnu.org/mailman/listinfo/gnokii-users
> 


                
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]