You have been subscribed to a public bug by Liam Alford (nezero):
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;
import org.apache.commons.daemon.Daemon;
import org.apache.commons.daemon.DaemonContext;
import org.apache.commons.daemon.DaemonInitException;
public class Run implements Daemon {
private class Runner extends Thread {
public void run() {
synchronized(this) {
try {
System.out.println(new Date() + " running ...");
wait();
} catch (Exception e) {}
}
}
}
Runner r = new Runner();
@Override
public void init(DaemonContext context) throws DaemonInitException,
Exception {}
@Override
public void start() throws Exception {
System.out.println(new Date() + " Staring...");
r.start();
}
@Override
public void stop() throws Exception {
synchronized(r) {
System.out.println(new Date() + " Stopping ...");
r.notify();
}
}
@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
EXEC=/usr/bin/jsvc
JAVA_HOME=/usr/lib/jvm/default-java
CLASS_PATH="/usr/share/java/commons-daemon.jar":"/home/nervecentreadm/JavaTest/"
CLASS=Run
USER=nervecentreadm
PID=/tmp/example.pid
LOG_OUT=/tmp/example.out
LOG_ERR=/tmp/example.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
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|stop|restart}" >&2
exit 3
;;
esac
Ran the script with
./service start
The error log file in /tmp/example.err contains.
ProblemType: Crash
DistroRelease: Ubuntu 16.04
Package: jsvc 1.0.15-6
ProcVersionSignature: Ubuntu 4.4.0-82.105-generic 4.4.70
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/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
SegvAnalysis:
Segfault happened at: 0x7f0c51ab0a4f <_expand_stack_to(address)+79>: movb
$0x0,(%rax)
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_stack_to(address) (bottom=0x7fff5de07fff "",
bottom@entry=0x7fff5de076b0 "") at
/build/openjdk-8-VTMhfL/openjdk-8-8u131-b11/src/hotspot/src/os/linux/vm/os_linux.cpp:673
os::Linux::manually_expand_stack(JavaThread*, 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
JVM_handle_linux_signal(int, siginfo_t*, void*, int) (sig=sig@entry=11,
info=info@entry=0x7fff5de0c230, ucVoid=ucVoid@entry=0x7fff5de0c100,
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
signalHandler(int, siginfo_t*, void*) (sig=11, info=0x7fff5de0c230,
uc=0x7fff5de0c100) at
/build/openjdk-8-VTMhfL/openjdk-8-8u131-b11/src/hotspot/src/os/linux/vm/os_linux.cpp:4346
<signal handler called> () at /lib/x86_64-linux-gnu/libpthread.so.0
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
** Affects: commons-daemon (Ubuntu)
Importance: Undecided
Status: New
** Tags: amd64 apport-crash xenial
--
jsvc crashed with SIGSEGV in _expand_stack_to()
https://bugs.launchpad.net/bugs/1700010
You received this bug notification because you are a member of Ubuntu Bugs,
which is subscribed to the bug report.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs