all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: anothersms@gmail.com (Nicolò Balzarotti)
To: Guix-devel <guix-devel@gnu.org>
Subject: guix build --repair might not always work
Date: Thu, 23 Jan 2020 15:43:35 +0100	[thread overview]
Message-ID: <87k15ib5d4.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> (raw)

#-*- org -*-

Hello Guix!

Sorry for the long mail, but I added all details I could think of in
order to try to debug this error ().

What happened: After a power failure during a guix pull + guix reconfigure, my /gnu/store ended up in a bad state.

Emacs failed to run with errors like:
#+begin_quote
/gnu/store/9i4lhk2g1f2k6sfwk9pyc8idx1ffgilw-emacs-26.3/bin/emacs-26.3: error while loading shared libraries: /gnu/store/mwfb8a9mkcn65nfnsnvj39xly9d8qa90-libxft-2.3.3/lib/libXft.so.2:
 file too short                                                                                                                                                                     
#+end_quote

I run
#+begin_src bash :results list
# This is the broken system
guix gc --verify=repair,contents
#+end_src

#+RESULTS:
- reading the store...
- checking path existence...
- checking hashes...

And nothing else.  So, let's check the hash

#+begin_src bash
# This is the broken system
guix hash -r /gnu/store/mwfb8a9mkcn65nfnsnvj39xly9d8qa90-libxft-2.3.3
#+end_src
#+RESULTS:
: 08fxn4xasrvv5ljydvy6xzxyzpd93f7rk2w0czp70z9fi3qdng9f

This is different than a hash I get on another system:
#+begin_src bash
# This is the sane system
guix hash -r /gnu/store/mwfb8a9mkcn65nfnsnvj39xly9d8qa90-libxft-2.3.3
#+end_src

#+RESULTS:
: 12lx9ar5vb2l4dwgw1cfjqyrfscca4rs6vmnxnza7l8qys97zps3

#+begin_src bash
# This is the broken system
sha1sum /gnu/store/mwfb8a9mkcn65nfnsnvj39xly9d8qa90-libxft-2.3.3/lib/libXft.so.2.3.3
#+end_src

#+RESULTS:
: da39a3ee5e6b4b0d3255bfef95601890afd80709  /gnu/store/mwfb8a9mkcn65nfnsnvj39xly9d8qa90-libxft-2.3.3/lib/libXft.so.2.3.3

#+begin_src bash
# This is the sane system
sha1sum /gnu/store/mwfb8a9mkcn65nfnsnvj39xly9d8qa90-libxft-2.3.3/lib/libXft.so.2.3.3
#+end_src

#+RESULTS:
: ce886196f0ab2bab3d27796b61627e9efcbd9eb0  /gnu/store/mwfb8a9mkcn65nfnsnvj39xly9d8qa90-libxft-2.3.3/lib/libXft.so.2.3.3

#+begin_src bash :results table
# This is the broken system
ls -lah  /gnu/store/mwfb8a9mkcn65nfnsnvj39xly9d8qa90-libxft-2.3.3/lib/libXft.so.2.3.3 | sed -s 's/ /|/g'
#+end_src

#+RESULTS:
| -r-xr-xr-x | 4 | root | root | 0 | Jan |   | 1 |   | 1970 | /gnu/store/mwfb8a9mkcn65nfnsnvj39xly9d8qa90-libxft-2.3.3/lib/libXft.so.2.3.3 |


#+begin_src bash :results table
# This is the sane system
ls -lah  /gnu/store/mwfb8a9mkcn65nfnsnvj39xly9d8qa90-libxft-2.3.3/lib/libXft.so.2.3.3 | sed -s 's/ /|/g'
#+end_src

#+RESULTS:
| -r-xr-xr-x | 2 | root | root | 109K | Jan |   | 1 |   | 1970 | /gnu/store/mwfb8a9mkcn65nfnsnvj39xly9d8qa90-libxft-2.3.3/lib/libXft.so.2.3.3 |

The manual also suggests this command:
#+begin_src bash :results table :dir /sudo:localhost:
# This is the broken system
guix build --repair libxft
#+end_src

#+RESULTS:
| /gnu/store/mwfb8a9mkcn65nfnsnvj39xly9d8qa90-libxft-2.3.3 |

Same on the sane system.

Do you have any idea on why is it failing? On IRC, <bricewge> said he had the
same problem and "solved" it by re-install guix.  Not being able to find which path is broken is a serious problem.

Last thing I could do is to check the database (file:/var/guix/db/db.sqlite)
#+begin_src sqlite :eval never
select * from ValidPaths where path = "/gnu/store/mwfb8a9mkcn65nfnsnvj39xly9d8qa90-libxft-2.3.3";
#+end_src

#+RESULTS:
| 24700 | /gnu/store/mwfb8a9mkcn65nfnsnvj39xly9d8qa90-libxft-2.3.3 | sha256:2e3ddbf0882e7d70ee67808b998f1ba9ddeffbefc6efe6252d7b67ad3ab1dd21 | 1579715645 | /gnu/store/ajkyhj4qsbzw7kqc4wp9yfzci7r5xgyy-libxft-2.3.3.drv | 10104 |

# Sane System:
#+begin_src sqlite :eval never
select * from ValidPaths where path = "/gnu/store/mwfb8a9mkcn65nfnsnvj39xly9d8qa90-libxft-2.3.3";
#+end_src
| 162188 | /gnu/store/mwfb8a9mkcn65nfnsnvj39xly9d8qa90-libxft-2.3.3 | sha256:43df7f92f618d1a3beedb66ea333518c69973d968e05fe782354ac5db24a9d8a | 1571144877 | /gnu/store/kv1xa04z0z8rmn5g365gg4glrgxp4cvr-libxft-2.3.3.drv | 272672 |

#+begin_src sqlite :eval never
cat /gnu/store/ajkyhj4qsbzw7kqc4wp9yfzci7r5xgyy-libxft-2.3.3.drv
#+end_src

#+RESULTS:
#+begin_example
Derive([("out","/gnu/store/mwfb8a9mkcn65nfnsnvj39xly9d8qa90-libxft-2.3.3","","")],[("/gnu/store/8qakp7k3ayv335z5cz3v0gmm2wsc2l0l-expat-2.2.9.drv",["out"]),("/gnu/store/ac3g11x2nznnd93wbhlgllbmwmcvrci3-module-import-compiled.drv",["out"]),("/gnu/store/bv9py3f2dsa5iw0aijqjv9zxwprcy1nb-fontconfig-2.13.1.drv",["out"]),("/gnu/store/fbclj50yav35pdn6lkkadj3vxdiz5ja6-libxft-2.3.3.drv",["out"]),("/gnu/store/il86vp1ir9bqvpn9cnx3b9qbfbjzjvqa-expat-2.2.7.drv",["out"]),("/gnu/store/nvg11k85cvyw96dj8470wp6c1bcwf5mp-guile-2.0.14.drv",["out"]),("/gnu/store/xv0kp47vd6qhn63py0lz6nq1fniczmmr-module-import.drv",["out"]),("/gnu/store/ydb37apsc4rc24npva269vi7gszcddv8-fontconfig-2.13.1.drv",["out"])],["/gnu/store/g4l2y8in2ksvm58xvyn657vpyycd7gsw-libxft-2.3.3-guile-builder"],"x86_64-linux","/gnu/store/qqdjb8vq2kdknfflkfdkqh6vp3mwgwl8-guile-2.0.14/bin/guile",["--no-auto-compile","-L","/gnu/store/7myzmxzapx7jnvbsyzv4xhfi2gg58d1w-module-import","/gnu/store/g4l2y8in2ksvm58xvyn657vpyycd7gsw-libxft-2.3.3-guile-builder"],[("GUILE_LOAD_COMPILED_PATH","/gnu/store/cn5v2g0zihw9hdsgcnbl6knq4zincfdk-module-import-compiled"),("allowSubstitutes","0"),("guix properties","((type . graft) (graft (count . 2)))"),("out","/gnu/store/mwfb8a9mkcn65nfnsnvj39xly9d8qa90-libxft-2.3.3"),("preferLocalBuild","1")])
#+end_example

#+begin_src bash :results raw :wrap example
# Sane system
cat /gnu/store/kv1xa04z0z8rmn5g365gg4glrgxp4cvr-libxft-2.3.3.drv
#+end_src

#+RESULTS:
#+begin_example
Derive([("out","/gnu/store/mwfb8a9mkcn65nfnsnvj39xly9d8qa90-libxft-2.3.3","","")],[("/gnu/store/5abb4chfjhln2z6d02859assm6q9ywfm-guile-2.0.14.drv",["out"]),("/gnu/store/5yzc9yzx5icb9ymsw23d33jpyd4hqf5y-libxft-2.3.3.drv",["out"]),("/gnu/store/iwxyyn37rdh712v7y5fphmidrna5cwq2-module-import-compiled.drv",["out"]),("/gnu/store/kg7qgva4bmii2xp2bi2diqyd9khafxvr-fontconfig-2.13.1.drv",["out"]),("/gnu/store/rp8qh5j8z3x6kz2nkmji8vh1sp1m091d-expat-2.2.9.drv",["out"]),("/gnu/store/skba4njas8mnvvsk2jb87nrfirdlniyk-module-import.drv",["out"]),("/gnu/store/x6idp5bk60y095350k4gf1q45hc8bja1-expat-2.2.7.drv",["out"]),("/gnu/store/xzb84yvlcpgi6f2hidf62147v1hah29a-fontconfig-2.13.1.drv",["out"])],["/gnu/store/g4l2y8in2ksvm58xvyn657vpyycd7gsw-libxft-2.3.3-guile-builder"],"x86_64-linux","/gnu/store/qqdjb8vq2kdknfflkfdkqh6vp3mwgwl8-guile-2.0.14/bin/guile",["--no-auto-compile","-L","/gnu/store/7myzmxzapx7jnvbsyzv4xhfi2gg58d1w-module-import","/gnu/store/g4l2y8in2ksvm58xvyn657vpyycd7gsw-libxft-2.3.3-guile-builder"],[("GUILE_LOAD_COMPILED_PATH","/gnu/store/cn5v2g0zihw9hdsgcnbl6knq4zincfdk-module-import-compiled"),("allowSubstitutes","0"),("guix properties","((type . graft) (graft (count . 2)))"),("out","/gnu/store/mwfb8a9mkcn65nfnsnvj39xly9d8qa90-libxft-2.3.3"),("preferLocalBuild","1")])
#+end_example

They are completely different so I don't know how to further investigate it.

Last thing I did:
#+begin_src bash :eval never
sudo mount -o remount,rw /gnu/store
echo "hello" > /gnu/store/mwfb8a9mkcn65nfnsnvj39xly9d8qa90-libxft-2.3.3/lib/libXft.so.2.3.3
guix build --repair libxft
#+end_src

Results:
#+begin_example
path `/gnu/store/mwfb8a9mkcn65nfnsnvj39xly9d8qa90-libxft-2.3.3' is corrupted or missing!
applying 2 grafts for /gnu/store/ajkyhj4qsbzw7kqc4wp9yfzci7r5xgyy-libxft-2.3.3.drv...
grafting '/gnu/store/844ngi6h6icrc3kkmxc1rni4pvwijhzg-libxft-2.3.3' -> '/gnu/store/mwfb8a9mkcn65nfnsnvj39xly9d8qa90-libxft-2.3.3'...
successfully built /gnu/store/ajkyhj4qsbzw7kqc4wp9yfzci7r5xgyy-libxft-2.3.3.drv
/gnu/store/mwfb8a9mkcn65nfnsnvj39xly9d8qa90-libxft-2.3.3
#+end_example

Any suggestions on why this happens, how to check for other paths of the store, and if this can be fixed?

Thanks, Nicolò

             reply	other threads:[~2020-01-23 14:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-23 14:43 Nicolò Balzarotti [this message]
2020-01-25 18:06 ` guix build --repair might not always work Ludovic Courtès
2020-03-02 16:39   ` zimoun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k15ib5d4.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me \
    --to=anothersms@gmail.com \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.