Page MenuHomePhabricator

Add explicit logs for Mail and SSH
Closed, ResolvedPublic

Description

Here's the mail as received back by one of the reviewers (I cut out the personal email addresses so they don't show up in public searches).

  • Forwarded message ----------

From: Mail Delivery System <MAILER-DAEMON@llvm-reviews.chandlerc.com>
Date: 14 November 2013 08:40
Subject: Undelivered Mail Returned to Sender
To: rafael....

This is the mail system at host llvm-reviews.chandlerc.com.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

The mail system

<reviews+D2165+public+acc007354ff2d405@llvm-reviews.chandlerc.com>: Command

died with status 255: " /srv/http/phabricator/scripts/mail/mail_handler.php
custom/myconfig". Command output: PHP Fatal error:  Uncaught exception
'Exception' with message 'Process exited with an open transaction! The
transaction will be implicitly rolled back. Calls to openTransaction() must
always be paired with a call to saveTransaction() or killTransaction().' in
/srv/http/libphutil/src/aphront/storage/connection/AphrontDatabaseTransactionState.php:71
Stack trace: #0 [internal function]:
AphrontDatabaseTransactionState->__destruct() #1 {main}   thrown in
/srv/http/libphutil/src/aphront/storage/connection/AphrontDatabaseTransactionState.php
on line 71  Fatal error: Uncaught exception 'Exception' with message
'Process exited with an open transaction! The transaction will be
implicitly rolled back. Calls to openTransaction() must always be paired
with a call to saveTransaction() or killTransaction().' in
/srv/http/libphutil/src/aphront/storage/connection/AphrontDatabaseTransactionState.php:71
Stack trace: #0 [internal function]:
AphrontDatabaseTransactionState->__destruct() #1 {main}   thrown in
/srv/http/libphutil/src/aphront/storage/connection/AphrontDatabaseTransactionState.php
on line 71

Final-Recipient: rfc822;
reviews+D2165+public+acc007354ff2d405@llvm-reviews.chandlerc.com
Original-Recipient:
rfc822;reviews+D2165+public+acc007354ff2d405@llvm-reviews.chandlerc.com
Action: failed
Status: 5.3.0
Diagnostic-Code: x-unix; PHP Fatal error: Uncaught exception 'Exception' with

message 'Process exited with an open transaction! The transaction will be
implicitly rolled back. Calls to openTransaction() must always be paired
with a call to saveTransaction() or killTransaction().' in
/srv/http/libphutil/src/aphront/storage/connection/AphrontDatabaseTransactionState.php:71
Stack trace: #0 [internal function]:
AphrontDatabaseTransactionState->__destruct() #1 {main}   thrown in
/srv/http/libphutil/src/aphront/storage/connection/AphrontDatabaseTransactionState.php
on line 71  Fatal error: Uncaught exception 'Exception' with message
'Process exited with an open transaction! The transaction will be
implicitly rolled back. Calls to openTransaction() must always be paired
with a call to saveTransaction() or killTransaction().' in
/srv/http/libphutil/src/aphront/storage/connection/AphrontDatabaseTransactionState.php:71
Stack trace: #0 [internal function]:
AphrontDatabaseTransactionState->__destruct() #1 {main}   thrown in
/srv/http/libphutil/src/aphront/storage/connection/AphrontDatabaseTransactionState.php
on line 71
  • Forwarded message ----------

From: "Rafael Espíndola" <rafael....>
To: Rui Ueyama <ruiu....>
Cc: reviews+D2165+public+acc007354ff2d405@llvm-reviews.chandlerc.com,
Michael Spencer <bigch....>, llvm-commits
<llvm-commits@cs.uiuc.edu>
Date: Thu, 14 Nov 2013 08:39:43 -0500
Subject: Re: [PATCH] Path: Recognize COFF import library file magic.

As to llvm-readobj, I think we don't have to write a test to run
llvm-readobj with an actual file reside on the file system. My test should
be sufficient as a unit test for the function that's being modified in the
patch. Actually I think this unit test would be better than tests using
llvm-readobj because it's more focused on identity_magic's functionality.
It's easy to write, understand, and debug.

But fails to show why we need a feature and cannot be compared with
native tools like dumpbin. At llvm we normally prefer smallish
integration tests than gtest style unit tests.

The case where unit tests are clearly better is when there is no easy
way to isolate what we want to test. For example, fixing a bug in
densemap. Anything but a unit test would be brittle in that case.

For file type identification, all that the unit test shows is that you
wrote the same number in two files. A test using llvm-readobj lets us
check the file with a native tool. Given that llvm-readobject must
identify the file, it is not brittle as the DenseMap example would be.

So, please, add a test running llvm-readobject.

Cheers,
Rafael

Event Timeline

klimek raised the priority of this task from to Needs Triage.
klimek updated the task description. (Show Details)
klimek added a subscriber: klimek.

Hrrm, I'm not exactly sure what's going on here. That error isn't very meaningful on its own. Is this issue reproducible? Can you get me a copy of the original raw email (e.g., including headers) that the user sent (it's fine to censor personal email addresses, etc) so I can try to reproduce it?

I by now had multiple people reporting this problem. Do you still have
admin access to our phab instance (and can you get to the stuff there?)
Otherwise I'll dig for the original...

We moved mail out of admin since there were too many weird policy violation edge cases. You might be able to fish something out of bin/mail list-inbound + bin/mail show-inbound --id <x>, though.

Ok, that worked... what's the best way to put the email up without it
getting indexed by search engines (the content is all public, as it goes to
a public mailing list anyway, but I don't want the full mail addresses to
show up indexed in search engines).

You can send it to epriestley@phacility.com

Got it, thanks. I'll see if I can reproduce the issue..

I'm not immediately able to reproduce this. I can't replicate your setup exactly, but I tried to get as close as possible and the mail went through fine.

We can add an explicit log for mail errors which might produce more useful information, let me pursue that.

epriestley renamed this task from Error while parsing incoming mail... to Add explicit logs for Mail and SSH.Nov 18 2013, 6:06 PM
epriestley triaged this task as Normal priority.
epriestley added a project: Mail.

Btw, this is becoming more and more annoying - if there are any tips on how I can debug this, that would be highly appreciated :) (the problem might well be related to my local changes...)

Oh, did we ever actually find the mail in bin/mail list-inbound + bin/mail show-inbound --id <x>?

Basically, do bin/mail list-inbound and find one of the relevant messages, then do bin/mail show-inbound --id X, where X is the ID from the previous step.

  • Do the messages exist? It's possible that this exception is firing early enough that we don't save them to the database.
  • Does the message record have anything useful? Normally, it is expected to have exception details.

Ah, I think with one of the recent integrates I'm back at the point where I get an error due to an empty message body. I remember inserting code to switch that error off, but I'm unsure of where I had to pull the lever...

The message exists, and looks exactly normal:
PROPERTIES
ID: 30951
Status:
Related PHID:
Author PHID:
Message ID Hash: BvDfx.DmqDTw

HEADERS
<the headers>
BODIES
Body "text"
On Thu, Dec 5, 2013 at 3:37 AM, Hans Wennborg <hans@chromium.org> wrote:

On Wed, Dec 4, 2013 at 5:39 PM, Josh Samuel <jsamuel@gmail.com> wrote:

LLVM_TOOLS_BINARY_DIR doesn't appear to be the correct directory to

copy from when building from the CMake generated Visual Studio solution.
It is copying the exe's to a subfolder of LLVM_TOOLS_BINARY_DIR that
represents the build configuration (eg. bin\Release or bin\RelWithDebugInfo
)

Hmm, so does anyone know a good way of getting the *real* binary
output dir within cmake?

Another phab email handling test, please ignore again...

Body "html"

ATTACHMENTS
No attachments.

This task is meandering a bit, but we hit three issues yesterday:

  • Bad getPHID() call in Conpherence.
  • Bad messageCount INSERT in Conpherence.
  • Conpherence incorrectly handling mail which wasn't addressed to it.
epriestley claimed this task.

At least some of these cases should be better after D8692. I'm not sure if the original issues got resolved or not, feel free to open up another task if there are still problems after D8692.