--- Begin Message ---
Hi Uday,
Could you provide me the backtrace that is located in the java crash
log file ? I'm interested to know exactly where in libssh the broken
memset happen. Just cut anything you find not relevant and/or confidential.
Please also call the global function once before launching the libssh
threads :
int ssh_init(void);
This function initializes all the global structures in libssh,
otherwise it's called right under ssh_connect, causing known reentrancy
problems.
Next version of libssh will be linked with threading and mutexes libs,
but meanwhile the best solution is to call ssh_init() at the begin of
your program.
There is no other known reentrancy bugs.
I'm looking forward your logfile.
Regards,
Aris
Uday Tennety a écrit :
Hello,
In our development environment, we noticed that some error in libssh
library resulted in crashing our application server. We saw this issue a
few times. Our scenario is:
We are using libssh 0.3.4 and noticed the crash when our libssh client
was trying to connect to multiple ssh servers running on various network
elements. Before we dive deep into the code, I wanted to find out if
there is a known threading issue in 0.3.4 with a libssh client trying to
connect to multiple ssh servers? Also, it would really help if someone
can point me in the right direction looking at the error. I really
appreciate your time and help.
Thanks,
Uday.
Sample Error:
-------------
[func] leaving function ssh_disconnect line 690 in
/home/public/temp/libssh-0.3.4/libssh/client.c
[func] entering function ssh_cleanup line 91 in
/home/public/temp/libssh-0.3.4/libssh/session.c
[func] entering function channel_free line 724 in
/home/public/temp/libssh-0.3.4/libssh/channels.c
[func] leaving function channel_free line 755 in
/home/public/temp/libssh-0.3.4/libssh/channels.c
Current time:Fri Jan 15 16:10:29 PST 2010
Remote host is 10.2.32.95 and remote port is 22[func] entering function
ssh_connect line 489 in /home/public/temp/libssh-0.3.4/libssh/client.c
[func] entering function ssh_connect_host line 184 in
/home/public/temp/libssh-0.3.4/libssh/connect.c
[func] leaving function ssh_connect_host line 249 in
/home/public/temp/libssh-0.3.4/libssh/connect.c
[func] leaving function ssh_connect_host line 258 in
/home/public/temp/libssh-0.3.4/libssh/connect.c
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0xff351040, pid=5438, tid=149
#
# JRE version: 6.0_16-b01
# Java VM: Java HotSpot(TM) Server VM (14.2-b01 mixed mode solaris-sparc )
# Problematic frame:
# C [libc_psr.so.1+0x1040] memset+0x140
#
# An error report file with more information is saved as:
# /home/IEM/Repository/hs_err_pid5438.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
--- End Message ---