On 9/25/06, Geir Magnusson Jr. <[EMAIL PROTECTED]> wrote:
On Sep 25, 2006, at 5:19 AM, Vladimir Gorr wrote:
> As for me (and other people) a lot of tests fail for the latest
> sources (revision 449592).
> I've run the build.bat clean; build.bat update; build.bat command
> in compliance with comments for H-1457.
> It's very strange for me it mentions here all C-unit tests work
> fine. Sorry I cannot confirm this.
It certainly did on my machine after a clean - update build, and then
hung on gc.LOS.
> The detailed investigation showed the patch for H-1457 is
> incorrect. I've attached a patch fixing this issue.
> Thanks Evgueni Brevnov for preparing this patch. After applying
> these changes the issue disappeared.
Where is that patch? it didn't make it through to list - can you
just re-open 1457 and attach there?
Not I cannot due to I have no permissions for this.
Our patch looks like this:
Index: apr_thread_ext.c
===================================================================
--- apr_thread_ext.c (revision 449604)
+++ apr_thread_ext.c (working copy)
@@ -28,14 +28,14 @@
APR_DECLARE(apr_status_t) apr_thread_set_priority(apr_thread_t *thread,
apr_int32_t priority)
{
- HANDLE *os_thread;
+ apr_os_thread_t * os_thread;
apr_status_t status;
- if (status = apr_os_thread_get(&((apr_os_thread_t *)os_thread),
thread)) {
+ if (status = apr_os_thread_get(&os_thread, thread)) {
return status;
}
- if (SetThreadPriority(*os_thread, (int)convert_priority(priority))) {
+ if (SetThreadPriority((HANDLE)os_thread,
(int)convert_priority(priority))) {
return APR_SUCCESS;
} else {
return apr_get_os_error();
@@ -50,23 +50,24 @@
// touch thread to flash memory
APR_DECLARE(apr_status_t) apr_thread_yield_other(apr_thread_t* thread) {
- HANDLE *os_thread = NULL;
+ apr_os_thread_t * os_thread = NULL;
apr_status_t status;
- if (status = apr_os_thread_get(&((apr_os_thread_t *)os_thread),
thread)) {
+ if (status = apr_os_thread_get(&os_thread, thread)) {
return status;
}
- if(!os_thread) {
-// printf ("detached thread\n");
- return status;
- }
- //printf("suspending %d\n", *os_thread);
- if(-1!=SuspendThread(*os_thread)) {
- ResumeThread(*os_thread);
- // printf("resuming %d\n", *os_thread);
- } else {
- // printf("fail to suspend %d\n", *os_thread);
- }
- return APR_SUCCESS;
+ if(!os_thread) {
+ // printf ("detached thread\n");
+ return status;
+ }
+
+ // printf("suspending %d\n", *os_thread);
+ if(SuspendThread((HANDLE)os_thread) != -1) {
+ ResumeThread((HANDLE)os_thread);
+ // printf("resuming %d\n", *os_thread);
+ } else {
+ // printf("fail to suspend %d\n", *os_thread);
+ }
+ return APR_SUCCESS;
}
APR_DECLARE(void) apr_memory_rw_barrier() {
@@ -79,19 +80,19 @@
FILETIME exitTime;
FILETIME kernelTime;
FILETIME userTime;
- HANDLE *hThread;
+ apr_os_thread_t * os_thread;
SYSTEMTIME sysTime;
int res;
__int64 xx;
__int32 * pp;
apr_status_t status;
- if (status = apr_os_thread_get(&((apr_os_thread_t *)hThread), thread))
{
+ if (status = apr_os_thread_get(&os_thread, thread)) {
return status;
}
res = GetThreadTimes(
- *hThread,
+ (HANDLE)os_thread,
&creationTime,
&exitTime,
&kernelTime,
@@ -125,13 +126,15 @@
APR_DECLARE(apr_status_t) apr_get_thread_time(apr_thread_t *thread,
apr_int64_t* nanos_ptr)
{
- HANDLE *os_thread;
+ apr_os_thread_t * os_thread;
apr_status_t status;
FILETIME creation_time, exit_time, kernel_time, user_time;
- if (status = apr_os_thread_get(&((apr_os_thread_t *)os_thread),
thread)!=APR_SUCCESS) {
+
+ status = apr_os_thread_get(&os_thread, thread);
+ if (status != APR_SUCCESS) {
return status;
}
- GetThreadTimes(*os_thread, &creation_time,
+ GetThreadTimes((HANDLE)os_thread, &creation_time,
&exit_time, &kernel_time,
&user_time);
@@ -141,13 +144,15 @@
}
APR_DECLARE(apr_status_t) apr_thread_cancel(apr_thread_t *thread) {
- HANDLE *os_thread;
+ apr_os_thread_t * os_thread;
apr_status_t status;
- if (status = apr_os_thread_get(&((apr_os_thread_t *)os_thread),
thread)) {
+
+ status = apr_os_thread_get(&os_thread, thread);
+ if (status != APR_SUCCESS) {
return status;
}
- if (TerminateThread(*os_thread, 0)) {
+ if (TerminateThread((HANDLE)os_thread, 0)) {
return APR_SUCCESS;
} else {
return apr_get_os_error();
Thanks,
Vladimir.
> Geir, could you please look at this patch and apply it if there are
> no objections?
>
> Thanks in advance,
> Vladimir.
>
> On 9/24/06, Geir Magnusson Jr. <[EMAIL PROTECTED]> wrote: Ok, I'm not
> as worried - I went back a few days to r447025 and still
> have the problem, so it's not from this morning. I guess this has
> been masked all along by the logger problem. Noted in JIRA
> HARMONY-1560
>
> geir
>
> On Sep 23, 2006, at 11:04 AM, Geir Magnusson Jr. wrote:
>
> > This is completely my fault.
> >
> > The latest round of patches, while I dutifully do smoke, c-unit and
> > kernel tests for each patch, I didn't do any app testing.
> >
> > I tried to run ActiveMQ, and it breaks with an asset in
> > object_handles.cpp : 99
> >
> > I'm going to back out the two GC patches I applied and hope for the
> > best.
> >
> > geir
> >
> >
> >
> ---------------------------------------------------------------------
> > Terms of use : http://incubator.apache.org/harmony/mailing.html
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: harmony-dev-
> [EMAIL PROTECTED]
> >
>
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]