Re: Kannel on Mac OSX
Alexander Malysh <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, please try attached hack and let us know what the panic is. Alejandro Guerrieri wrote: > So, I've recompiled with -g. > > What I did (shell is "fish") > > set CFLAGS "-g -O2" > > ./configure > make > make install > > During make, I've confirmed that the -g flag was being passed on the > arguments like this: > ... > gcc -D_REENTRANT=1 -I. -Igw -g -O2 -DDARWIN=1 > -L/Developer/SDKs/MacOSX10.4u.sdk/usr/lib > -I/Developer/SDKs/MacOSX10.4u.sdk/usr/include -I/usr/include/libxml2 > -o checks/check_date checks/check_date.o libgw.a libwmlscript.a > libwap.a libgwlib.a -lresolv -lm -lpthread -liconv -L/usr/lib -lxml2 > -lz -lpthread -liconv -lm > ... > But then on the gdb, the backtrace doesn't have any symbols either: > >> gdb /usr/local/sbin/bearerbox /cores/core.14690 > GNU gdb 6.3.50-20050815 (Apple version gdb-563) (Wed Jul 19 05:10:58 GMT > 2006) 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-apple-darwin"...Reading symbols > for shared libraries ...... done > > Core was generated by `/usr/local/sbin/bearerbox'. > Core file contained no thread-specific data > > (gdb) bt > #0 0x00000000 in ?? () > > Am I missing something? > > Regards, > > Alejandro. > On 4/23/07, Alejandro Guerrieri <[email protected]> wrote: >> I've started with >> >> --with-pcre --enable-mysql >> >> but ended up with plain "./configure", it didn't make any differences >> though. >> >> Are you using it on Intel or PPC platform? Mine's a MacBook Pro (Intel >> 2.16 Ghz Core Duo with 2Gb RAM). >> >> I'll try adding the symbols and run gdb again. >> >> Regards, >> >> Alejandro. >> >> On 4/23/07, Andreas Fink <[email protected]> wrote: >> > Alejandro, what ./configure line did you use? >> > We use kannel without a problem under MacOS X... >> > I would recommend to build it with debug symbols (add -g to the >> > compiler flags). >> > >> > >> > >> > >> > On 21.04.2007, at 19:53, Alejandro Guerrieri wrote: >> > >> > Hi, >> > >> > I've been struggling to get Kannel running on Mac OSX Tiger 10.4.9 on >> > a MacBook Pro (Intel architecture) to no avail. >> > >> > Kannel compiles fine, but when run it segfaults. >> > >> > gdb output is rather poor: >> > >> > #0 0x00000000 in ?? () >> > >> > CrashReporter log is as follows: >> > >> > ********** >> > >> > Host Name: silverbook >> > Date/Time: 2007-04-21 12:01:00.689 -0300 >> > OS Version: 10.4.9 (Build 8P2137) >> > Report Version: 4 >> > >> > Command: bearerbox >> > Path: /usr/local/sbin/bearerbox >> > Parent: bash [9999] >> > >> > Version: ??? (???) >> > >> > PID: 18746 >> > Thread: 0 >> > >> > Exception: EXC_BAD_ACCESS (0x0001) >> > Codes: KERN_INVALID_ADDRESS (0x0001) at 0xbf7ffd7c >> > >> > Thread 0 Crashed: >> > 0 libSystem.B.dylib 0x9000b10d __vfprintf + 12 >> > 1 libSystem.B.dylib 0x9000b0f0 sprintf + 480 >> > 2 bearerbox 0x00080160 format + 650 (log.c:386) >> > 3 bearerbox 0x000802e3 gw_panic + 72 (log.c:527) >> > 4 bearerbox 0x00075611 gw_rwlock_rdlock + 52 >> > (gw-rwlock.c:152) >> > 5 bearerbox 0x000802f7 gw_panic + 92 (log.c:527) >> > 6 bearerbox 0x00075611 gw_rwlock_rdlock + 52 >> > (gw-rwlock.c:152) >> > 7 bearerbox 0x000802f7 gw_panic + 92 (log.c:527) >> > 8 bearerbox 0x00075611 gw_rwlock_rdlock + 52 >> > (gw-rwlock.c:152) >> > 9 bearerbox 0x000802f7 gw_panic + 92 (log.c:527) >> > 10 bearerbox 0x00075611 gw_rwlock_rdlock + 52 >> > (gw-rwlock.c:152) ... >> > (Repeats the same two lines) >> > ... >> > >> > 505 bearerbox 0x000802f7 gw_panic + 92 (log.c:527) >> > 506 bearerbox 0x00075611 gw_rwlock_rdlock + 52 >> > (gw-rwlock.c:152) >> > 507 bearerbox 0x000802f7 gw_panic + 92 (log.c:527) >> > 508 bearerbox 0x00075611 gw_rwlock_rdlock + 52 >> > (gw-rwlock.c:152) >> > >> > Thread 0 crashed with X86 Thread State (32-bit): >> > eax: 0xbf8005b4 ebx: 0x9000af20 ecx: 0x00000000 edx: 0xa00023e0 >> > edi: 0x0000000c esi: 0xbf800628 ebp: 0xbf8004d8 esp: 0xbf7ffd80 >> > ss: 0x0000001f efl: 0x00010282 eip: 0x9000b10d cs: 0x00000017 >> > ds: 0x0000001f es: 0x0000001f fs: 0x00000000 gs: 0x00000037 >> > >> > Binary Images Description: >> > 0x1000 - 0xa6fff bearerbox /usr/local/sbin/bearerbox >> > 0x8fe00000 - 0x8fe4afff dyld 46.12 /usr/lib/dyld >> > 0x90000000 - 0x90172fff libSystem.B.dylib /usr/lib/libSystem.B.dylib >> > 0x901c2000 - 0x901c4fff libmathCommon.A.dylib >> > /usr/lib/system/libmathCommon.A.dylib >> > 0x90bd2000 - 0x90bd9fff libgcc_s.1.dylib /usr/lib/libgcc_s.1.dylib >> > 0x91157000 - 0x91165fff libz.1.dylib /usr/lib/libz.1.dylib >> > 0x91946000 - 0x919f8fff libcrypto.0.9.7.dylib >> > /usr/lib/libcrypto.0.9.7.dylib 0x91be1000 - 0x91cbffff libxml2.2.dylib >> > /usr/lib/libxml2.2.dylib 0x92627000 - 0x92714fff libiconv.2.dylib >> > /usr/lib/libiconv.2.dylib 0x9496d000 - 0x94992fff libssl.0.9.7.dylib >> > /usr/lib/libssl.0.9.7.dylib 0x9499e000 - 0x949bbfff libresolv.9.dylib >> > /usr/lib/libresolv.9.dylib >> > >> > If anyone have a clue about what's wrong, it will be more than welcome >> > ;) >> > >> > Thank you in advance >> > -- >> > Alejandro Guerrieri >> > Magicom >> > http://www.magicom-bcn.net/ >> > LinkedIn: http://www.linkedin.com/in/aguerrieri >> > >> > >> > Andreas Fink >> > >> > Fink Consulting GmbH >> > Global Networks Schweiz AG >> > BebbiCell AG >> > >> > --------------------------------------------------------------- >> > Tel: +41-61-6666330 Fax: +41-61-6666331 Mobile: +41-79-2457333 >> > Address: Clarastrasse 3, 4058 Basel, Switzerland >> > E-Mail: [email protected] >> > www.finkconsulting.com www.global-networks.ch www.bebbicell.ch >> > --------------------------------------------------------------- >> > ICQ: 8239353 MSN: [email protected] AIM: smsrelay Skype: andreasfink >> > Yahoo: finkconsulting SMS: +41792457333 >> > >> > >> > >> > >> > >> > >> >> >> -- >> Alejandro Guerrieri >> Magicom >> http://www.magicom-bcn.net/ >> LinkedIn: http://www.linkedin.com/in/aguerrieri >> > > -- Thanks, Alex
log.diff
(text/x-diff, 1021 B)
=== gwlib/log.c
==================================================================
--- gwlib/log.c (revision 282)
+++ gwlib/log.c (local)
@@ -520,11 +520,32 @@
void gw_panic(int err, const char *fmt, ...)
{
+ int i;
+ char buf[FORMAT_SIZE];
+ va_list args;
+ int level = GW_PANIC;
+ char *place = "";
+
/*
* we don't want PANICs to spread accross smsc logs, so
* this will be always within the main core log.
*/
- FUNCTION_GUTS(GW_PANIC, "");
+ format(buf, level, "", err, fmt, 1);
+ for (i = 0; i < num_logfiles; ++i) {
+ if (logfiles[i].exclusive == GW_NON_EXCL &&
+ level >= logfiles[i].minimum_output_level &&
+ logfiles[i].file != NULL) {
+ va_start(args, fmt);
+ output(logfiles[i].file, buf, args);
+ va_end(args);
+ }
+ }
+ if (dosyslog) {
+ format(buf, level, place, err, fmt, 0);
+ va_start(args, fmt);
+ kannel_syslog(buf,args,level);
+ va_end(args);
+ }
#ifdef HAVE_BACKTRACE
{