Uploaded image for project: 'BoxGrinder Build'
  1. BoxGrinder Build
  2. BGBUILD-172

Boxgrinder EC2 meta appliance doesn't set up glibc correctly


    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 0.8.0
    • Fix Version/s: None
    • Component/s: Meta appliance
    • Labels:


      There's a severe bug in the chroot environment set up by boxgrinder that affects 32-bit systems running on Amazon EC2, and also under other Xen environments.

      Xen requires a special glibc runtime, named nosegneg in order for applications to access thread-local storage efficiently. This is configured in a file named /etc/ld.so.conf.d/libc6-xen.conf with the following contents:

      hwcap 1 nosegneg

      These ld.so config files must also be present in the chroot environment, or the nosegneg version of glibc will not be used. And if those are not used, some applications will be very slow, while others will either crash or go into an infinite loop.

      Here is a bug I reported against GHC that turned out to not be a GHC bug - it was really due to GHC not being run with the nosegneg libraries inside boxgrinder's chroot environment: http://hackage.haskell.org/trac/ghc/ticket/4993

      That problem was causing my attempt to build a VM image with boxgrinder on 32-bit EC2 to hang forever, and it took me ages to figure out why.

      I think there are two parts to fixing this:

      • Copy /etc/ld.so.conf and the files in /etc/ld.so.conf.d into the chroot environment. (Actually, the real fix would be to figure out what creates /etc/ld.so.conf.d/libc6-xen.conf and do the exact same thing, but I've not been able to figure out what does that.)
      • Run ldconfig in the chroot environment.

      Thanks for looking into this. It's a big deal, as it's very hard to understand why an installer gets stuck, and very difficult to work around.

        Gliffy Diagrams


            Issue Links



                • Assignee:
                  goldmann Marek Goldmann
                  bos31337 Bryan O'Sullivan
                • Votes:
                  0 Vote for this issue
                  1 Start watching this issue


                  • Created: