After upgrading to 4.4.0-81-generic some a third party service failed to start after investigating I managed to reproduce the issue using the following method. Note: Issue does not occur after down grading the kernel to 4.4.0-79-generic, but as this report suggests, it is still there in 4.4.0-82-generic
After upgrading to 4.4.0-81-generic some a third party service failed to start after investigating I managed to reproduce the issue using the following method. Note: Issue does not occur after down grading the kernel to 4.4.0-79-generic, but as this report suggests, it is still there in 4.4.0-82-generic
Created a Java file Run.java
import java.util.Date; commons. daemon. Daemon; commons. daemon. DaemonContext; commons. daemon. DaemonInitExcep tion;
import org.apache.
import org.apache.
import org.apache.
public class Run implements Daemon {
private class Runner extends Thread {
synchroniz ed(this) {
System. out.println( new Date() + " running ...");
wait( );
public void run() {
try {
} catch (Exception e) {}
}
}
}
Runner r = new Runner();
@Override tion, Exception {}
public void init(DaemonContext context) throws DaemonInitExcep
@Override
System. out.println( new Date() + " Staring...");
public void start() throws Exception {
r.start();
}
@Override
synchronized( r) {
System. out.println( new Date() + " Stopping ...");
r. notify( );
public void stop() throws Exception {
}
}
@Override
public void destroy() {}
}
Compiled with
javac -cp /usr/share/ java/commons- daemon- 1.0.15. jar Run.java
Created a script to launch through JSVC
# Setup variables /usr/lib/ jvm/default- java "/usr/share/ java/commons- daemon. jar":"/ home/nervecentr eadm/JavaTest/ " example. pid /tmp/example. out /tmp/example. err
EXEC=/usr/bin/jsvc
JAVA_HOME=
CLASS_PATH=
CLASS=Run
USER=nervecentreadm
PID=/tmp/
LOG_OUT=
LOG_ERR=
do_exec()
{
$EXEC -home "$JAVA_HOME" -cp $CLASS_PATH -user $USER -outfile $LOG_OUT -errfile $LOG_ERR -pidfile $PID $1 $CLASS
}
case "$1" in stop|restart} " >&2
start)
do_exec
;;
stop)
do_exec "-stop"
;;
restart)
if [ -f "$PID" ]; then
do_exec "-stop"
do_exec
else
echo "service not running, will do nothing"
exit 1
fi
;;
*)
echo "usage: daemon {start|
exit 3
;;
esac
Ran the script with
./service start
The error log file in /tmp/example.err contains.
ProblemType: Crash ature: Ubuntu 4.4.0-82. 105-generic 4.4.70 jvm/default- java -cp /usr/share/ java/commons- daemon. jar:/home/ username/ JavaTest/ -user username -outfile /tmp/example.out -errfile /tmp/example.err -pidfile /tmp/example.pid Run stack_to( address) +79>: movb $0x0,(%rax) stack_to( address) (bottom= 0x7fff5de07fff "", bottom@ entry=0x7fff5de 076b0 "") at /build/ openjdk- 8-VTMhfL/ openjdk- 8-8u131- b11/src/ hotspot/ src/os/ linux/vm/ os_linux. cpp:673 :manually_ expand_ stack(JavaThrea d*, unsigned char*) (t=t@entry= 0xa7e000, addr=0x7fff5de076b0 "") at /build/ openjdk- 8-VTMhfL/ openjdk- 8-8u131- b11/src/ hotspot/ src/os/ linux/vm/ os_linux. cpp:686 linux_signal( int, siginfo_t*, void*, int) (sig=sig@entry=11, info=info@ entry=0x7fff5de 0c230, ucVoid= ucVoid@ entry=0x7fff5de 0c100, abort_if_ unrecognized= abort_if_ unrecognized@ entry=1) at /build/ openjdk- 8-VTMhfL/ openjdk- 8-8u131- b11/src/ hotspot/ src/os_ cpu/linux_ x86/vm/ os_linux_ x86.cpp: 330 c230, uc=0x7fff5de0c100) at /build/ openjdk- 8-VTMhfL/ openjdk- 8-8u131- b11/src/ hotspot/ src/os/ linux/vm/ os_linux. cpp:4346 64-linux- gnu/libpthread. so.0
DistroRelease: Ubuntu 16.04
Package: jsvc 1.0.15-6
ProcVersionSign
Uname: Linux 4.4.0-82-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.7
Architecture: amd64
Date: Fri Jun 23 08:39:45 2017
ExecutablePath: /usr/bin/jsvc
InstallationDate: Installed on 2014-10-09 (987 days ago)
InstallationMedia: Ubuntu-Server 12.04.4 LTS "Precise Pangolin" - Release amd64 (20140204)
ProcCmdline: jsvc.exec -home /usr/lib/
SegvAnalysis:
Segfault happened at: 0x7f0c51ab0a4f <_expand_
PC (0x7f0c51ab0a4f) ok
source "$0x0" ok
destination "(%rax)" (0x7fff5de07ff0) not located in a known VMA region (needed writable region)!
Stack memory exhausted (SP below stack segment)
SegvReason: writing unknown VMA
Signal: 11
SourcePackage: commons-daemon
StacktraceTop:
_expand_
os::Linux:
JVM_handle_
signalHandler(int, siginfo_t*, void*) (sig=11, info=0x7fff5de0
<signal handler called> () at /lib/x86_
Title: jsvc crashed with SIGSEGV in _expand_stack_to()
UpgradeStatus: Upgraded to xenial on 2016-11-01 (233 days ago)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo