Re: Apparent Memory error in BF and Mutt
Brian McCullough <[email protected]> Wed, 6 Jul 2016 09:20:23 -0400
| Newsgroups | gmane.mail.bogofilter.general |
|---|---|
| Message-ID | <[email protected]> |
Wrong sender address, again. B ----- Forwarded message from Brian McCullough <[email protected]> ----- On Wed, Jul 06, 2016 at 09:29:04AM +0200, Matthias Andree wrote: > Am 05.07.2016 um 05:26 schrieb Brian McCullough: > > Hi all, > > > > I have just built a new machine and installed bogofilter, procmail and > > mutt. > > > > However, every time that I try to use bogofilter from mutt, I get the > > following messages: > > > > BDB0126 mmap: Cannot allocate memory > > bogofilter[22611]: cannot join environment: Cannot allocate memory > > > > What have I done wrong? > > Hi Brian, Greetings, Matthias, It has been about a decade since I last used Bogofilter, so I don't remember a lot. > welcome onboard. > > What's gone wrong is hard to tell without further information, as this > is a failure mode I don't recall from memory. > > Something seems to spoil up the database up front. Might be a typo in > the command line arguments that lead to an issue that Berkeley DB does > not report in an eye-catching way, might be broken files, might be > something else. > > Can we start by asking: Certainly. > - how is bogofilter called from mutt (command line arguments, wrapper > script, ...)? I followed instructions that I found both in the Bogofilter FAQ ( if I remember correctly ) and other places. They all tended to agree. One is an "overloading" of the Save function in Mutt, the other is an separate command in Mutt. The command looks like " |bogofilter -Ns " while the other is " |bogofilter -MSn ". They both create the error above. In procmailrc is " |bogofilter -u -e -p " which seems to work correctly, but also shows that error in the "from" log. > - the output of running "bogofilter -V" (that's a capital Vee at the end) Wed Jul 06 [bdmc@mail2] ~/$ bogofilter -V bogofilter version 1.2.4 Database: Berkeley DB 5.3.28: (September 9, 2013) AUTO-XA Copyright (C) 2002-2010 David Relson, Matthias Andree Copyright (C) 2002-2004 Greg Louis Copyright (C) 2002-2003 Eric S. Raymond, Adrian Otto, Gyepi Sam bogofilter comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under the General Public License. See the COPYING file with the source distribution for details. > - the operating system and version (the output of uname -a is also > appreciated) Debian Jessie ( 8.5.0 ) Wed Jul 06 [bdmc@mail2] ~/$ uname -a Linux mail2 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2+deb8u2 (2016-06-25) x86_64 GNU/Linux If it matters, this is a Xen VM. > - the file system used for your home directory ext4 > And if you're using default directories, the output of > > env LC_ALL=C ls -lab $HOME/.bogofilter $HOME/.bogofilter.cf Hmmm. I think that I see a potential problem. I told you that it had been a long time. I am going to remove .bogofilter and see if that makes any difference. B-) I will show you the top and bottom of the listing, but not all of it. Wed Jul 06 [bdmc@mail2] ~/$ env LC_ALL=C ls -lab $HOME/.bogofilter $HOME/.bogofilter.cf ls: cannot access /home/bdmc/.bogofilter.cf: No such file or directory /home/bdmc/.bogofilter: total 441320 drwx--S--- 2 bdmc bdmc 20480 May 15 2005 . drwxr-xr-x 112 bdmc bdmc 12288 Jul 6 09:02 .. -rw------- 1 bdmc bdmc 16384 Apr 6 2005 __db.001 -rw------- 1 bdmc bdmc 5251072 Apr 6 2005 __db.002 -rw------- 1 bdmc bdmc 98304 Apr 6 2005 __db.003 -rw------- 1 bdmc bdmc 4063232 Apr 6 2005 __db.004 -rw------- 1 bdmc bdmc 16384 Apr 6 2005 __db.005 -rw-rw-r-- 1 bdmc bdmc 0 Apr 3 2005 lockfile-d -rw-rw-r-- 1 bdmc bdmc 1024 May 16 2005 lockfile-p -rw-rw-r-- 1 bdmc bdmc 1048576 Apr 3 2005 log.0000000001 -rw------- 1 bdmc bdmc 1048576 Apr 3 2005 log.0000000002 -rw------- 1 bdmc bdmc 1048576 Apr 3 2005 log.0000000003 -rw------- 1 bdmc bdmc 1048576 Apr 3 2005 log.0000000004 -rw------- 1 bdmc bdmc 1048576 Apr 4 2005 log.0000000005 -rw------- 1 bdmc bdmc 1048576 Apr 4 2005 log.0000000006 -rw------- 1 bdmc bdmc 1048576 Apr 4 2005 log.0000000007 -rw------- 1 bdmc bdmc 1048576 Apr 4 2005 log.0000000008 -rw------- 1 bdmc bdmc 1048576 Apr 4 2005 log.0000000009 -rw------- 1 bdmc bdmc 1048576 Apr 4 2005 log.0000000010 -rw------- 1 bdmc bdmc 1048576 Apr 4 2005 log.0000000011 -rw------- 1 bdmc bdmc 1048576 Apr 4 2005 log.0000000012 -rw------- 1 bdmc bdmc 1048576 Apr 4 2005 log.0000000013 -rw------- 1 bdmc bdmc 1048576 Apr 4 2005 log.0000000014 -rw------- 1 bdmc bdmc 1048576 Apr 4 2005 log.0000000015 -rw------- 1 bdmc bdmc 1048576 Apr 5 2005 log.0000000016 -rw------- 1 bdmc bdmc 1048576 Apr 5 2005 log.0000000017 . . . . . -rw------- 1 bdmc bdmc 1048576 May 14 2005 log.0000000395 -rw------- 1 bdmc bdmc 1048576 May 14 2005 log.0000000396 -rw------- 1 bdmc bdmc 1048576 May 14 2005 log.0000000397 -rw------- 1 bdmc bdmc 1048576 May 14 2005 log.0000000398 -rw------- 1 bdmc bdmc 1048576 May 14 2005 log.0000000399 -rw------- 1 bdmc bdmc 1048576 May 14 2005 log.0000000400 -rw------- 1 bdmc bdmc 1048576 May 15 2005 log.0000000401 -rw------- 1 bdmc bdmc 1048576 May 15 2005 log.0000000402 -rw------- 1 bdmc bdmc 1048576 May 15 2005 log.0000000403 -rw------- 1 bdmc bdmc 1048576 May 16 2005 log.0000000404 -rw------- 1 bdmc bdmc 18800640 Jul 6 09:02 wordlist.db Wed Jul 06 [bdmc@mail2] ~/$ > It would be good to see debugging output, from these commands: > > bogofilter -QQ Wed Jul 06 [bdmc@mail2] ~/$ bogofilter -QQ BDB0126 mmap: Cannot allocate memory bogofilter[10529]: cannot join environment: Cannot allocate memory # bogofilter version 1.2.4 robx = 0.582995 # (5.83e-01) robs = 0.017800 # (1.78e-02) min_dev = 0.375000 # (3.75e-01) ham_cutoff = 0.450000 # (4.50e-01) spam_cutoff = 0.990000 # (9.90e-01) ns_esf = 1.000000 # (1.00e+00) sp_esf = 1.000000 # (1.00e+00) block-on-subnets = No encoding = utf-8 charset-default = iso-8859-1 replace-nonascii-characters = No no-header-tags = Yes stats-in-header = Yes report-unsure = No thresh-update = 0.000000 timestamp = Yes timestamp-date = 20160706 spam-header-name = X-Bogosity spam-header-place = '' spam-subject-tag = '' unsure-subject-tag = '' syslog-tag = '' header-format = %h: %c, tests=bogofilter, spamicity=%p, version=%v terse-format = %1.1c %f log-header-format = %h: %c, spamicity=%p, version=%v log-update-format = register-%r, %w words, %m messages spamicity-tags = Spam, Ham, Unsure spamicity-formats = %0.6f, %0.6f, %0.6f no-config-file = No config-file = '' user-config-file = ~/.bogofilter.cf bogofilter-dir = /home/bdmc/.bogofilter wordlist r,word,/home/bdmc/.bogofilter/wordlist.db,0 db-cachesize = 4 Wed Jul 06 [bdmc@mail2] ~/$ AFTER removing the OLD .bogofilter directory: Wed Jul 06 [bdmc@mail2] ~/$ bogofilter -QQ # bogofilter version 1.2.4 robx = 0.520000 # (5.20e-01) robs = 0.017800 # (1.78e-02) min_dev = 0.375000 # (3.75e-01) ham_cutoff = 0.450000 # (4.50e-01) spam_cutoff = 0.990000 # (9.90e-01) ns_esf = 1.000000 # (1.00e+00) sp_esf = 1.000000 # (1.00e+00) block-on-subnets = No encoding = utf-8 charset-default = iso-8859-1 replace-nonascii-characters = No no-header-tags = Yes stats-in-header = Yes report-unsure = No thresh-update = 0.000000 timestamp = Yes timestamp-date = 20160706 spam-header-name = X-Bogosity spam-header-place = '' spam-subject-tag = '' unsure-subject-tag = '' syslog-tag = '' header-format = %h: %c, tests=bogofilter, spamicity=%p, version=%v terse-format = %1.1c %f log-header-format = %h: %c, spamicity=%p, version=%v log-update-format = register-%r, %w words, %m messages spamicity-tags = Spam, Ham, Unsure spamicity-formats = %0.6f, %0.6f, %0.6f no-config-file = No config-file = '' user-config-file = ~/.bogofilter.cf bogofilter-dir = /home/bdmc/.bogofilter wordlist r,word,/home/bdmc/.bogofilter/wordlist.db,0 db-cachesize = 4 Wed Jul 06 [bdmc@mail2] ~/$ Here's the LS after removing the ancient history: Wed Jul 06 [bdmc@mail2] ~/$ env LC_ALL=C ls -lab $HOME/.bogofilter $HOME/.bogofilter.cf ls: cannot access /home/bdmc/.bogofilter.cf: No such file or directory /home/bdmc/.bogofilter: total 116 drwx------ 2 bdmc bdmc 4096 Jul 6 09:10 . drwxr-xr-x 113 bdmc bdmc 12288 Jul 6 09:09 .. -rw------- 1 bdmc bdmc 102400 Jul 6 09:11 wordlist.db Wed Jul 06 [bdmc@mail2] ~/$ > bogofilter -vvvv -xdygbc </dev/null > > Does your mutt integration change the environment in a special way, are > you using wrapper scripts, or are you just piping into bogofilter > commands and binding those to key sequences? The last. > We'll then work from there. I am going to suggest that you have solved my problem! > Cheers, > Matthias Thank you, Brian ----- End forwarded message ----- _______________________________________________ bogofilter mailing list [email protected] https://www.bogofilter.org/mailman/listinfo/bogofilter