db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <derby-...@db.apache.org>
Subject [jira] Updated: (DERBY-989) unit/daemonService.unit fails intermittently: 'ran out of time'
Date Tue, 04 Jul 2006 09:07:35 GMT
     [ http://issues.apache.org/jira/browse/DERBY-989?page=all ]

Knut Anders Hatlen updated DERBY-989:

    Attachment: derby-989-v1.diff

The attached patch (derby-989-v1.diff) attempts to solve the real
problem. Derbyall runs cleanly with the patch. I have not been able to
reproduce the bug on single-CPU machines (neither with the patch nor
without the patch). On dual-CPU machines I got these results with

Solaris without patch: 80 runs - 5 failures
Solaris with patch: 80 runs - 0 failures

Linux without patch: 80 runs - 2 failures
Linux with patch: 80 runs - 0 failures

Description of the patch:

Right before BasicDaemon invokes performWork(), it now checks (inside
a synchronized block) that the client has not unsubscribed.
BasicDaemon.unsubscribe() now has a synchronized block which checks
whether the client that is about to be unsubscribed is being
serviced. If it is being serviced, unsubscribe() waits until
performWork() has finished before it returns.

With this patch, the behaviour of BasicDaemon.unsubscribe()
changes. Before, it would always return immediately. Now, it returns
immediately if the client that wants to unsubscribe is not being
serviced. Otherwise, it waits until the client's performWork() method
has finished. This means that if performWork() enters a deadlock,
unsubscribe() might never return. I think this is acceptable since the
javadoc for BasicDaemon says:

  [The] performWork method should be well behaved - in other words, it
  should not take too long or hog too many resources or deadlock with
  anyone else.


> unit/daemonService.unit fails intermittently: 'ran out of time'
> ---------------------------------------------------------------
>          Key: DERBY-989
>          URL: http://issues.apache.org/jira/browse/DERBY-989
>      Project: Derby
>         Type: Test

>   Components: Regression Test Failure
>     Versions:
>  Environment: OS: Solaris 10 3/05 s10_74L2a X86 - SunOS 5.10 Generic, JVM: Sun Microsystems
Inc. 1.5.0_04
> OS: Solaris 9 9/04 s9s_u7wos_09 SPARC - SunOS 5.9 Generic_118558-11, JVM: Sun Microsystems
Inc. 1.5.0_03
> OS: Red Hat Enterprise Linux AS release 3 (Taroon Update 4) - Linux 2.4.21-27.ELsmp #1
SMP Wed Dec 1 21:50:31 EST 2004 GNU/Linux, JVM: Sun Microsystems Inc. 1.5.0_03
>     Reporter: Ole Solberg
>     Assignee: Knut Anders Hatlen
>     Priority: Minor
>  Attachments: 989-411220-derbyall_derbyall_unit_unit_derby.log, derby-989-timebomb.diff,
derby-989-timebomb.stat, derby-989-v1.diff, derby-989-v1.stat
> "Signature":
> ********* Diff file unit/unit/daemonService.diff
> *** Start: daemonService jdk1.5.0_04 unit:unit 2006-02-14 20:46:42 ***
> 2 del
> < -- Unit Test T_DaemonService finished
> 2 add
> > ran out of time
> > Shutting down due to unit test failure.
> > Exit due to time bomb
> Test Failed.
> *** End:   daemonService jdk1.5.0_04 unit:unit 2006-02-14 21:47:13 ***
> http://www.multinet.no/~solberg/public/Apache/Derby/Limited/testSummary-377800.html [SunOS-5.10

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message