Skip to content

(wip-shared_ptr) process could not start on RHEL7/CentOS7 #156

@stakao

Description

@stakao

Java process with heapstats(wip-shared_ptr) could not start.
It seems the config file loading has something wrong.

Back trace from core dump

#0  0x00007fd77e33d387 in __GI_raise (sig=sig@entry=6)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:55
#1  0x00007fd77e33ea78 in __GI_abort () at abort.c:90
#2  0x00007fd77d05ba95 in __gnu_cxx::__verbose_terminate_handler() ()
   from /lib64/libstdc++.so.6
#3  0x00007fd77d059a06 in ?? () from /lib64/libstdc++.so.6
#4  0x00007fd77d059a33 in std::terminate() () from /lib64/libstdc++.so.6
#5  0x00007fd77d059c53 in __cxa_throw () from /lib64/libstdc++.so.6
#6  0x00007fd77d0af095 in std::__throw_regex_error(std::regex_constants::error_type) () from /lib64/libstdc++.so.6
#7  0x00007fd777cd9fda in std::__detail::_Compiler<char const*, std::regex_traits<char> >::_M_match_token (this=this@entry=0x7fd77f11aa00,
    token=std::__detail::_Scanner<char const*>::_S_token_ord_char)
    at /usr/include/c++/4.8.2/bits/regex_compiler.h:747
#8  0x00007fd777ce0048 in _M_match_token (
    token=std::__detail::_Scanner<char const*>::_S_token_ord_char,
    this=0x7fd77f11aa00) at /usr/include/c++/4.8.2/bits/regex_compiler.h:961
#9  std::__detail::_Compiler<char const*, std::regex_traits<char> >::_M_atom (
    this=this@entry=0x7fd77f11aa00)
    at /usr/include/c++/4.8.2/bits/regex_compiler.h:921
#10 0x00007fd777ce074a in std::__detail::_Compiler<char const*, std::regex_traits<char> >::_M_term (this=this@entry=0x7fd77f11aa00)
    at /usr/include/c++/4.8.2/bits/regex_compiler.h:795
#11 0x00007fd777ce07ee in std::__detail::_Compiler<char const*, std::regex_traits<char> >::_M_alternative (this=this@entry=0x7fd77f11aa00)
    at /usr/include/c++/4.8.2/bits/regex_compiler.h:773
#12 0x00007fd777ce0964 in std::__detail::_Compiler<char const*, std::regex_traits<char> >::_M_disjunction (this=0x7fd77f11aa00)
    at /usr/include/c++/4.8.2/bits/regex_compiler.h:758
#13 0x00007fd777ce0cc4 in std::__detail::_Compiler<char const*, std::regex_traits<char> >::_Compiler (this=0x7fd77f11aa00, __b=<optimized out>,
    __e=<optimized out>, __traits=..., __flags=<optimized out>)
    at /usr/include/c++/4.8.2/bits/regex_compiler.h:729
#14 0x00007fd777ce1048 in std::__detail::__compile<char const*, std::regex_traits<char> > (
    __b=@0x7fd77f11ab58: 0x7fd777d99c0a "^\\s*(\\S+?)\\s*=\\s*(\\S+)?\\s*$",
    __e=@0x7fd77f11ab60: 0x7fd777d99c25 "", __t=..., __f=__f@entry=16)
    at /usr/include/c++/4.8.2/bits/regex_compiler.h:1105
#15 0x00007fd777cda1c4 in basic_regex (__f=16,
    __p=0x7fd777d99c0a "^\\s*(\\S+?)\\s*=\\s*(\\S+)?\\s*$",
    this=0x7fd77f11ab80) at /usr/include/c++/4.8.2/bits/regex.h:388
#16 TConfiguration::loadConfiguration (this=this@entry=0x7fd778007c80,
    filename=filename@entry=0x7fd778002f80 "/root/dev-heapstats/heapstats/agent/heapstats.conf") at configuration.cpp:382
#17 0x00007fd777cb6e4b in CommonInitialization (vm=<optimized out>,
    jvmti=jvmti@entry=0x7fd77f11bc38,
    options=0x7fd778002f80 "/root/dev-heapstats/heapstats/agent/heapstats.conf") at libmain.cpp:562
#18 0x00007fd777cb6fb4 in Agent_OnLoad (vm=<optimized out>,
    options=<optimized out>, reserved=<optimized out>) at libmain.cpp:637
#19 0x00007fd77dd8f18e in create_vm_init_agents ()
    at /usr/src/debug/java-1.8.0-openjdk-1.8.0.252.b09-2.el7_8.x86_64/openjdk/hotspot/src/share/vm/runtime/thread.cpp:3908
#20 Threads::create_vm (args=<optimized out>,
    canTryAgain=canTryAgain@entry=0x7fd77f11bdf0)
    at /usr/src/debug/java-1.8.0-openjdk-1.8.0.252.b09-2.el7_8.x86_64/openjdk/hotspot/src/share/vm/runtime/thread.cpp:3465
#21 0x00007fd77d9a688d in JNI_CreateJavaVM (vm=0x7fd77f11bea0,
    penv=0x7fd77f11beb0, args=<optimized out>)
    at /usr/src/debug/java-1.8.0-openjdk-1.8.0.252.b09-2.el7_8.x86_64/openjdk/hotspot/src/share/vm/prims/jni.cpp:5248
#22 0x00007fd77e8dc037 in InitializeJVM (ifn=<synthetic pointer>,
    penv=0x7fd77f11beb0, pvm=0x7fd77f11bea0)
    at /usr/src/debug/java-1.8.0-openjdk-1.8.0.252.b09-2.el7_8.x86_64/openjdk/jdk/src/share/bin/java.c:1240
#23 JavaMain (_args=<optimized out>)
    at /usr/src/debug/java-1.8.0-openjdk-1.8.0.252.b09-2.el7_8.x86_64/openjdk/jdk/src/share/bin/java.c:376
#24 0x00007fd77ed05ea5 in start_thread (arg=0x7fd77f11c700)
    at pthread_create.c:307
#25 0x00007fd77e4058dd in clone ()
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

The heapstats.conf file

# HeapStats 2.2.trunk
# HeapStats 2.2.trunk configuration file.
attach=true

# Output file setting
file=heapstats_snapshot.dat
heaplogfile=heapstats_log.csv
archivefile=heapstats_analyze.zip
logfile=
loglevel=INFO
reduce_snapshot=true

# SnapShot type
collect_reftree=true

# Trigger snapshot setting
trigger_on_fullgc=true
trigger_on_dump=true

# deadlock check
check_deadlock=false

# Trigger logging setting
## Note: trigger_on_logerror does *NOT* work when target
## JVM process enables {Exit|Crash}OnOutOfMemoryError
## http://mail.openjdk.java.net/pipermail/hotspot-gc-dev/2019-July/026547.html
trigger_on_logerror=true
trigger_on_logsignal=true
trigger_on_loglock=true

# Rank setting
rank_level=5
rank_order=delta

# Alert setting
alert_percentage=50

# Alert threshold for java heap usage.
# "0" means disabled.
javaheap_alert_percentage=95

# Alert threshold for metaspace usage (in MB).
# "0" means disabled.
metaspace_alert_threshold=0

# Timer setting
snapshot_interval=0
log_interval=300

first_collect=true
logsignal_normal=
logsignal_all=SIGUSR2
signal_reload=SIGHUP

# Thread recording
thread_record_enable=false
thread_record_buffer_size=100  # Set buffer size in MB.
thread_record_filename=heapstats-thread-records.htr
thread_record_iotracer=/usr/local/etc/iotracer/IoTrace.class

# Snmp setting
snmp_send=false
snmp_target=localhost
snmp_comname=public
# You can check library path with `net-snmp-config --netsnmp-libs`
snmp_libpath=/usr/lib64/libnetsnmp.so

logdir=./tmp
archive_command=/usr/bin/zip %archivefile% -jr %logdir%

kill_on_error=false

How to reproduce:

git clone -b wip-shared_ptr https://github.com/HeapStats/heapstats.git
cd heapstats
./configure
make agent
java -agentpath:/path/to/heapstats/agent/src/libheapstats-2.2.so.3=/path/to/heapstats/agent/heapstats.conf -version
terminate called after throwing an instance of 'std::regex_error'
  what():  regex_error
Aborted (core dumped)

Environment

# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.8 (Maipo)
java -version
openjdk version "1.8.0_252"
OpenJDK Runtime Environment (build 1.8.0_252-b09)
OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode)
# rpm -qa | grep java-1.8.0
java-1.8.0-openjdk-headless-1.8.0.252.b09-2.el7_8.x86_64
java-1.8.0-openjdk-debuginfo-1.8.0.252.b09-2.el7_8.x86_64
java-1.8.0-openjdk-1.8.0.252.b09-2.el7_8.x86_64
java-1.8.0-openjdk-devel-1.8.0.252.b09-2.el7_8.x86_64
# rpm -qa | grep glibc
glibc-2.17-307.el7.1.x86_64
glibc-debuginfo-common-2.17-307.el7.1.x86_64
glibc-common-2.17-307.el7.1.x86_64
glibc-devel-2.17-307.el7.1.x86_64
glibc-debuginfo-2.17-307.el7.1.x86_64
glibc-headers-2.17-307.el7.1.x86_64
# rpm -qa | grep kernel
kernel-tools-libs-3.10.0-957.el7.x86_64
kernel-devel-3.10.0-957.el7.x86_64
abrt-addon-kerneloops-2.1.11-57.el7.x86_64
kernel-3.10.0-957.el7.x86_64
kernel-tools-3.10.0-957.el7.x86_64
kernel-headers-3.10.0-957.el7.x86_64

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions