Subject: cglib: FTBFS using locally rebuilt packages

From: Daniel Schepler <[email-masked]>
Date: Sun, 06 Oct 2013 01:09:15 -0700

Source: cglib
Version: 2.2.2+dfsg-5
Severity: normal

>From my pbuilder build log, using a chroot where the apt sources.list points
to a repository of locally rebuilt packages:

...
build-test:
    [javac] /tmp/buildd/cglib-2.2.2+dfsg/build.xml:221: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
    [javac] Compiling 68 source files to /tmp/buildd/cglib-2.2.2+dfsg/build/test/classes
    [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.5
    [javac] /tmp/buildd/cglib-2.2.2+dfsg/src/test/net/sf/cglib/CodeGenTestCase.java:54: warning: [deprecation] toURL() in File has been deprecated
    [javac]             classPath.add( new File(tokenizer.nextToken()).toURL() );
    [javac]                                                           ^
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 2 warnings

test:
     [java] -- listing properties --
     [java] java.runtime.name=OpenJDK Runtime Environment
     [java] sun.boot.library.path=/usr/lib/jvm/java-7-openjdk-amd64/jre...
     [java] java.vm.version=23.7-b01
     [java] cglib.debugLocation=debug
     [java] java.vm.vendor=Oracle Corporation
     [java] java.vendor.url=http://java.oracle.com/
     [java] path.separator=:
     [java] java.vm.name=OpenJDK 64-Bit Server VM
     [java] file.encoding.pkg=sun.io
     [java] user.country=US
     [java] sun.java.launcher=SUN_STANDARD
     [java] sun.os.patch.level=unknown
     [java] java.vm.specification.name=Java Virtual Machine Specification
     [java] user.dir=/tmp/buildd/cglib-2.2.2+dfsg
     [java] java.runtime.version=1.7.0_25-b30
     [java] java.awt.graphicsenv=sun.awt.X11GraphicsEnvironment
     [java] java.endorsed.dirs=/usr/lib/jvm/java-7-openjdk-amd64/jre...
     [java] os.arch=amd64
     [java] java.io.tmpdir=/tmp
     [java] line.separator=
     [java] 
     [java] java.vm.specification.vendor=Oracle Corporation
     [java] os.name=Linux
     [java] sun.jnu.encoding=ANSI_X3.4-1968
     [java] java.library.path=/usr/java/packages/lib/amd64:/usr/lib...
     [java] java.specification.name=Java Platform API Specification
     [java] java.class.version=51.0
     [java] sun.management.compiler=HotSpot 64-Bit Tiered Compilers
     [java] os.version=3.10-1-amd64
     [java] user.home=/tmp/buildd
     [java] user.timezone=
     [java] java.awt.printerjob=sun.print.PSPrinterJob
     [java] file.encoding=ANSI_X3.4-1968
     [java] java.specification.version=1.7
     [java] user.name=pbuildd
     [java] java.class.path=/tmp/buildd/cglib-2.2.2+dfsg/build/pr...
     [java] java.vm.specification.version=1.7
     [java] sun.arch.data.model=64
     [java] java.home=/usr/lib/jvm/java-7-openjdk-amd64/jre
     [java] sun.java.command=net.sf.cglib.TestAll net.sf.cglib.Tes...
     [java] java.specification.vendor=Oracle Corporation
     [java] user.language=en
     [java] awt.toolkit=sun.awt.X11.XToolkit
     [java] java.vm.info=mixed mode
     [java] java.version=1.7.0_25
     [java] java.ext.dirs=/usr/lib/jvm/java-7-openjdk-amd64/jre...
     [java] sun.boot.class.path=/usr/lib/jvm/java-7-openjdk-amd64/jre...
     [java] java.vendor=Oracle Corporation
     [java] file.separator=/
     [java] java.vendor.url.bug=http://bugreport.sun.com/bugreport/
     [java] sun.cpu.endian=little
     [java] sun.io.unicode.encoding=UnicodeLittle
     [java] sun.cpu.isalist=
     [java] CGLIB debugging enabled, writing to 'debug'
     [java] .public void net.sf.cglib.proxy.Source.throwIndexOutOfBoundsException()
     [java] ..public java.lang.String java.lang.Object.toString()
     [java] public native int java.lang.Object.hashCode()
     [java] public int net.sf.cglib.proxy.EA.compareTo(java.lang.Object)
     [java] public java.lang.String java.lang.Object.toString()
     [java] public native int java.lang.Object.hashCode()
     [java] public java.lang.String java.lang.Object.toString()
     [java] public native int java.lang.Object.hashCode()
     [java] ..public java.lang.Object net.sf.cglib.proxy.TestEnhancer$TestCloneImpl.clone() throws java.lang.CloneNotSupportedException
     [java] .  public synchronized boolean java.util.Vector.add(java.lang.Object)
     [java]   arg1: TEST
     [java]   return true
     [java] 
     [java]   public boolean java.util.Vector.contains(java.lang.Object)
     [java]   arg1: TEST
     [java] .......  public synchronized int java.util.Vector.indexOf(java.lang.Object,int)
     [java] .......  arg1: TEST
     [java] .......  arg2: 0
     [java] .......  return 0
     [java]   return true
     [java] 
     [java]   public synchronized java.lang.Object java.util.Vector.set(int,java.lang.Object)
     [java]   arg1: 2
     [java]   arg2: ArrayIndexOutOfBounds
     [java]   throw java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 2
     [java] 
     [java]   public synchronized boolean java.util.Vector.add(java.lang.Object)
     [java]   arg1: TEST1
     [java]   return true
     [java] 
     [java]   public synchronized boolean java.util.Vector.add(java.lang.Object)
     [java]   arg1: TEST2
     [java]   return true
     [java] 
     [java]   public synchronized java.lang.String java.util.Vector.toString()
     [java] .......  public synchronized java.util.Iterator java.util.Vector.iterator()
     [java] .......  return java.util.Vector$Itr@37a63e06
     [java]   return [TEST, TEST1, TEST2]
     [java] 
     [java]   public synchronized boolean java.util.Vector.equals(java.lang.Object)
     [java]   arg1: this
     [java]   return true
     [java] 
     [java]   public synchronized java.lang.Object java.util.Vector.set(int,java.lang.Object)
     [java]   arg1: 0
     [java]   arg2: null
     [java]   return TEST
     [java] 
     [java]   public synchronized java.lang.String java.util.Vector.toString()
     [java] .......  public synchronized java.util.Iterator java.util.Vector.iterator()
     [java] .......  return java.util.Vector$Itr@3321875
     [java]   return [null, TEST1, TEST2]
     [java] 
     [java]   public synchronized boolean java.util.Vector.add(java.lang.Object)
     [java]   arg1: this
     [java]   return true
     [java] 
     [java]   public synchronized java.lang.Object java.util.Vector.get(int)
     [java]   arg1: 1
     [java]   return TEST1
     [java] 
     [java]   public synchronized java.lang.Object[] java.util.Vector.toArray()
     [java]   return [Ljava.lang.Object;@4de3aaf6
     [java] 
     [java]   public boolean java.util.Vector.remove(java.lang.Object)
     [java]   arg1: this
     [java] .......  public synchronized boolean java.util.Vector.removeElement(java.lang.Object)
     [java] .......  arg1: this
     [java] ..............  public int java.util.Vector.indexOf(java.lang.Object)
     [java] ..............  arg1: this
     [java] .....................  public synchronized int java.util.Vector.indexOf(java.lang.Object,int)
     [java] .....................  arg1: this
     [java] .....................  arg2: 0
     [java] ............................  public synchronized boolean java.util.Vector.equals(java.lang.Object)
     [java] ............................  arg1: null
     [java] ............................  return false
     [java] ............................  public synchronized boolean java.util.Vector.equals(java.lang.Object)
     [java] ............................  arg1: TEST1
     [java] ............................  return false
     [java] ............................  public synchronized boolean java.util.Vector.equals(java.lang.Object)
     [java] ............................  arg1: TEST2
     [java] ............................  return false
     [java] ............................  public synchronized boolean java.util.Vector.equals(java.lang.Object)
     [java] ............................  arg1: this
     [java] ............................  return true
     [java] .....................  return 3
     [java] ..............  return 3
     [java] ..............  public synchronized void java.util.Vector.removeElementAt(int)
     [java] ..............  arg1: 3
     [java] ..............  return null
     [java] .......  return true
     [java]   return true
     [java] 
     [java]   public boolean java.util.Vector.remove(java.lang.Object)
     [java]   arg1: 
     [java] .......  public synchronized boolean java.util.Vector.removeElement(java.lang.Object)
     [java] .......  arg1: 
     [java] ..............  public int java.util.Vector.indexOf(java.lang.Object)
     [java] ..............  arg1: 
     [java] .....................  public synchronized int java.util.Vector.indexOf(java.lang.Object,int)
     [java] .....................  arg1: 
     [java] .....................  arg2: 0
     [java] .....................  return -1
     [java] ..............  return -1
     [java] .......  return false
     [java]   return false
     [java] 
     [java]   public synchronized boolean java.util.Vector.containsAll(java.util.Collection)
     [java]   arg1: this
     [java] .......  public synchronized java.util.Iterator java.util.Vector.iterator()
     [java] .......  return java.util.Vector$Itr@1ded246d
     [java] .......  public boolean java.util.Vector.contains(java.lang.Object)
     [java] .......  arg1: null
     [java] ..............  public synchronized int java.util.Vector.indexOf(java.lang.Object,int)
     [java] ..............  arg1: null
     [java] ..............  arg2: 0
     [java] ..............  return 0
     [java] .......  return true
     [java] .......  public boolean java.util.Vector.contains(java.lang.Object)
     [java] .......  arg1: TEST1
     [java] ..............  public synchronized int java.util.Vector.indexOf(java.lang.Object,int)
     [java] ..............  arg1: TEST1
     [java] ..............  arg2: 0
     [java] ..............  return 1
     [java] .......  return true
     [java] .......  public boolean java.util.Vector.contains(java.lang.Object)
     [java] .......  arg1: TEST2
     [java] ..............  public synchronized int java.util.Vector.indexOf(java.lang.Object,int)
     [java] ..............  arg1: TEST2
     [java] ..............  arg2: 0
     [java] ..............  return 2
     [java] .......  return true
     [java]   return true
     [java] 
     [java]   public synchronized int java.util.Vector.lastIndexOf(java.lang.Object)
     [java]   arg1: TEST
     [java] .......  public synchronized int java.util.Vector.lastIndexOf(java.lang.Object,int)
     [java] .......  arg1: TEST
     [java] .......  arg2: 2
     [java] .......  return -1
     [java]   return -1
     [java] 
     [java] java.beans.PropertyChangeEvent[propertyName=sampleProperty; oldValue=null; newValue=TEST; propagationId=null; source=sampleProperty is TEST]
     [java] ..public abstract int net.sf.cglib.proxy.TestEnhancer$ConflictA.foo()
     [java] public abstract java.lang.String net.sf.cglib.proxy.TestEnhancer$ConflictB.foo()
     [java] .public java.lang.String net.sf.cglib.proxy.ArgInit.toString()
     [java] public java.lang.String net.sf.cglib.proxy.ArgInit.toString()
     [java] .protected void java.lang.Object.finalize() throws java.lang.Throwable
     [java] public int net.sf.cglib.proxy.TestEnhancer$Signature.interceptor()
     [java] protected void java.lang.Object.finalize() throws java.lang.Throwable
     [java] protected void java.lang.Object.finalize() throws java.lang.Throwable
     [java] .public abstract void net.sf.cglib.proxy.TestEnhancer$AbstractMethodCallInConstructor.foo()
     [java] public abstract void net.sf.cglib.proxy.TestEnhancer$AbstractMethodCallInConstructor.foo()
     [java] .protected void java.lang.Object.finalize() throws java.lang.Throwable
     [java] .  protected void java.lang.Object.finalize() throws java.lang.Throwable
     [java]   return null
     [java] 
     [java] protected void java.lang.Object.finalize() throws java.lang.Throwable
     [java] protected void java.lang.Object.finalize() throws java.lang.Throwable
     [java] protected void java.lang.Object.finalize() throws java.lang.Throwable
     [java] protected void java.lang.Object.finalize() throws java.lang.Throwable
     [java] .protected void java.lang.Object.finalize() throws java.lang.Throwable
     [java] protected void java.lang.Object.finalize() throws java.lang.Throwable
     [java] ..protected void java.lang.Object.finalize() throws java.lang.Throwable
     [java] protected void java.lang.Object.finalize() throws java.lang.Throwable
     [java] ..protected void java.lang.Object.finalize() throws java.lang.Throwable
     [java] .....public void net.sf.cglib.proxy.Source.callAll()
     [java] protected void net.sf.cglib.proxy.Source.protectedMethod()
     [java] void net.sf.cglib.proxy.Source.packageMethod()
     [java] abstract void net.sf.cglib.proxy.Source.abstractMethod()
     [java] public synchronized void net.sf.cglib.proxy.Source.synchronizedMethod()
     [java] public int net.sf.cglib.proxy.Source.intType(int)
     [java] public long net.sf.cglib.proxy.Source.longType(long)
     [java] public float net.sf.cglib.proxy.Source.floatType(float)
     [java] public double net.sf.cglib.proxy.Source.doubleType(double)
     [java] public java.lang.Object net.sf.cglib.proxy.Source.objectType(java.lang.Object)
     [java] public void net.sf.cglib.proxy.Source.voidType()
     [java] public void net.sf.cglib.proxy.Source.multiArg(int,long,double,float,java.lang.Object,java.lang.Object,java.lang.Object)
     [java] ....public int net.sf.cglib.proxy.Source.intType(int)
     [java] public long net.sf.cglib.proxy.Source.longType(long)
     [java] public float net.sf.cglib.proxy.Source.floatType(float)
     [java] public double net.sf.cglib.proxy.Source.doubleType(double)
     [java] public java.lang.Object net.sf.cglib.proxy.Source.objectType(java.lang.Object)
     [java] public java.lang.String net.sf.cglib.proxy.Source.toString()
     [java] public int[] net.sf.cglib.proxy.Source.arrayType(int[])
     [java] ...public java.lang.String java.lang.Object.toString()
     [java] public native int java.lang.Object.hashCode()
     [java] .public java.lang.String java.lang.Object.toString()
     [java] public native int java.lang.Object.hashCode()
     [java] public java.lang.String java.lang.Object.toString()
     [java] public native int java.lang.Object.hashCode()
     [java] ..protected void java.lang.Object.finalize() throws java.lang.Throwable
     [java] F..protected void java.lang.Object.finalize() throws java.lang.Throwable
     [java] protected void java.lang.Object.finalize() throws java.lang.Throwable
     [java] protected void java.lang.Object.finalize() throws java.lang.Throwable
     [java] protected void java.lang.Object.finalize() throws java.lang.Throwable
     [java] protected void java.lang.Object.finalize() throws java.lang.Throwable
     [java] .protected void java.lang.Object.finalize() throws java.lang.Throwable
     [java] protected void java.lang.Object.finalize() throws java.lang.Throwable
     [java] .protected void java.lang.Object.finalize() throws java.lang.Throwable
     [java] protected void java.lang.Object.finalize() throws java.lang.Throwable
     [java] protected void java.lang.Object.finalize() throws java.lang.Throwable
     [java] protected void java.lang.Object.finalize() throws java.lang.Throwable
     [java] protected void java.lang.Object.finalize() throws java.lang.Throwable
     [java] ....
     [java] hello
     [java] loading object
     [java] ......invoking public abstract java.lang.Object java.util.Map.get(java.lang.Object) on {test=test} with [Ljava.lang.Object;@202bb129
     [java] done: public abstract java.lang.Object java.util.Map.get(java.lang.Object) on {test=test} with [Ljava.lang.Object;@202bb129, result is test
     [java] .invoking public abstract java.lang.Object java.util.Map.get(java.lang.Object) on {test=test} with [Ljava.lang.Object;@147c0b3f
     [java] done: public abstract java.lang.Object java.util.Map.get(java.lang.Object) on {test=test} with [Ljava.lang.Object;@147c0b3f, result is test
     [java] .....exception: net.sf.cglib.proxy.UndeclaredThrowableException: java.lang.Exception-->test!
     [java] ..........................
     [java] iteration count: 100000
     [java] 
     [java] net.sf.cglib.beans.TestBulkBean$BulkBeanReflectImpl: 
     [java] 160 ms.   0.0016 per iteration
     [java] 
     [java] net.sf.cglib.beans.MA$$BulkBeanByCGLIB$$5cb0a72a: 
     [java] 48 ms.   4.8E-4 per iteration
     [java] factor: 3.3333333
     [java] net.sf.cglib.beans.TestBulkBean$BulkBeanPlainImpl: 
     [java] 31 ms.   3.1E-4 per iteration
     [java] ...
     [java] .........................................
     [java] ..........load : net.sf.cglib.transform.impl.TransformDemo
     [java] transforming net.sf.cglib.transform.impl.TransformDemo
     [java] Loading net.sf.cglib.transform.impl.Example
     [java] Loading java.lang.Object
     [java] Loading java.lang.String
     [java] Loading net.sf.cglib.transform.impl.Example
     [java] Loading java.lang.Object
     [java] Loading java.lang.Class
     [java] Loading net.sf.cglib.transform.impl.TestTransformingLoader
     [java] Loading net.sf.cglib.CodeGenTestCase
     [java] Loading junit.framework.TestCase
     [java] Loading java.util.List
     [java] Loading java.util.Set
     [java] Loading java.lang.ClassLoader
     [java] Loading net.sf.cglib.CodeGenTestCase$1
     [java] Loading java.net.URLClassLoader
     [java] Loading java.lang.ref.Reference
     [java] Loading java.lang.ref.WeakReference
     [java] Loading net.sf.cglib.transform.ClassTransformerFactory
     [java] Loading net.sf.cglib.transform.ClassTransformer
     [java] Loading org.objectweb.asm.ClassVisitor
     [java] Loading net.sf.cglib.transform.impl.InterceptFieldFilter
     [java] Loading junit.framework.Test
     [java] Loading net.sf.cglib.transform.ClassFilter
     [java] Loading java.lang.System
     [java] Loading java.lang.StringBuilder
     [java] Loading java.io.PrintStream
     [java] INITING: class net.sf.cglib.CodeGenTestCase
     [java] INITING: class net.sf.cglib.transform.impl.TestTransformingLoader
     [java] Loading net.sf.cglib.transform.impl.TestTransformingLoader$1
     [java] INITING: class net.sf.cglib.transform.impl.TestTransformingLoader$1
     [java] INITING: class net.sf.cglib.transform.impl.Example
     [java] Loading net.sf.cglib.transform.impl.Example
     [java] Loading net.sf.cglib.transform.impl.InterceptFieldEnabled
     [java] Loading java.lang.Object
     [java] Loading net.sf.cglib.transform.impl.Example
     [java] Loading net.sf.cglib.transform.impl.FieldProvider
     [java] Loading java.lang.Object
     [java] load : net.sf.cglib.transform.impl.FieldProvider
     [java] load : net.sf.cglib.transform.impl.InterceptFieldEnabled
     [java] load : net.sf.cglib.transform.impl.PersistenceCapable
     [java] load : java.lang.Object
     [java] load : net.sf.cglib.transform.impl.InterceptFieldCallback
     [java] load : java.lang.Throwable
     [java] load : java.lang.IllegalArgumentException
     [java] load : net.sf.cglib.transform.ClassFilter
     [java] load : net.sf.cglib.transform.ClassTransformerFactory
     [java] load : java.lang.String
     [java] load : java.lang.Exception
     [java] load : java.lang.Class
     [java] load : java.lang.System
     [java] load : java.lang.StringBuilder
     [java] load : java.io.PrintStream
     [java] register class net.sf.cglib.transform.impl.TransformDemo
     [java] load : net.sf.cglib.transform.impl.MA
     [java] transforming net.sf.cglib.transform.impl.MA
     [java] load : net.sf.cglib.transform.impl.Base
     [java] transforming net.sf.cglib.transform.impl.Base
     [java] register class net.sf.cglib.transform.impl.Base
     [java] register class net.sf.cglib.transform.impl.MA
     [java] load : java.lang.Float
     [java] load : java.lang.Long
     [java] load : java.lang.Double
     [java] load : java.lang.Byte
     [java] load : java.lang.Short
     [java] load : java.lang.Boolean
     [java] load : java.lang.Character
     [java] load : java.lang.Integer
     [java] load : net.sf.cglib.transform.impl.PersistenceCapableImpl
     [java] load : java.util.Arrays
     [java] makePersistent class net.sf.cglib.transform.impl.MA [interface net.sf.cglib.transform.impl.FieldProvider, interface net.sf.cglib.transform.impl.InterceptFieldEnabled, interface net.sf.cglib.transform.impl.PersistenceCapable]
     [java] load : net.sf.cglib.transform.impl.TransformDemo$StateManager
     [java] Field Names [floatP, id, doubleP, byteP, longP, publicField, name, shortP, booleanP, privateName, stringP, charP, intP]
     [java] Field Types [float, class java.lang.Long, double, byte, long, class java.lang.String, class java.lang.String, short, boolean, class java.lang.String, class java.lang.String, char, int]
     [java] setPersistenceManager:Manager
     [java] write charP = A
     [java] read charP = A
     [java] write doubleP = 554.0
     [java] write doubleP = 1.2
     [java] read floatP = 0.0
     [java] write name = testName
     [java] write publicField = set value
     [java] read publicField = set value
     [java] write publicField = set value append value
     [java] write baseTest = base test field
     [java] read baseTest = base test field
     [java] 
     [java] Time: 8.324
     [java] There was 1 failure:
     [java] 1) testFailOnMemoryLeak(net.sf.cglib.proxy.TestEnhancer)junit.framework.AssertionFailedError: Memory leak caused by Enhancer
     [java]     at net.sf.cglib.proxy.TestEnhancer.testFailOnMemoryLeak(TestEnhancer.java:714)
     [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     [java]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
     [java]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     [java]     at net.sf.cglib.TestAll.main(TestAll.java:99)
     [java] 
     [java] FAILURES!!!
     [java] Tests run: 133,  Failures: 1,  Errors: 0
     [java] 

BUILD FAILED
/tmp/buildd/cglib-2.2.2+dfsg/build.xml:241: Java returned: 1

Total time: 11 seconds
make: *** [debian/stamp-ant-check] Error 1
dpkg-buildpackage: error: debian/rules build gave error exit status 2

However I haven't been able to reproduce this in a normal pbuilder chroot
using the existing binary packages, nor by rebuilding just the direct
Build-Depends within that normal pbuilder chroot.  So I don't know what
might have gone wrong when everything got rebuilt...
-- 
Daniel Schepler

---

From: Emmanuel Bourg <[email-masked]>
Date: Tue, 11 Feb 2014 12:15:10 +0100

Hi Daniel,

I haven't been able to reproduce this error. Do you know what Java
packages were installed in the local repository? Did you build them on
sid or wheezy?

Emmanuel Bourg

---

From: Daniel Schepler <[email-masked]>
Date: Wed, 12 Feb 2014 12:38:24 -0800

Sorry about the top posting and reproducing your questions here, stuck
with the Gmail interface right now...

> Do you know what Java packages were installed in the local repository?
All of them.  Every single package installed in the chroot was from
the local repository.

> Did you build them on sid or wheezy?
sid

It also appears now that this might be more of an issue of a test
failure that's not 100% reproducible: just today, my latest round of
rebuilding reached cglib again.  On the first trial build, it failed
with the same error message as before, but when I retried it, it built
fine.
-- 
Daniel Schepler