Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 738802 - app-admin/haskell-updater gets stuck in rebuilds on haskell binpkgs
Summary: app-admin/haskell-updater gets stuck in rebuilds on haskell binpkgs
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Haskell Language team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-24 09:47 UTC by Frédéric Pierret
Modified: 2020-09-10 03:36 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
http-client-tls-build.log (http-client-tls.log,20.24 KB, text/plain)
2020-08-25 09:03 UTC, Frédéric Pierret
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Frédéric Pierret 2020-08-24 09:47:24 UTC
While attempting to install `pandoc`, I went through issue while installing `http-client`:

===
Emerging (1 of 33) dev-haskell/http-client-tls-0.3.5.3::gentoo
 * Fetching files in the background.
 * To view fetch progress, run in another terminal:
 * tail -f /var/log/emerge-fetch.log
openpty failed: 'out of pty devices'
 * http-client-tls-0.3.5.3.tar.gz BLAKE2B SHA512 size ;-) ...                                                                                                                                    [ ok ]
>>> Unpacking source...
>>> Unpacking http-client-tls-0.3.5.3.tar.gz to /var/tmp/portage/dev-haskell/http-client-tls-0.3.5.3/work
>>> Source unpacked in /var/tmp/portage/dev-haskell/http-client-tls-0.3.5.3/work
>>> Preparing source in /var/tmp/portage/dev-haskell/http-client-tls-0.3.5.3/work/http-client-tls-0.3.5.3 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/dev-haskell/http-client-tls-0.3.5.3/work/http-client-tls-0.3.5.3 ...
 * Using cabal-3.0.1.0.
 * Prepending /usr/lib64/ghc-8.8.4 to LD_LIBRARY_PATH
/usr/bin/ghc -package Cabal-3.0.1.0 --make /var/tmp/portage/dev-haskell/http-client-tls-0.3.5.3/work/http-client-tls-0.3.5.3/Setup.hs -j4 +RTS -A256M -qb0 -RTS -threaded -dynamic -o setup
[1 of 1] Compiling Main             ( /var/tmp/portage/dev-haskell/http-client-tls-0.3.5.3/work/http-client-tls-0.3.5.3/Setup.hs, /var/tmp/portage/dev-haskell/http-client-tls-0.3.5.3/work/http-client-tls-0.3.5.3/Setup.o )
Linking setup ...
./setup configure --ghc --prefix=/usr --with-compiler=/usr/bin/ghc --with-hc-pkg=/usr/bin/ghc-pkg --prefix=/usr --libdir=/usr/lib64 --libsubdir=http-client-tls-0.3.5.3/ghc-8.8.4 --datadir=/usr/share/ --datasubdir=http-client-tls-0.3.5.3/ghc-8.8.4 --disable-tests --ghc-options=-j4 +RTS -A256M -qb0 -RTS --with-ar=x86_64-pc-linux-gnu-ar --ghc-option=-optc-O2 --ghc-option=-optc-pipe --ghc-option=-optl-Wl,-O1 --ghc-option=-optl-Wl,--as-needed --disable-executable-stripping --docdir=/usr/share/doc/http-client-tls-0.3.5.3 --verbose --enable-shared --enable-executable-dynamic --sysconfdir=/etc --disable-library-stripping
Using Parsec parser
Configuring http-client-tls-0.3.5.3...
Dependency base ==4.*: using base-4.13.0.0
Dependency bytestring -any: using bytestring-0.10.10.1
Dependency case-insensitive -any: using case-insensitive-1.2.1.0
Dependency connection >=0.2.5: using connection-0.3.1
Dependency containers -any: using containers-0.6.2.1
Dependency cryptonite -any: using cryptonite-0.26
Dependency data-default-class -any: using data-default-class-0.1.2.0
Dependency exceptions -any: using exceptions-0.10.4
Dependency http-client >=0.5.0: using http-client-0.6.4.1
Dependency http-types -any: using http-types-0.12.3
Dependency memory -any: using memory-0.15.0
Dependency network -any: using network-3.0.1.1
Dependency network-uri -any: using network-uri-2.6.3.0
Dependency text -any: using text-1.2.4.0
Dependency tls >=1.2: using tls-1.5.4
Dependency transformers -any: using transformers-0.5.6.2
Source component graph: component lib
Configured component graph:
    component http-client-tls-0.3.5.3-KFZhdh8tXjkG7CZo0pL4KA
        include base-4.13.0.0
        include bytestring-0.10.10.1
        include case-insensitive-1.2.1.0-LfRmStYTpigCSh46Fvshz8
        include connection-0.3.1-B3IWhTQL7mp561WDWrFeE8
        include containers-0.6.2.1
        include cryptonite-0.26-FXCXjHBl3K81OBqWNGpX5s
        include data-default-class-0.1.2.0-Hn6rbGElvv4B4VdN5m2X0W
        include exceptions-0.10.4-AcCA76Y0j0oK3rQoxPMQMv
        include http-client-0.6.4.1-J8wHGc71nuy2TIy0ek7diL
        include http-types-0.12.3-HxxGXXE4tbTHcPYkwunAlg
        include memory-0.15.0-7KxDq0VAYz22HAxgR54OFq
        include network-3.0.1.1-Cv4xwaYSk3qLs0kTRkld1f
        include network-uri-2.6.3.0-CPjS2hnZr1IIlGhZ1dITqG
        include text-1.2.4.0
        include tls-1.5.4-Gvl6GyJ8fTX6sPNn6744nY
        include transformers-0.5.6.2
Linked component graph:
    unit http-client-tls-0.3.5.3-KFZhdh8tXjkG7CZo0pL4KA
        include base-4.13.0.0
        include bytestring-0.10.10.1
        include case-insensitive-1.2.1.0-LfRmStYTpigCSh46Fvshz8
        include connection-0.3.1-B3IWhTQL7mp561WDWrFeE8
        include containers-0.6.2.1
        include cryptonite-0.26-FXCXjHBl3K81OBqWNGpX5s
        include data-default-class-0.1.2.0-Hn6rbGElvv4B4VdN5m2X0W
        include exceptions-0.10.4-AcCA76Y0j0oK3rQoxPMQMv
        include http-client-0.6.4.1-J8wHGc71nuy2TIy0ek7diL
        include http-types-0.12.3-HxxGXXE4tbTHcPYkwunAlg
        include memory-0.15.0-7KxDq0VAYz22HAxgR54OFq
        include network-3.0.1.1-Cv4xwaYSk3qLs0kTRkld1f
        include network-uri-2.6.3.0-CPjS2hnZr1IIlGhZ1dITqG
        include text-1.2.4.0
        include tls-1.5.4-Gvl6GyJ8fTX6sPNn6744nY
        include transformers-0.5.6.2
        Network.HTTP.Client.TLS=http-client-tls-0.3.5.3-KFZhdh8tXjkG7CZo0pL4KA:Network.HTTP.Client.TLS
Ready component graph:
    definite http-client-tls-0.3.5.3-KFZhdh8tXjkG7CZo0pL4KA
        depends base-4.13.0.0
        depends bytestring-0.10.10.1
        depends case-insensitive-1.2.1.0-LfRmStYTpigCSh46Fvshz8
        depends connection-0.3.1-B3IWhTQL7mp561WDWrFeE8
        depends containers-0.6.2.1
        depends cryptonite-0.26-FXCXjHBl3K81OBqWNGpX5s
        depends data-default-class-0.1.2.0-Hn6rbGElvv4B4VdN5m2X0W
        depends exceptions-0.10.4-AcCA76Y0j0oK3rQoxPMQMv
        depends http-client-0.6.4.1-J8wHGc71nuy2TIy0ek7diL
        depends http-types-0.12.3-HxxGXXE4tbTHcPYkwunAlg
        depends memory-0.15.0-7KxDq0VAYz22HAxgR54OFq
        depends network-3.0.1.1-Cv4xwaYSk3qLs0kTRkld1f
        depends network-uri-2.6.3.0-CPjS2hnZr1IIlGhZ1dITqG
        depends text-1.2.4.0
        depends tls-1.5.4-Gvl6GyJ8fTX6sPNn6744nY
        depends transformers-0.5.6.2
CallStack (from HasCallStack):
  dieNoWrap, called at libraries/Cabal/Cabal/Distribution/Utils/LogProgress.hs:61:9 in Cabal-3.0.1.0:Distribution.Utils.LogProgress
Error:
    The following packages are broken because other packages they depend on are missing. These broken packages must be rebuilt before they can be used.
installed package http-client-0.6.4.1 is broken due to missing package cookie-0.4.4-GZkZ5d1fwl1CSj3nhZpqLu

 * ghc-pkg check: 'checking for other broken packages:'
There are problems in package http-client-0.6.4.1:
  Warning: haddock-interfaces: /usr/share/doc/http-client-0.6.4.1/html/http-client.haddock doesn't exist or isn't a file
  Warning: haddock-html: /usr/share/doc/http-client-0.6.4.1/html doesn't exist or isn't a directory
  dependency "cookie-0.4.4-GZkZ5d1fwl1CSj3nhZpqLu" doesn't exist

The following packages are broken, either because they have a problem
listed above, or because they depend on a broken package.
http-client-0.6.4.1
 * Detected broken packages: http-client-0.6.4.1
 * ERROR: dev-haskell/http-client-tls-0.3.5.3::gentoo failed (configure phase):
 *   //==-- Please, run 'haskell-updater' to fix broken packages --==//
 * 
 * Call stack:
 *     ebuild.sh, line  125:  Called src_configure
 *   environment, line 2718:  Called haskell-cabal_src_configure
 *   environment, line 1949:  Called cabal-configure
 *   environment, line  571:  Called cabal-show-brokens-and-die 'setup configure failed'
 *   environment, line  672:  Called cabal-show-brokens
 *   environment, line  668:  Called cabal-die-if-nonempty 'broken' 'http-client-0.6.4.1'
 *   environment, line  593:  Called die
 * The specific snippet of code:
 *       die "//==-- Please, run 'haskell-updater' to fix ${breakage_type} packages --==//"
 * 
 * If you need support, post the output of `emerge --info '=dev-haskell/http-client-tls-0.3.5.3::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-haskell/http-client-tls-0.3.5.3::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/dev-haskell/http-client-tls-0.3.5.3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-haskell/http-client-tls-0.3.5.3/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-haskell/http-client-tls-0.3.5.3/work/http-client-tls-0.3.5.3'
 * S: '/var/tmp/portage/dev-haskell/http-client-tls-0.3.5.3/work/http-client-tls-0.3.5.3'

>>> Failed to emerge dev-haskell/http-client-tls-0.3.5.3, Log file:

>>>  '/var/tmp/portage/dev-haskell/http-client-tls-0.3.5.3/temp/build.log'

 * Messages for package dev-haskell/http-client-tls-0.3.5.3:

 * ghc-pkg check: 'checking for other broken packages:'
 * Detected broken packages: http-client-0.6.4.1
 * ERROR: dev-haskell/http-client-tls-0.3.5.3::gentoo failed (configure phase):
 *   //==-- Please, run 'haskell-updater' to fix broken packages --==//
 * 
 * Call stack:
 *     ebuild.sh, line  125:  Called src_configure
 *   environment, line 2718:  Called haskell-cabal_src_configure
 *   environment, line 1949:  Called cabal-configure
 *   environment, line  571:  Called cabal-show-brokens-and-die 'setup configure failed'
 *   environment, line  672:  Called cabal-show-brokens
 *   environment, line  668:  Called cabal-die-if-nonempty 'broken' 'http-client-0.6.4.1'
 *   environment, line  593:  Called die
 * The specific snippet of code:
 *       die "//==-- Please, run 'haskell-updater' to fix ${breakage_type} packages --==//"
 * 
 * If you need support, post the output of `emerge --info '=dev-haskell/http-client-tls-0.3.5.3::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-haskell/http-client-tls-0.3.5.3::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/dev-haskell/http-client-tls-0.3.5.3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-haskell/http-client-tls-0.3.5.3/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-haskell/http-client-tls-0.3.5.3/work/http-client-tls-0.3.5.3'
 * S: '/var/tmp/portage/dev-haskell/http-client-tls-0.3.5.3/work/http-client-tls-0.3.5.3'
===

Running `haskel-updater` does not solved the problem:

===
askell-updater
Running haskell-updater-1.3.2 using GHC 8.8.4
  * Executable: /usr/bin/ghc
  * Library directory: /usr/lib64/ghc-8.8.4
  * Package manager (PM): portage
  * Mode: OnlyInvalid

Searching for packages installed with a different version of GHC.

No old packages found!

Searching for Haskell libraries with broken dependencies.

Found the following broken packages:
  * dev-haskell/http-client:0

emerge --oneshot --keep-going --complete-graph --deep dev-haskell/http-client:0
setlocale: unsupported locale setting
setlocale: unsupported locale setting

 * IMPORTANT: 7 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.

Calculating dependencies... done!

>>> Emerging binary (1 of 1) dev-haskell/http-client-0.6.4.1::gentoo
 * http-client-0.6.4.1.tbz2 MD5 SHA1 size ;-) ...                        [ ok ]
openpty failed: 'out of pty devices'
>>> Extracting info
>>> Extracting dev-haskell/http-client-0.6.4.1

>>> Installing (1 of 1) dev-haskell/http-client-0.6.4.1::gentoo
 * Recaching GHC package DB
 * Recaching GHC package DB
>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.

 * GNU info directory index is up-to-date.

 * IMPORTANT: 7 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.

Searching for packages installed with a different version of GHC.

No old packages found!

Searching for Haskell libraries with broken dependencies.

Found the following broken packages:
  * dev-haskell/http-client:0

Updater's past history:
Pass 1 : dev-haskell/http-client:0
ERROR: Updater stuck in the loop and can't progress
===

Looking at the first part of the issue, it was about missing `cookie` dependency. After installing it separately, I've retried just in case to emerge previous package but it leads to the same error again. I've seen some similar issue like https://bugs.gentoo.org/735174 https://bugs.gentoo.org/565364.

Any idea? Thank you.

Best regards,
Frédéric
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2020-08-25 05:25:56 UTC
It says you should run `haskell-updater'.
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2020-08-25 06:35:45 UTC
haskell-updater-should succeed. If it fails it's a bug.

Can you attach full build.log of a failed dev-haskell/http-client build?
Comment 3 Frédéric Pierret 2020-08-25 07:08:44 UTC
(In reply to Jeroen Roovers from comment #1)
> It says you should run `haskell-updater'.

I've already posted the result of `haskell-updater` in the original post where the result is: 'ERROR: Updater stuck in the loop and can't progress'
Comment 4 Frédéric Pierret 2020-08-25 09:03:12 UTC
Created attachment 656576 [details]
http-client-tls-build.log
Comment 5 Frédéric Pierret 2020-08-25 09:12:59 UTC
(In reply to Sergei Trofimovich from comment #2)
> haskell-updater-should succeed. If it fails it's a bug.
> 
> Can you attach full build.log of a failed dev-haskell/http-client build?

I've attached the failing build.log of "dev-haskell/http-client-tls". "http-client" itself does not fail if emerging from source or binary. Only "http-client-tls" fails if "http-client" is emerged from binary. After this fail, running "haskell-updater", makes emerging again "http-client" from binary so the problem is "looping" indeed. I'm not sure about this "dev-haskell/cookie" dependency but, running "haskell-updater" should detect potential issue between current retry and ending package problem. Here it tries to fix "http-client" and it ends by "http-client" issue. Maybe "haskell-updater" should attempt a retry after such case by ignoring binpkg?

To clarify context, I've enabled a freshly built binpkgs host with all those packages successfully built. The target was "pandoc" and all it's dependencies.
Comment 6 Sergei Trofimovich (RETIRED) gentoo-dev 2020-08-25 22:45:48 UTC
Oh, you are using binpkgs. binpkgs don't really work for dev-haskell/*.

To keep haskell-updater implementation simple we could unconditionally pass emerge option to always disable binpkgs.

Or you can pass it manuall with 'haskell-updater -- <extra-emerge-opts>'.
Comment 7 Frédéric Pierret 2020-08-26 13:24:20 UTC
(In reply to Sergei Trofimovich from comment #6)
> Oh, you are using binpkgs. binpkgs don't really work for dev-haskell/*.
> 
> To keep haskell-updater implementation simple we could unconditionally pass
> emerge option to always disable binpkgs.
> 
> Or you can pass it manuall with 'haskell-updater -- <extra-emerge-opts>'.

oh no. do you know how do you debug such issue with binpkg? My current workaround is to have built pandoc-bin. The original idea is to speed up continuous integration build and tests.
Comment 8 Sergei Trofimovich (RETIRED) gentoo-dev 2020-08-26 21:55:10 UTC
(In reply to Frédéric Pierret from comment #7)
> (In reply to Sergei Trofimovich from comment #6)
> > Oh, you are using binpkgs. binpkgs don't really work for dev-haskell/*.
> > 
> > To keep haskell-updater implementation simple we could unconditionally pass
> > emerge option to always disable binpkgs.
> > 
> > Or you can pass it manuall with 'haskell-updater -- <extra-emerge-opts>'.
> 
> oh no. do you know how do you debug such issue with binpkg?

I'm not sure I understand your question. What specifically you would like to achieve (or find out)? Maybe below is good enough.

> My current workaround is to have built pandoc-bin. The original idea is to speed up
> continuous integration build and tests.

Haskell library ABI is quite fragile. ABI hash is explicitly stored in $(ghc --print-global-package-db). In Gentoo pandoc installs both binary and haskell library. Every time 'haskell-updater -q -l' reports broken packages you effectively have to rebuild all binpkgs in the list.