I haven't been able to recreate this error, but it's happened to me 3 times now. I can't even guarantee that it's a drush issue, but wanted to put it up here in case anybody else is seeing this. This is happening with a clean D7 database. I haven't been able to recreate it on demand, unfortunately.

1. Install D7.
2. Do some stuff (If I get to where I can recreate it I'll update)
3. Issue a drush command. This has happened to me with drush cron and with drush enable
4. Issue another drush command. Drush suddenly can't bootstrap or use the drupal instance.

Looking casually at the db, I note that all modules are disabled in the system table.

I will continue to try to recreate this.

The only thing I know to do is to reinstall or reload from a saved db. I haven't even figured out a way to repair the database after this(enabling all the modules via the db doesn't do it)

If anybody has suggestions on how to provoke this or how to proceed, please let me know. It's conceivable that this is a D7 issue, in which case I *really* want to nail it.

Comments

rfay’s picture

Status: Active » Fixed

I'm going to say this is not a drush problem. It just happened to me again with no drush intervention that I can remember.

It's a bad one, but I don't think it's drush.

It may be just moving modules around underneath Drupal 7 that's doing it.

rfay’s picture

Status: Fixed » Closed (duplicate)

@moshe: Thanks for your ping in IRC. @bendir pointed me at the real issue:

This has turned out to be caused by #566494: Running cron in a shutdown function breaks the site. Since it shows up on update and cache flush, drush was a likely candidate, but it's core that's the problem.

The workaround is to disable update module at this point, but maybe we'll get it fixed shortly.