[dev.icinga.com #572] Segmentation Fault (core dumped) on solaris 10 (x86) while icinga runs #275

Closed
icinga-migration opened this Issue Jul 5, 2010 · 17 comments

Projects

None yet

1 participant

@icinga-migration
Member

This issue has been migrated from Redmine: https://dev.icinga.com/issues/572

Created by kimige on 2010-07-05 06:24:25 +00:00

Assignee: Meier
Status: Closed (closed on 2010-09-17 14:54:43 +00:00)
Target Version: (none)
Last Update: 2010-09-17 14:54:43 +00:00 (in Redmine)


bash-3.00# /usr/local/icinga/bin/icinga -v /usr/local/icinga/etc/icinga.cfg

Icinga 1.0.2
Copyright © 2009-2010 Icinga Development Team (http://www.icinga.org)
Copyright © 2009 Nagios Core Development Team and Community Contributors
Copyright © 1999-2009 Ethan Galstad
Last Modified: 06-30-2010
License: GPL

Reading configuration data...
Read main config file okay...
Segmentation Fault (core dumped)

= run mdb to analyze core dump file =
bash-3.00# mdb core
Loading modules: [ libc.so.1 ld.so.1 ]

::status
debugging core file of icinga (32-bit) from unixmon
file: /usr/local/icinga/bin/icinga
initial argv: /usr/local/icinga/bin/icinga -v /usr/local/icinga/etc/icinga.cfg
threading model: multi-threaded
status: process terminated by SIGSEGV (Segmentation Fault)

= run pstack to get stack trace ==
core 'core' of 4202: /usr/local/icinga/bin/icinga -v /usr/local/icinga/etc/icinga.cfg
fed84611 realfree (80eaee0) + bf
fed84bb3 cleanfree (0) + 44
fed840cf _malloc_unlocked (2020, 2000, 10, fee0d000, 8047ab4, fed8c632) + ad
fed83ff8 malloc (201c) + 34
fed8c632 _nss_XbyY_buf_alloc (10, 2000) + 22
fed775a4 get_grbuf (80e7ae8, 8047b18, 80826e1, 80e7ae8, 80c989e, 80c986c) + 3c
fed77601 getgrnam (80e7ae8, 80c989e, 80c986c, 808269e) + 15
080826e1 drop_privileges (80e7ad8, 80e7ae8, 8047c78, 805f5f2) + 99
0805f638 main (3, 8047cb0, 8047cc0) + ad0
0805ea80 _start (3, 8047d80, 8047d9d, 8047da0, 0, 8047dc1) + 60

run truss and list some final lines =
brk(0x080EDAA8) = 0
brk(0x080F1AA8) = 0
time() = 1278311003
open("/usr/share/lib/zoneinfo/US/Pacific", O_RDONLY) = 4
fstat64(4, 0x08047A00) = 0
read(4, " T Z i f\0\0\0\0\0\0\0\0".., 1017) = 1017
close(4) = 0
munmap(0xFEC90000, 45885) = 0
close(3) = 0
Read main config file okay...
write(1, " R e a d m a i n".., 33) = 33
getgid() = 0 [0]
getuid() = 0 [0]
getuid() = 0 [0]
Incurred fault #6, FLTBOUNDS %pc = 0xFED84611
siginfo: SIGSEGV SEGV_MAPERR addr=0xFED84611
Received signal #11, SIGSEGV [default]
siginfo: SIGSEGV SEGV_MAPERR addr=0xFED84611

Changesets

2010-09-24 12:03:12 +00:00 by mfriedrich 69d5fab

disable eventprofiler on Solaris gcc3, preventing core dumps #702 #572

eventprofiler patch is doing some realloc/malloc magic outside of
main core process, allocating memory in a way it will fail on
Solaris gcc3 (while gcc4 works). Made optional by compiler
detection flag.

refs #702
refs #572

2010-09-24 16:38:26 +00:00 by mfriedrich 8ca33ed

move eventprofiler init after config parsing, checking if enabled, making it optional all over #572 #702

refs #572
refs #702
refs #312

Relations:

@icinga-migration
Member

Updated by mfriedrich on 2010-07-09 14:44:49 +00:00

  • Category changed from Other to Installation
@icinga-migration
Member

Updated by dilbret42 on 2010-07-13 20:04:59 +00:00

Similar error on Solaris 10 (Sparc).

[triptest:/usr/local/icinga] root# /usr/local/icinga/bin/icinga -v /usr/local/icinga/etc/icinga.cfg

Icinga 1.0.2
Copyright © 2009-2010 Icinga Development Team (http://www.icinga.org)
Copyright © 2009 Nagios Core Development Team and Community Contributors
Copyright © 1999-2009 Ethan Galstad
Last Modified: 06-30-2010
License: GPL

Bus error (core dumped)
[triptest:/usr/local/icinga] root#

::status
debugging core file of icinga (32-bit) from triptest
file: /usr/local/icinga/bin/icinga
initial argv: /usr/local/icinga/bin/icinga -v /usr/local/icinga/etc/icinga.cfg
threading model: multi-threaded
status: process terminated by SIGBUS (Bus Error)

core 'core' of 28251: /usr/local/icinga/bin/icinga -v /usr/local/icinga/etc/icinga.cfg
fee56ddc _morecore (2011, b2600, b43f0, fef4734c, 7ffffc00, 0) + 178
fee565ac _malloc_unlocked (600, b2600, 1, b2600, fef3e3c0, 0) + 1fc
fee562dc _smalloc (10, 0, e8124, fee564b8, ffffffff, fef472b4) + 4c
fee56394 malloc (9, 1, e8070, 0, fef3e3c0, fef485b8) + 4c
fee69344 strdup (8b6a0, 0, 0, 0, 0, 99) + c
0003f5a8 init_macrox_names (b018c, 0, 0, 0, 0, 0) + 28
0003ff40 init_macros (ffffffff, 3c, 1e, 1, aec00, ae800) + 4
0004ba4c reset_variables (b1008, 0, e, fef480f0, 1, 1) + 460
0001ef7c main (aec00, ffbffbe4, ffbffbf4, b0180, ff330100, 0) + a98
0001e37c _start (0, 0, 0, 0, 0, 0) + 5c

@icinga-migration
Member

Updated by Meier on 2010-07-31 07:42:58 +00:00

  • Status changed from New to Assigned
  • Assigned to set to Meier
@icinga-migration
Member

Updated by Meier on 2010-07-31 13:29:52 +00:00

  • Status changed from Assigned to Feedback

I did a test installation on Solaris 10: SunOS unknown 5.10 Generic_141445-09 i86pc i386 i86pc

I used gcc4 from blastwave.org to compile icinga i can not reproduce this problem.

Which compiler did you use?

@icinga-migration
Member

Updated by dilbret42 on 2010-07-31 14:22:30 +00:00

For Solaris 10 (Sparc) I used the version of gcc3 included with Sun Studio 12

@icinga-migration
Member

Updated by Meier on 2010-07-31 16:06:06 +00:00

Hm I did install Sun Studio 12 and i can't find any included gcc there. Compiling with the suncc fails because of https://dev.icinga.org/issues/521

@icinga-migration
Member

Updated by kimige on 2010-08-02 05:50:13 +00:00

Hi Meier,

There is no gcc in Sun Sudio 12. Sun Studio 12 includes its compiler. Basically we need to install gcc package on Solaris. We may install gcc package by different providers like SUNWgcc, SMCgcc etc.

The core dump happens on my following platform:
Generic_127112-10 i86pc i386 i86pc Solaris
bash-3.00# gcc -v
Reading specs from /usr/local/lib/gcc/i386-pc-solaris2.10/3.4.6/specs
Configured with: ../configure --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld --enable-shared --enable-languages=c,c**,f77
Thread model: posix
gcc version 3.4.6

BTW.The beta version icinga-1.0.1 works on my previous platform. So far this version is working on my platform and no issue is found so far.

Thanks,

@icinga-migration
Member

Updated by dilbret42 on 2010-08-02 12:17:48 +00:00

I really shouldn't reply to emails in the morning without a Mtn Dew first. GCC3 came from sunfreeware.com. As another point of information I was able to compile and run the last release version just fine on the same box.

@icinga-migration
Member

Updated by Meier on 2010-08-12 19:20:01 +00:00

dilbret42: Hm the last release version 1.0.2, but that is also the version you reported the problem against.

kimige: which icinga is NOT working for you? can you test if a build with a different compiler changes anything?

@icinga-migration
Member

Updated by dilbret42 on 2010-08-13 02:05:44 +00:00

By last release I meant 1.0.1

@icinga-migration
Member

Updated by kimige on 2010-08-13 07:47:06 +00:00

Hi Meier,
The version 1.0.2 is not working for me. But the version 1.0.1 works.

let me try it with a different compiler and will let you know the result.

Thanks

@icinga-migration
Member

Updated by Meier on 2010-09-10 19:07:33 +00:00

running in gdb:

drop_privileges (user=0x80e8718 "icinga", group=0x80e8728 "icinga") at utils.c:2419
2419 if(getuid()!=0)
(gdb)
2420 return OK;
(gdb)
2419 if(getuid()!=0)
(gdb)
2423 if(group!=NULL){
(gdb)
2426 if(strspn(group,"0123456789")<strlen(group)){
(gdb)
2427 grp=(struct group *)getgrnam(group);
(gdb)

Program received signal SIGSEGV, Segmentation fault.
0xfed64e4d in realfree () from /lib/libc.so.1

@icinga-migration
Member

Updated by Meier on 2010-09-10 19:15:04 +00:00

also interesting

drop_privileges (user=0x80e8718 "icinga", group=0x80e8728 "icinga") at utils.c:2419
2419 if(getuid()!=0)
(gdb)
2420 return OK;
(gdb)
2419 if(getuid()!=0)
(gdb)
2423 if(group!=NULL){
(gdb)
2426 if(strspn(group,"0123456789")<strlen(group)){
(gdb) p group
$1 = 0x80e8728 "icinga"
(gdb) p getgrnam(group)

@icinga-migration
Member

Updated by Meier on 2010-09-10 19:17:18 +00:00

2426 if(strspn(group,"0123456789")<strlen(group)){
(gdb) p group
$1 = 0x80e8728 "icinga"
(gdb) p getgrnam(group)

Program received signal SIGSEGV, Segmentation fault.

@icinga-migration
Member

Updated by LarsEngels on 2010-09-14 14:18:22 +00:00

I am also seeing the SIGBUS error here on SPARC64. Do you need any additional information to get this problem fixed?

@icinga-migration
Member

Updated by mfriedrich on 2010-09-14 16:22:28 +00:00

can we decide wether to use this issue or #702 instead?

@icinga-migration
Member

Updated by mfriedrich on 2010-09-17 14:54:43 +00:00

  • Status changed from Feedback to Closed

continue in #702 please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment