Gossamer Forum
Home : Products : Gossamer Mail : Discussion :

Segmentation Fault!?!?!??

Quote Reply
Segmentation Fault!?!?!??
hi,

I'm getting this error when incoming.pl runs - any idea what's going wrong and how I can fix it??

/root/cronjobs/webmail_incoming_script: line 2: 30846 Segmentation fault ./incoming.pl

thanks!

regan
Quote Reply
Re: [ryel01] Segmentation Fault!?!?!?? In reply to
Turns out to be a problem with the first message in the que waiting to be processed - that's a problem.

I thought someone from GT would have answered this question? Bit of a concern if Gossamer Mail can't handle this sort of thing?

regan.
Quote Reply
Re: [ryel01] Segmentation Fault!?!?!?? In reply to
Hi, Regan.

Can you send the first message in the queue to jason@gossamer-threads.com if you still have it? Thanks.
_________________________
bruce@gossamer-threads.com
Quote Reply
Re: [Inertia] Segmentation Fault!?!?!?? In reply to
hi inertia,

I deleted the first, then had another one last night and deleted that too - if it happens again I'll forward it on.

thanks
regan.
Quote Reply
Re: [Inertia] Segmentation Fault!?!?!?? In reply to
it's happened again - 3rd time in 3 days.

I'll sort out the problem and then forward the message on.

cheers,

r.
Quote Reply
Re: [ryel01] Segmentation Fault!?!?!?? In reply to
Was this ever resolved? I've started having this problem. A user just complained that they hadn't received new mail for 5 days. Other domains seem to be working fine, but test messages sent to addresses in the same domain as the complaining user don't go through. When I run incoming.pl manually in verbose mode everything seems to run fine until it throws a segfault.

Code:
GT::Mail::POP3 (23010): --> LIST
GT::Mail::POP3 (23010): <-- +OK 94 messages (1429884 octets).
GT::Mail::POP3 (23010): 94 messages listed.
GMail (23010): Parsing the header of message number 1.
GT::Mail::POP3 (23010): Getting head of message 1 ...
GT::Mail::POP3 (23010): --> TOP 1 0.
GT::Mail::POP3 (23010): <-- +OK.
GT::Mail::POP3 (23010): Top of message 1 retrieved.
Segmentation fault

Any ideas? This is bad!!!
Michael Coyne
seaturtle.org
Quote Reply
Re: [mcoyne] Segmentation Fault!?!?!?? In reply to
hi mcoyne,

no official fix for this - what I found was it is was a problem with the 1st message at the top of the mail spool file (I'm using the catch all setup) - just delete that (or save it to another file) and then try processing again - it should work fine.

regan.
Quote Reply
Re: [ryel01] Segmentation Fault!?!?!?? In reply to
Thanks Regan, I fixed the problem by doing as you suggested. Something was wrong with the first message. I was just kind of hoping there would be another solution. Deleting messages, like war, should be the last resort :)

cheers,
Michael Coyne
seaturtle.org
Quote Reply
Re: [mcoyne] Segmentation Fault!?!?!?? In reply to
yip, I'm not sure what the problem was either. If you kept a copy of it you might want to sent it to brewt so he can take a look at it - might be able to find something similar to mine in there?

regan.
Quote Reply
Re: [mcoyne] Segmentation Fault!?!?!?? In reply to
In case anyone is still using the older version of GM like me (I'm using Version: 2.0.2) - here's a fix for the problem mentioned in this thread.

Code:
Here's a replacement split_line() from GT/Mail/Parts.pm:

sub split_line {
# --------------------------------------------------------------------------
# Class->split_line('\s*,\s*', $line);
# -----------------------------
# Splits a line given a delimitor regex and the line. Returns an array
# of the pieces
#
# We will be testing undef strings
my $class = shift;
local $^W;

my ($delimiter, $line) = @_;
$delimiter =~ s/(\s)/\\$1/g;

my ($quote, $quoted, $unquoted, $delim, $word, @pieces);

@pieces = $line =~ m{
\G
(
(?:
" (?:\\.|[^\\"]+) * "
|
' (?:\\.|[^\\']+) * '
|
\\.
|
.
)+? # May segfault on very long lines (around 8000+ iterations of this group)
)
(?: $ | (?:$delimiter)+ )
}gsx;

return @pieces;
}

It's 'somewhat' fixed because of the regex - but it can handle a much higher length than the older one can.

Cheers

Regan.

Last edited by:

ryel01: Jul 5, 2004, 5:41 PM