Closed Bug 1155009 Opened 9 years ago Closed 9 years ago

Cache::Memcached causes email_in.pl to stop working

Categories

(Bugzilla :: Incoming Email, defect)

defect
Not set
critical

Tracking

()

RESOLVED FIXED
Bugzilla 5.0

People

(Reporter: LpSolit, Assigned: LpSolit)

References

Details

(Keywords: regression)

Attachments

(1 file, 3 obsolete files)

Due to |$SIG{__DIE__} = \&die_handler| in email_in.pl line 492, the script dies everytime Cache::Memcached calls eval() to check which optional modules are installed. For instance:

  $HAVE_SOCKET6 = eval "use Socket6 qw(AF_INET6 PF_INET6); 1;"

causes:

  Can't locate Socket6.pm in @INC


And if I install Socket6, then:

  my $HAVE_XS = eval "use Cache::Memcached::GetParserXS; 1;"

causes:

  Can't locate Cache/Memcached/GetParserXS.pm in @INC

etc...
Flags: blocking5.0?
Attached patch patch, v1 (obsolete) — Splinter Review
Assignee: incoming.email → LpSolit
Status: NEW → ASSIGNED
Attachment #8593144 - Flags: review?(glob)
Comment on attachment 8593144 [details] [diff] [review]
patch, v1

Review of attachment 8593144 [details] [diff] [review]:
-----------------------------------------------------------------

that script's die_handler already has a check for eval blocks, so i'm not convinced that's the issue, and it appears your fix will causes an mta to send a failure notice.

::: email_in.pl
@@ -480,5 @@
>         MessageToMTA($reply->as_string);
>      }
> -    print STDERR "$msg\n";
> -    # We exit with a successful value, because we don't want the MTA
> -    # to *also* send a failure notice.

the comment indicates that die'ing would be bad, however that's what this patch does.
Attachment #8593144 - Flags: review?(glob) → review-
Flags: blocking5.0? → blocking5.0+
Assignee: LpSolit → incoming.email
Status: ASSIGNED → NEW
glob do you have a moment to look at a revised patch for this? we need this for 5.0 and then we can proceed with the release.
Flags: needinfo?(glob)
(In reply to David Lawrence [:dkl] from comment #3)
> glob do you have a moment to look at a revised patch for this? we need this
> for 5.0 and then we can proceed with the release.

when i have some time to get things set up i could have a look.
Flags: needinfo?(glob)
Attached patch patch, v2 (obsolete) — Splinter Review
No idea why, but it seems that $^S is lost somewhere, and so I fallback to detect "eval" in the name of the filename. Definitely a hack, but I cannot figure the root cause of the problem.
Attachment #8593144 - Attachment is obsolete: true
Attachment #8604355 - Flags: review?(glob)
Attached patch patch, v2.1 (obsolete) — Splinter Review
Better fix, as $^S == 0 is a valid state.
Attachment #8604355 - Attachment is obsolete: true
Attachment #8604355 - Flags: review?(glob)
Attachment #8604356 - Flags: review?(glob)
Comment on attachment 8604356 [details] [diff] [review]
patch, v2.1

Review of attachment 8604356 [details] [diff] [review]:
-----------------------------------------------------------------

thanks for revisiting this lpsolit.

i'm fine with this approach, but we should probably check the entire call stack not just the immediate caller.
Bugzilla::Error::_in_eval() shows how to do this.
Attachment #8604356 - Flags: review?(glob) → review-
Attached patch patch, v3Splinter Review
Attachment #8604356 - Attachment is obsolete: true
Attachment #8604759 - Flags: review?(glob)
Comment on attachment 8604759 [details] [diff] [review]
patch, v3

Review of attachment 8604759 [details] [diff] [review]:
-----------------------------------------------------------------

r=glob
Attachment #8604759 - Flags: review?(glob) → review+
Flags: approval5.0+
Flags: approval+
Assignee: incoming.email → LpSolit
Status: NEW → ASSIGNED
To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git
   3ff9b3e..2102acc  master -> master

To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git
   3d2b724..f261808  5.0 -> 5.0
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: