|
Home > Archive > Amavisd-new > March 2006 > Need help to overcome "Error closing main::stdin: Bad file descriptor"
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Need help to overcome "Error closing main::stdin: Bad file descriptor"
|
|
| Ralph Seichter 2006-03-10, 5:45 pm |
| Hi,
I'm moving a mail server from SuSE Linux 9 to SuSE 10 and I'm having
great difficulties with amavisd-new.
amavis[13946]: (13946-02) ESMTP::10024 /var/amavis/tmp/amavis-20060310T22=
0700-13946: <user@domain.tld> ->
<user2@mailhub.domain2.tld> Received: SIZE=3D9081 BODY=3D8BITMIME from ma=
ilhub.domain2.tld ([127.0.0.1]) by localhost
(mailhub.domain2.tld [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id=
13946-02 for <user2@mailhub.domain2.tld>; Fri,
10 Mar 2006 22:07:00 +0100 (CET)
amavis[13946]: (13946-02) Checking: nqyj6sdDg7fD <user@domain.tld> -> <us=
er2@mailhub.domain2.tld>
amavis[13950]: (13946-02) run_command: child process [13950]: Error closi=
ng main::stdin: Bad file descriptor at
/usr/sbin/amavisd line 1872.\n
amavis[13946]: (13946-02) TROUBLE in check_mail: parts_decode_ext FAILED:=
parsing file(1) results - missing last 1
results at (eval 57) line 154.
amavis[13946]: (13946-02) PRESERVING EVIDENCE in /var/amavis/tmp/amavis-2=
0060310T220700-13946
postfix/smtp[13926]: 53E0927E9C: host 127.0.0.1[127.0.0.1] said: 451 4.5.=
0 Error in processing, id=3D13946-02,
parts_decode_ext FAILED: parsing file(1) results - missing last 1 results=
at (eval 57) line 154. (in reply to end of
DATA command)
I searched the web for information, but apart from some hints to check
the permissions on /var/amavis, I failed to find anything useful so far.
The first difference between the server platforms that comes to my mind
is the installed PERL version. Could PERL 5.8.7 on the new machine cause
trouble? Unfortunately I'm no PERL guru, so I can't tell.
Thanks for your help!
--=20
Mit freundlichen Gr=FC=DFen / Sincerely
Dipl. Inform. Ralph Seichter
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd...1720&dat=121642
________________________________________
_______
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net
https://lists.sourceforge.net/lists...nfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/
| |
| Mark Martinec 2006-03-10, 8:45 pm |
| Ralph,
> I'm moving a mail server from SuSE Linux 9 to SuSE 10 and I'm having
> great difficulties with amavisd-new.
> amavis[13950]: (13946-02) run_command: child
> process [13950]: Error closing main::stdin: Bad file descriptor
> at /usr/sbin/amavisd line 1872.
> I searched the web for information, but apart from some hints to check
> the permissions on /var/amavis, I failed to find anything useful so far.
> The first difference between the server platforms that comes to my mind
> is the installed PERL version. Could PERL 5.8.7 on the new machine cause
> trouble? Unfortunately I'm no PERL guru, so I can't tell.
I don't remember seeing such problem report before
(others about "parsing file(1) results - missing last 1 results" were
probably for different reasons). It is probably not due to PERL 5.8.7 itself,
which probably now runs on a majority of hosts and is quite good - although
it could be a particular installation of it.
Since it complains about main::stdin file descriptor, it is probably worth
starting investigation there. Does it make any difference when amavisd
is started manually from a command line, or when started by your
startup script? Or is there a difference when a startup script is run
automatically at boot time, or later manually?
You could try just ignoring the status result at line 1872,
replacing the:
close(main::stdin) or die "Error closing main::stdin: $!";
with:
close(main::stdin);
If the problem does not pop up now some place else,
it's probably not too bad just ignoring the status. Certainly it would
be nice to investigate further. Perhaps a strace -f could shed some light.
Mark
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd...1720&dat=121642
________________________________________
_______
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net
https://lists.sourceforge.net/lists...nfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/
| |
| Mark Martinec 2006-03-11, 5:45 pm |
| Ralph,
> Matt Jackson suggested using Net::Server 0.90 instead of the current
> version 0.91, and with V0.90 the error does not pop up. Thanks once more
> for the hint, Matt!
I see, there has been some changes in Net::Server 0.91 on handling STDIN.
>
> I changed the line of code as you suggested. Amavisd-new seems to run
> nicely after the change, even in conjuction with Net::Server 0.91.
For now, removing the status test or sticking to 0.90 is a workaround.
Will investigate later on.
change:
close(main::stdin) or die "Error closing main::stdin: $!";
to:
close(main::stdin);
> I will ask the customer if it is OK to install strace on the server and
> to forward a trace file to you.
No need, the 0.90/0.91 hint is good enough, thanks.
Mark
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd...1720&dat=121642
________________________________________
_______
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net
https://lists.sourceforge.net/lists...nfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/
| |
| Jim Knuth 2006-03-11, 5:45 pm |
| Heute (11.03.2006/15:47 Uhr) schrieb Mark Martinec (Mark.Martinec+amavis@ijs.si),
> Ralph,
[vbcol=seagreen]
> I see, there has been some changes in Net::Server 0.91 on handling STDIN.
[vbcol=seagreen]
> For now, removing the status test or sticking to 0.90 is a workaround.
> Will investigate later on.
> change:
> close(main::stdin) or die "Error closing main::stdin: $!";
> to:
> close(main::stdin);
yeah, solved. Thank you.
[vbcol=seagreen]
> No need, the 0.90/0.91 hint is good enough, thanks.
> Mark
--
Viele Gruesse, Kind regards,
Jim Knuth
jk@jkart.de
ICQ #277289867
----------
Zufalls-Zitat
----------
Die Zeit mit ihrem stetigen Schweigen lehrt uns mehr
als die Menschen mit ihrem stetigen Reden.
(Johann Michael Sailer)
----------
Der Text hat nichts mit dem Empfaenger der Mail zu tun
----------
Virus free. Checked by NOD32 Version 1.1439 Build 6902 11.03.2006
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd...1720&dat=121642
________________________________________
_______
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net
https://lists.sourceforge.net/lists...nfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/
| |
| Jim Knuth 2006-03-11, 5:45 pm |
| SGV1dGUgKDExLjAzLjIwMDYvMTc6MjQgVWhyKSBz
Y2hyaWViIFJhbHBoIFNlaWNodGVyIChh
bWF2aXMtbWxAc2VudHJpZXMub3JnKSwNCg0KPiBN
YXJrIE1hcnRpbmVjIHdyb3RlOg0KDQo+
PiBGb3Igbm93LCByZW1vdmluZyB0aGUgc3RhdHVz
IHRlc3Qgb3Igc3RpY2tpbmcgdG8gMC45
MCBpcyBhIHdvcmthcm91bmQuDQo+PiBXaWxsIGlu
dmVzdGlnYXRlIGxhdGVyIG9uLg0KDQo+
IEkgdGhpbmsgSSdsbCBrZWVwIHVzaW5nIE5ldDo6
U2VydmVyIDAuOTEgYW5kIGRpc2FibGUg
dGhlIHN0YXR1cyB0ZXN0Lg0KDQpJIGhhdmUgZG9u
ZSB0aGlzIGFuZCBldnJ5dGhpbmcgaXMg
b2suIChOZXQ6OlNlcnZlciAwLjkxKQ0KDQo+IFBs
ZWFzZSBsZXQgbWUga25vdyB3aGF0IHlv
dSBjb21lIHVwIHdpdGg7IHRoaXMgcHJvYmxlbSBo
YXMgY29zdCBtZSBzb21lDQo+IHR1ZnRz
IG9mIGhhaXIgZnJvbSBteSBoZWFkIChhbmQgc29t
ZSBzbGVlcCBhc3dlbGwpLiA7LSkNCg0K
LS0gDQpWaWVsZSBHcnVlc3NlLCBLaW5kIHJlZ2Fy
ZHMsDQogSmltIEtudXRoDQogamtAamth
cnQuZGUNCiBJQ1EgIzI3NzI4OTg2Nw0KLS0tLS0t
LS0tLQ0KWnVmYWxscy1aaXRhdA0KLS0t
LS0tLS0tLQ0KRGllIEds/ GhsYW1wZW4gZGVzIE5ldyBZb3JrZXIgVS1CYWhuL
VN5c3RlbXMg
d2VyZGVuIGltIA0KVWhyemVpZ2Vyc2lubiBlaW5n
ZXNjaHJhdWJ0IHVuZCBlbnRnZWdlbiBk
ZW0gVWhyemVpZ2Vyc2lubiANCmhlcmF1c2dlZHJl
aHQsIGFsc28gZ2VuYXUgdW1nZWtlaHJ0
IGFscyD8YmxpY2guIERhcyBoYXQgDQphdWNoIGVp
bmVuIGd1dGVuIEdydW5kOiBGYWxscyBk
aWVzZSBHbPxobGFtcGVuIGdla2xhdXQgDQp3ZXJk
ZW4sIGthbm4gZGVyIERpZWIgbmljaHRz
IGRhbWl0IGFuZmFuZ2VuLi4uDQotLS0tLS0tLS0t
DQpEZXIgVGV4dCBoYXQgbmljaHRzIG1p
dCBkZW0gRW1wZmFlbmdlciBkZXIgTWFpbCB6dSB0
dW4NCi0tLS0tLS0tLS0NClZpcnVzIGZy
ZWUuIENoZWNrZWQgYnkgTk9EMzIgVmVyc2lvbiAx
LjE0MzkgQnVpbGQgNjkwMiAgMTEuMDMu
MjAwNg0K
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd...1720&dat=121642
________________________________________
_______
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net
https://lists.sourceforge.net/lists...nfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/
| |
| Mark Martinec 2006-03-11, 8:45 pm |
| > myself wrote:
It is more tricky than it appeared to make the same code work correctly
under 0.90 as well as under 0.91. The post_process_request_hook fails
to close socket under 0.91, so smtp QUIT command no longer drops the
session. Luckily Postfix does not mind, but it is wrong anyway.
I'll get more results hopefully tomorrow.
[vbcol=seagreen]
> I think I'll keep using Net::Server 0.91 and disable the status test.
> Please let me know what you come up with; this problem has cost me some
> tufts of hair from my head (and some sleep aswell). ;-)
For now disabling the check or keeping 0.90 is still a good workaround.
Mark
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd...1720&dat=121642
________________________________________
_______
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net
https://lists.sourceforge.net/lists...nfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/
| |
|
|
| Jim Knuth 2006-03-13, 5:45 pm |
| SGV1dGUgKDEzLjAzLjIwMDYvMTY6MDcgVWhyKSBz
Y2hyaWViIE1hcmsgTWFydGluZWMgKE1h
cmsuTWFydGluZWMrYW1hdmlzQGlqcy5zaSksDQoN
Cj4gSmltLA0KDQo+PiA+IHdpdGggYSBu
ZXh0IHByZS1yZWxhZXNlICItcHJlNiIgbGF0ZXIg
dG9uaWdodC4NCg0KPj4gaXMgaW4gdGhh
dCB0aGUgZml4IGZyb20gTmV0OjpTZXJ2ZXIgMC45
MSBpbmNsdWRlZA0KDQo+IFdpbGwgYmUg
KGF0IGxlYXN0IGZvciAwLjkyIGFuZCAwLjkwKSwg
YnV0IEknbSB3YWl0aW5nIGZvciBhIGZp
bmFsIHNheQ0KPiBmcm9tIHRoZSBhdXRob3Igb2Yg
TmV0OjpTZXJ2ZXIuIEl0IHNlZW1zIHRo
ZXJlIHdpbGwgYmUgYSAwLjkyIHByZXR0eSBzb29u
IDopDQoNCkl0IHNlZW1zIHRvIGJlIGEg
YnVnIGluIDAuOTEhPyA7KQ0KDQo+ICAgTWFyaw0K
DQotLSANClZpZWxlIEdydWVzc2UsIEtp
bmQgcmVnYXJkcywNCiBKaW0gS251dGgNCiBqa0Bq
a2FydC5kZQ0KIElDUSAjMjc3Mjg5ODY3
DQotLS0tLS0tLS0tDQpadWZhbGxzLVppdGF0DQot
LS0tLS0tLS0tDQpJY2ggaGFiZSBM9ndl
bmLkbmRpZ2VyIG5pZSBm/ HIgYmVzb25kZXJzIG11dGlnIGdlaGFsdGVuLCANC
mRlbm4gaW0g
TPZ3ZW5r5GZpZyBzaW5kIHNpZSBqYSBzaWNoZXIg
dm9yIGRlbiBNZW5zY2hlbi4gDQooRy5C
LiBTaGF3LCBlbmdsLi1pcmlzY2guIERyYW1hdGlr
ZXIsIDE4NTYtMTk1MCkNCi0tLS0tLS0t
LS0NCkRlciBUZXh0IGhhdCBuaWNodHMgbWl0IGRl
bSBFbXBmYWVuZ2VyIGRlciBNYWlsIHp1
IHR1bg0KLS0tLS0tLS0tLQ0KVmlydXMgZnJlZS4g
Q2hlY2tlZCBieSBOT0QzMiBWZXJzaW9u
IDEuMTQ0MCBCdWlsZCA2OTA1ICAxMi4wMy4yMDA2
DQo=
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd...1720&dat=121642
________________________________________
_______
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net
https://lists.sourceforge.net/lists...nfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/
| |
| Mark Martinec 2006-03-14, 5:45 pm |
| Ralph and others,
>
> It is more tricky than it appeared to make the same code work correctly
> under 0.90 as well as under 0.91. The post_process_request_hook fails
> to close socket under 0.91, so smtp QUIT command no longer drops the
> session. Luckily Postfix does not mind, but it is wrong anyway.
A workaround for this bug in 0.91 (not closing a connection) is quite
straightforward (the bug will be fixed in 0.92), but as a next obstacle
there are some conflicts between the new use of file descriptors
in Net::Server 0.91 and the way file descriptors are assigned when
spawning external programs, both by amavisd itself and by SpamAssassin.
This is not a bug in Net::Server, just a compatibility issue.
The "Error closing main::stdin: Bad file descriptor" is just
a (trivially fixed) tip of the iceberg.
The fix is nontrivial, so my intention is to get the 2.4.0
out on the street pretty fast, and not to bother with preparing,
testing and releasing a patched 2.3.3. People that want to
stick with 2.3.3 should not upgrade Net::Server beyond 0.90,
which is the last version under which 2.3.3 works reliably
in all setups. Port maintainers are of course free to patch
older port if they so desire.
Mark
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd...1720&dat=121642
________________________________________
_______
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net
https://lists.sourceforge.net/lists...nfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/
| |
| Jim Knuth 2006-03-14, 5:45 pm |
| SGV1dGUgKDE0LjAzLjIwMDYvMjI6NDcgVWhyKSBz
Y2hyaWViIFJhbHBoIFNlaWNodGVyIChh
bWF2aXMtbWxAc2VudHJpZXMub3JnKSwNCg0KPiBN
YXJrIE1hcnRpbmVjIHdyb3RlOg0KDQo+
PiBUaGUgZml4IGlzIG5vbnRyaXZpYWwsIHNvIG15
IGludGVudGlvbiBpcyB0byBnZXQgdGhl
IDIuNC4wIG91dCBvbiB0aGUNCj4+IHN0cmVldCBw
cmV0dHkgZmFzdCBbLi4uXQ0KDQo+IFRo
YW5rcyBmb3IgdGhlIGluZm8uIEknbGwgZG93bmdy
YWRlIHRvIE5ldDo6U2VydmVyIDAuOTAg
dW50aWwgYSBzdGFibGUNCj4gcmVsZWFzZSAyLjQu
MCBiZWNvbWVzIGF2YWlsYWJsZS4NCg0K
DQp3aHkgdGhhdD8gVXNlIHRoZSBwcmU2LiBXb3Jr
cyBmaW5lIHdpdGggTmV0OjpTZXJ2ZXIg
MC45MS4gOikNCg0KDQotLSANClZpZWxlIEdydWVz
c2UsIEtpbmQgcmVnYXJkcywNCiBKaW0g
S251dGgNCiBqa0Bqa2FydC5kZQ0KIElDUSAjMjc3
Mjg5ODY3DQotLS0tLS0tLS0tDQpadWZh
bGxzLVppdGF0DQotLS0tLS0tLS0tDQpNaXQgZGVt
IEJpZXIsIHdlbGNoZXMgZWluIGR1cmNo
c2Nobml0dGxpY2hlciBCdW5kZXNi/ HJnZXIgDQp6ZWl0IHNlaW5lcyBMZWJlbnMgdHJpb
mt0
LCBsaWXfZW4gc2ljaCBpbiBldHdhIDIwMCANClN3
aW1taW5ncG9vbHMgZvxsbGVuLg0KLS0t
LS0tLS0tLQ0KRGVyIFRleHQgaGF0IG5pY2h0cyBt
aXQgZGVtIEVtcGZhZW5nZXIgZGVyIE1h
aWwgenUgdHVuDQotLS0tLS0tLS0tDQpWaXJ1cyBm
cmVlLiBDaGVja2VkIGJ5IE5PRDMyIFZl
cnNpb24gMS4xNDQyIEJ1aWxkIDY5MTEgIDE0LjAz
LjIwMDYNCg==
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd...1720&dat=121642
________________________________________
_______
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net
https://lists.sourceforge.net/lists...nfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/
|
|
|
|
|