Database locks permanently when adding a list while an LMTP session is in progress

Bug #246867 reported by Ian Eiloart
2
Affects Status Importance Assigned to Milestone
GNU Mailman
New
Undecided
Unassigned

Bug Description

The bug seems to be in the lmtp queue runner. If I try to create a new list while the queue runner is handling a connection, mailman.db gets permanently locked.

So, if I telnet to the lmtp server, and say:

  220 quant.staff.uscs.susx.ac.uk Python LMTP queue runner 1.0
  lhlo me
  250 quant.staff.uscs.susx.ac.uk
  mail from:<>
  250 Ok
  rcpt to:<email address hidden>

then, I switch to another shell, and try to create a list with create_list:

  quant:mailman-3.0.0a1 its$ staging/bin/create_list -l <email address hidden>
 -q -o <email address hidden>
  Traceback (most recent call last):
    File "staging/bin/create_list", line 8, in <module>
      load_entry_point('mailman==3.0.0a1', 'console_scripts', 'bin/ create_list')()
    File "/Users/wam22/mailmantesting/test4/mailman-3.0.0a1/mailman/ bin/create_list.py",
  line 110, in main config.db.commit()
    File "/Users/wam22/mailmantesting/test4/mailman-3.0.0a1/mailman/ database/__init__.py",
  line 79, in commit self.store.commit()
    File "/Library/Python/2.5/site-packages/storm-0.12-py2.5.egg/ storm/store.py",
  line 107, in commit self._connection.commit()
    File "/Library/Python/2.5/site-packages/storm-0.12-py2.5.egg/ storm/databases/sqlite.py",
  line 125, in commit self.raw_execute("COMMIT", _end=True)
    File "/Library/Python/2.5/site-packages/storm-0.12-py2.5.egg/ storm/databases/sqlite.py",
  line 153, in raw_execute return Connection.raw_execute(self, statement, params)
    File "/Library/Python/2.5/site-packages/storm-0.12-py2.5.egg/ storm/database.py",
  line 278, in raw_execute raw_cursor.execute(statement)
  sqlite3.OperationalError: database is locked

And, it stays locked like that for eternity, or until I remove var/ data/mailman.db-journal (whichever comes sooner ;)

Revision history for this message
Ian Eiloart (iane) wrote :

Barry says:

> I'm betting the LMTPRunner needs a config.db.commit() right before the successful return path in process_message().

Yes, or perhaps in some other part of the code.

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.