Hi.
I believe I am in need of assistance in diagnosing and correcting a crash. Recently, dspam is segfaulting on a great many messages, enough to preclude its use. I have attached one such message, include a little information from gdb, and list contents of dspam.debug below. I'd greatly appreciate any help with this issue and would be happy to assist in any way.

For the record, I am running dspam 3.8.0-r7 along with a postgres 8.0.13 server. Note that the particular crash below occurs only when showing factors, but disabling this only delays the crash. Recently, I did switch to using postgres from mysql. I do not believe I received these crashes under mysql.

GDB:
Short story: CTX->factors->first->ptr at dspam.c:3092 does not appear to be initialized
----------------------------------------------------------------
Starting program: /usr/bin/dspam --debug --user jacob --mode=notrain --client --stdout --deliver=innocent,spam < /home/jacob/[EMAIL PROTECTED]
[Thread debugging using libthread_db enabled]
[New Thread -1212545344 (LWP 17038)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1212545344 (LWP 17038)]
add_xdspam_headers (CTX=0x80705e0, ATX=0xbfe51b18) at dspam.c:3092
3092                    snprintf(scratch, sizeof(scratch), "%s, %2.5f",
(gdb) list
3087                node_ft = c_nt_first(CTX->factors, &c_ft);
3088                while(node_ft != NULL) {
3089 struct dspam_factor *f = (struct dspam_factor *) node_ft->ptr;
3090                  if (f) {
3091                    strlcat(data, ",\n\t", sizeof(data));
3092                    snprintf(scratch, sizeof(scratch), "%s, %2.5f",
3093                             f->token_name, f->value);
3094                    strlcat(data, scratch, sizeof(data));
3095                  }
3096                  node_ft = c_nt_next(CTX->factors, &c_ft);
(gdb) bt
#0  add_xdspam_headers (CTX=0x80705e0, ATX=0xbfe51b18) at dspam.c:3092
#1  0x08053442 in process_message (ATX=0xbfe51b18, message=0x8062bb8,
    username=0x8062930 "jacob", result_string=0xbfe519d0) at dspam.c:727
#2  0x08054295 in process_users (ATX=0xbfe51b18, message=0x8062b10)
    at dspam.c:1797
#3  0x08054f30 in main (argc=Cannot access memory at address 0x0
) at dspam.c:258
(gdb) print CTX->factors
$11 = (struct nt *) 0x806e688
(gdb) print *CTX->factors
$12 = {
  first = 0x806e570,
  insert = 0x616d6c69,
  items = 1700146542,
  nodetype = 1869181810
}
(gdb) print *CTX->factors->first
$13 = {
  ptr = 0x38,
  next = 0x20
}
-----------------------------------------------------------

dspam.debug
-----------------------------------------------------------
17124: [11/14/2007 00:19:02] No QuarantineAgent option found. Using standard quarantine.
17124: [11/14/2007 00:19:02] DSPAM Instance Startup
17124: [11/14/2007 00:19:02] input args: /usr/bin/dspam --debug --user jacob --mode=notrain --client --stdout --deliver=innocent,spam
17124: [11/14/2007 00:19:02] pass-thru args:
17124: [11/14/2007 00:19:02] processing user jacob
17124: [11/14/2007 00:19:02] uid = 0, euid = 0, gid = 0, egid = 503
17124: [11/14/2007 00:19:02] loading preferences for user jacob
17124: [11/14/2007 00:19:02] Loading preferences for uid 680
17124: [11/14/2007 00:19:02] Loading preferences for uid 0
17124: [11/14/2007 00:19:02] default preferences empty. reverting to dspam.conf preferences.
17124: [11/14/2007 00:19:02] Loading preferences from dspam.conf
17124: [11/14/2007 00:19:02] using /var/spool/dspam/opt-in/local/jacob.dspam as path 17124: [11/14/2007 00:19:02] using /var/spool/dspam/opt-out/local/jacob.nodspam as path
17124: [11/14/2007 00:19:02] sedation level set to: 0
17124: [11/14/2007 00:19:02] Connecting to 127.0.0.1:3310 for virus check
17124: [11/14/2007 00:19:02] Loading 278 BNR patterns
17124: [11/14/2007 00:19:02] bnr reported snr of 6.597
17124: [11/14/2007 00:19:02] Interesting BNR Pattern: bnr.s|0.05_0.05_0.40_ 0.01000 0s 3i 17124: [11/14/2007 00:19:02] Interesting BNR Pattern: bnr.s|0.05_0.40_0.40_ 0.01000 0s 7i 17124: [11/14/2007 00:19:02] Interesting BNR Pattern: bnr.s|0.05_0.05_0.05_ 0.01000 0s 41i 17124: [11/14/2007 00:19:02] Interesting BNR Pattern: bnr.s|0.00_0.00_0.05_ 0.01000 0s 38i 17124: [11/14/2007 00:19:02] Interesting BNR Pattern: bnr.s|0.05_0.40_0.05_ 0.01000 0s 3i 17124: [11/14/2007 00:19:02] Interesting BNR Pattern: bnr.s|0.40_0.05_0.40_ 0.01000 0s 7i 17124: [11/14/2007 00:19:02] Interesting BNR Pattern: bnr.s|0.40_0.40_0.40_ 0.01000 0s 8i
17124: [11/14/2007 00:19:02] Interesting BNR Pattern: bnr.t| 0.01000 0s 46i
17124: [11/14/2007 00:19:02] Interesting BNR Pattern: bnr.s|0.40_0.05_0.05_ 0.01000 0s 3i 17124: [11/14/2007 00:19:02] Interesting BNR Pattern: bnr.s|0.40_0.40_0.05_ 0.01000 0s 7i 17124: [11/14/2007 00:19:02] Interesting BNR Pattern: bnr.s|0.00_0.05_0.05_ 0.01000 0s 38i
17124: [11/14/2007 00:19:02] Whitelist threshold: 10
17124: [11/14/2007 00:19:02] [burton] [0.001190] is+> (1frq, 0s, 614i)
17124: [11/14/2007 00:19:02] [burton] [0.002290] >+I (2frq, 8s, 2550i)
17124: [11/14/2007 00:19:02] [burton] [0.002290] >+I (2frq, 8s, 2550i)
17124: [11/14/2007 00:19:02] [burton] [0.002382] >+The (2frq, 3s, 919i)
17124: [11/14/2007 00:19:02] [burton] [0.002382] >+The (2frq, 3s, 919i)
17124: [11/14/2007 00:19:02] [burton] [0.002888] https+// (1frq, 11s, 2778i)
17124: [11/14/2007 00:19:02] [burton] [0.003946] X-Mailman-Version*2.1.5 (1frq, 29s, 5355i)
17124: [11/14/2007 00:19:02] [burton] [0.004760] >+> (60frq, 38s, 5812i)
17124: [11/14/2007 00:19:02] [burton] [0.004760] >+> (60frq, 38s, 5812i)
17124: [11/14/2007 00:19:02] [burton] [0.005031] wrote+> (2frq, 39s, 5643i)
17124: [11/14/2007 00:19:02] [burton] [0.005031] wrote+> (2frq, 39s, 5643i)
17124: [11/14/2007 00:19:02] [burton] [0.006364] https (1frq, 26s, 2970i)
17124: [11/14/2007 00:19:02] [burton] [0.006518] List-Post*<mailto (1frq, 62s, 6913i) 17124: [11/14/2007 00:19:02] [burton] [0.006790] List-Help*request (1frq, 55s, 5886i) 17124: [11/14/2007 00:19:02] [burton] [0.008260] Errors-To*bounces (1frq, 67s, 5885i) 17124: [11/14/2007 00:19:02] [burton] [0.008264] Sender*bounces (1frq, 67s, 5882i)
17124: [11/14/2007 00:19:02] [burton] [0.008533] Url*redhat (1frq, 0s, 85i)
17124: [11/14/2007 00:19:02] [burton] [0.008634] List-Help*cluster+request (1frq, 0s, 84i) 17124: [11/14/2007 00:19:02] [burton] [0.008634] List-Post*cluster+redhat.com> (1frq, 0s, 84i) 17124: [11/14/2007 00:19:02] [burton] [0.008634] List-Subscribe*<https+//www.redhat.com/mailman/listinfo/linux (1frq, 0s, 84i) 17124: [11/14/2007 00:19:02] [burton] [0.008634] cluster+redhat (1frq, 0s, 84i) 17124: [11/14/2007 00:19:02] [burton] [0.008634] Subject*[Linux+cluster] (1frq, 0s, 84i)
17124: [11/14/2007 00:19:02] [burton] [0.008634] list+Linux (1frq, 0s, 84i)
17124: [11/14/2007 00:19:02] [burton] [0.008634] Sender*linux+cluster (1frq, 0s, 84i) 17124: [11/14/2007 00:19:02] [burton] [0.008634] List-Subscribe*//www.redhat.com/mailman/listinfo/linux+cluster> (1frq, 0s, 84i)
17124: [11/14/2007 00:19:02] [burton] [0.008634] redhat+com (1frq, 0s, 84i)
17124: [11/14/2007 00:19:02] [burton] [0.008634] Return-Path*cluster+bounces (1frq, 0s, 84i) 17124: [11/14/2007 00:19:02] Burton-Bayesian Probability: 0.000000 Samples: 27
17124: [11/14/2007 00:19:02] no factors specified; using default
17124: [11/14/2007 00:19:02] Result Confidence: 0.99
17124: [11/14/2007 00:19:02] [burton] [0.001190] is+> (1frq, 0s, 614i)
17124: [11/14/2007 00:19:02] [burton] [0.002290] >+I (2frq, 8s, 2550i)
17124: [11/14/2007 00:19:02] [burton] [0.002290] >+I (2frq, 8s, 2550i)
17124: [11/14/2007 00:19:02] [burton] [0.002382] >+The (2frq, 3s, 919i)
17124: [11/14/2007 00:19:02] [burton] [0.002382] >+The (2frq, 3s, 919i)
17124: [11/14/2007 00:19:02] [burton] [0.002888] https+// (1frq, 11s, 2778i)
17124: [11/14/2007 00:19:02] [burton] [0.003946] X-Mailman-Version*2.1.5 (1frq, 29s, 5355i)
17124: [11/14/2007 00:19:02] [burton] [0.004760] >+> (60frq, 38s, 5812i)
17124: [11/14/2007 00:19:02] [burton] [0.004760] >+> (60frq, 38s, 5812i)
17124: [11/14/2007 00:19:02] [burton] [0.005031] wrote+> (2frq, 39s, 5643i)
17124: [11/14/2007 00:19:02] [burton] [0.005031] wrote+> (2frq, 39s, 5643i)
17124: [11/14/2007 00:19:02] [burton] [0.006364] https (1frq, 26s, 2970i)
17124: [11/14/2007 00:19:02] [burton] [0.006518] List-Post*<mailto (1frq, 62s, 6913i) 17124: [11/14/2007 00:19:02] [burton] [0.006790] List-Help*request (1frq, 55s, 5886i) 17124: [11/14/2007 00:19:02] [burton] [0.008260] Errors-To*bounces (1frq, 67s, 5885i) 17124: [11/14/2007 00:19:02] [burton] [0.008264] Sender*bounces (1frq, 67s, 5882i)
17124: [11/14/2007 00:19:02] [burton] [0.008533] Url*redhat (1frq, 0s, 85i)
17124: [11/14/2007 00:19:02] [burton] [0.008634] List-Help*cluster+request (1frq, 0s, 84i) 17124: [11/14/2007 00:19:02] [burton] [0.008634] List-Post*cluster+redhat.com> (1frq, 0s, 84i) 17124: [11/14/2007 00:19:02] [burton] [0.008634] List-Subscribe*<https+//www.redhat.com/mailman/listinfo/linux (1frq, 0s, 84i) 17124: [11/14/2007 00:19:02] [burton] [0.008634] cluster+redhat (1frq, 0s, 84i) 17124: [11/14/2007 00:19:02] [burton] [0.008634] Subject*[Linux+cluster] (1frq, 0s, 84i)
17124: [11/14/2007 00:19:02] [burton] [0.008634] list+Linux (1frq, 0s, 84i)
17124: [11/14/2007 00:19:02] [burton] [0.008634] Sender*linux+cluster (1frq, 0s, 84i) 17124: [11/14/2007 00:19:02] [burton] [0.008634] List-Subscribe*//www.redhat.com/mailman/listinfo/linux+cluster> (1frq, 0s, 84i)
17124: [11/14/2007 00:19:02] [burton] [0.008634] redhat+com (1frq, 0s, 84i)
17124: [11/14/2007 00:19:02] [burton] [0.008634] Return-Path*cluster+bounces (1frq, 0s, 84i) 17124: [11/14/2007 00:19:02] Burton-Bayesian Probability: 0.000000 Samples: 27
17124: [11/14/2007 00:19:02] Result Confidence: 0.99
17124: [11/14/2007 00:19:02] BNR Decision Concurs
17124: [11/14/2007 00:19:02] total processing time: 0.08533s
17124: [11/14/2007 00:19:02] saving signature as 473a8546171241968551123
17124: [11/14/2007 00:19:02] libdspam returned probability of 0.000000
17124: [11/14/2007 00:19:02] message result: NOT SPAM
--------------------------------------------------------------

Attachment: dbg_mail-linux-cluster-bounces@redhat.com-1194995056.gz
Description: application/gzip

Reply via email to