Project

General

Profile

Actions

Bug #11496

open

make(1) signal handler is unsafe

Added by Alexander Pyhalov over 4 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

After starting illumos-gate build I've likely typed Ctrl^C and got the following dmake core

> ::status
debugging core file of make (32-bit) from buildzone.oi-build.r61.net
file: /opt/onbld/bin/i386/make
initial argv: dmake clobber
threading model: native threads
status: process terminated by SIGABRT (Abort), pid=22910 uid=101 code=-1
> $C
0803a288 libc.so.1`_lwp_kill+0x15(1, 6, 0, 1, feb22000, feafed24)
0803a2a8 libc.so.1`raise+0x2b(6)
0803a2c8 libumem.so.1`umem_do_abort+0x53()
0803a2d8 libumem.so.1`umem_panic+0x3c(feafed24)
0803a2f8 0xfeaf43c5(feb0078c, feb0111d, 245, feafd90c)
0803a338 libumem.so.1`vmem_populate+0x8c(809d8e8, 101)
0803a3a8 libumem.so.1`vmem_xalloc+0x158(809d8e8, 2000, 1000, 0, 0, 0)
0803a3f8 libumem.so.1`vmem_alloc+0x198(809d8e8, 2000, 1)
0803a458 libumem.so.1`umem_slab_create+0x79(80aaa90, 0)
0803a498 libumem.so.1`umem_slab_alloc+0x16c(80aaa90, 0)
0803a4d8 libumem.so.1`umem_cache_alloc+0xc0(80aaa90, 0)
0803a528 libumem.so.1`umem_alloc+0x5c(408, 0)
0803a548 libumem.so.1`umem_malloc+0x25(400)
0803a978 _ZL22report_dir_enter_leave7Boolean+0xe8(0, 597e, 803a9a8, 8063121, fed39000, 803a9c4)
0803a9a8 _Z16handle_interrupti+0xe9(2, 0, 803aa68, fea32a40, fed39000, 803aa24)
0803a9c4 libc.so.1`__sighndlr+0x15(2, 0, 803aa68, 80630e4, feafcba6, fed3e500)
0803aa24 libc.so.1`call_user_handler+0x1e9(2, 0, 803aa68)
0803aa54 libc.so.1`sigacthandler+0xe4(2, 0, 803aa68)
0803ac68 libumem.so.1`vmem_putseg+0xc(feb36548, 80d6fe0, 1, feafd986)
0803aca8 libumem.so.1`vmem_populate+0x191(809d8e8, 101)
0803ad18 libumem.so.1`vmem_xalloc+0x158(809d8e8, 1000, 1000, 0, 0, 0)
0803ad68 libumem.so.1`vmem_alloc+0x198(809d8e8, 1000, 1)
0803adc8 libumem.so.1`umem_slab_create+0x79(80a5010, 0)
0803ae08 libumem.so.1`umem_slab_alloc+0x16c(80a5010, 0)
0803ae48 libumem.so.1`umem_cache_alloc+0xc0(80a5010, 0)
0803ae98 libumem.so.1`umem_alloc+0x5c(44, 0)
0803aeb8 libumem.so.1`umem_malloc+0x25(3c)
0803afa8 _Z6getmemi+0x13(3c, 80d4688, 803afd8, fec79144, 8097a80, 803b020)
0803afd8 _ZN8Name_set6insertEPKcR7Boolean+0xf0(8098e98, 8097a80, 803b008, 80702f4, 80d5528, 0)
0803c038 _Z10getname_fnPwi7BooleanPS0_+0xb5(80c8360, 14, 0, 0, 803e45c, 803e45c)
08043758 _ZL14parse_makefileP5_NameP7_Source+0x25d8(80c2ab8, 80c3f98, 1, 0)
080437b8 _Z16read_simple_fileP5_Name7BooleanS1_S1_S1_S1_S1_+0x174(80c2ab8, 1, 1, 1, 0, 1)
080437e8 _ZL13read_makefileP5_Name7BooleanS1_S1_+0x3b(80c2f68, 1, 0, 1)
08047188 main+0x995(804718c, fed462e8, 80471c8, 80590f8, 2, 80471f0)
080471c8 _start_crt+0x97(2, 80471f0, fefcfed4, 0, 0, 0)
080471e4 _start+0x1a(2, 8047404, 804740a, 0, 8047412, 8047435)

The issue was diagnosed by Joerg Schilling - dmake signal handler is unsafe, it uses malloc() and putenv(). So, during singal handling dmake dumps core.

No data to display

Actions

Also available in: Atom PDF