Pipeline stuck at `pecl install imagick`

Issue #17589 closed
André O. Brown created an issue

My pipelines frequently get stuck running the command pecl install imagick. Sometimes after stopping and restarting the pipeline it works. Today I've tried that 5 times and it still won't complete the command.

It usually looks like this:

+ pecl install imagick
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
downloading imagick-3.4.3.tgz ...
Starting to download imagick-3.4.3.tgz (245,410 bytes)
...................................................done: 245,410 bytes
19 source files, building
running: phpize
Configuring for:
PHP Api Version:         20160303
Zend Module Api No:      20160303
Zend Extension Api No:   320160303

Comments (7)

  1. André O. Brown reporter

    Why would it wait for input some times but not others? What is it seeking confirmation for?

  2. André O. Brown reporter

    Yes, I tried the suggestion. I didn't work.

    Here is the pipelines file:

    image: php:7.1.23-fpm
    
    options:
      max-time: 15
    pipelines:
      branches:
        master:
          - step:
              script:
                # Install dependencies and tools
                - apt-get update && apt-get install -y libmcrypt-dev libpq-dev libmemcached-dev mysql-client libmagickwand-dev curl unzip git gnupg2 openssh-client --no-install-recommends
                - echo "\n\n\n\n\n\n\n\n\n" | pecl install imagick
                - docker-php-ext-enable imagick
                - docker-php-ext-install mcrypt pdo_mysql zip
                - curl -sL https://deb.nodesource.com/setup_6.x | bash -
                - apt-get install -y nodejs
                - npm install -g bower
                - npm install -g gulp
                - curl -sS https://getcomposer.org/installer | php
                - chmod +x composer.phar && mv composer.phar /usr/local/bin/composer
                - curl -LO https://deployer.org/deployer.phar
                - mv deployer.phar /usr/local/bin/dep
                - chmod +x /usr/local/bin/dep
                - /usr/local/bin/dep -vvv deploy prod
    

    Here is the command it was getting stuck on:

    - echo "\n\n\n\n\n\n\n\n\n" | pecl install imagick

    There is no output from BitBucket to indicate why it gets stuck.

  3. Kevin Van Gyseghem

    I'm having exactly the same issue. The command

    pecl install imagick
    

    gets stuck half of the time.

  4. André O. Brown reporter

    @Kevin Van Gyseghem what I eventually did was create a docker image with all the dependencies already installed, and then used that image in the pipeline. It also has the benefit of speeding up the pipeline, since dependencies aren’t installed on each run.

  5. Log in to comment