Pham Ngoc Hai personal web site

Syndicate

Softwares
Java and Program terminated with signal 11, Segmentation fault.
 
Written by Pham Ngoc Hai, on 21-10-2011 07:52

Recently we have encoutered several jvm crashes on our test server which is on Amazon cloud. This server is running on CentOS 5.5 x86_64 with Oracle JRE 1.6.0_22. We have Fusesource ServiceMix 4.2.0-fuse-02-00, PostgreSQL 8.4 on this server. This system has been running for more than a year without any problem but last week, ServiceMix just crashed a few times a day without showing anything in the log. I tried to upgrade to Oracle JDK 1.6.0_27 but the problem persisted. I found out that the ulimit for "core file size" for the user that we use to run servicemix is 0

core file size          (blocks, -c) 0

data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 122944
max locked memory       (kbytes, -l) 32
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 10240
cpu time               (seconds, -t) unlimited
max user processes              (-u) 122944
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

 

I changed that to unlimited

 

ulimit -c unlimited

 

and core dump files were produced whenever ServiceMix (or JVM actually) crashes.

I have two core dump files, one from JRE 1.6.0_22 the other from JDK 1.6.0_27.

With the help of gdb, I was able to find the problem:

gdb /usr/java/jre1.6.0_22/bin/java /usr/local/apache-servicemix-4.2.0-fuse-02-00/core.3595
GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-37.el5_7.1)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/java/jre1.6.0_22/bin/java...(no debugging symbols found)...done.
[New Thread 4249]
[New Thread 13326]
[New Thread 13302]
....

[New Thread 3595]
Reading symbols from /lib64/libpthread.so.0...(no debugging symbols found)...done.
[Thread debugging using libthread_db enabled]
Loaded symbols for /lib64/libpthread.so.0
Reading symbols from /usr/java/jdk1.6.0_27/bin/../jre/lib/amd64/jli/libjli.so...(no debugging symbols found)...done.
Loaded symbols for /usr/java/jdk1.6.0_27/bin/../jre/lib/amd64/jli/libjli.so
Reading symbols from /lib64/libdl.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib64/libdl.so.2
Reading symbols from /lib64/libc.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib64/libc.so.6
Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Reading symbols from /usr/java/jdk1.6.0_27/jre/lib/amd64/server/libjvm.so...(no debugging symbols found)...done.
Loaded symbols for /usr/java/jdk1.6.0_27/jre/lib/amd64/server/libjvm.so
Reading symbols from /lib64/libm.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib64/libm.so.6
Reading symbols from /lib64/librt.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib64/librt.so.1
Reading symbols from /usr/java/jdk1.6.0_27/jre/lib/amd64/libverify.so...(no debugging symbols found)...done.
Loaded symbols for /usr/java/jdk1.6.0_27/jre/lib/amd64/libverify.so
Reading symbols from /usr/java/jdk1.6.0_27/jre/lib/amd64/libjava.so...(no debugging symbols found)...done.
Loaded symbols for /usr/java/jdk1.6.0_27/jre/lib/amd64/libjava.so
Reading symbols from /lib64/libnsl.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib64/libnsl.so.1
Reading symbols from /lib64/libnss_files.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib64/libnss_files.so.2
Reading symbols from /usr/java/jdk1.6.0_27/jre/lib/amd64/libzip.so...(no debugging symbols found)...done.
Loaded symbols for /usr/java/jdk1.6.0_27/jre/lib/amd64/libzip.so
Reading symbols from /usr/java/jdk1.6.0_27/jre/lib/amd64/libnet.so...(no debugging symbols found)...done.
Loaded symbols for /usr/java/jdk1.6.0_27/jre/lib/amd64/libnet.so
Reading symbols from /usr/java/jdk1.6.0_27/jre/lib/amd64/libmanagement.so...(no debugging symbols found)...done.
Loaded symbols for /usr/java/jdk1.6.0_27/jre/lib/amd64/libmanagement.so
Reading symbols from /lib64/libnss_dns.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib64/libnss_dns.so.2
Reading symbols from /lib64/libresolv.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib64/libresolv.so.2
Reading symbols from /usr/java/jdk1.6.0_27/jre/lib/amd64/libnio.so...(no debugging symbols found)...done.
Loaded symbols for /usr/java/jdk1.6.0_27/jre/lib/amd64/libnio.so
Reading symbols from /usr/java/jdk1.6.0_27/jre/lib/amd64/librmi.so...(no debugging symbols found)...done.
Loaded symbols for /usr/java/jdk1.6.0_27/jre/lib/amd64/librmi.so
Core was generated by `/usr/java/latest/bin/java -server -Xms1024M -Xmx4096M -XX:MaxPermSize=256m -XX:'.
Program terminated with signal 11, Segmentation fault.
#0  0x00002aaaaf640360 in Java_java_net_SocketInputStream_socketRead0 () from /usr/java/jdk1.6.0_27/jre/lib/amd64/libnet.so

 

The other core dumpl file also showed me that the JVM crashed at .../amd64/libnet.so

Google brought me to JVM bug 7059899

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7059899

Follow the workaround mentioned there, I change the DEFAULT_JAVA_OPTS in [SMX_HOME]/bin/servicemix to:

DEFAULT_JAVA_OPTS="-Xms$JAVA_MIN_MEM -Xmx$JAVA_MAX_MEM -XX:MaxPermSize=256m -XX:PermSize=256m -XX:StackShadowPages=20"

After restarting, my ServiceMix has been running fine since.

Last update: 21-10-2011 07:58

Published in : Computer stuff, Softwares
User comments Quote this article in website Favoured Print Send to friend Save this to del.icio.us Related articles Read more...

ALSA, IEC958 S/PDIF to Z5500
 
Written by Pham Ngoc Hai, on 08-02-2008 09:18

After trying the builtin ALSA driver with kernel 2.6.24-rc4 and alsa-utils-1.0.14 from portage with no success to get the S/PDIF output from my  Intel Corporation 82801G sound card, I was about to give up, then I thought may be the lastest ALSA driver would do. I grabbed alsa-driver-1.0.16-rc2, compiled, installed... then again no S/PDIF output. I thought may be I'd wait for a few months but I would give a last shot, I downloaded the snapshot alsa-driver-hg20080207.tar.bz2, compiled, installed, by the way, I unmask alsa-utils and upgraded it as well.

I did a speaker-test and voila my Logitech Z5500 was able to detect the optical input signal. Now I can bypass the crappy DAC of the sound card on my Fujitsu Amilo Si1520.

You'll need to disable ALSA and OSS in the kernel, but you must let Kernel sound support on.

To config alsa driver:

./configure --with-cards=hda-intel --with-card-options=hda-codec-conexant

And then make, make install as the INSTALL doc says.

To test S/PDIF

speaker-test -Diec958 -c2

If things go well, you might be able to see the blinking red light in the S/PDIF output from the sound card. 

You need alsa-utils to do speaker-test.

 

My sound card is: 

Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)

Which is intel-hda in ALSA

 

Speakers:

Ligitech Z5500

 

Cable:

Toslink to 3.5 mini (Optical)

 

Last update: 08-02-2008 09:22

Published in : Computer stuff, Softwares
Keywords : ALSA, IEC958 S/PDIF to Z5500
User comments Quote this article in website Favoured Print Send to friend Save this to del.icio.us Related articles Read more...

Bug in blogSidebar2.4 Joomla component
 
Written by Pham Ngoc Hai, on 28-11-2007 06:59

I found a bug in blogSidebar 2.4 component.
When the admin changes the values in the component setting,
those settings are not saved.
Empty values go in to the config file, this makes the side
bar module not find the correct setting so it displays
nothing when users click on the date in the calendar.
A simple fix is to put those lines:
$columns = mosGetParam($_REQUEST, 'columns');
$intro = mosGetParam($_REQUEST, 'intro');
$leading = mosGetParam($_REQUEST, 'leading');
$links = mosGetParam($_REQUEST, 'links');


above the line:
saveConfig ($option, $columns, $intro, $leading, $links);

in /administrator/components/com_blogsidebar/admin.blogsidebar.php

Last update: 15-03-2008 09:12

Published in : Computer stuff, Softwares
Keywords : blogSidebar 2.4 joomla component bug
User comments Quote this article in website Favoured Print Send to friend Save this to del.icio.us Related articles Read more...



Search

Calendar

 Jan   February 2012   Mar

SMTWTFS
   1  2  3  4
  5  6  7  8  91011
12131415161718
19202122232425
26272829 
VC Funding Resources

Random Photos






Donate

Enter Amount:

Sponsored Links

Copyright © 2007 Joomla Templates By Joomladesigns.  Modified By Pham Ngoc Hai