polyglot-compiler / JLang

JLang: Ahead-of-time compilation of Java programs to LLVM
http://polyglot-compiler.github.io/JLang/
Other
287 stars 30 forks source link

make tests failed #62

Closed ghost closed 4 years ago

ghost commented 4 years ago

Command: cd ~/JLang/ && make tests

Output:

--- Checking setup ---
+ ant found
+ JDK 7 found
+ git lfs installed
+ LLVM version is up to date: 5.0.1
+ Found libgc shared library
Setup looks good
--- Building Polyglot ---
Buildfile: /home/vagrant/JLang/lib/polyglot/build.xml
java version is 1.8.0_241
current directory is /home/vagrant/JLang/lib/polyglot
Java home directory is /home/vagrant/jdk-8/jre
Polyglot version is 2.7.1 (2020-04-02 19:13:08)

--- Building compiler ---
Buildfile: /home/vagrant/JLang/build.xml

--- Building jdk classes ---
make[1]: Entering directory '/home/vagrant/JLang/jdk'
make[1]: Nothing to be done for 'classes'.
make[1]: Leaving directory '/home/vagrant/JLang/jdk'

--- Building runtime ---
make[1]: Entering directory '/home/vagrant/JLang/runtime'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/vagrant/JLang/runtime'

--- Building jdk ---
make[1]: Entering directory '/home/vagrant/JLang/jdk'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/vagrant/JLang/jdk'

--- Running Test Suite ---
Generating output for Add
Generating output for Annotations
Generating output for AnonymousClass
Generating output for Array
Generating output for ArrayInit
Generating output for ArrayOutOfBounds
Generating output for ArrayReflection
ArrayReflection.binary: native/jvm.cpp:492: void JVM_SetArrayElement(JNIEnv *, jobject, jint, jobject): Assertion `reinterpret_cast<JArrayRep *>(arr)->ElemSize() == sizeof(void *)' failed.
Aborted (core dumped)
Generating output for Assert
Generating output for Assign
Generating output for Binary
Generating output for BinaryCondOps
Generating output for Blocks
Generating output for Cast
Generating output for CastNull
Generating output for ClassLiteral
Generating output for ClassReflection
Generating output for ClassTest
Generating output for ConcurrentReflection
Generating output for Conditional
Generating output for Empty
Generating output for EnhancedFor
Generating output for Enums
Generating output for ExceptionReturnTest
Generating output for Exceptions
Generating output for ExceptionsNested
Generating output for FieldReflection
Generating output for FinalField
Generating output for Generic
Generating output for Generic01
Generating output for Generic02
Generating output for Generic03
Generating output for Generic04
Generating output for Generic05
Generating output for Generic06
Generating output for Generic07
Generating output for Generic08
Generating output for Generic09
Generating output for Generic10
Generating output for Generic11
Generating output for Generic12
Generating output for Generic13
Generating output for Generic14
Generating output for GenericInterface
Generating output for GenericMethods
Generating output for GenericRemoved
Generating output for HashtableTest
Generating output for IfStatement
Generating output for Inc
Generating output for Initializer
Generating output for InnerClass
Generating output for InstanceOf
Generating output for Interface
Generating output for InterfaceHierarchy
Generating output for InterruptTest
Generating output for Labeled
Generating output for Lit
Generating output for LocalClass
Generating output for Loop
Generating output for Main
Generating output for MethodReflection
Generating output for MultipleInterfaces
Generating output for Nesting
Generating output for NotifyAllTest
Generating output for NotifyTest
Generating output for PrimitiveReflection
Generating output for Printing
Generating output for ReflectionMemoryTest
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Aborting due to signal: Segmentation fault
This likely indicates a null pointer exception.
- - - - - - - - - - - - - - - - - - - - - - - - - - -
../../runtime/out/libjvm.so(+0x16b83)[0x7f0ec3d2eb83]
../../runtime/out/libjvm.so(+0x3de41)[0x7f0ec3d55e41]
/lib/x86_64-linux-gnu/libc.so.6(+0x3ef20)[0x7f0ec09d3f20]
Aborted (core dumped)
Generating output for RuntimeTypeCheck
Generating output for SimpleClass
Generating output for Special
Generating output for StaticFields
Generating output for StringConversion
Generating output for StringIntern
Generating output for Strings
Generating output for Subtype
Generating output for Switch
Generating output for Synchronized
Generating output for TernaryOperator
Generating output for ThreadingTest
Generating output for TryFinally
Generating output for TryWithResources
Generating output for Unary
Generating output for UnaryOperations
Generating output for VarArgs
******** CHECKING CORRECTNESS *********
NotifyAllTest failed and is a regression
==============
1 new tests FAILED! :(
==============
==============
==============
The following expected failures occurred:
ArrayReflection
ReflectionMemoryTest
Makefile:46: recipe for target 'check' failed
make[1]: *** [check] Error 1
Makefile:103: recipe for target 'tests' failed
make: *** [tests] Error 2 
dz333 commented 4 years ago

Thanks for posting this bug. Could you also update this with the following information:

  1. The system that you're running on (Ubuntu xx, Darwin xx, etc)
  2. The contents of ~/Jlang/tests/isolated/NotifyAllTest.output
ghost commented 4 years ago

You're very welcome.

$ hostnamectl

   Static hostname: ubuntu1804.localdomain
         Icon name: computer-vm
           Chassis: vm
        Machine ID: 6fb8a9b82eb24f39beffa28e11b5aca3
           Boot ID: 60480899c7734d0dbd9071f4a2441213
    Virtualization: kvm
  Operating System: Ubuntu 18.04.4 LTS
            Kernel: Linux 4.15.0-91-generic
      Architecture: x86-64

$ cat ~/JLang/tests/isolated/NotifyAllTest.output

Server prints 0
Clients print 1
Clients print 2
Clients print 3
Clients print 4
Clients print 5
Clients print 6
Clients print 7
Clients print 8
Clients print 9
Server prints 10
Clients print 11
Clients print 12
Clients print 13
Clients print 14
Clients print 15
Clients print 16
Clients print 17
Clients print 18
Clients print 19
Server prints 20
Clients print 21
Clients print 22
Clients print 23
Clients print 24
Clients print 25
Clients print 26
Clients print 27
Clients print 28
Clients print 29
Server prints 30
Clients print 31
Clients print 32
Clients print 33
Clients print 34
Clients print 35
Clients print 36
Clients print 37
Clients print 38
Clients print 39
Server prints 40
Clients print 41
Clients print 42
Clients print 43
Clients print 44
Clients print 45
Clients print 46
Clients print 47
Clients print 48
Clients print 49
Server prints 50
Clients print 51
Clients print 52
Clients print 53
Clients print 54
Clients print 55
Clients print 56
Clients print 57
Clients print 58
Clients print 59
Server prints 60
Clients print 61
Clients print 62
Clients print 63
Clients print 64
Clients print 65
Clients print 66
Clients print 67
Clients print 68
Clients print 69
Server prints 70
Clients print 71
Clients print 72
Clients print 73
Clients print 74
Clients print 75
Clients print 76
Clients print 77
Clients print 78
Clients print 79
Server prints 80
Clients print 81
Clients print 82
Clients print 83
Clients print 84
Clients print 85
Clients print 86
Clients print 87
Clients print 88
Clients print 89
Server prints 90
Clients print 91
Clients print 92
Clients print 93
Clients print 94
Clients print 95
Clients print 96
Clients print 97
Clients print 98
Clients print 99
dz333 commented 4 years ago

Hmmm that output is what I expected to see so I'm guessing there's something weird going on with the test infrastructure on your machine, rather than JLang itself.

Last diagnosis question: What's the output of: diff ~JLang/tests/isolated/NotifyAllTest.output ~JLang/tests/isolated/NotifyAllTest.sol ?

ghost commented 4 years ago

The .output and the .sol files are identical.

Only the first execution of make tests shows the errors, but the consequent executions show this:

--- Checking setup ---
+ ant found
+ JDK 7 found
+ git lfs installed
+ LLVM version is up to date: 5.0.1
+ Found libgc shared library
Setup looks good
--- Building Polyglot ---
Buildfile: /home/vagrant/JLang/lib/polyglot/build.xml
java version is 1.8.0_241
current directory is /home/vagrant/JLang/lib/polyglot
Java home directory is /home/vagrant/jdk-8/jre
Polyglot version is 2.7.1 (2020-04-06 22:02:54)

--- Building compiler ---
Buildfile: /home/vagrant/JLang/build.xml

--- Building jdk classes ---
make[1]: Entering directory '/home/vagrant/JLang/jdk'
make[1]: Nothing to be done for 'classes'.
make[1]: Leaving directory '/home/vagrant/JLang/jdk'

--- Building runtime ---
make[1]: Entering directory '/home/vagrant/JLang/runtime'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/vagrant/JLang/runtime'

--- Building jdk ---
make[1]: Entering directory '/home/vagrant/JLang/jdk'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/vagrant/JLang/jdk'

--- Running Test Suite ---
Generating output for Add
Generating output for Annotations
Generating output for AnonymousClass
Generating output for Array
Generating output for ArrayInit
Generating output for ArrayOutOfBounds
Generating output for ArrayReflection
ArrayReflection.binary: native/jvm.cpp:492: void JVM_SetArrayElement(JNIEnv *, jobject, jint, jobject): Assertion `reinterpret_cast<JArrayRep *>(arr)->ElemSize() == sizeof(void *)' failed.
Aborted (core dumped)
Generating output for Assert
Generating output for Assign
Generating output for Binary
Generating output for BinaryCondOps
Generating output for Blocks
Generating output for Cast
Generating output for CastNull
Generating output for ClassLiteral
Generating output for ClassReflection
Generating output for ClassTest
Generating output for ConcurrentReflection
Generating output for Conditional
Generating output for Empty
Generating output for EnhancedFor
Generating output for Enums
Generating output for ExceptionReturnTest
Generating output for Exceptions
Generating output for ExceptionsNested
Generating output for FieldReflection
Generating output for FinalField
Generating output for Generic
Generating output for Generic01
Generating output for Generic02
Generating output for Generic03
Generating output for Generic04
Generating output for Generic05
Generating output for Generic06
Generating output for Generic07
Generating output for Generic08
Generating output for Generic09
Generating output for Generic10
Generating output for Generic11
Generating output for Generic12
Generating output for Generic13
Generating output for Generic14
Generating output for GenericInterface
Generating output for GenericMethods
Generating output for GenericRemoved
Generating output for HashtableTest
Generating output for IfStatement
Generating output for Inc
Generating output for Initializer
Generating output for InnerClass
Generating output for InstanceOf
Generating output for Interface
Generating output for InterfaceHierarchy
Generating output for InterruptTest
Generating output for Labeled
Generating output for Lit
Generating output for LocalClass
Generating output for Loop
Generating output for Main
Generating output for MethodReflection
Generating output for MultipleInterfaces
Generating output for Nesting
Generating output for NotifyAllTest
Generating output for NotifyTest
Generating output for PrimitiveReflection
Generating output for Printing
Generating output for ReflectionMemoryTest
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Aborting due to signal: Segmentation fault
This likely indicates a null pointer exception.
- - - - - - - - - - - - - - - - - - - - - - - - - - -
../../runtime/out/libjvm.so(+0x16b83)[0x7f0a91fdbb83]
../../runtime/out/libjvm.so(+0x3de41)[0x7f0a92002e41]
/lib/x86_64-linux-gnu/libc.so.6(+0x3ef20)[0x7f0a8ec80f20]
Aborted (core dumped)
Generating output for RuntimeTypeCheck
Generating output for SimpleClass
Generating output for Special
Generating output for StaticFields
Generating output for StringConversion
Generating output for StringIntern
Generating output for Strings
Generating output for Subtype
Generating output for Switch
Generating output for Synchronized
Generating output for TernaryOperator
Generating output for ThreadingTest
Generating output for TryFinally
Generating output for TryWithResources
Generating output for Unary
Generating output for UnaryOperations
Generating output for VarArgs
******** CHECKING CORRECTNESS *********
==============
No regressions found!
==============
==============
==============
The following expected failures occurred:
ArrayReflection
ReflectionMemoryTest
dz333 commented 4 years ago

Ok cool. I'm going to resolve this and chalk this up to part of the Make system that can be improved. I've made an issue to track that.