MacOS FutureTask.get race (sort of)

Jason Schroeder shrode at subnature.com
Tue Nov 1 11:19:18 PDT 2011


I made the same problem happen with the macosx:
openjdk version "1.7.0-ea"
OpenJDK Runtime Environment (build 1.7.0-ea-b215)
OpenJDK 64-Bit Server VM (build 21.0-b17, mixed mode)

The problem here is that the contract of FutureTask.get is breaking and
most likely something is not right at runtime with
AbstractQueuedSynchronizer or FutureTask.Sync.

So far, I have only triggered this problem on MacOS, so I have thought the
port team might like to know.

On Tue, Nov 1, 2011 at 4:40 AM, Michael Hall <mik3hall at gmail.com> wrote:

>
> On Oct 31, 2011, at 10:07 AM, Jason Schroeder wrote:
>
> > I hope mentioning the race contained in this example is appropriate.  I
> can
> > only force this bug to appear with the MacOS jvm.
> >
> > How can I be of useful assistance?
> >
> > // $ java -version
> > // java version "1.6.0_27"
> > // Java(TM) SE Runtime Environment (build 1.6.0_27-b07-393-11M3511)
> > // Java HotSpot(TM) 64-Bit Server VM (build 20.2-b06-393, mixed mode)
> > //
>
> I think the JVM you show is the current Apple one not openjdk isn't it?
>
> Do we bug report race conditions, if I'm understanding your use correctly
> is sort of an interesting question.
> I just got this...
>
> Thread 16 Crashed:  Java: AWT-EventQueue-0
> 0   libSystem.B.dylib                   0x91b1ac5a __kill + 10
> 1   libSystem.B.dylib                   0x91b1ac4c kill$UNIX2003 + 32
> 2   libSystem.B.dylib                   0x91bad5a5 raise + 26
> 3   libSystem.B.dylib                   0x91bc36e4 abort + 93
> 4   libjvm.dylib                        0x01843a7f os::abort(bool) + 25
> 5   libjvm.dylib                        0x0185cf5a
> VMError::report_and_die() + 2476
> 6   libjvm.dylib                        0x01c9c053 crash_handler(int,
> __siginfo*, void*) + 128
> 7   libSystem.B.dylib                   0x91b2005b _sigtramp + 43
> 8   ???                                 0xffffffff 0 + 4294967295
> 9   libjvm.dylib                        0x0185be76
> VMError::report(outputStream*) + 2740
> 10  libjvm.dylib                        0x0185cc04
> VMError::report_and_die() + 1622
> 11  libjvm.dylib                        0x01bc725f JVM_handle_bsd_signal +
> 1397
> 12  libjvm.dylib                        0x01bc4bea signalHandler(int,
> __siginfo*, void*) + 42
> 13  libSystem.B.dylib                   0x91b2005b _sigtramp + 43
> 14  ???                                 0xffffffff 0 + 4294967295
>
> In a crash log.
>
> I thought Eclipse was showing a related SIGSEGV in it's console too but
> now I'm not seeing that.
>
> Probably because I restarted to see if I could reproduce.
>
> So far no go.
>
> So how do I know if it was my code not properly using invokeLater or
> something or a jvm race condition?
> So I suppose not worth the bug report?
>
> Pretty sure mine is openjdk this time anyhow.
>
> set java.* | grep version
> System.in:3:java.runtime.version=1.7.0-ea-b215
> System.in:4:java.version=1.7.0-ea
> System.in:7:java.class.version=51.0
> System.in:10:java.vm.version=21.0-b17
> System.in:20:java.vm.specification.version=1.7
> System.in:27:java.specification.version=1.7


More information about the macosx-port-dev mailing list