gnokii-users
[Top][All Lists]
Advanced

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

Re: gnokii --send-sms core dumps


From: ML mail
Subject: Re: gnokii --send-sms core dumps
Date: Wed, 5 Dec 2012 03:57:33 -0800 (PST)

Hi Jan,

Thanks for your instructions. I have now recompiled gnokii as you suggested with the new CFLAGS in order to remove the -O2 flag. So for example now the CFLAGS variable for the smsd Makefile are the following:

smsd/Makefile:CFLAGS = -g -Wall -Wno-pointer-sign -fvisibility=hidden -fno-strict-aliasing -Wall -Wno-pointer-sign -fvisibility=hidden -fno-strict-aliasing

Unfortunately even after all that smsd still core dumps (although the gnokii binary itself works fine). Below is the output of gdb:

$ sudo gdb --args  /usr/local/gnokii/bin/smsd -u smsd -p password -d smsd -m mysql -f /tmp/smsd.log
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-unknown-openbsd4.9"...
(gdb) run
Starting program: /usr/local/gnokii/bin/smsd -u smsd -p password -d smsd -m mysql -f /tmp/smsd.log
smsd - version 1.5.3 from gnokii 0.6.32git
LOG: debug mask is 0x1
LOG: xdebug mask is 0x1
Config read from file /etc/gnokiirc.
phone instance config:
model = 6110
port = /dev/ttyU0
connection = serial
initlength = default
serial_baudrate = 19200
serial_write_usleep = -1
handshake = software
require_dcd = 0
smsc_timeout = 10
rfcomm_channel = 0
sm_retry = 0
device: opening device /dev/ttyU0
device: setting speed to 115200
device: setting RTS to low and DTR to high
[New process 17016]
[New process 17016, thread 0x7f30e000]

Program received signal SIGSEGV, Segmentation fault.
[Switching to process 17016, thread 0x7f30e000]
0x0aa9cfec in IdentifyPhone (state=Cannot access memory at address 0x8bc90c00
) at nk6100.c:442
442     {
(gdb)




From: Jan Derfinak <address@hidden>
To: ML mail <address@hidden>; Discussion forum for gnokii users. <address@hidden>
Sent: Tuesday, December 4, 2012 9:53 AM
Subject: Re: gnokii --send-sms core dumps

On Sat, 1 Dec 2012, ML mail wrote:

> Stupid question here from a non-dev guy here but how do I remove any -O*
> options and how do I check if the -Wall option was used?

You can look to CFLAGS variable in your Makefile:
$ grep -r -e '^CFLAGS.*=' */Makefile
common/Makefile:CFLAGS = -g -O2 -Wall -Wno-pointer-sign -fvisibility=hidden -fno-strict-aliasing
Docs/Makefile:CFLAGS = -g -O2 -Wall -Wno-pointer-sign -fvisibility=hidden -fno-strict-aliasing
...

As you see -O2 and -Wall parameters are set.
To change CFLAGS run:
$ CFLAGS="-g -Wall -Wno-pointer-sign -fvisibility=hidden -fno-strict-aliasing" ./configure
$ grep -r -e '^CFLAGS.*=' */Makefile
common/Makefile:CFLAGS = -g -Wall -Wno-pointer-sign -fvisibility=hidden -fno-strict-aliasing -Wall -Wno-pointer-sign -fvisibility=hidden -fno-strict-aliasing
Docs/Makefile:CFLAGS = -g -Wall -Wno-pointer-sign -fvisibility=hidden -fno-strict-aliasing -Wall -Wno-pointer-sign -fvisibility=hidden -fno-strict-aliasing
...

The options are doubled, but this isn't a problem.

Jan

> ____________________________________________________________________________
> From: Jan Derfinak <address@hidden>
> To: ML mail <address@hidden>; Discussion forum for gnokii users.
> <address@hidden>
> Cc: Daniele Forsi <address@hidden>
> Sent: Saturday, December 1, 2012 9:09 PM
> Subject: Re: gnokii --send-sms core dumps
>
> On Fri, 30 Nov 2012, ML mail wrote:
>
> > Thanks, I now managed to compile gnokii from the git source with your
> > instructions. Unfortunately, smsd does a segmentation fault like before
> > using the latest stable version of gnokii. Just now gdb mentions another
> > line but it's still an opening curly brace as you can see in the output
> > below:
>
> Please try to remove any -O* options when compiling gnokii. Were there any
> warnings during compilation? Was the -Wall option used?
>
> Jan
>
>
> >___________________________________________________________________________
> _
> > From: Daniele Forsi <address@hidden>
> > To: ML mail <address@hidden>
> > Cc: Discussion forum for gnokii users. <address@hidden>
> > Sent: Friday, November 30, 2012 3:28 PM
> > Subject: Re: gnokii --send-sms core dumps
> >
> > 2012/11/30 ML mail <address@hidden>:
> >
> > > Was just wondering if someone of you had a clue why my smsd is still
> core
> > > dumping? All the details are in my mail below...
> > sorry for not getting back to you
> >
> > I have ho idea why it would segfault on the opening brace here:
> >
> > > Program received signal SIGSEGV, Segmentation fault.
> > > [Switching to process 5507, thread 0x8904fc00]
> > > 0x01944f9f in Functions (op=GN_OP_Init, data="" state=0x8bc79000) at
> > > nk6100.c:232
> > > 232    {
> >
> > the most probable cause is that the sources don't match the
> > executable, so that line 232 has a different content, can you check if
> > the smsd you are running is actually built from the source files whose
> > lines that are printed by gdb? gdb prints a warning f the sources are
> > newer than the executable but it doens't seem your case. You can also
> > try to compile the sources from git which is what I'm actually using;
> > for instructions see http://gnokii.org/git.shtml
> >
> > > if you need more details
> > > don't hesitate to ask me. I would really be happy to be able to use smsd
> > on
> > > my OpenBSD box.
> >
> > you can also try to run under valgrind because it could be able to
> > show if smsd is accessing memory that it shouldn't (invalid write),
> > smsd will run slower but it's a quick test:
> >
> > valgrind /usr/local/gnokii/bin/smsd -u smsd -p PASSWORD -d smsd -m
> > mysql -f /tmp/smsd.log
> >
> > --
> > Daniele Forsi
> >
> >
> >
> >
>
> --
>
>
>

--


reply via email to

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