Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 114709 - some qmail patches break qmail on amd64 and in general need cleanup
Summary: some qmail patches break qmail on amd64 and in general need cleanup
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Qmail Team (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-07 01:45 UTC by Sulla Felix
Modified: 2007-04-01 23:07 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sulla Felix 2005-12-07 01:45:15 UTC
You're really asking for trouble letting the qmail maintainer enable every 
possible qmail patches by default! 

on AMD64, gentoo's qmail qmail-remote keeps crashes while it works fine on x86.
... and vanilla qmail install works fine on amd64 without all your ugly patches 
and add-ons!

qmail-maildir++.patch is using the printf family and violates the coding 
standard used in qmail.

All qmail patches shouldn't be enabled by default! People trust qmail for its 
robustess but the portage version is really floppy.
Comment 1 Sulla Felix 2005-12-07 01:46:19 UTC
Dec  7 07:19:17 gadgetzan qmail-remote[19694]: segfault at 0000000000000000 rip 
0000000000407740 rsp 00007fffff8782e8 error 4
Dec  7 11:35:58 gadgetzan qmail-remote[20135]: segfault at 0000000000000000 rip 
0000000000407740 rsp 00007fffff95dc68 error 4
Dec  7 15:55:27 gadgetzan qmail-remote[20672]: segfault at 0000000000000000 rip 
0000000000407740 rsp 00007fffffd8f098 error 4
Dec  7 15:58:58 gadgetzan qmail-remote[21910]: segfault at 0000000000000000 rip 
0000000000407740 rsp 00007fffffbeadc8 error 4
Dec  7 16:02:02 gadgetzan qmail-remote[21969]: segfault at 0000000000000000 rip 
0000000000407740 rsp 00007fffffbc6218 error 4
Dec  7 16:05:42 gadgetzan qmail-remote[21979]: segfault at 0000000000000000 rip 
0000000000407740 rsp 00007ffffffe99b8 error 4
Dec  7 16:05:55 gadgetzan qmail-remote[21998]: segfault at 0000000000000000 rip 
0000000000407740 rsp 00007ffffff0aba8 error 4
Dec  7 16:21:14 gadgetzan qmail-remote[22080]: segfault at 0000000000000000 rip 
0000000000407740 rsp 00007fffffb189e8 error 4
Dec  7 16:22:03 gadgetzan qmail-remote[22152]: segfault at 0000000000000000 rip 
0000000000407740 rsp 00007fffffc6c5d8 error 4
Dec  7 16:25:39 gadgetzan qmail-remote[22153]: segfault at 0000000000000000 rip 
0000000000407740 rsp 00007fffffeaac68 error 4
Dec  7 16:27:56 gadgetzan qmail-remote[22154]: segfault at 0000000000000000 rip 
0000000000407740 rsp 00007fffff9125f8 error 4
Comment 2 Tavis Ormandy (RETIRED) gentoo-dev 2005-12-07 01:52:40 UTC
Not sure why this was assigned to security, reassigning to maintainer
Comment 3 Sulla Felix 2005-12-07 01:57:10 UTC
Here is another example of a useless patch:

    # Apply patch for local timestamps.
    # This will make the emails headers be written in localtime rather than GMT
    # If you really want, uncomment it yourself, as mail really should be in GMT
    epatch ${DISTDIR}/qmail-date-localtime.patch.txt

Why is this enabled by default???
Comment 4 Sulla Felix 2005-12-07 01:59:43 UTC
Now this is probably the culprit patch which causes all the crashes:

   # this patch merges a few others already
    EPATCH_SINGLE_MSG="Adding SMTP AUTH (2 way), Qregex and STARTTLS support" \
    EPATCH_OPTS="${EPATCH_OPTS} -F 3" \
    epatch ${DISTDIR}/qregex-starttls-2way-auth-20050523.patch

Maybe the maintainer should have added these words of warning (from the patch's 
author) as a comment in the ebuild:

A word of warning: the TLS part of this patch is not type-safe at
at least one point (hey, I didn't write it.)  I don't think this
causes problems on i386 architectures, but it made qmail-smtpd
crash frequently on an Alpha.  Commenting out the substdio_fdbuf(...);
call in qmail-smtpd appears to fix the issue.
Comment 5 Sulla Felix 2005-12-07 02:22:07 UTC
Ok this ebuild is an abomination! You can't disable any patches because of 
cross-dependencies.

Can we have a vanilla qmail ebuild and move this qmail port to qmail-bloated 
please.
Comment 6 Sulla Felix 2005-12-07 02:45:01 UTC
if you want to reproduce the crashes, try on a amd64 box and email someone at 
gmail.com, it will crash everytime.

In the meantime, this will temporarely fix the problem at the expense of TLS 
support.

echo mail-mta/qmail -ssl >>/etc/portage/package.use
emerge qmail

I guess I'm switching to postfix really soon.
Comment 7 Gabe Martin-Dempesy 2006-02-03 07:18:13 UTC
This bug also has me in a jam; I previously had an x86 server that I migrated (without choice) to an amd64.  Previously I had been offering TLS support, which is unfortunately causes crashes in the amd64.
Comment 8 Gabe Martin-Dempesy 2006-02-08 07:34:15 UTC
Due to the use of a newer version of the TLS patch, the qmail-1.03-r16 ebuild fixes the segmentation fault related to the SSL use flag in qmail-remote.  Please closet this bug.
Comment 9 Michael Hanselmann (hansmi) (RETIRED) gentoo-dev 2006-02-08 11:49:35 UTC
Thanks.

Please note that it's worth trying the ~-ebuild if the stable one doesn't work in almost all cases.
Comment 10 Sulla Felix 2006-02-09 17:41:08 UTC
How well has this new patch been audited? I see a lot of useless patches in this qmail ebuild. Patches that don't even respect djb coding standard and which introduce new bugs.

Don't cry when your machine gets hacked because of this crappy ebuild and careless maintainer.
Comment 11 Jakub Moc (RETIRED) gentoo-dev 2007-04-01 23:07:54 UTC
# Michael Hanselmann <hansmi@gentoo.org> (15 Mar 2007)
# mail-mta/qmail has been superseeded by mail-mta/netqmail.
# Pending removal mid April.
mail-mta/qmail