harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oliver Deakin (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (HARMONY-6275) [jdwp][java6] Crash during shutdown on Linux
Date Wed, 22 Jul 2009 14:55:15 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-6275?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Oliver Deakin resolved HARMONY-6275.
------------------------------------

       Resolution: Fixed
    Fix Version/s: 5.0M11
         Assignee: Oliver Deakin

Fixed at repo revision r796755.

TCPIPSocketTran_Accept() in SocketTransport.cpp has a do-while loop with a possible exit condition
of envServerSocket being NULL. However, we do not check this exit condition after the do-while
loop and then pass envServerSocket into SetSocketBlockingMode(), which was causing the crash.
Adding a NULL check and returning an error if true fixes the problem.

> [jdwp][java6] Crash during shutdown on Linux
> --------------------------------------------
>
>                 Key: HARMONY-6275
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6275
>             Project: Harmony
>          Issue Type: Bug
>          Components: JDK
>            Reporter: Oliver Deakin
>            Assignee: Oliver Deakin
>             Fix For: 5.0M11
>
>
> Executing a command such as "java -Xrunjdwp:transport=dt_socket,server=y,suspend=n HelloWorld"
results in a crash during shutdown:
> Listening for transport dt_socket at address: 59572
> HelloWorld
> Signal reported: GENERAL_PROTECTION_FAULT
> Registers:
>     EAX: 0x00000000, EBX: 0xb7f3011c, ECX: 0xb7f1632c, EDX: 0x00000000
>     ESI: 0x00000000, EDI: 0x0860c9f0, ESP: 0x95cc4f40, EBP: 0x95cc4f68
>     EIP: 0xb7f266bc
> Command line:
> target/hdk/jdk/jre/bin/java -Xrunjdwp:transport=dt_socket,server=y,suspend=n HelloWorld
> Working directory:
> /home/odeakin/svn-checkouts/fed6
> Environment variables:
> TERM=xterm
> SHELL=/bin/bash
> SSH_CLIENT=9.20.183.162 4743 22
> CVSROOT=:pserver:odeakin@clear.hursley.ibm.com:/home/cvs/clear
> SSH_TTY=/dev/pts/1
> USER=odeakin
> LS_COLORS=no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.svgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:
> MAIL=/var/mail/odeakin
> PATH=/home/odeakin/apache-ant-1.6.5/bin:/usr/lib/ccache:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/opt/j950/bin
> PWD=/home/odeakin/svn-checkouts/fed6
> JAVA_HOME=/opt/j950
> EDITOR=vi
> LANG=C
> SHLVL=1
> HOME=/home/odeakin
> LANGUAGE=en_GB:en_US:en_GB:en
> LOGNAME=odeakin
> SSH_CONNECTION=9.20.183.162 4743 9.20.181.102 22
> DISPLAY=:0
> _=target/hdk/jdk/jre/bin/java
> OLDPWD=/home/odeakin/svn-checkouts/fed6/working_classlib
> LD_LIBRARY_PATH=/home/odeakin/svn-checkouts/fed6/target/hdk/jdk/jre/bin/default:/home/odeakin/svn-checkouts/fed6/target/hdk/jdk/jre/bin/:
> Loaded modules:
> /home/odeakin/svn-checkouts/fed6/target/hdk/jdk/jre/bin/java:
>         0x08048000:0x0804d000
>         0x0804d000:0x0804e000
> [heap]:
>         0x0804e000:0x0862b000
> /home/odeakin/svn-checkouts/fed6/target/hdk/jdk/jre/bin/libdt_socket.so:
>         0x95d46000:0x95d4a000
>         0x95d4a000:0x95d4b000
> /home/odeakin/svn-checkouts/fed6/target/hdk/jdk/jre/bin/libhyniochar.so:
>         0x9600d000:0x96161000
>         0x96161000:0x96189000
> /home/odeakin/svn-checkouts/fed6/target/hdk/jdk/jre/bin/libhyarchive.so:
>         0x96189000:0x96195000
>         0x96195000:0x96196000
> /home/odeakin/svn-checkouts/fed6/target/hdk/jdk/jre/bin/libhyluni.so:
>         0x96196000:0x961cb000
>         0x961cb000:0x961cc000
> /home/odeakin/svn-checkouts/fed6/target/hdk/jdk/jre/bin/libhyzlib.so:
>         0x961cc000:0x961de000
>         0x961de000:0x961df000
> /home/odeakin/svn-checkouts/fed6/target/hdk/jdk/jre/bin/libjdwp.so:
>         0x962df000:0x96336000
>         0x96336000:0x96338000
> /home/odeakin/svn-checkouts/fed6/target/hdk/jdk/jre/bin/default/libgc_gen_uncomp.so:
>         0xb6642000:0xb668d000
>         0xb668d000:0xb668f000
> /home/odeakin/svn-checkouts/fed6/target/hdk/jdk/jre/bin/default/libjitrino.so:
>         0xb6690000:0xb68d5000
>         0xb68d5000:0xb68e2000
> /home/odeakin/svn-checkouts/fed6/target/hdk/jdk/jre/bin/default/libem.so:
>         0xb6945000:0xb696d000
>         0xb696d000:0xb696e000
> /lib/libnss_files-2.7.so:
>         0xb69ee000:0xb69f7000
>         0xb69f7000:0xb69f9000
> /lib/libnss_nis-2.7.so:
>         0xb69f9000:0xb6a01000
>         0xb6a01000:0xb6a03000
> /lib/libnsl-2.7.so:
>         0xb6a03000:0xb6a16000
>         0xb6a16000:0xb6a18000
> /lib/libnss_compat-2.7.so:
>         0xb6a1a000:0xb6a21000
>         0xb6a21000:0xb6a23000
> /home/odeakin/svn-checkouts/fed6/target/hdk/jdk/jre/bin/libhynio.so:
>         0xb6a26000:0xb6a28000
>         0xb6a28000:0xb6a29000
> /home/odeakin/svn-checkouts/fed6/target/hdk/jdk/jre/bin/default/libicudata.so.34:
>         0xb6b4d000:0xb73c1000
>         0xb73c1000:0xb73c2000
> /usr/lib/libxml2.so.2.6.32:
>         0xb73c2000:0xb74f5000
>         0xb74f5000:0xb74fa000
> /usr/lib/libz.so.1.2.3.3:
>         0xb74fb000:0xb750f000
>         0xb750f000:0xb7510000
> /home/odeakin/svn-checkouts/fed6/target/hdk/jdk/jre/bin/default/libicuuc.so.34:
>         0xb7510000:0xb7611000
>         0xb7611000:0xb7619000
> /home/odeakin/svn-checkouts/fed6/target/hdk/jdk/jre/bin/default/libharmonyvm.so:
>         0xb7619000:0xb7757000
>         0xb7757000:0xb77b7000
> /home/odeakin/svn-checkouts/fed6/target/hdk/jdk/jre/bin/default/libch.so:
>         0xb79ed000:0xb79f9000
>         0xb79f9000:0xb7a57000
> /lib/libgcc_s.so.1:
>         0xb7c8d000:0xb7c99000
>         0xb7c99000:0xb7c9a000
> /lib/libpthread-2.7.so:
>         0xb7c9b000:0xb7caf000
>         0xb7caf000:0xb7cb1000
> /lib/librt-2.7.so:
>         0xb7cb3000:0xb7cba000
>         0xb7cba000:0xb7cbc000
> /usr/lib/libstdc++.so.6.0.10:
>         0xb7cbc000:0xb7d9f000
>         0xb7d9f000:0xb7da2000
>         0xb7da2000:0xb7da4000
> /lib/libdl-2.7.so:
>         0xb7daa000:0xb7dac000
>         0xb7dac000:0xb7dae000
> /lib/libm-2.7.so:
>         0xb7dae000:0xb7dd2000
>         0xb7dd2000:0xb7dd4000
> /lib/libc-2.7.so:
>         0xb7dd4000:0xb7f0c000
>         0xb7f0c000:0xb7f0d000
>         0xb7f0d000:0xb7f0f000
> /home/odeakin/svn-checkouts/fed6/target/hdk/jdk/jre/bin/default/libvmi.so:
>         0xb7f12000:0xb7f16000
>         0xb7f16000:0xb7f17000
> /home/odeakin/svn-checkouts/fed6/target/hdk/jdk/jre/bin/libhyprt.so:
>         0xb7f18000:0xb7f30000
>         0xb7f30000:0xb7f34000
> /home/odeakin/svn-checkouts/fed6/target/hdk/jdk/jre/bin/libhythr.so:
>         0xb7f35000:0xb7f50000
>         0xb7f50000:0xb7f51000
> /lib/ld-2.7.so:
>         0xb7f83000:0xb7f9d000
>         0xb7f9d000:0xb7f9f000
> [stack]:
>         0xbfa9c000:0xbfa9f000
> [vdso]:
>         0xffffe000:0xfffff000
> Stack trace:
>   0: 0xb7f266bc  hysock_set_nonblocking (hysock.c:2723)
>   1: 0x95d470fb  SetSocketBlockingMode(_jdwpTransportEnv*, hysocket_struct*, bool) (SocketTransport.cpp:-1)
>   2: 0x95d479f5  TCPIPSocketTran_Accept(_jdwpTransportEnv*, long long, long long) (SocketTransport.cpp:-1)
>   3: 0x963287b0  jdwp::TransportManager::Connect() (TransportManager_pd.cpp:-1)
>   4: 0x9630f7ee  jdwp::PacketDispatcher::Run(JNIEnv_External*) (TransportManager_pd.cpp:-1)
>   5: 0x963110a6  jdwp::PacketDispatcher::StartFunction(jvmtiEnv_struct*, JNIEnv_External*,
void*) (TransportManager_pd.cpp:-1)
>   6: 0xb7704846  jthread_wrapper_start_proc(void*) (thread_java_basic.cpp:167)
>   7: 0xb7f414b8  thread_start_func (thread_os.c:106)
>   8: 0xb7ca0f3b  start_thread (??:-1)
>   9: 0xb7e9ebee  __clone (??:-1)
> <end of stack trace>
> Crashed module:
> /home/odeakin/svn-checkouts/fed6/target/hdk/jdk/jre/bin/libhyprt.so
> (JNI native library)
> VM attached threads:
> --->[0x95cc5b90]  '_jdwp_PacketDispatcher'
>     [0x95d45b90]  '_jdwp_EventDispatcher'
>     [0xb7c8c8e0]  'destroy'
> Segmentation fault
> A bit of debugging shows that we're getting into the hysock calls with a null pointer
for the socket struct, which probably means that it's been freed as part of the JDWP shutdown
phase before we've finished using it.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message