You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2005/06/02 07:40:12 UTC
[Bug 4380] New: spamd on FreeBSD fails to support UNIX domain sockets
http://bugzilla.spamassassin.org/show_bug.cgi?id=4380
Summary: spamd on FreeBSD fails to support UNIX domain sockets
Product: Spamassassin
Version: SVN Trunk (Latest Devel Version)
Platform: PC
OS/Version: other
Status: NEW
Severity: normal
Priority: P5
Component: spamc/spamd
AssignedTo: dev@spamassassin.apache.org
ReportedBy: jm@jmason.org
http://spamassassin.zones.apache.org:8010/t-quinlan-fbsd/builds/20/test_3/0
t/spamc_cf..................spamd start failed: log: [82986] dbg: logger: adding
facilities: all
[82986] dbg: logger: logging level is DBG
[82986] dbg: spamd: creating UNIX socket:
[82986] dbg: spamd: _Listen: 128
[82986] dbg: spamd: _Local:
/usr/home/sabuildbot/slaves/quinlan-freebsd-perl585/t-quinlan-freebsd-perl585/build/Mail-SpamAssassin-3.1.0/t/log/spamd.sock
[82986] dbg: spamd: _Type: 1
[82986] error: spamd: could not find newly-created UNIX socket on
/usr/home/sabuildbot/slaves/quinlan-freebsd-perl585/t-quinlan-freebsd-perl585/build/Mail-SpamAssassin-3.1.0/t/log/spamd.sock:
No such file or directory ()
spamd: could not find newly-created UNIX socket on
/usr/home/sabuildbot/slaves/quinlan-freebsd-perl585/t-quinlan-freebsd-perl585/build/Mail-SpamAssassin-3.1.0/t/log/spamd.sock:
No such file or directory ()
Maybe you need to kill a running spamd process?
Not found: flag = X-Spam-Flag: YES
# Failed test 3 in t/SATest.pm at line 580
Not found: status = X-Spam-Status: Yes, score=
# Failed test 4 in t/SATest.pm at line 580 fail #2
FAILED tests 3-4
Failed 2/4 tests, 50.00% okay
t/spamc_E...................ok
t/spamd_plugin..............spamd start failed: log: [83256] dbg: logger: adding
facilities: all
[83256] dbg: logger: logging level is DBG
[83256] dbg: spamd: creating UNIX socket:
[83256] dbg: spamd: _Listen: 128
[83256] dbg: spamd: _Local:
/usr/home/sabuildbot/slaves/quinlan-freebsd-perl585/t-quinlan-freebsd-perl585/build/Mail-SpamAssassin-3.1.0/t/log/spamd.sock
[83256] dbg: spamd: _Type: 1
[83256] error: spamd: could not create UNIX socket on
/usr/home/sabuildbot/slaves/quinlan-freebsd-perl585/t-quinlan-freebsd-perl585/build/Mail-SpamAssassin-3.1.0/t/log/spamd.sock:
Address already in use ()
spamd: could not create UNIX socket on
/usr/home/sabuildbot/slaves/quinlan-freebsd-perl585/t-quinlan-freebsd-perl585/build/Mail-SpamAssassin-3.1.0/t/log/spamd.sock:
Address already in use ()
Maybe you need to kill a running spamd process?
Not found: called1 = test: called myTestPlugin, round 1
# Failed test 2 in t/SATest.pm at line 580
Not found: called2 = called myTestPlugin, round 2
# Failed test 4 in t/SATest.pm at line 580 fail #2
Not found: called3 = called myTestPlugin, round 3
# Failed test 6 in t/SATest.pm at line 580 fail #3
FAILED tests 2, 4, 6
Failed 3/6 tests, 50.00% okay
t/spamd_unix................spamd start failed: log: [83365] dbg: logger: adding
facilities: all
[83365] dbg: logger: logging level is DBG
[83365] dbg: spamd: creating UNIX socket:
[83365] dbg: spamd: _Listen: 128
[83365] dbg: spamd: _Local:
/usr/home/sabuildbot/slaves/quinlan-freebsd-perl585/t-quinlan-freebsd-perl585/build/Mail-SpamAssassin-3.1.0/t/log/spamd.sock
[83365] dbg: spamd: _Type: 1
[83365] error: spamd: could not create UNIX socket on
/usr/home/sabuildbot/slaves/quinlan-freebsd-perl585/t-quinlan-freebsd-perl585/build/Mail-SpamAssassin-3.1.0/t/log/spamd.sock:
Address already in use ()
spamd: could not create UNIX socket on
/usr/home/sabuildbot/slaves/quinlan-freebsd-perl585/t-quinlan-freebsd-perl585/build/Mail-SpamAssassin-3.1.0/t/log/spamd.sock:
Address already in use ()
Maybe you need to kill a running spamd process?
Not found: flag = X-Spam-Flag: YES
# Failed test 3 in t/SATest.pm at line 580
Not found: status = X-Spam-Status: Yes, score=
# Failed test 4 in t/SATest.pm at line 580 fail #2
FAILED tests 3-4
Failed 2/4 tests, 50.00% okay
Failed 3/89 test scripts, 96.63% okay. 7/1943 subtests failed, 99.64% okay.
Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------
t/spamc_cf.t 4 2 50.00% 3-4
t/spamd_plugin.t 6 3 50.00% 2 4 6
t/spamd_unix.t 4 2 50.00% 3-4
12 tests skipped.
*** Error code 25
Basically, any of the tests that use spamd/spamc with UNIX domain
sockets is failing, and has been since that buildbot was set
up. This needs to be investigated for 3.1.0.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 4380] spamd on *BSD has problems with long paths for UNIX domain sockets
Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4380
spamassassin-contrib@msquadrat.de changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|spamd on FreeBSD fails to |spamd on *BSD has problems
|support UNIX domain sockets |with long paths for UNIX
| |domain sockets
------- Additional Comments From spamassassin-contrib@msquadrat.de 2005-06-06 09:53 -------
r180340 will die more graceful.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 4380] spamd on FreeBSD fails to support UNIX domain sockets
Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4380
------- Additional Comments From parkerm@pobox.com 2005-06-01 23:36 -------
Subject: Re: New: spamd on FreeBSD fails to support UNIX domain
sockets
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
>Basically, any of the tests that use spamd/spamc with UNIX domain
>sockets is failing, and has been since that buildbot was set
>up. This needs to be investigated for 3.1.0.
That isn't a completely true statement. The tests pass just fine
during a normal make test, it's during the make disttest, and only
under the buildbot env, do they fail.
You can type make test and make disttest from the command line all day
long and it won't fail.
The last time I looked at this I hypothesized that it was due to path
length for the sock file.
Also, this is happening on OpenBSD as well.
Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCnqj3G4km+uS4gOIRAjPvAJ96ARgNbC5de64SXxsMeukOA1W+HgCfSfXd
Gxshpi15HTGzfVv1xdZv3WM=
=9HBA
-----END PGP SIGNATURE-----
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 4380] spamd on has problems with long paths for UNIX domain sockets
Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4380
------- Additional Comments From jm@jmason.org 2005-06-07 12:36 -------
no need to get over-smart here -- just use /tmp in the test suite always.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 4380] spamd on *BSD has problems with long paths for UNIX domain sockets
Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4380
------- Additional Comments From parkerm@pobox.com 2005-06-06 10:10 -------
Subject: Re: spamd on FreeBSD fails to support UNIX domain sockets
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
>The one in brackets is the output from $server->hostpath() (ie. the
internal
>representation of the socket in IO::Socket::UNIX) which I added in r180306.
>There you see that something (I guess sockaddr_un()) truncates the path.
>
>The second error also sounds like it actually creates a socket but with the
>wrong name.
>
>I'll add a check for hostpath() ne $path which will make spamd fail with an
>error better to understand.
>
You're finding basically what I've found. Something is truncating the
path. I started some simple searches last night to find a reference in
the FreeBSD or OpenBSD code that would confirm this but couldn't. I was
certainly able to recreate the issue outside of the buildbot environment
by moving the tree to a really long pathname and running make test from
there.
>That won't help for the buildbots though, they will still fail. What
shall we
>do? Shall we just move the build directory to /tmp?
>
This is actually what I'm contemplating, instead of putting the socket
in the t/log directory we could make something that will not conflict in
/tmp, maybe only on error when trying to create a socket in the t/log dir.
Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)
iD8DBQFCpINkG4km+uS4gOIRArmEAJ0Qr13JqdwxGh7B8z3rIyzSulk4kACbBlRX
0amlUuSt47QzC0oC7uzqVAU=
=4A6F
-----END PGP SIGNATURE-----
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 4380] spamd on has problems with long paths for UNIX domain sockets
Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4380
------- Additional Comments From jm@jmason.org 2005-06-07 11:32 -------
ick, I don't like the idea of chdir'ing -- that could have knock-on effects all
over the code.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 4380] spamd on *BSD has problems with long paths for UNIX domain sockets
Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4380
------- Additional Comments From jm@jmason.org 2005-06-06 10:23 -------
+1 on creating the socket in /tmp. we can generate a random filename for that
as the tests are running.
the issue should be documented in hte spamd manual page, too....
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 4380] spamd on has problems with long paths for UNIX domain sockets
Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4380
------- Additional Comments From quinlan@pathname.com 2005-06-07 11:23 -------
Subject: Re: spamd on has problems with long paths for UNIX domain sockets
How about a "chdir" to the basename if the path length is over 64
characters (or whatever) as a workaround? Does that do the job?
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 4380] spamd on has problems with long paths for UNIX domain sockets
Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4380
spamassassin-contrib@msquadrat.de changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|spamd on *BSD has problems |spamd on has problems with
|with long paths for UNIX |long paths for UNIX domain
|domain sockets |sockets
------- Additional Comments From spamassassin-contrib@msquadrat.de 2005-06-07 02:38 -------
Actually, similar restrictions apply on Linux, too:
mss@otherland ~ $ perl -MIO::Socket::UNIX=pack_sockaddr_un,unpack_sockaddr_un
-le 'print length(unpack_sockaddr_un(pack_sockaddr_un("x" x $ARGV[0])))' 1024
108
Anybody an idea where the best place for such a a check would be? In spamd,
the regression tests, autocon? Oh, and that should apply for spamc, too.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 4380] spamd on has problems with long paths for UNIX domain sockets
Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4380
------- Additional Comments From parkerm@pobox.com 2005-06-07 11:49 -------
Subject: Re: spamd on has problems with long paths for UNIX domain
sockets
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I think the warning that, I believe, is already in spamd as of a
couple of days ago should be sufficient for normal use, with a nice
little notice in the man page of course.
For tests, I suggest that we adopt something similar to Malte's
oneliner to provide a sanity check, if the path is getting cut off
switch to using a /tmp/<something random>spamd.sock type file in the
test only.
Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)
iD8DBQFCpexFG4km+uS4gOIRArEsAKCLJUnhcnTHBeXg7jzgx7g1fdOrugCfXSop
0ACgRU+wFNvLBaEMn6VRiRI=
=dblU
-----END PGP SIGNATURE-----
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 4380] spamd on has problems with long paths for UNIX domain sockets
Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4380
------- Additional Comments From felicity@apache.org 2005-06-07 13:10 -------
Subject: Re: spamd on has problems with long paths for UNIX domain sockets
On Tue, Jun 07, 2005 at 12:36:38PM -0700, bugzilla-daemon@bugzilla.spamassassin.org wrote:
> no need to get over-smart here -- just use /tmp in the test suite always.
I'd say $ENV{'TMPDIR'} || "/tmp" actually.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 4380] spamd on has problems with long paths for UNIX domain sockets
Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4380
jm@jmason.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Additional Comments From jm@jmason.org 2005-06-07 20:39 -------
Sending MANIFEST
Sending t/SATest.pm
Deleting t/data/spamc_test.cf
Sending t/spamc_cf.t
Sending t/spamd_plugin.t
Sending t/spamd_unix.t
Transmitting file data .....
Committed revision 189514.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 4380] spamd on FreeBSD fails to support UNIX domain sockets
Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4380
------- Additional Comments From spamassassin-contrib@msquadrat.de 2005-06-06 09:09 -------
Hah! Got it :)
http://buildbot.spamassassin.org:8010/t-quinlan-fbsd/builds/47/test_3/0
[77318] error: spamd: could not find newly-created UNIX socket
on /usr/home/sabuildbot/slaves/quinlan-freebsd-perl585/t-quinlan-freebsd-perl585/build/Mail-SpamAssassin-3.1.0/t/log/spamd.sock
(/usr/home/sabuildbot/slaves/quinlan-freebsd-perl585/t-quinlan-freebsd-perl585/build/Mail-SpamAssassin-3.):
No such file or directory
[77585] error: spamd: could not create UNIX socket
on /usr/home/sabuildbot/slaves/quinlan-freebsd-perl585/t-quinlan-freebsd-perl585/build/Mail-SpamAssassin-3.1.0/t/log/spamd.sock:
Address already in use
The one in brackets is the output from $server->hostpath() (ie. the internal
representation of the socket in IO::Socket::UNIX) which I added in r180306.
There you see that something (I guess sockaddr_un()) truncates the path.
The second error also sounds like it actually creates a socket but with the
wrong name.
I'll add a check for hostpath() ne $path which will make spamd fail with an
error better to understand.
That won't help for the buildbots though, they will still fail. What shall we
do? Shall we just move the build directory to /tmp?
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 4380] spamd on FreeBSD fails to support UNIX domain sockets
Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4380
jm@jmason.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|Undefined |3.1.0
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.