Command:
drush disable tribune

Initialized Drupal 6.9 root directory at /home/wp/public_html/.../public                                   [notice]
Initialized Drupal site default at sites/default                                                                                [notice]

now freezed
when pressed Enter:

The following modules will be disabled: tribune
Do you really want to continue? (y/n): drush: Aborting.
CommentFileSizeAuthor
#3 drush_stderr_prompt_443392.patch652 bytesanarcat

Comments

owen barton’s picture

Status: Active » Postponed (maintainer needs more info)

Hey there - this works for me locally with HEAD - could you please retest with HEAD and see if that fixes it? If not, please check to see if this happens with other modules too, and (if so) test with an "out of the box" core install, so we can see if it is something indeed specific to your environment or just this site.

anarcat’s picture

Version: 6.x-2.0-alpha2 »
Category: support » bug
Status: Postponed (maintainer needs more info) » Active

I have just seen this happen here. It definitely looks like a buffering issue.

Here's a log:

sh-3.1$  /var/hostmaster/drush/drush.php --verbose=2 provision migrate default /var/hostmaster/drupal-5.17/
Drush bootstrap phase : _drush_bootstrap_drupal_root() [0.0333 sec]                                                             [bootstrap]
Loading drushrc "/var/hostmaster/drupal-5.x/drushrc.php" into "drupal" scope. [0.0341 sec]                                      [bootstrap]
Initialized Drupal 5.14 root directory at /var/hostmaster/drupal-5.x [0.0553 sec]                                               [notice]
Found command: provision migrate [0.0608 sec]                                                                                   [bootstrap]
Initializing drush commandfile: provision_mysql [0.0615 sec]                                                                    [bootstrap]
Initializing drush commandfile: provision_apache [0.0622 sec]                                                                   [bootstrap]
Initializing drush commandfile: provision_drupal [0.0641 sec]                                                                   [bootstrap]
Including /var/hostmaster/.drush/provision/platform/migrate.provision.inc [0.065 sec]                                           [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_site() [0.0839 sec]                                                             [bootstrap]
Initialized Drupal site default at sites/default [0.153 sec]                                                                    [notice]
Loading drushrc "/var/hostmaster/drupal-5.x/sites/default/drushrc.php" into "site" scope. [0.1538 sec]                          [bootstrap]
Including /var/hostmaster/.drush/provision/db_server/backup.provision.inc [0.1737 sec]                                          [bootstrap]
Including /var/hostmaster/.drush/provision/platform/backup.provision.inc [0.1988 sec]                                           [bootstrap]
Generating mysql dump for default. [0.2709 sec]                                                                                 [backup]
mysqldump -hlocalhost -uhostmaster -pXXXXX -rsites/default/database.sql hostmaster [0.2718 sec]                          [notice]
Executing: mysqldump -hlocalhost -uhostmaster -pXXXX -rsites/default/database.sql hostmaster
Adding sites directory to /var/hostmaster/backups/default-2009-05-07.tar [41.5455 sec]                                          [backup]
cd /var/hostmaster/drupal-5.x/sites/default; tar -rf /var/hostmaster/backups/default-2009-05-07.tar *  [41.546 sec]             [notice]
Executing: cd /var/hostmaster/drupal-5.x/sites/default; tar -rf /var/hostmaster/backups/default-2009-05-07.tar *
Deleted mysql dump from sites directory [46.8418 sec]                                                                           [message]
gzip /var/hostmaster/backups/default-2009-05-07.tar [46.8423 sec]                                                               [notice]
Executing: gzip /var/hostmaster/backups/default-2009-05-07.tar
Running: php /var/hostmaster/drush/drush.php  --root='/var/hostmaster/drupal-5.17/' --uri='http://default'  'provision' 'deploy'[command]
'default' '/var/hostmaster/backups/default-2009-05-07.tar.gz' --backend [58.2111 sec]






[1]+  Stopped(SIGTSTP)        /var/hostmaster/drush/drush.php --verbose=2 provision migrate default /var/hostmaster/drupal-5.17/
sh-3.1$ bg
[1] /var/hostmaster/drush/drush.php --verbose=2 provision migrate default /var/hostmaster/drupal-5.17/ &
sh-3.1$ The following updates are pending:

comment module
--------------
1 - Changed node_comment_statistics to use node->changed to avoid future  timestamps.

Do you wish to run all pending updates? (y/n): drush: Aborting.

Warning: include_once(./sites/default/settings.php): failed to open stream: No such file or directory in /var/hostmaster/drupal-5.17/includes/bootstrap.inc on line 274

Warning: include_once(): Failed opening './sites/default/settings.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/hostmaster/drupal-5.17/includes/bootstrap.inc on line 274

Warning: Cannot modify header information - headers already sent by (output started at /var/hostmaster/drush/includes/backend.inc:174) in /var/hostmaster/drupal-5.17/includes/common.inc on line 141
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head> <title>Unsupported database type</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css" media="all">@import "/misc/maintenance.css";</style>
<style type="text/css" media="all">@import "/modules/system/defaults.css";</style>
<style type="text/css" media="all">@import "/modules/system/system.css";</style>
<link rel="shortcut icon" href="/misc/favicon.ico" type="image/x-icon" />
</head><body><h1>Unsupported database type</h1>
<!-- begin content -->
<p>The database type <em></em> is unsupported. Please use either <var>mysql</var> for MySQL 3.x &amp; 4.0.x databases, <var>mysqli</var> for MySQL 4.1.x+ databases, or <var>pgsql</var> for PostgreSQL databases. The database information is in your <code>settings.php<.code> file.</p>
<p>For more help, see the <a href="http://drupal.org/node/258">Installation and upgrading handbook</a>. If you are unsure what these terms mean you should probably contact your hosting provider.</p>
<!-- end content -->
</body></html>Drush bootstrap phase : _drush_bootstrap_drush() [729.3292 sec]                                                                 [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_root() [729.3294 sec]                                                           [bootstrap]
Loading drushrc "/var/hostmaster/drupal-5.17/drushrc.php" into "drupal" scope. [729.3294 sec]                                   [bootstrap]
Initialized Drupal 5.17 root directory at /var/hostmaster/drupal-5.17/ [729.3295 sec]                                           [notice]
Found command: provision deploy [729.3296 sec]                                                                                  [bootstrap]
Initializing drush commandfile: provision_mysql [729.3296 sec]                                                                  [bootstrap]
Initializing drush commandfile: provision_apache [729.3297 sec]                                                                 [bootstrap]
Initializing drush commandfile: provision_drupal [729.3298 sec]                                                                 [bootstrap]
Including /var/hostmaster/.drush/provision/db_server/deploy.provision.inc [729.3298 sec]                                        [bootstrap]
Including /var/hostmaster/.drush/provision/web_server/deploy.provision.inc [729.3299 sec]                                       [bootstrap]
Including /var/hostmaster/.drush/provision/platform/deploy.provision.inc [729.3299 sec]                                         [bootstrap]
Deploying site from /var/hostmaster/backups/default-2009-05-07.tar.gz [729.33 sec]                                              [message]
tar -zxf /var/hostmaster/backups/default-2009-05-07.tar.gz -C /var/hostmaster/drupal-5.17/sites/default [729.3301 sec]          [notice]
Running: tar -zxf /var/hostmaster/backups/default-2009-05-07.tar.gz -C /var/hostmaster/drupal-5.17/sites/default [729.3301 sec] [notice]
Successfully extracted the contents of /var/hostmaster/backups/default-2009-05-07.tar.gz [729.3302 sec]                         [message]
Drush bootstrap phase : _drush_bootstrap_drupal_site() [729.3312 sec]                                                           [bootstrap]
Initialized Drupal site default at sites/default [729.3313 sec]                                                                 [notice]
Loading drushrc "/var/hostmaster/drupal-5.17/sites/default/drushrc.php" into "site" scope. [729.3313 sec]                       [bootstrap]
Created hostmaster_0 database [729.3314 sec]                                                                                    [success]
Found database dump at /var/hostmaster/drupal-5.17/sites/default/database.sql. [729.3315 sec]                                   [message]
Database dump at /var/hostmaster/drupal-5.17/sites/default/database.sql is readable [729.3315 sec]                              [message]
Importing database using command: mysql -uhostmaster_0 -pXXXXX -hlocalhost hostmaster_0 <                                  [notice]
/var/hostmaster/drupal-5.17/sites/default/database.sql [729.3316 sec]
mysql -uhostmaster_0 -pXXXX -hlocalhost hostmaster_0 < /var/hostmaster/drupal-5.17/sites/default/database.sql [729.3317   [notice]
sec]
Removed dump file /var/hostmaster/drupal-5.17/sites/default/database.sql after restoring from it [729.3317 sec]                 [message]
Generating apache host configuration file default. [729.3318 sec]                                                               [notice]
Apache has been restarted [729.3319 sec]                                                                                        [notice]
Generate settings.php file [729.3319 sec]                                                                                       [notice]
Changed permissions of settings.php to 640 [729.332 sec]                                                                        [message]
Changed permissions of settings.php to 440 [729.332 sec]                                                                        [message]
Change group ownership of settings.php to www-data [729.3321 sec]                                                               [message]
Running: php /var/hostmaster/drush/drush.php  --uri='http://default' --root='/var/hostmaster/drupal-5.17/'  'updatedb' --backend[command]
[729.3322 sec]
Drush bootstrap phase : _drush_bootstrap_drush() [729.3322 sec]                                                                 [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_root() [729.3323 sec]                                                           [bootstrap]
Loading drushrc "/var/hostmaster/drupal-5.17/drushrc.php" into "drupal" scope. [729.3324 sec]                                   [bootstrap]
Initialized Drupal 5.17 root directory at /var/hostmaster/drupal-5.17/ [729.3325 sec]                                           [notice]
Drush bootstrap phase : _drush_bootstrap_drupal_site() [729.3326 sec]                                                           [bootstrap]
Initialized Drupal site default at sites/default [729.3326 sec]                                                                 [notice]
Loading drushrc "/var/hostmaster/drupal-5.17/sites/default/drushrc.php" into "site" scope. [729.3327 sec]                       [bootstrap]
Found command: updatedb [729.3327 sec]                                                                                          [bootstrap]
Initializing drush commandfile: provision_mysql [729.3328 sec]                                                                  [bootstrap]
Initializing drush commandfile: provision_apache [729.3329 sec]                                                                 [bootstrap]
Initializing drush commandfile: provision_drupal [729.3329 sec]                                                                 [bootstrap]
Including version specific file : /var/hostmaster/drush/commands/core/drupal/update_5.inc [729.333 sec]                         [notice]
Drush bootstrap phase : _drush_bootstrap_drupal_configuration() [729.3331 sec]                                                  [bootstrap]
PDO support available, but the  driver has not been installed. Assuming success. [729.3346 sec]                                 [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_database() [729.3347 sec]                                                       [bootstrap]
Successfully connected to the Drupal database. [729.3347 sec]                                                                   [bootstrap]
Deleting /var/hostmaster/drupal-5.x/sites/default/modules directory sucessful. [729.3736 sec]                                   [message]
Deleting /var/hostmaster/drupal-5.x/sites/default/themes directory sucessful. [729.3839 sec]                                    [message]
Deleting /var/hostmaster/drupal-5.x/sites/default/CVS directory sucessful. [729.406 sec]                                        [message]
Deleting /var/hostmaster/drupal-5.x/sites/default/files/images directory sucessful. [729.4434 sec]                              [message]
Deleting /var/hostmaster/drupal-5.x/sites/default/files/tmp directory sucessful. [729.4445 sec]                                 [message]
Deleting /var/hostmaster/drupal-5.x/sites/default/files/pictures directory sucessful. [729.4457 sec]                            [message]
Deleting /var/hostmaster/drupal-5.x/sites/default/files directory sucessful. [729.446 sec]                                      [message]
Deleting /var/hostmaster/drupal-5.x/sites/default directory sucessful. [729.4629 sec]                                           [message]
Command dispatch complete [729.4637 sec]                                                                                        [notice]
ps
[1]+  Done(1)                 /var/hostmaster/drush/drush.php --verbose=2 provision migrate default /var/hostmaster/drupal-5.17/

Note that I suspended (^Z) the process because it was stalled. When I made it run again, everything showed up.

My guess is that there's some output buffering going on when the prompt is fired so the user can't see the prompt. Maybe the prompt should be fired at stderr instead?

anarcat’s picture

Status: Active » Needs work
StatusFileSize
new652 bytes

I have made a simple patch, but it's not working. I do not see the prompt.

In fact, i have this problem even when there is no prompt. It's as if drush_invoke() was introducing some race condition or something...

adrian’s picture

Status: Needs work » Postponed (maintainer needs more info)

I committed a fix to drush. http://drupal.org/cvs?commit=208486

--backend implies -y

this is only for things that do backend_invoke , which update does now.

anarcat’s picture

Status: Postponed (maintainer needs more info) » Fixed

@kenorb - please test again with latest HEAD.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

kenorb’s picture

Ok, I'll test it soon
Thanks.