Bug 232458 - jevents: Program terminated with signal 11, Segmentation fault when build word of 12-STABLE
Summary: jevents: Program terminated with signal 11, Segmentation fault when build wor...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 12.0-STABLE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-19 19:47 UTC by iron.udjin
Modified: 2018-11-21 02:33 UTC (History)
0 users

See Also:


Attachments
jevents.truss (114.13 KB, text/plain)
2018-10-19 19:47 UTC, iron.udjin
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description iron.udjin 2018-10-19 19:47:48 UTC
Created attachment 198379 [details]
jevents.truss

Hello,

I'm trying to build world of 12-STABLE r339445 from 11.2-STABLE r339336M and it fall with error:

===> lib/ofed/libopensm (all)
===> lib/libpcap (all)
===> lib/libpjdlog (all)
===> lib/libpmc (all)
./pmu-events/jevents "x86" /usr/src/lib/libpmc/pmu-events/arch libpmc_events.c
*** Signal 11

Stop.
make[5]: stopped in /usr/src/lib/libpmc
*** Error code 1


# cd /usr/src/lib/libpmc
# gdb --args /usr/obj/usr/src/amd64.amd64/lib/libpmc/pmu-events/jevents "x86" /usr/src/lib/libpmc/pmu-events/arch libpmc_events.c
(gdb) r
Starting program: /usr/obj/usr/src/amd64.amd64/lib/libpmc/pmu-events/jevents x86 /usr/src/lib/libpmc/pmu-events/arch libpmc_events.c
Program received signal SIGSEGV, Segmentation fault.
json_events (fn=<value optimized out>, func=0x403f00 <print_events_table_entry>, data=0x7fffffffdf80) at /usr/src/lib/libpmc/pmu-events/jevents.c:125
125		if (*e == '.')
Current language:  auto; currently minimal
(gdb) bt
#0  json_events (fn=<value optimized out>, func=0x403f00 <print_events_table_entry>, data=0x7fffffffdf80) at /usr/src/lib/libpmc/pmu-events/jevents.c:125
#1  0x0000000000403b4e in process_one_file (fpath=<value optimized out>, sb=<value optimized out>, typeflag=0, ftwbuf=<value optimized out>) at /usr/src/lib/libpmc/pmu-events/jevents.c:1044
#2  0x00000008008972fe in nftw (path=<value optimized out>, fn=0x403680 <process_one_file>, nfds=<value optimized out>, ftwflags=<value optimized out>) at /usr/src/lib/libc/gen/nftw.c:98
#3  0x0000000000403094 in main (argc=4, argv=<value optimized out>) at /usr/src/lib/libpmc/pmu-events/jevents.c:1135
(gdb)

CFLAGS: -O2 -pipe -march=native -mtune=native
Clang: 6.0.1 (tags/RELEASE_601/final 335540) (based on LLVM 6.0.1)
Arch: amd64

P.S: Please add FreeBSD 12-STABLE in the "Version:" list.
Comment 1 iron.udjin 2018-10-31 01:01:51 UTC
I did clean install of 12-BETA2 and tried run buildworld of 12-STABLE:

===> lib/ofed/libopensm (all)
===> lib/libpcap (all)
===> lib/libpjdlog (all)
===> lib/libpmc (all)
./pmu-events/jevents "x86" /usr/src/lib/libpmc/pmu-events/arch libpmc_events.c
*** Error code 127

Stop.
make[5]: stopped in /usr/src/lib/libpmc
*** Error code 1

Stop.
make[4]: stopped in /usr/src/lib
*** Error code 1
Comment 2 iron.udjin 2018-11-21 02:33:27 UTC
It was fixed somewhere between r339445 and r340717.