Mailing List Archive

segfaults on amd64 platform / read access to bugtracker...
I think there is a problem related to the sizeof(int) != sizeof(size_t)
when compiling on Linux/AMD/EMT 64 systems, and was wondering if anybody
else already reported this (possibly with a fix) to the
bug tracker at rt.anarres.org, before producing a fix
and submitting a patch myself...

(The debian etch amd64 patches seems to have the same problem:
see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=392793)

Is there a way to actually read the bug reports without
a login name?

Alternatively could somebody else comment on whether
this issue is known/fixed already somewhere....

On AMD64/Linux

sizeof(int) = 4
sizeof(size_t) = 8

For an example see:

spf_interpret.c:44

int buflen; <----
int len;

....
buflen = SPF_SMTP_COMMENT_SIZE + 1;
buf = malloc(buflen);
memset(buf, '\0', buflen);

err = SPF_request_get_exp(spf_server, spf_request,
spf_response, spf_record, &buf, &buflen);


spf_get_exp.c:78

SPF_errcode_t
SPF_request_get_exp(SPF_server_t *spf_server,
SPF_request_t *spf_request,
SPF_response_t *spf_response,
SPF_record_t *spf_record,
char **bufp, size_t *buflenp) <---


-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?list_id=1007
Re: segfaults on amd64 platform / read access to bugtracker... [ In reply to ]
On Thursday 08 March 2007 12:55, Thomas Jacob wrote:
> I think there is a problem related to the sizeof(int) != sizeof(size_t)
> when compiling on Linux/AMD/EMT 64 systems, and was wondering if anybody
> else already reported this (possibly with a fix) to the
> bug tracker at rt.anarres.org, before producing a fix
> and submitting a patch myself...

I think that bug tracker is dead.

> (The debian etch amd64 patches seems to have the same problem:
> see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=392793)

That bug is also reported in Ubuntu (which I use), but note that it only lists
the problem as being:

"The milter-greylist (linked with libspf2) segfaults ..."

It's actually a milter-greylist segfault that the reporter believes can be
attributed to libspf2.

> Is there a way to actually read the bug reports without
> a login name?
>
> Alternatively could somebody else comment on whether
> this issue is known/fixed already somewhere....
>
> On AMD64/Linux
>
> sizeof(int) = 4
> sizeof(size_t) = 8
>
> For an example see:
>
> spf_interpret.c:44
>
> int buflen; <----
> int len;
>
> ....
> buflen = SPF_SMTP_COMMENT_SIZE + 1;
> buf = malloc(buflen);
> memset(buf, '\0', buflen);
>
> err = SPF_request_get_exp(spf_server, spf_request,
> spf_response, spf_record, &buf, &buflen);
>
>
> spf_get_exp.c:78
>
> SPF_errcode_t
> SPF_request_get_exp(SPF_server_t *spf_server,
> SPF_request_t *spf_request,
> SPF_response_t *spf_response,
> SPF_record_t *spf_record,
> char **bufp, size_t *buflenp) <---

I have discussed this patch with the libspf2 developer and he didn't see how
it could make a difference, but I'm not a C programmer, so I have no opinion
myself (I was considering submitting the patch to Ubuntu, but have not based
on the developer's review of the issue).

In the Ubuntu build system libspf2 builds successfully on amd64:

https://launchpad.net/+builds/+build/127675

Scott K

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?list_id=1007
Re: segfaults on amd64 platform / read access to bugtracker... [ In reply to ]
Sorry for the delay, but ironically, the SPF record for v2.listbox.com
somehow seems to miss the IP of the mailing list sender host, so your
post went straight into my spam box ;-)


> I think that bug tracker is dead.

So what's the preferred way to submit bug reports and fixes, this list?

More to the point, given that the last Changelog entry dates
2004-04-09 and the lastest file in the last release 2005-02-24,
is libspf2 still maintained? Anyone know?

> That bug is also reported in Ubuntu (which I use), but note that it only lists
> the problem as being:
>
> "The milter-greylist (linked with libspf2) segfaults ..."
>
> It's actually a milter-greylist segfault that the reporter believes can be
> attributed to libspf2.

Yes that's exactly the problem ...

> I have discussed this patch with the libspf2 developer and he didn't see how
> it could make a difference, but I'm not a C programmer, so I have no opinion
> myself (I was considering submitting the patch to Ubuntu, but have not based
> on the developer's review of the issue).

Ehmm.. if int is 4 bytes wide, and size_t 8 bytes wide, and then you
are passing a pointer to an int into a function that expects a pointer
to a size_t, then I would say that does make a difference, as the
function will be reading/writing an extra 4 bytes of data which might be
anything.

As happens in this case as the buffer length suddenly is gigabytes
instead of a couple of bytes.

> In the Ubuntu build system libspf2 builds successfully on amd64:
>
> https://launchpad.net/+builds/+build/127675

This is the same source package as in Debian proper, and building
the package is not the problem, the segfault occurs when using the
library
(incidentally also when using the spfquery tool directly)...

Anyway I've written a patch that fixes these issues,
and also have a modified Debian source package for libspf2 that
contains this patch, and I will submit this to the Debian
bugtracker once it has been successfully introduced into
our production system next week ...

If you're interested I can mail you the patch, it would be
great if you could test whether it works for you as well...


Regards,
Thomas

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?list_id=1007
Re: segfaults on amd64 platform / read access to bugtracker... [ In reply to ]
On Friday 09 March 2007 07:24, Thomas Jacob wrote:
> Sorry for the delay, but ironically, the SPF record for v2.listbox.com
> somehow seems to miss the IP of the mailing list sender host, so your
> post went straight into my spam box ;-)

Odd

> > I think that bug tracker is dead.
>
> So what's the preferred way to submit bug reports and fixes, this list?

I'd say this list.

> More to the point, given that the last Changelog entry dates
> 2004-04-09 and the lastest file in the last release 2005-02-24,
> is libspf2 still maintained? Anyone know?

The original developer passed it off to a maintainer who vanished into the
sunset. The original developer has said he will pick up maintenance again,
but has not done so. Part of his reluctance is a lack of high volume/varied
mail streams to test against, so if you'd be willing to help out with
testing, that might help us get going.

> > That bug is also reported in Ubuntu (which I use), but note that it only
> > lists the problem as being:
> >
> > "The milter-greylist (linked with libspf2) segfaults ..."
> >
> > It's actually a milter-greylist segfault that the reporter believes can
> > be attributed to libspf2.
>
> Yes that's exactly the problem ...

Ah. OK.

> > I have discussed this patch with the libspf2 developer and he didn't see
> > how it could make a difference, but I'm not a C programmer, so I have no
> > opinion myself (I was considering submitting the patch to Ubuntu, but
> > have not based on the developer's review of the issue).
>
> Ehmm.. if int is 4 bytes wide, and size_t 8 bytes wide, and then you
> are passing a pointer to an int into a function that expects a pointer
> to a size_t, then I would say that does make a difference, as the
> function will be reading/writing an extra 4 bytes of data which might be
> anything.

As I said, I'm not a C programmer.

> As happens in this case as the buffer length suddenly is gigabytes
> instead of a couple of bytes.
>
> > In the Ubuntu build system libspf2 builds successfully on amd64:
> >
> > https://launchpad.net/+builds/+build/127675
>
> This is the same source package as in Debian proper, and building
> the package is not the problem, the segfault occurs when using the
> library
> (incidentally also when using the spfquery tool directly)...

OK.

> Anyway I've written a patch that fixes these issues,
> and also have a modified Debian source package for libspf2 that
> contains this patch, and I will submit this to the Debian
> bugtracker once it has been successfully introduced into
> our production system next week ...
>
> If you're interested I can mail you the patch, it would be
> great if you could test whether it works for you as well...

Sounds good. I'm not in a position to test it, but if you are quick I can
probably get it into the next Ubuntu release. Beta freeze is March 15 and
the RC freeze is a couple of weeks after that, so the sooner the better if
you are confident.

Scott K

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?list_id=1007
Re: segfaults on amd64 platform / read access to bugtracker... [ In reply to ]
> The original developer passed it off to a maintainer who vanished into the
> sunset. The original developer has said he will pick up maintenance again,
> but has not done so. Part of his reluctance is a lack of high volume/varied
> mail streams to test against, so if you'd be willing to help out with
> testing, that might help us get going.

Sure... we're running libspf together with Exim and definitely
have an interest in continuing to do so in a stable manner. Also
we are currently upgrading a number of nodes to the AMD64 platform.

Yesterday we had about 700k incoming emails, dunno if you
would consider that high volume.

But of course this is a production system so I certainly cannot
run alpha releases on it ;-)

> Sounds good. I'm not in a position to test it, but if you are quick I can
> probably get it into the next Ubuntu release. Beta freeze is March 15 and
> the RC freeze is a couple of weeks after that, so the sooner the better if
> you are confident.

Well I just replaced a couple of data type names, by the ones
that are used in the rest of the code, so I am fairly confident...

So to whom should I send my changes, directly to you or
to the Ubuntu bug tracker people?

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?list_id=1007
Re: segfaults on amd64 platform / read access to bugtracker... [ In reply to ]
On Friday 09 March 2007 08:17, Thomas Jacob wrote:
> > The original developer passed it off to a maintainer who vanished into
> > the sunset. The original developer has said he will pick up maintenance
> > again, but has not done so. Part of his reluctance is a lack of high
> > volume/varied mail streams to test against, so if you'd be willing to
> > help out with testing, that might help us get going.
>
> Sure... we're running libspf together with Exim and definitely
> have an interest in continuing to do so in a stable manner. Also
> we are currently upgrading a number of nodes to the AMD64 platform.
>
> Yesterday we had about 700k incoming emails, dunno if you
> would consider that high volume.
>
> But of course this is a production system so I certainly cannot
> run alpha releases on it ;-)
>
> > Sounds good. I'm not in a position to test it, but if you are quick I
> > can probably get it into the next Ubuntu release. Beta freeze is March
> > 15 and the RC freeze is a couple of weeks after that, so the sooner the
> > better if you are confident.
>
> Well I just replaced a couple of data type names, by the ones
> that are used in the rest of the code, so I am fairly confident...
>
> So to whom should I send my changes, directly to you or
> to the Ubuntu bug tracker people?

I'll take care of it. The patch needs some Debian (actually Ubuntu) packaging
wrapped around it.

Thanks,

Scott K

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?list_id=1007
Re: segfaults on amd64 platform / read access to bugtracker... [ In reply to ]
On Friday 09 March 2007 08:17, Thomas Jacob wrote:
> > The original developer passed it off to a maintainer who vanished into
> > the sunset. The original developer has said he will pick up maintenance
> > again, but has not done so. Part of his reluctance is a lack of high
> > volume/varied mail streams to test against, so if you'd be willing to
> > help out with testing, that might help us get going.
>
> Sure... we're running libspf together with Exim and definitely
> have an interest in continuing to do so in a stable manner. Also
> we are currently upgrading a number of nodes to the AMD64 platform.
>
> Yesterday we had about 700k incoming emails, dunno if you
> would consider that high volume.
>
> But of course this is a production system so I certainly cannot
> run alpha releases on it ;-)
>
> > Sounds good. I'm not in a position to test it, but if you are quick I
> > can probably get it into the next Ubuntu release. Beta freeze is March
> > 15 and the RC freeze is a couple of weeks after that, so the sooner the
> > better if you are confident.
>
> Well I just replaced a couple of data type names, by the ones
> that are used in the rest of the code, so I am fairly confident...
>
> So to whom should I send my changes, directly to you or
> to the Ubuntu bug tracker people?
>
The patch has been uploaded for the next Ubuntu release:

https://bugs.launchpad.net/ubuntu/+source/libspf2/+bug/65952/comments/3

There should be a new source packages within the next hour or so and new
binaries within the next day.

Thanks again for fixing this.

Scott K

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?list_id=1007
Re: segfaults on amd64 platform / read access to bugtracker... [ In reply to ]
Scott Kitterman wrote:

> The original developer passed it off to a maintainer who vanished into the
> sunset. The original developer has said he will pick up maintenance again,
> but has not done so. Part of his reluctance is a lack of high volume/varied
> mail streams to test against, so if you'd be willing to help out with
> testing, that might help us get going.

I am an early adopter of libspf_alt (which is now libspf2); I did
original SPF support for Zmailer (http://www.zmailer.org/), and I
develop a mail filtering framework (http://www.average.org/zmscanner/)
which, among other things, has an SPF module. Mail traffic on the
systems under my control is substantial, and segfaults in libspf2 are
frustratingly frequent (although less frequent than in libspf).

Unfortunately I have no time to participate in debugging/development of
libspf2, but I am more than happy to do some testing on my systems.

Regards
Eugene

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?list_id=1007
Re: segfaults on amd64 platform / read access to bugtracker... [ In reply to ]
On Thursday 15 March 2007 14:22, Eugene Crosser wrote:

> I am an early adopter of libspf_alt (which is now libspf2); I did
> original SPF support for Zmailer (http://www.zmailer.org/), and I
> develop a mail filtering framework (http://www.average.org/zmscanner/)
> which, among other things, has an SPF module. Mail traffic on the
> systems under my control is substantial, and segfaults in libspf2 are
> frustratingly frequent (although less frequent than in libspf).
>
> Unfortunately I have no time to participate in debugging/development of
> libspf2, but I am more than happy to do some testing on my systems.

Great. What O/S and architctures do you use?

Scott K

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?list_id=1007
Re: segfaults on amd64 platform / read access to bugtracker... [ In reply to ]
Scott Kitterman wrote:

>> Unfortunately I have no time to participate in debugging/development of
>> libspf2, but I am more than happy to do some testing on my systems.
>
> Great. What O/S and architctures do you use?

Only Linux/x86 at this time, Debian and Slackware. One system, Debian,
runs Sendmail + zmscanner in milter mode, traffic is not that high but I
have crashes in libspf2 maybe once a day. Another is a huge production
system with a farm of servers running Zmailer; this one is not suitable
to test highly experimental stuff.

Eugene

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?list_id=1007
Re: segfaults on amd64 platform / read access to bugtracker... [ In reply to ]
On Thu, 2007-03-15 at 22:32 +0300, Eugene Crosser wrote:
> Scott Kitterman wrote:
>
> >> Unfortunately I have no time to participate in debugging/development of
> >> libspf2, but I am more than happy to do some testing on my systems.
> >
> > Great. What O/S and architctures do you use?
>
> Only Linux/x86 at this time, Debian and Slackware. One system, Debian,
> runs Sendmail + zmscanner in milter mode, traffic is not that high but I
> have crashes in libspf2 maybe once a day. Another is a huge production
> system with a farm of servers running Zmailer; this one is not suitable
> to test highly experimental stuff.

This has me worried.

We don't seem to be getting any segfaults with libspf2
(or which would be worst, we do not notice them), our incoming mail
servers run x86-Debian Sarge servers with Exim + libspf (and now some on
amd64 and Debian Etch)...

SPF record verification is an opt in feature at our site though, maybe
we just do not have the volume to generate segfaults (~100k rejects
based
on SPF yesterday).

Maybe it's a problem with the libspf2 integration rather than with
the library itself?



-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?list_id=1007
Re: segfaults on amd64 platform / read access to bugtracker... [ In reply to ]
Thomas Jacob wrote:

>> runs Sendmail + zmscanner in milter mode, traffic is not that high but I
>> have crashes in libspf2 maybe once a day. Another is a huge production
>> system with a farm of servers running Zmailer; this one is not suitable
>> to test highly experimental stuff.
>
> This has me worried.
>
> We don't seem to be getting any segfaults with libspf2
> (or which would be worst, we do not notice them), our incoming mail
> servers run x86-Debian Sarge servers with Exim + libspf (and now some on
> amd64 and Debian Etch)...
>
> SPF record verification is an opt in feature at our site though, maybe
> we just do not have the volume to generate segfaults (~100k rejects
> based
> on SPF yesterday).
>
> Maybe it's a problem with the libspf2 integration rather than with
> the library itself?

This possibility cannot be completely ruled out...
However, the point is that with Sendmail+milter, you do notice crashes,
because milter runs as a single multithreaded process and when it
faults, no further mail is accepted at all. Possibly, in other setups
(with Zmailer for sure), when a process that is trying to accept a
problematic message crashes, this is not a cause to worry...

Eugene

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?list_id=1007