Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A review command mail makes sympa_msg crash #308

Closed
ldidry opened this issue May 16, 2018 · 6 comments
Closed

A review command mail makes sympa_msg crash #308

ldidry opened this issue May 16, 2018 · 6 comments

Comments

@ldidry
Copy link
Contributor

ldidry commented May 16, 2018

A simple mail with a review command make sympa_msg crash

Configuration: Debian 9, PostgreSQL 9.6, Sympa 6.2.16, libmime-tools-perl 5.508-1 (Debian package)

Log:

May 16 20:16:13 rod2 sympa_msg[5972]: notice Sympa::Spindle::ProcessMessage::_twist() Processing Sympa::Request <action=review;[email protected]>
May 16 20:16:13 rod2 sympa_msg[5972]: err main::#240 > Sympa::Spindle::spin#92 > Sympa::Spindle::DoCommand::_twist#117 > Sympa::Spindle::spin#92 > Sympa::Request::Handler::review::_twist#85 > Sympa::send_file#387 > Sympa::Spindle::new#39 > Sympa::Message::Template::new#181 > Sympa::Message::Template::_new_from_template#449 > Sympa::Message::new#149 > MIME::Parser::parse_data#1130 > MIME::Parser::parse#1158 > MIME::Parser::process_part#1018 > MIME::Parser::process_header#628 > MIME::Parser::Reader::read_chunk#236 > MIME::Parser::Reader::native_handle#186 DIED: Can't call method "isa" on an undefined value at /usr/share/perl5/MIME/Parser/Reader.pm line 186.

The (anonimized) mail:

X-Sympa-To: [email protected]
Return-Path: <[email protected]>
X-Original-To: [email protected]
Delivered-To: [email protected]
Received: from smtpfb2-g21.free.fr (smtpfb2-g21.free.fr [212.27.42.10])
        by rod2.framasoft.org (Postfix) with ESMTP id F0CA213F25F
        for <[email protected]>; Wed, 16 May 2018 20:16:04 +0200 (CEST)
Received: from smtp6-g21.free.fr (smtp6-g21.free.fr [212.27.42.6])
        by smtpfb2-g21.free.fr (Postfix) with ESMTP id 4C8604290A3
        for <[email protected]>; Wed, 16 May 2018 20:06:48 +0200 (CEST)
Received: from [192.168.1.11] (unknown [XX.XX.XX.XX])
        by smtp6-g21.free.fr (Postfix) with ESMTPS id 67386780310
        for <[email protected]>; Wed, 16 May 2018 20:06:47 +0200 (CEST)
Date: Wed, 16 May 2018 20:06:46 +0200 (CEST)
From: First_name Last_name <[email protected]>
X-X-Sender: xxx@localhost
To: Sympa Framalistes <[email protected]>
Message-ID: <alpine.LNX.numbers@localhost>
User-Agent: Alpine 2.20.13 (LNX numbers)
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset=US-ASCII

review list_name
@ldidry
Copy link
Contributor Author

ldidry commented May 16, 2018

After sympa_msg restart stack trace:

Le processus sympa_msg.pl précédent (avec le pid 5972) est mort brutalement.
Date du crash : 16 mai 2018  20:16
Erreurs : 

Use of uninitialized value in numeric le (<=) at /home/sympa/bin/Sympa/List.pm line 1391, <FILE> line 22.
[lot of same lines]
Use of uninitialized value in numeric le (<=) at /home/sympa/bin/Sympa/List.pm line 1391.
[lot of same lines]
Use of uninitialized value in numeric le (<=) at /home/sympa/bin/Sympa/List.pm line 1391.

Warning: Could not parse date for message
         Message-Id: <[email protected]>
         Date: 
Use of uninitialized value in numeric le (<=) at /home/sympa/bin/Sympa/List.pm line 1391.
Use of uninitialized value in numeric le (<=) at /home/sympa/bin/Sympa/List.pm line 1391, <FILE> line 313.
Use of uninitialized value in numeric le (<=) at /home/sympa/bin/Sympa/List.pm line 1391, <FILE> line 313.
Use of uninitialized value in numeric le (<=) at /home/sympa/bin/Sympa/List.pm line 1391, <FILE> line 313.
Use of uninitialized value in numeric le (<=) at /home/sympa/bin/Sympa/List.pm line 1391.
[lot of same lines]
Use of uninitialized value in numeric le (<=) at /home/sympa/bin/Sympa/List.pm line 1391.
Use of uninitialized value in numeric le (<=) at /home/sympa/bin/Sympa/List.pm line 1391, <FILE> line 645.
Use of uninitialized value in numeric le (<=) at /home/sympa/bin/Sympa/List.pm line 1391, <FILE> line 645.
Use of uninitialized value in numeric le (<=) at /home/sympa/bin/Sympa/List.pm line 1391, <FILE> line 645.
Use of uninitialized value in numeric le (<=) at /home/sympa/bin/Sympa/List.pm line 1391.
[lot of same lines]
Use of uninitialized value in numeric le (<=) at /home/sympa/bin/Sympa/List.pm line 1391.
Use of uninitialized value in string eq at /home/sympa/bin/Sympa/Request/Handler/review.pm line 77.
[lot of same lines]
Use of uninitialized value in string eq at /home/sympa/bin/Sympa/Request/Handler/review.pm line 77.
DIED: Can't call method "isa" on an undefined value at /usr/share/perl5/MIME/Parser/Reader.pm line 186.
 at /usr/share/perl5/MIME/Parser/Reader.pm line 186.
        MIME::Parser::Reader::native_handle(undef) called at /usr/share/perl5/MIME/Parser/Reader.pm line 236
        MIME::Parser::Reader::read_chunk(MIME::Parser::Reader=HASH(0x564916295610), undef, GLOB(0x56490ea750b0), 0, 1) called at /usr/share/perl5/MIME/Parser.pm line 628
        MIME::Parser::process_header(MIME::Parser=HASH(0x56490f68ae20), undef, MIME::Parser::Reader=HASH(0x564915adee78)) called at /usr/share/perl5/MIME/Parser.pm line 1018
        MIME::Parser::process_part(MIME::Parser=HASH(0x56490f68ae20), undef, undef) called at /usr/share/perl5/MIME/Parser.pm line 1158
        MIME::Parser::parse(MIME::Parser=HASH(0x56490f68ae20), undef) called at /usr/share/perl5/MIME/Parser.pm line 1130
        MIME::Parser::parse_data(MIME::Parser=HASH(0x56490f68ae20), SCALAR(0x5649094ccec8)) called at /home/sympa/bin/Sympa/Message.pm line 149
        Sympa::Message::new('Sympa::Message::Template', 'Message-Id: <[email protected]>\x{a}Date: ...', 'context', Sympa::List <[email protected]>) called at /home/sympa/bin/Sympa/Message/Template.pm line 449
        Sympa::Message::Template::_new_from_template('Sympa::Message::Template', Sympa::List <[email protected]>, 'review.tt2', '[email protected]', HASH(0x5649220586c8), 'template', 'review', 'context', ...) called at /home/sympa/bin/Sympa/Message/Template.pm line 181
        Sympa::Message::Template::new('Sympa::Message::Template', 'data', HASH(0x56491700f390), 'rcpt', '[email protected]', 'context', Sympa::List <[email protected]>, 'template', ...) called at /home/sympa/bin/Sympa/Spindle.pm line 39
        Sympa::Spindle::new('Sympa::Spindle::ProcessTemplate', 'context', Sympa::List <[email protected]>, 'template', 'review', 'rcpt', '[email protected]', 'data', ...) called at /home/sympa/bin/Sympa.pm line 387
        Sympa::send_file(Sympa::List <[email protected]>, 'review', '[email protected]', HASH(0x56491700f390)) called at /home/sympa/bin/Sympa/Request/Handler/review.pm line 85
        Sympa::Request::Handler::review::_twist(Sympa::Spindle::ProcessMessage=HASH(0x56491294e9e0), Sympa::Request <action=review;[email protected]>) called at /home/sympa/bin/Sympa/Spindle.pm line 92
        Sympa::Spindle::spin(Sympa::Spindle::ProcessMessage=HASH(0x56491294e9e0)) called at /home/sympa/bin/Sympa/Spindle/DoCommand.pm line 117
        Sympa::Spindle::DoCommand::_twist(Sympa::Spindle::ProcessIncoming=HASH(0x564909e02df8), Sympa::Message <[email protected]>) called at /home/sympa/bin/Sympa/Spindle.pm line 92
        Sympa::Spindle::spin(Sympa::Spindle::ProcessIncoming=HASH(0x564909e02df8)) called at /home/sympa/bin/sympa_msg.pl line 240

@ldidry
Copy link
Contributor Author

ldidry commented May 16, 2018

In fact, it's not the mail itself that makes sympa crash, but in fact the creation of the mail: I sent a mail from the listmaster address and it crashes Sympa as well, but I can send a review command for an other list and it works well.

@ikedas
Copy link
Member

ikedas commented May 17, 2018

@ldidry,
I suppose this behavior (and #305) may depend on version of external module (on this issue see also CPAN RT#119166).

If possible, could you please check following versions?

  • MIME-tools 5.428 or earlier (legacy)
  • MIME-tools 5.502 (the first stable of 5.5xx)
  • MIME-tools 5.509 (the latest)

Or at least, specify versions you used.

@ikedas
Copy link
Member

ikedas commented May 17, 2018

Perhaps I got it.

#! /usr/local/perl-5.24.0/bin/perl

use warnings;
use IO::File;
$x = "\x{fffd}";
$io = IO::File->new(\$x, "<:");
print $io;

Result:

Strings with code points over 0xFF may not be mapped into in-memory file handles
Use of uninitialized value $io in print at xxxx.pl line 7.

@ldidry
Copy link
Contributor Author

ldidry commented May 17, 2018

Yeah \o/ The patch suggested in #305 worked! No more crash! (DBD::Pg 3.5.3)

@ikedas
Copy link
Member

ikedas commented May 28, 2018

Duplicate of #305.

@ikedas ikedas closed this as completed May 28, 2018
ikedas added a commit that referenced this issue May 28, 2018
Candidate fix for #305, #308: PostgreSQL: Issues related to utf8 flag
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants