Date: Wed, 20 Dec 2000 16:07:15 +1100 (EST) From: Andy Newman <andy@silverbrook.com.au> To: stable@FreeBSD.org Subject: misc/23679, pthreads and sleep times Message-ID: <200012200507.eBK57Gf30708@bebop.silverbrook.com.au>
next in thread | raw e-mail | index | archive | help
While getting Doug Schmidt's ACE & TAO up and running on RELENG_4 I ran into a curious problem with sleep time calculations and libc_r. One of ACE's test programs - Process_Mutex_Test - uses SysV semaphores for inter-process synchronization (funny that). It forks a number of children which grab the semaphore, do some work, release the semaphore and exit. Work is simulated by sleeping for two seconds so the overall run-time should be in the order the number of children. I noticed that this test didn't seem to finish. A little investigation showed each child was actually sleeping for 2**N (plus a constant :) seconds, N being the ordinal number of the child in the fork loop. I've recreated the test case (attached to report) and tracing it's system calls shows the timeouts being passed to poll() from the thread scheduler are wrong. Yes I aware the timeouts are not guaranteed however I doubt the behaviour I'm seeing is actually desired. Any thoughts? -- Andy Newman, Principal Software Engineer, Silverbrook Research To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200012200507.eBK57Gf30708>