Project

General

Profile

Bug #9136

Icinga2 crashed with SEGV_ACCERR

Added by Anonymous 9 months ago. Updated 4 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
07/26/2018
Due date:
% Done:

0%

Estimated time:
Affected versions:
Security IDs:

Description

Since version 2.8.2 there are bigger problems when using the API of Icinga2.
The process crashes with the error message'xxxx'.

I have started several attempts to get a usable debug output, but failed again and again.
I have summarized my previous results in 2 gists:
https://gist.github.com/bodsch/16d6c96b8dfa6aa48c59eb9599edacef
https://gist.github.com/bodsch/a55bae4347906a3760067ba45626770b

Version 2.8.2 was not available in the community repository at that time, I built it myself.
However, the current version 2.9.x also shows this problem.

One of Icinga's developers helped me to detect the problem.

Quotes:
"If you google for "alpine linux SEGV_ACCERR", you can find other tools having the same problem though. Even Golang itself has had troubles with libmusl somehow using hardening.
https://github.com/golang/go/issues/14851"
and
"The Alpine toolchain enables PIE by default. Since the go linker does
not (yet) support PIE we need to explicitly disable it on Alpine."

Their solution was a '-fno-PIC' during build.

I would very much like to deliver a core dump, but I haven't made it here yet.
If I can, I will provide all the information that is still needed.

Best regards,
Bodo

History

#1 Updated by Pawel Szafer 4 months ago

Exact same bug occurs to me.
Icinga2 is unusable as master in Alpine with such error.

#2 Updated by Francesco Colista 4 months ago

Would this patch work?

x86_64-edge:~/aports/community/icinga2$ git diff APKBUILD 
diff --git a/community/icinga2/APKBUILD b/community/icinga2/APKBUILD
index 50e0c58b40..718af1e06b 100644
--- a/community/icinga2/APKBUILD
+++ b/community/icinga2/APKBUILD
@@ -2,7 +2,7 @@
 # Maintainer: Francesco Colista <fcolista@alpinelinux.org>
 pkgname=icinga2
 pkgver=2.10.2
-pkgrel=0
+pkgrel=1
 pkgdesc="An open source host, service and network monitoring program" 
 url="http://www.icinga.org" 
 arch="all !armhf !armv7" 
@@ -20,15 +20,10 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/Icinga/$pkgname/archive/v$pk
 builddir="$srcdir/$pkgname-$pkgver" 

 prepare() {
+       default_prepare
        cd "$builddir" 
        rm -r third-party/yajl
        mkdir -p build
-  default_prepare
-}
-
-check() {
-  cd "$builddir" 
-  make test
 }       

 build() {
@@ -49,7 +44,12 @@ build() {
                -DICINGA2_GROUP=icingacmd \
                -DICINGA2_COMMAND_GROUP=icingacmd \
                -DINSTALL_SYSTEMD_SERVICE_AND_INITSCRIPT=no
-  make
+       CFLAGS="$CFLAGS -fno-PIC" make
+}
+
+check() {
+       cd "$builddir" 
+       make test
 }

 package() {

.: Francesco

#3 Updated by Francesco Colista 4 months ago

Can you please provide a way to reproduce it?
Thanks.

.: Francesco

Also available in: Atom PDF