KeyError in "virgin" runner.

Bug #827547 reported by Stephen A. Goss
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GNU Mailman
Incomplete
Undecided
Unassigned

Bug Description

Not sure what caused this error that showed up in mailman.log:

Aug 16 10:54:50 2011 (31400) Uncaught runner exception: u'foo.example.com'
Aug 16 10:54:50 2011 (31400) Traceback (most recent call last):
  File "/home/sgoss/mailman_clone/src/mailman/core/runner.py", line 138, in _one_iteration
    self._process_one_file(msg, msgdata)
  File "/home/sgoss/mailman_clone/src/mailman/core/runner.py", line 220, in _process_one_file
    keepqueued = self._dispose(mlist, msg, msgdata)
  File "/home/sgoss/mailman_clone/src/mailman/runners/virgin.py", line 37, in _dispose
    process(mlist, msg, msgdata, 'virgin')
  File "/home/sgoss/mailman_clone/src/mailman/core/pipelines.py", line 50, in process
    handler.process(mlist, msg, msgdata)
  File "/home/sgoss/mailman_clone/src/mailman/pipeline/cook_headers.py", line 360, in process
    process(mlist, msg, msgdata)
  File "/home/sgoss/mailman_clone/src/mailman/pipeline/cook_headers.py", line 202, in process
    listinfo = mlist.script_url('listinfo')
  File "/home/sgoss/mailman_clone/src/mailman/model/mailinglist.py", line 243, in script_url
    return urljoin(self.domain.base_url, target + '/' + self.fqdn_listname)
  File "/home/sgoss/mailman_clone/src/mailman/model/mailinglist.py", line 227, in domain
    return getUtility(IDomainManager)[self.mail_host]
  File "/home/sgoss/mailman_clone/src/mailman/model/domain.py", line 142, in __getitem__
    raise KeyError(email_host)
KeyError: u'foo.example.com'

Tags: mailman3
Revision history for this message
Stephen A. Goss (postfuturist) wrote :

I am able to trigger this error by sending an email to a list from a nonmember, so the message gets put into held status. Then moderating the message with Action.accept. After that, the message does not get delivered, instead the above error appears in the log.

Revision history for this message
Stephen A. Goss (postfuturist) wrote :

Regarding last comment, this error does not always appear, but moderator approved message never gets sent, so I think they might be unrelated.

Revision history for this message
Barry Warsaw (barry) wrote :

In one sense script_url() is kind of bogus because now that the web ui is separate from the engine, the engine needs a better model for how to calculate its urls. This method is mostly a hold over from Mailman 2.

OTOH, its rather disturbing that you don't have a key in the Domain column of database for foo.example.com. Wait, did you possibly create foo.example.com, and then delete it before this message got put into the virgin queue?

Barry Warsaw (barry)
Changed in mailman:
status: New → Triaged
Revision history for this message
Stephen A. Goss (postfuturist) wrote :

Ah, yep, it happens right at the end of the test suite (our internal tests, not MM3's) which cleans up everything, including the domain entry.

Revision history for this message
Stephen A. Goss (postfuturist) wrote :

I think what happened, was that before the fix for https://bugs.launchpad.net/flufl.lock/+bug/827052 was made, I was looping through and rejecting all pending messages before removing the list and then the domain. Maybe since I was rejecting instead of discarding, it was generating a bounce message for the virgin queue right before deleting the domain entry. This isn't really a problem any more. Sorry if I got some details wrong, I don't fully understand the Mailman pipeline yet.

Revision history for this message
Barry Warsaw (barry) wrote :

Yeah, I think this had to be caused by some unsupported external manipulation of the database. The base Runner class will refuse to process any message destined for a mailing list that does not exist, and every mailing list should be associated with an existing domain.

I'm going to mark this one incomplete, but if you find a reproducible test case to show the error, please re-open it.

Changed in mailman:
status: Triaged → Incomplete
Revision history for this message
Abhilash Raj (raj-abhilash1) wrote :

This bug has been moved to the new gitlab repo here: https://gitlab.com/mailman/mailman/issues/53

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.