|
|
Choosing A Webhost: |
RE: DBmail 2.x, PostgreSQL, IMAP: msg#00089mail.imap.dbmail
My immediate attention is at #5 0x0804c81a in trace (level=5, formatstring=0x807119a "%s,%s: executing query [%s]") at debug.c:93 Line 93 is a call to vsyslog. My guess is that argp is null or even worse, uninitialised. Try adding an if(argp) before using argp like this: void trace (int level, char *formatstring, ...) { va_list argp; va_start(argp, formatstring); if (level <= TRACE_LEVEL) { if (TRACE_VERBOSE != 0) { vfprintf (err_out_stream, formatstring, argp); if (formatstring[strlen(formatstring)]!='\n') fprintf (err_out_stream,"\n"); } if (TRACE_TO_SYSLOG != 0) { if (formatstring[strlen(formatstring)]=='\n') formatstring[strlen(formatstring)]='\0'; if (level <= TRACE_WARNING) { /* set LOG_ALERT at warnings */ if(argp) vsyslog (LOG_ALERT, formatstring, argp); } else if(argp) vsyslog (LOG_NOTICE, formatstring, argp); } if(argp) va_end(argp); } /* very big fatal error * bailout */ if (level == TRACE_FATAL) exit(EXIT_CODE); if (level == TRACE_STOP) exit(EXIT_CODE); } Regards, John -----Original Message----- From: dbmail-admin@xxxxxxxxxx [mailto:dbmail-admin@xxxxxxxxxx] On Behalf Of Ilja Booij Sent: Friday, January 30, 2004 8:57 PM To: dbmail@xxxxxxxxxx; dbmail-dev@xxxxxxxxxx Subject: Re: [Dbmail] DBmail 2.x, PostgreSQL, IMAP Sandino Araico Sanchez wrote: > [root@wafflera root] gdb --pid=361 <snip gdb preamble > (gdb) continue > Continuing. > > Program received signal SIGSEGV, Segmentation fault. 0x400b90f0 in > malloc_consolidate () from /lib/libc.so.6 > (gdb) bt > #0 0x400b90f0 in malloc_consolidate () from /lib/libc.so.6 > #1 0x400b898e in _int_malloc () from /lib/libc.so.6 > #2 0x400b7bc1 in malloc () from /lib/libc.so.6 > #3 0x400ada81 in open_memstream () from /lib/libc.so.6 > #4 0x40116d92 in vsyslog () from /lib/libc.so.6 > #5 0x0804c81a in trace (level=5, > formatstring=0x807119a "%s,%s: executing query [%s]") at debug.c:93 #6 > 0x080681ab in db_query ( the_query=0x80799c0 "SELECT no_select FROM > mailboxes WHERE mailbox_idnr = '1'") at dbpgsql.c:217 > #7 0x080635f1 in db_isselectable (mailbox_idnr=0) at db.c:2476 > #8 0x08054da1 in _ic_list (tag=0xbfffc640 "5", args=0x807a2a0, > ci=0x8079dc0) > at imapcommands.c:1300 > #9 0x0804c287 in IMAPClientHandler (ci=0x8079dc0) at imap4.c:342 > #10 0x0804bbcd in PerformChildTask (info=0xbfffeee0) at serverchild.c:341 > #11 0x0804b8cf in CreateChild (info=0x0) at serverchild.c:232 > #12 0x0804b1ad in StartServer (conf=0xbfffef50) at server.c:141 > #13 0x0805d986 in main (argc=1, argv=0x0) at imapd.c:128 > (gdb) This seems to suggest a bug in the trace() function in debug.c Problem is.. I can't seem to find what's wrong. For clarity, I'll print the function below. Can anybody find anything that's wrong? void trace (int level, char *formatstring, ...) { va_list argp; va_start(argp, formatstring); if (level <= TRACE_LEVEL) { if (TRACE_VERBOSE != 0) { vfprintf (err_out_stream, formatstring, argp); if (formatstring[strlen(formatstring)]!='\n') fprintf (err_out_stream,"\n"); } if (TRACE_TO_SYSLOG != 0) { if (formatstring[strlen(formatstring)]=='\n') formatstring[strlen(formatstring)]='\0'; if (level <= TRACE_WARNING) { /* set LOG_ALERT at warnings */ vsyslog (LOG_ALERT, formatstring, argp); } else vsyslog (LOG_NOTICE, formatstring, argp); } va_end(argp); } /* very big fatal error * bailout */ if (level == TRACE_FATAL) exit(EXIT_CODE); if (level == TRACE_STOP) exit(EXIT_CODE); } Currently, I'm a bit lost here.. Sandino, could you try recompiling with TRACE_TO_SYSLOG (in debug.c) set to 0 (zero), and running again. Maybe there's an error earlier in the code, which will show up in a different place when not tracing to syslog. BTW, I'm also sending this to dbmail-dev Ilja -- IC&S Stadhouderslaan 57 3583 JD Utrecht PGP-key: http://www.ic-s.nl/keys/ilja.txt _______________________________________________ Dbmail mailing list Dbmail@xxxxxxxxxx https://mailman.fastxs.nl/mailman/listinfo/dbmail
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: [Dbmail] DBmail 2.x, PostgreSQL, IMAP, Ilja Booij |
|---|---|
| Next by Date: | DBMail 2.0 RC 1 release, Ilja Booij |
| Previous by Thread: | Accessing my relational Database through a layer of JDBC, Ralf Hauser |
| Next by Thread: | DBMail 2.0 RC 1 release, Ilja Booij |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |