Skip to content

Segmentation fault: Builder killed by signal SIGSEGV[11] #116

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
lilianmoraru opened this issue Nov 5, 2015 · 3 comments
Closed

Segmentation fault: Builder killed by signal SIGSEGV[11] #116

lilianmoraru opened this issue Nov 5, 2015 · 3 comments
Milestone

Comments

@lilianmoraru
Copy link
Contributor

Vagga version: v0.4.0-54-g331f7f0

The entire config file:

containers:

  ##[Helpers] Don't use ubuntu container directly, it's only for SubConfigs
  ubuntu:
    setup:
    - !UbuntuRelease { version: 15.10 }

  ##[Helpers] Don't use qt5 container directly, it's only for SubConfigs
  qt5:
    setup:
    - !SubConfig
      container: ubuntu
    - !Install [qt5-default, libgl1-mesa-dev]

  dev-env:
    setup:
    - !SubConfig
      container: qt5

commands:
  build: !Command
    container: dev-env
    description: Build QMLChecker with Qt 5.4.2
    run: "qmake --version"

  shell: !Command
    container: dev-env
    description: Open bash inside the container
    run: /bin/bash

Error:

ERROR:vagga::wrapper: Error executing _build: Builder killed by signal SIGSEGV[11] (core dumped)
Command <Command "/proc/self/exe" ("vagga_wrapper") "_build" "dev-env"; environ: {"ftp_proxy"="[company ftp proxy]","RUST_LOG"="warn","http_proxy"="http://localhost:3128","TERM"="xterm","VAGGA_USER_HOME"="/home/[my company user]","https_proxy"="https://localhost:3128",}; uid_map=[UidMap { inside_uid: 0, outside_uid: 1000, count: 1 }, UidMap { inside_uid: 100000, outside_uid: 100000, count: 65536 }]; gid_map=[GidMap { inside_gid: 0, outside_gid: 1000, count: 1 }, GidMap { inside_gid: 100000, outside_gid: 100000, count: 65536 }]> exited with code 124

Moving !Install in ubuntu container and changing in dev-env to use container ubuntu solves the issue. I wanted to separate the concerns...

What's even more strange, after it installs everything into the container I can change the config file as it was before and it will work ok. If I remove .vagga and run it again, it crashes again.
Segmentation fault even though using Rust :)
Searched now and you do have unsafe in a few locations. For some reason, I searched a while back and had the impression you had no unsafe inside the code(libraries using unsafe, not vagga itself).

Said core dumped but I couldn't manage to find it.

@tailhook
Copy link
Owner

tailhook commented Nov 5, 2015

It's probably stack overflow. Unfortunately musl libc has small stack (80kib) but rust usually relies on large stack (order of megabytes). I could not find easy way to change the stack size previously.

Anyway, if you can reproduce it reliably, I'll fix it.

In the meantime, you can probably run vagga _build ubuntu && vagga _build qt5 && vagga _build dev-env. I.e. build containers sequentially.

@tailhook tailhook added this to the 0.4.2 milestone Nov 5, 2015
@lilianmoraru
Copy link
Contributor Author

To reproduce it reliably you have to use this config file and do
rm -rf .vagga && vagga build

@tailhook
Copy link
Owner

tailhook commented Nov 6, 2015

Hm, I don't believe I didn't think of it before. With 80k stack and 64k default buffer for file copying (on stack) it surprising that it was working before :)

Fixed in v0.4.1-4-gf63d8a5

tailhook added a commit that referenced this issue Nov 10, 2015
Instead of allocating buffer for file copy in heap allocate it on stack.
Just use 32k instead of default 64k. This leaves 48k stack for other
things. Which is 3x bigger than default (80k - 64k) so should be okay to
keep #116 fixed.

Performance get back to the same level as vagga 0.4.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants