United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 6564074 Some tests fails on windows x64
6564074 : Some tests fails on windows x64

Details
Type:
Bug
Submit Date:
2007-05-31
Status:
Resolved
Updated Date:
2011-01-19
Project Name:
JDK
Resolved Date:
2008-07-28
Component:
client-libs
OS:
windows_2003,windows_xp,windows
Sub-Component:
javax.sound
CPU:
x86
Priority:
P1
Resolution:
Fixed
Affected Versions:
1.4.2,1.4.2_12,1.4.2_17,1.4.2_18
Fixed Versions:
1.4.2_18-rev

Related Reports
Backport:
Duplicate:
Duplicate:

Sub Tasks

Description
JDK              : jvm64 - JDK1.4.2_11,JDK1.4.2_14,JDK1.4.2_15
Platforms[s]     : Windows x64
testbase         : /net/vice.russia/export/home0/dtf/dtf_ws/suites/142_Suites/142_Sound/sound_mantis/sound_tonga
Falling tests    : 

sound/test029 compile_and_execute test005
sound/test029 compile_and_execute test029
sound/test039 compile_and_execute test039
sound/test041 compile_and_execute test041
sound/test042 compile_and_execute test042
sound/test043 compile_and_execute test043
sound/test060 compile_and_execute test060
sound/test073 compile_and_execute test073
sound/test076 compile_and_execute test076
sound/test077 compile_and_execute test077
sound/test078 compile_and_execute test078
sound/test079 compile_and_execute test079
sound/test080 compile_and_execute test080
sound/test094 compile_and_execute test094
sound/test095 compile_and_execute test095

Error messages:
===============
#cat test095.out

theMaxPolyphony: 32
Supported MIDI File Type: 1
Just opened sequencer. Make sure it gets closed!
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000077d6f1af, pid=2288, tid=2796
#
# Java VM: Java HotSpot(TM) 64-Bit Server VM (1.4.2_15-b02 mixed mode)
# Problematic frame:
# C  [kernel32.dll+0x2f1af]
#
# An error report file with more information is saved as hs_err_pid2288.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#

See steps to reproduce and results location in comments.
Affected JCK tests:
api/javax_sound/midi/ControllerEventListener/index.html#Listener : Listener - ControllerEventListener tests
api/javax_sound/midi/Instrument/index.html#getCtor : Constructor ang get methods tests.
api/javax_sound/midi/MetaEventListener/index.html#Listener : Listener - MetaEventListener tests
api/javax_sound/midi/MidiChannel/index.html#MidiChannel : MidiChannel tests
api/javax_sound/midi/MidiChannel/index.html#Mono : Get and set tests
api/javax_sound/midi/MidiChannel/index.html#MuteOmni : Get and set tests
api/javax_sound/midi/MidiChannel/index.html#PitchBend : Get and set tests
api/javax_sound/midi/MidiChannel/index.html#Solo : Get and set tests
api/javax_sound/midi/MidiChannel/index.html#control : Controller tests
api/javax_sound/midi/MidiDevice/index.html#get : Checking getDeviceInfo, getMicrosecondPosition methods.
api/javax_sound/midi/MidiDevice/index.html#openClose : Checking open(), close(), isOpen() methods.
api/javax_sound/midi/Receiver/index.html#Receiver : Receiver tests
api/javax_sound/midi/Sequencer/index.html#MuteSolo : Sequencer get/setMute, get/setSolo method tests
api/javax_sound/midi/Sequencer/index.html#Play : Checking start, stop, isRunning methods.
api/javax_sound/midi/Sequencer/index.html#Record : Checking startRecording, stop, isRecording, stopRecording methods.
api/javax_sound/midi/Sequencer/index.html#Sequencer : MidiSystem Sequencer tests
api/javax_sound/midi/Sequencer/index.html#Sync : Checking get/setMasterSyncMode, methods.
api/javax_sound/midi/Sequencer/index.html#Tempo : Sequencer get/setTempo method tests
api/javax_sound/midi/Soundbank/index.html#Instrument : Checking getInstrument, getInstruments methods.
api/javax_sound/midi/Soundbank/index.html#Resource : Checking getInstrument, getInstruments methods.
api/javax_sound/midi/Soundbank/index.html#Soundbank : Soundbank tests
api/javax_sound/midi/Soundbank/index.html#get : Checking getInstrument, getInstruments methods.
api/javax_sound/midi/SoundbankResource/index.html#getCtor : Constructor ang getSoundbank method tests.
api/javax_sound/midi/SoundbankResource/index.html#getData : Checking getData, getDataClass methods.
api/javax_sound/midi/SoundbankResource/index.html#getName : Checking getName method.
api/javax_sound/midi/Synthesizer/index.html#Synthesizer : MidiSystem Synthesizer tests
api/javax_sound/midi/Synthesizer/index.html#Voice : Checking getVoiceStatus, getMaxPolyphony methods.
api/javax_sound/midi/Synthesizer/index.html#getInstruments : Checking getAvailableInstruments, getLoadedInstruments methods.
api/javax_sound/midi/Synthesizer/index.html#load : Checking loadAllInstruments, loadInstrument, loadInstruments methods.
api/javax_sound/midi/Synthesizer/index.html#remap : Checking unoadAllInstruments, unloadInstrument, unloadInstruments methods.
api/javax_sound/midi/Synthesizer/index.html#unload : Checking unoadAllInstruments, unloadInstrument, unloadInstruments methods.

                                    

Comments
EVALUATION

According to Alex we've lost our Beatnik audo engine experience which is unfortunate. I managed to narrow down the responsible changes between 142 & 150 outlined at:

http://jpsesvr.sfbay.sun.com:8080/ctetools/html/ViewDetail.jsp?index=2404
                                     
2008-01-16
EVALUATION

The crash that occurs can be reproduced with a slightly modified version of the testcase that accepts 4 args: (bank, program, channel, note)

For several combinations of those args the test crashes though I have not been able to find a pattern.

The crash occurs in the following snippet of code: (I've marked line 835 which is what the debugger pinpoints as the last line in the stacktrace, see below)

for (a = MusicGlobals->Four_Loop; a > 0; --a)
           {
               zIndex1 = zIndex2 - (this_voice->previous_zFrequency >> 8);
               this_voice->previous_zFrequency += (this_voice->LPF_frequency - this_voice->previous_zFrequency) >> 3;
               amplitudeReverb = ((amplitudeL + amplitudeR) * this_voice->reverbLevel) >> 8;
               amplitudeChorus = ((amplitudeL + amplitudeR) * this_voice->chorusLevel) >> 8;

               for (inner = 0; inner < 4; inner++)
               {
                   b = source[cur_wave>>STEP_BIT_RANGE];
                   c = source[(cur_wave>>STEP_BIT_RANGE)+1];
                   sample = ((((INT32) (cur_wave & STEP_FULL_RANGE) * (c-b))>>STEP_BIT_RANGE) + b - 0x80) << 2;
                   sample = (sample * Xn + Z1value * Z1 + z[zIndex1 & MAXRESONANCE] * Zn) >> 16;
                   zIndex1++;
                   z[zIndex2 & MAXRESONANCE] = (INT16)sample;
                   zIndex2++;
                   Z1value = sample - (sample >> 9);
                   *destL += sample * amplitudeL;
                   destL[1] += sample * amplitudeR;
                   destL += 2;
                   *destReverb += sample * amplitudeReverb;
                   destReverb++;
                   *destChorus++ += sample * amplitudeChorus;
835-->                                     cur_wave += wave_increment;
               }
               amplitudeL += amplitudeLincrement;
               amplitudeR += amplitudeRincrement;
           }


Here's the stack trace:

00000000`05f1f520 00000000`059a8c9e jsound!PV_ServeStereoInterp2FilterFullBufferNewReverb(struct GM_Voice * this_voice = 0x00000000`00000000, void * threadContext = 0x00000000`00000000)+0x64a [e:\1.4.2\j2se\src\share\native\com\sun\media\sound\engine\genfiltersreverb.c @ 835]
00000000`05f1f5f0 00000000`059a6d67 jsound!PV_ServeStereoInterp2FilterFullBuffer(struct GM_Voice * this_voice = 0x00000000`0015f6a0, void * threadContext = 0x00000000`00000000)+0x70e [e:\1.4.2\j2se\src\share\native\com\sun\media\sound\engine\gensynthfilters.c @ 659]
00000000`05f1f6a0 00000000`059a7158 jsound!PV_ServeThisInstrument(struct GM_Voice * pVoice = 0x00000000`00000000, void * threadContext = 0x00000000`00000000)+0x5e7 [e:\1.4.2\j2se\src\share\native\com\sun\media\sound\engine\gensynth.c @ 1242]
00000000`05f1f710 00000000`059a738d jsound!PV_ServeStereoInstruments(void * threadContext = 0x00000000`00000006)+0xb8 [e:\1.4.2\j2se\src\share\native\com\sun\media\sound\engine\gensynth.c @ 1554]
00000000`05f1f760 00000000`059a74ab jsound!PV_ProcessSampleFrame(void * threadContext = 0x00000000`00000001, void * destinationSamples = 0x00000000`001b0480)+0x19d [e:\1.4.2\j2se\src\share\native\com\sun\media\sound\engine\gensynth.c @ 1910]
00000000`05f1f7a0 00000000`059b4b85 jsound!HAE_BuildMixerSlice(void * threadContext = 0x00000000`00000006, void * pAudioBuffer = 0x00000000`059c2160, int bufferByteLength = 5, int sampleFrames = 1758128)+0x7b [e:\1.4.2\j2se\src\share\native\com\sun\media\sound\engine\gensynth.c @ 1643]
00000000`05f1f800 00000000`0599126c jsound!PV_AudioWaveOutFrameThread(void * threadContext = 0x00000000`01d2a060)+0x175 [e:\1.4.2\j2se\src\windows\native\com\sun\media\sound\engine\hae_api_winos.c @ 852]
00000000`05f1f9a0 00000000`01d3ccf7 jsound!Java_com_sun_media_sound_MixerThread_runNative(struct JNINativeInterface_ ** e = 0x00000000`00000000, struct _jobject * thisObj = 0x00000000`00000000, int64 frameProc = 0)+0xc [e:\1.4.2\j2se\src\share\native\com\sun\media\sound\mixerthread.c @ 61]
                                     
2008-01-15
EVALUATION

Changing this to p3. It is one of several sound (midi in fact) issues that have cropped up as a result of amd64 support. I don't feel this needs to be a p1 since midi on x64 is pretty fragged and has been from the start. Working with QA to gfind the root cause of this one.
                                     
2007-10-16
EVALUATION

I've cast a glance at the issue
The issue is not related with cr 6498661 (the issue affects sampled recording only, midi classes don't use it)
I've checked similar routine for playback, there is no such problem there.

Further research requires much time. As far as I understand the reason of the crash is in MixerSequencer or in MixerSynth native implementation

Regards
Alex
                                     
2007-06-07



Hardware and Software, Engineered to Work Together