On Tue, 2006-02-07 at 13:34 -0500, Dominic Duval wrote:
> Hi,
> 
> Have you tried running the whole thing through lstrace? That might help
> determining which function in glibc causes the call to gettimeofday(). 
> 
> If you have access to a test system, you might also want to downgrade
> glibc to whatever version we used in U1, just to make sure the problem
> comes from glibc (which is what I suspect).
> 
> Let us know if you find the solution.
> 
> Cheers,
>                       -Dominic

Hi,

I have been able to reproduce this with a simple test script (attached).

ltrace[1] demonstraces the change in system call activity. I have
included only the top 5 in each list for brevity:

Under RHES4.1:

     46 SYS_stat
     55 SYS_futex
     58 SYS_lstat
     76 SYS_open
    105 SYS_mmap

Under RHES4.2:

     54 SYS_futex
     58 SYS_lstat
     76 SYS_open
    105 SYS_mmap
   1658 SYS_gettimeofday

Over 1500 calls to gettimeofday, out of thin air.

We've not yet tried a downgrade of glibc on the affected systems, but
that is out next test.

As this is clearly not a problem related to the Blackdown JVM itself,
this shall be my last email to the list on the subject. If any reader is
also affected by this problem and would be interested in updates, by all
means make yourself known to me privately.

Ollie

1: ltrace -S /usr/java/j2sdk1.4.2_02_bd/bin/java BFThreadTest 2>&1|awk
-F\( '{print $1}'|sort|uniq -c | sort -n | tail -5
// BFThreadTest
//
// Simple class to demonstrate that creation of threads
// under Redhat ES 4 Update 2 produces spurious calls
// to SYS_gettimeofday, which are not present when
// running the same code on Redhat ES 4 Update 1.
//
// Tested with Blackdown JVM v1.4.2-02 and Sun JVM
// v1.4.2-08.
//
// (c) Betfair Limited 2006
//
// Ollie Cook <[EMAIL PROTECTED]>

public class BFThreadTest extends Thread {
	private int countDown = 50;

	public BFThreadTest() {
		super("BFThreadTest");
		start();
	}

	public void run() {
		do {
		  countDown--;
		} while (countDown > 0);

		return;
	}

	public static void main(String[] args) {
		for(int i = 0; i < 1; i++) {
			new BFThreadTest();
		}
	}
}

Reply via email to