Hi all,
we are running the Jabber server Openfire on FreeBSD 6.1 and it
doesn't close its sockets, forcing use to periodically recycle the
java process. Here's some interesting output:
# ps alxHp 51002
UID PID PPID CPU PRI NI VSZ RSS MWCHAN STAT TT TIME COMMAND
314 51002 1 0 20 0 492556 104812 ksesig Ss ?? 10:03.35
/usr/local/jdk1.5.0/bin/java -server -jar -Xmx256M -Dopenfire.lib.dir 314 51002
1 17 4 0 492556 104812 sbwait Ss ?? 10:03.35
/usr/local/jdk1.5.0/bin/java -server -jar -Xmx256M -Dopenfire.lib.dir 314 51002
1 17 4 0 492556 104812 sbwait Ss ?? 10:03.35
/usr/local/jdk1.5.0/bin/java -server -jar -Xmx256M -Dopenfire.lib.dir 314 51002
1 17 4 0 492556 104812 accept Ss ?? 10:03.35
/usr/local/jdk1.5.0/bin/java -server -jar -Xmx256M -Dopenfire.lib.dir 314 51002
1 17 4 0 492556 104812 sbwait Ss ?? 10:03.35
/usr/local/jdk1.5.0/bin/java -server -jar -Xmx256M -Dopenfire.lib.dir 314 51002
1 17 4 0 492556 104812 sbwait Ss ?? 10:03.35
/usr/local/jdk1.5.0/bin/java -server -jar -Xmx256M -Dopenfire.lib.dir 314 51002
1 17 4 0 492556 104812 sbwait Ss ?? 10:03.35
/usr/local/jdk1.5.0/bin/java -server -jar -Xmx256M -Dopenfire.lib.dir 314 51002
1 17 4 0 492556 104812 sbwait Ss ?? 10:03.35
/usr/local/jdk1.5.0/bin/java -server -jar -Xmx256M -Dopenfire.lib.dir 314 51002
1 17 4 0 492556 104812 sbwait Ss ?? 10:03.35
/usr/local/jdk1.5.0/bin/java -server -jar -Xmx256M -Dopenfire.lib.dir 314 51002
1 17 4 0 492556 104812 accept Ss ?? 10:03.35
/usr/local/jdk1.5.0/bin/java -server -jar -Xmx256M -Dopenfire.lib.dir 314 51002
1 17 4 0 492556 104812 sbwait Ss ?? 10:03.35
/usr/local/jdk1.5.0/bin/java -server -jar -Xmx256M -Dopenfire.lib.dir 314 51002
1 17 4 0 492556 104812 sbwait Ss ?? 10:03.35
/usr/local/jdk1.5.0/bin/java -server -jar -Xmx256M -Dopenfire.lib.dir 314 51002
1 17 4 0 492556 104812 sbwait Ss ?? 10:03.35
/usr/local/jdk1.5.0/bin/java -server -jar -Xmx256M -Dopenfire.lib.dir 314 51002
1 17 4 0 492556 104812 sbwait Ss ?? 10:03.35
/usr/local/jdk1.5.0/bin/java -server -jar -Xmx256M -Dopenfire.lib.dir 314 51002
1 17 4 0 492556 104812 sbwait Ss ?? 10:03.35
/usr/local/jdk1.5.0/bin/java -server -jar -Xmx256M -Dopenfire.lib.dir 314 51002
1 17 4 0 492556 104812 sbwait Ss ?? 10:03.35
/usr/local/jdk1.5.0/bin/java -server -jar -Xmx256M -Dopenfire.lib.dir...
# lsof -p 51002 | grep CANT
ljava 51002 openfire 8u IPv4 0t0 TCP no
PCB, CANTSENDMORE, CANTRCVMORE
java 51002 openfire 25u IPv4 0t0 TCP no PCB,
CANTSENDMORE, CANTRCVMORE
java 51002 openfire 27u IPv4 0t0 TCP no PCB,
CANTSENDMORE, CANTRCVMORE
java 51002 openfire 33u IPv4 0t0 TCP no PCB,
CANTSENDMORE, CANTRCVMORE
java 51002 openfire 34u IPv4 0t0 TCP no PCB,
CANTSENDMORE, CANTRCVMORE
java 51002 openfire 38u IPv4 0t0 TCP no PCB,
CANTSENDMORE, CANTRCVMORE
java 51002 openfire 39u IPv4 0t0 TCP no PCB,
CANTSENDMORE, CANTRCVMORE
java 51002 openfire 40u IPv4 0t0 TCP no PCB,
CANTSENDMORE, CANTRCVMORE
java 51002 openfire 43u IPv4 0t0 TCP no PCB,
CANTSENDMORE, CANTRCVMORE
java 51002 openfire 45u IPv4 0t0 TCP no PCB,
CANTSENDMORE, CANTRCVMORE
java 51002 openfire 46u IPv4 0t0 TCP no PCB,
CANTSENDMORE, CANTRCVMORE
java 51002 openfire 47u IPv4 0t0 TCP no PCB,
CANTSENDMORE, CANTRCVMORE
java 51002 openfire 48u IPv4 0t0 TCP no PCB,
CANTSENDMORE, CANTRCVMORE
java 51002 openfire 49u IPv4 0t0 TCP no PCB,
CANTSENDMORE, CANTRCVMORE
...
A ktrace of the process shows *lots* of kse_release() calls, but I'm
not sure what to look for exactly.
What I would try next, is to use libmap for java to use libthr instead
of libpthread(libkse). Can anyone here confirm, are there known
problems with java and libthr under 6.x?
Thanks,
Uli