Short version
Why does Java consume far more CPU time when launched via start-stop-daemon than when launched directly from the terminal?
OS: Debian Squeeze x86
Java version: Sun Java SE 1.6.0_24
Long version
When Java is launched from the terminal using the following invocation, top reports that the CPU usage of the process hovers around 5%:
java -server -Xincgc -Xmx512M -jar craftbukkit-0.0.1-SNAPSHOT.jar nogui
Whereas running it via start-stop-daemon with the following (seemingly identical) invocation causes the CPU usage to spike to 100%:
start-stop-daemon --oknodo --start --background --make-pidfile --pidfile=/var/run/minecraft.pid --chdir /opt/minecraft --chuid minecraft --exec /usr/bin/java -- -server -Xincgc -Xmx512M -jar craftbukkit-0.0.1-SNAPSHOT.jar nogui
What am I doing wrong? What's causing this discrepancy, and how can I fix it?
Update - strace output
strace -p $(pidof java) outputs the following, regardless of whether the process was launched directly or via start-stop-daemon:
futex(0xb6a5fbd8, FUTEX_WAIT, 3158, NULL
The daemon is still running correctly, it's not a hard lock.