Segmentation Fault on Fedora 30 Power(ppc64le) Container on x86

To my pleasant surprise, it’s really easy to build docker images for other architectures using Docker. It makes use of QEMU user mode emulation to execute the binaries.

It’s especially easy on Docker for Desktop on macOS since everything is already preconfigured and all you have to do is fire up the container. In my case ppc64le/fedora:30.

However, I ran into some issues when running dnf update or dnf install commands on the ppc64le/fedora:30 image. The commands would work on an x86 image, but throw a segmentation fault when emulating Power.

exceed:Code knikolla$ docker run --rm -it ppc64le/fedora:30 dnf makecache
Fedora Modular 30 - ppc64le                                                                                                                       371 kB/s | 2.6 MB     00:07    
Fedora Modular 30 - ppc64le - Updates                                                                                                             403 kB/s | 2.0 MB     00:05    
Fedora Modular 30 - ppc64le - Test Updates                                                                                                        169 kB/s | 489 kB     00:02    
Fedora 30 - ppc64le - Test Updates                                                                                                                277 kB/s |  12 MB     00:42    
qemu: uncaught target signal 11 (Segmentation fault) - core dumped        [                                 ===                                 ] ---  B/s |   0  B     --:-- ETA

There is a bug with the librepo package, and the solution is to disable zchunk metadata by adding zchunk=False to /etc/dnf/dnf.conf.

exceed:onboarding-ui knikolla$ docker run --rm -it ppc64le/fedora:30
[root@027ce7b4bd5c /]# echo "zchunk=False" >> /etc/dnf/dnf.conf
[root@027ce7b4bd5c /]# dnf makecache
Fedora Modular 30 - ppc64le                                                                                                                       295 kB/s | 1.8 MB     00:06    
Fedora Modular 30 - ppc64le - Updates                                                                                                             323 kB/s | 1.7 MB     00:05    
Fedora Modular 30 - ppc64le - Test Updates                                                                                                        254 kB/s | 1.8 MB     00:07    
Fedora 30 - ppc64le - Test Updates                                                                                                                240 kB/s |  13 MB     00:55    
Fedora 30 - ppc64le - Updates                                                                                                                     376 kB/s |  11 MB     00:31    
Fedora 30 - ppc64le                                                                                                                               320 kB/s |  53 MB     02:51    
Last metadata expiration check: 0:00:07 ago on Mon 27 May 2019 03:54:26 PM UTC.
Metadata cache created.

Leave a Reply

Your email address will not be published. Required fields are marked *