jfloff / docker-lineageos

A more automated Docker-based build environment for LineageOS
MIT License
61 stars 41 forks source link

H990 - segmentation fault while building kernel #7

Closed erhan- closed 5 years ago

erhan- commented 5 years ago

Hey @jfloff ,

I am trying to build los-15.1 for the LG v20 (H990) and am having problems when it starts building the kernel. I get segmentation faults:

make: Entering directory '/home/lineageos/kernel/lge/msm8996'
make[1]: Entering directory '/home/lineageos/out/target/product/h990/obj/KERNEL_OBJ'
Segmentation fault (core dumped)
Segmentation fault (core dumped)
  GEN     ./Makefile
scripts/kconfig/conf  --silentoldconfig Kconfig
Segmentation fault (core dumped)
Segmentation fault (core dumped)
  CHK     include/config/kernel.release
Segmentation fault (core dumped)
Segmentation fault (core dumped)
  GEN     ./Makefile
Segmentation fault (core dumped)
  CHK     include/generated/uapi/linux/version.h
Segmentation fault (core dumped)
Segmentation fault (core dumped)
  Using /home/lineageos/kernel/lge/msm8996 as source for kernel
Segmentation fault (core dumped)
  CHK     include/generated/utsrelease.h
Segmentation fault (core dumped)

[...]

[ 53% 16655/31169] build INSTALLED_KERNEL_MODULES
Installing Kernel Modules
make: Entering directory '/home/lineageos/kernel/lge/msm8996'
make[1]: Entering directory '/home/lineageos/out/target/product/h990/obj/KERNEL_OBJ'
Segmentation fault (core dumped)
Segmentation fault (core dumped)
  INSTALL block/test-iosched.ko
  INSTALL crypto/ansi_cprng.ko
  INSTALL drivers/char/rdbg.ko
  INSTALL drivers/input/evbug.ko
  INSTALL drivers/mmc/card/mmc_block_test.ko
  INSTALL drivers/mmc/card/mmc_test.ko
  INSTALL drivers/net/wireless/ath/wil6210/wil6210.ko
  INSTALL drivers/scsi/ufs/ufs_test.ko
  INSTALL drivers/spi/spidev.ko
  INSTALL drivers/usb/gadget/legacy/g_laf.ko
  INSTALL drivers/usb/gadget/udc/dummy_hcd.ko
  INSTALL drivers/video/backlight/lcd.ko
  INSTALL net/bridge/br_netfilter.ko
Segmentation fault (core dumped)
  DEPMOD  3.18.113-perf-g56b53202e62
make[1]: Leaving directory '/home/lineageos/out/target/product/h990/obj/KERNEL_OBJ'
make: Leaving directory '/home/lineageos/kernel/lge/msm8996'
depmod: WARNING: could not open /home/lineageos/out/target/product/h990/obj/PACKAGING/depmod_vendor_intermediates/lib/modules/0.0/modules.order: No such file or directory
depmod: WARNING: could not open /home/lineageos/out/target/product/h990/obj/PACKAGING/depmod_vendor_intermediates/lib/modules/0.0/modules.builtin: No such file or directory
[45670.856670] show_signal_msg: 16 callbacks suppressed
[45670.856672] aarch64-linux-a[18273]: segfault at 17f4009 ip 0000000000462c20 sp 00007ffd92d39848 error 4 in aarch64-linux-android-ld.bfd[400000+1cf000]
[45671.279208] aarch64-linux-a[18650]: segfault at 986009 ip 0000000000462c20 sp 00007ffd08575bc8 error 4 in aarch64-linux-android-ld.bfd[400000+1cf000]
[45671.379506] aarch64-linux-a[18739]: segfault at 2272000 ip 0000000000462c20 sp 00007ffea2f3c108 error 4 in aarch64-linux-android-ld.bfd[400000+1cf000]
[45671.486016] aarch64-linux-a[18862]: segfault at 1691019 ip 0000000000462c20 sp 00007ffc18de9278 error 4 in aarch64-linux-android-ld.bfd[400000+1cf000]
[45671.594243] aarch64-linux-a[18950]: segfault at 256d009 ip 0000000000462c20 sp 00007ffc52d80368 error 4 in aarch64-linux-android-ld.bfd[400000+1cf000]
[45671.695387] aarch64-linux-a[19018]: segfault at 11fa009 ip 0000000000462c20 sp 00007fffceff22c8 error 4 in aarch64-linux-android-ld.bfd[400000+1cf000]
[45673.387570] aarch64-linux-a[20263]: segfault at 1b65019 ip 0000000000462c20 sp 00007ffca7f918d8 error 4 in aarch64-linux-android-ld.bfd[400000+1cf000]
[45673.559025] aarch64-linux-a[20348]: segfault at 1a7a000 ip 0000000000462c20 sp 00007ffc1f7ff058 error 4 in aarch64-linux-android-ld.bfd[400000+1cf000]
[45673.646780] aarch64-linux-a[20409]: segfault at 12d9019 ip 0000000000462c20 sp 00007fffb219ed78 error 4 in aarch64-linux-android-ld.bfd[400000+1cf000]
[45673.726228] aarch64-linux-a[20463]: segfault at 1b5d009 ip 0000000000462c20 sp 00007ffe77b8b538 error 4 in aarch64-linux-android-ld.bfd[400000+1cf000]
[45676.409960] show_signal_msg: 10 callbacks suppressed

my device-config:

cat device-config/h990.env
#!/bin/bash

LINEAGEOS_REPO=https://github.com/LineageOS/android.git
LINEAGEOS_BRANCH=lineage-15.1

DEVICE_CODENAME=h990

PROPRIETARY_BLOBS_REPO=https://github.com/TheMuppets/proprietary_vendor_lge
PROPRIETARY_BLOBS_DIR=$BASE_DIR/vendor/lge

I could not find a way to fix this problem. I even changed to "unstable" in the debian image to use newer gcc binaries but that did not work either.

The docker-image runs inside a VM and resources seem not to be exhausted.

jfloff commented 5 years ago

It seems that its a machine-specific bug. Your deployment caught my eye:

The docker-image runs inside a VM and resources seem not to be exhausted.

How much memory are you allocating to docker inside that VM?

oupala commented 5 years ago

I have a different issue but it might come from the same problem.

Here my final log: fatal: fork: Cannot allocate memory.

How much memory is needed to build lineageos? I have 6 Gigs on my server.

jfloff commented 5 years ago

I don't know for sure, my problem was always disk space because I didn't had that much. But 6Gigs sounds kinda low.

oupala commented 5 years ago

When I talk about memory, I'm talking about RAM.

How much RAM is needed?

jfloff commented 5 years ago

I'm not entirely sure, but I would say 8Gigs up would be better.

jfloff commented 5 years ago

We can keep continuing the discussion but since I think this a machine-related problem I'm closing the issue. Feel free to reopen if you think there is something going on with this docker image.

erhan- commented 5 years ago

@jfloff I have not been online for a while. I am pretty sure that this is a machine issue so this can stay closed imho. Thanks!