You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Ivan Popov (JIRA)" <ji...@apache.org> on 2007/06/09 13:11:26 UTC

[jira] Updated: (HARMONY-4066) [jdktools][jdwp] Tests ConsoleInputTests from EUT suite org.eclipse.jdt.debug.tests hang

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

Ivan Popov updated HARMONY-4066:
--------------------------------

    Attachment: TerminateTest.zip

The problem is in implementation of stream readers for process input/output streams. I'm attaching small test to reproduce this issue. In this test class TerminateTest runs second instance of JVM with ConsoleInput class, which reads input stream and echoes text to output stream. TerminateTest sends text "one\ntwo\n" to second VM and redirects its output to console.

Test behaves differently for BEA JDK (%BEA_JDK%) and Harmony JDK (%HY_JDK%);

---------------------------------------------------------------------------------------------
> %BEA_JDK%\bin\java.exe -cp . TerminateTest %BEA_JDK%\bin\java.exe -cp . ConsoleInput
*** Starting process:  ...\jrockit-jdk1.5.0_06-windows-ia32\bin\java.exe -cp . ConsoleInput
*** Process started
*** Streams obtained
*** Output streams redirected
*** Buffered input stream created
*** Sending input text: one
two

*** Input text sent
STDOUT: one
two

*** Close input buffered stream
*** Input buffered stream closed
*** Destroy process
STDOUT: EOF
*** Process destroyed
STDERR: <close>
STDOUT: <close>
---------------------------------------------------------------------------------------------

---------------------------------------------------------------------------------------------
> %BEA_JDK%\bin\java.exe -cp . TerminateTest %HY_JDK%\bin\java.exe -cp . ConsoleInput
*** Starting process:  ...\hdk\jdk\bin\java.exe -cp . ConsoleInput
*** Process started
*** Streams obtained
*** Output streams redirected
*** Buffered input stream created
STDERR: The GC did not provide gc_add_weak_root_set_entry()

*** Sending input text: one
two

*** Input text sent
*** Close input buffered stream
*** Input buffered stream closed
*** Destroy process
*** Process destroyed
<<<VM hangs here because child VM did not exit>>>
^C
<<<orphan child VM process remains in memory wasting CPU time>>>
---------------------------------------------------------------------------------------------

---------------------------------------------------------------------------------------------
> %HY_JDK%\bin\java.exe -cp . TerminateTest %HY_JDK%\bin\java.exe -cp . ConsoleInput
*** Starting process:  ...\hdk\jdk\bin\java.exe -cp . ConsoleInput
*** Process started
*** Streams obtained
*** Output streams redirected
*** Buffered input stream created
STDERR: The GC did not provide gc_add_weak_root_set_entry()

*** Sending input text: one
two

<<<all VMs hangs here>>>
^C
<<<all VM processes are terminated>>>
---------------------------------------------------------------------------------------------


> [jdktools][jdwp] Tests ConsoleInputTests from EUT suite org.eclipse.jdt.debug.tests hang
> ----------------------------------------------------------------------------------------
>
>                 Key: HARMONY-4066
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4066
>             Project: Harmony
>          Issue Type: Bug
>          Components: JDK
>         Environment: Windows 2003/XP ia32
>            Reporter: Nina Rinskaya
>         Attachments: TerminateTest.zip
>
>
> VM launched by org.eclipse.jdt.debug.tests.core.ConsoleInputTests.testEOF from EUT suite org.eclipse.jdt.debug.tests hangs, this happens when executing the line "proxy2.closeInputStream();". The stacktraces below are received by attaching to the hanging processes.
> To reproduce: please see http://wiki.apache.org/harmony/Eclipse_Unit_Tests_Pass_on_DRLVM#How_to_run_EUT for reproducing instructions. ${plugin-name} is org.eclipse.jdt.debug.tests, ${test-classname} and ${launching-test-classname} are org.eclipse.jdt.debug.tests.AutomatedSuite. "Running the Test Suite from Eclipse SDK" (see (4) at http://wiki.apache.org/harmony/Eclipse_Unit_Tests_Pass_on_DRLVM#How_to_run_EUT_individual) would be most helpful for debugging.
> ====================================
> Stacktarces: 
> stack 1 (differs for each debugging session):
> >	vmi.dll!GetPortLibrary(const VMInterfaceFunctions_ * * vmi=0x02099040)  Line 100	C++
>  	hyluni.dll!Java_org_apache_harmony_luni_platform_OSFileSystem_ttyAvailableImpl(const JNINativeInterface_ * * env=0x0132cdb0, _jobject * 
> thiz=0x0013f534)  Line 255 + 0x18	C
>  	034e72cd()	
>  	harmonyvm.dll!get_vm_thread(HyThread * thr=0x0013f560)  Line 190 + 0xb	C++
>  	harmonyvm.dll!get_vm_thread(HyThread * thr=0x00000000)  Line 191 + 0x7	C++
> stack 2:
>  	ntdll.dll!7c90eb94() 	
>  	ntdll.dll!7c90e9c0() 	
>  	kernel32.dll!7c8025cb() 	
>  	gc_gen.dll!vtable_get_gcvt(Partial_Reveal_VTable * vt=0x01f4ffa4)  Line 204 + 0x7	C++
>  	kernel32.dll!7c8308cf() 	
>  	kernel32.dll!7c802532() 	
>  	hythr.dll!os_cond_timedwait(HyCond * cond=0x00392cc0, _RTL_CRITICAL_SECTION * mutex=0x00392ce4, __int64 ms=0, int nano=0)  Line 89 + 0x10	C
>  	hythr.dll!condvar_wait_impl(HyCond * cond=0x00392cc0, _RTL_CRITICAL_SECTION * mutex=0x00392ce4, __int64 ms=0, int nano=0, int interruptable=0)  Line 
> 55 + 0x19	C
>  	hythr.dll!sem_wait_impl(HySemaphore * sem=0x00392cb8, __int64 ms=0, int nano=0, int interruptable=0)  Line 70 + 0x23	C
>  	hythr.dll!hysem_wait(HySemaphore * sem=0x00392cb8)  Line 107 + 0x11	C
>  	gc_gen.dll!vm_wait_event(HySemaphore * event=0x00392cb8)  Line 68 + 0x14	C++
>  	gc_gen.dll!collector_wait_for_task(Collector * collector=0x01c457c8)  Line 123 + 0xc	C++
>  	gc_gen.dll!collector_thread_func(void * arg=0x01c457c8)  Line 172 + 0x9	C++
>  	hythr.dll!thread_start_proc(void * arg=0x0039b420)  Line 711 + 0x9	C
> >	hythr.dll!_threadstartex(void * ptd=0x0039b8c0)  Line 241 + 0xd	C
>  	kernel32.dll!7c80b683() 	
> stack 3:
>  	ntdll.dll!7c90eb94() 	
>  	ntdll.dll!7c90e9c0() 	
>  	kernel32.dll!7c8025cb() 	
>  	gc_gen.dll!finref_metadata_add_entry(GC * gc=0x0204ffa4, Vector_Block * & vector_block_in_use=0x83ec8b55, Sync_Stack * pool=0x7c8025f8, unsigned int 
> value=0)  Line 277 + 0xa	C++
>  	kernel32.dll!7c8308cf() 	
>  	kernel32.dll!7c802532() 	
>  	hythr.dll!os_cond_timedwait(HyCond * cond=0x0039b520, _RTL_CRITICAL_SECTION * mutex=0x0039b544, __int64 ms=0, int nano=0)  Line 89 + 0x10	C
>  	hythr.dll!condvar_wait_impl(HyCond * cond=0x0039b520, _RTL_CRITICAL_SECTION * mutex=0x0039b544, __int64 ms=0, int nano=0, int interruptable=0)  Line 
> 55 + 0x19	C
>  	hythr.dll!sem_wait_impl(HySemaphore * sem=0x0039b518, __int64 ms=0, int nano=0, int interruptable=0)  Line 70 + 0x23	C
>  	hythr.dll!hysem_wait(HySemaphore * sem=0x0039b518)  Line 107 + 0x11	C
>  	gc_gen.dll!vm_wait_event(HySemaphore * event=0x0039b518)  Line 68 + 0x14	C++
>  	gc_gen.dll!collector_wait_for_task(Collector * collector=0x01c45850)  Line 123 + 0xc	C++
>  	gc_gen.dll!collector_thread_func(void * arg=0x01c45850)  Line 172 + 0x9	C++
>  	hythr.dll!thread_start_proc(void * arg=0x0039b7c8)  Line 711 + 0x9	C
> >	hythr.dll!_threadstartex(void * ptd=0x0039b978)  Line 241 + 0xd	C
>  	kernel32.dll!7c80b683() 	
> stack 4:
>  	ntdll.dll!7c90eb94() 	
>  	ntdll.dll!7c90e9c0() 	
>  	kernel32.dll!7c8025cb() 	
>  	hythr.dll!hysem_wait(HySemaphore * sem=0x032dffa4)  Line 107 + 0x11	C
>  	kernel32.dll!7c8308cf() 	
>  	kernel32.dll!7c802532() 	
>  	hythr.dll!os_cond_timedwait(HyCond * cond=0x0039ba38, _RTL_CRITICAL_SECTION * mutex=0x0039ba5c, __int64 ms=0, int nano=0)  Line 89 + 0x10	C
>  	hythr.dll!condvar_wait_impl(HyCond * cond=0x0039ba38, _RTL_CRITICAL_SECTION * mutex=0x0039ba5c, __int64 ms=0, int nano=0, int interruptable=0)  Line 
> 55 + 0x19	C
>  	hythr.dll!sem_wait_impl(HySemaphore * sem=0x0039ba30, __int64 ms=0, int nano=0, int interruptable=0)  Line 70 + 0x23	C
>  	hythr.dll!hysem_wait(HySemaphore * sem=0x0039ba30)  Line 107 + 0x11	C
>  	harmonyvm.dll!wait_pending_finalizer()  Line 207 + 0xd	C++
>  	harmonyvm.dll!finalizer_thread_func(void * * args=0x02981fc8)  Line 240	C++
>  	hythr.dll!thread_start_proc(void * arg=0x0039bc70)  Line 711 + 0x9	C
> >	hythr.dll!_threadstartex(void * ptd=0x0039bd68)  Line 241 + 0xd	C
>  	kernel32.dll!7c80b683() 	
> stack 5:
>  	ntdll.dll!7c90eb94() 	
>  	ntdll.dll!7c90e9c0() 	
>  	kernel32.dll!7c8025cb() 	
>  	kernel32.dll!7c8308cf() 	
>  	kernel32.dll!7c802532() 	
>  	hythr.dll!os_cond_timedwait(HyCond * cond=0x0039ba38, _RTL_CRITICAL_SECTION * mutex=0x0039ba5c, __int64 ms=0, int nano=0)  Line 89 + 0x10	C
>  	hythr.dll!condvar_wait_impl(HyCond * cond=0x0039ba38, _RTL_CRITICAL_SECTION * mutex=0x0039ba5c, __int64 ms=0, int nano=0, int interruptable=0)  Line 
> 55 + 0x19	C
>  	hythr.dll!sem_wait_impl(HySemaphore * sem=0x0039ba30, __int64 ms=0, int nano=0, int interruptable=0)  Line 70 + 0x23	C
>  	hythr.dll!hysem_wait(HySemaphore * sem=0x0039ba30)  Line 107 + 0x11	C
>  	harmonyvm.dll!wait_pending_finalizer()  Line 207 + 0xd	C++
>  	harmonyvm.dll!finalizer_thread_func(void * * args=0x0297c0d0)  Line 240	C++
>  	hythr.dll!thread_start_proc(void * arg=0x0039bf00)  Line 711 + 0x9	C
> >	hythr.dll!_threadstartex(void * ptd=0x004260f8)  Line 241 + 0xd	C
>  	kernel32.dll!7c80b683() 	
> stack 6:
>  	ntdll.dll!7c90eb94() 	
>  	ntdll.dll!7c90e9c0() 	
>  	kernel32.dll!7c8025cb() 	
>  	harmonyvm.dll!References_To_Enqueue::enqueue_references()  Line 599 + 0xf	C++
>  	harmonyvm.dll!wait_pending_reference()  Line 126 + 0xd	C++
>  	harmonyvm.dll!ref_enqueue_thread_func(void * * args=0x0297c2a0)  Line 152	C++
>  	hythr.dll!thread_start_proc(void * arg=0x0039bfe0)  Line 711 + 0x9	C
> >	hythr.dll!_threadstartex(void * ptd=0x004263c8)  Line 241 + 0xd	C
>  	kernel32.dll!7c80b683() 	

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