You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Gregory Shimansky (JIRA)" <ji...@apache.org> on 2006/11/16 14:47:38 UTC

[jira] Commented: (HARMONY-2203) Asynchronous signal reporter is interrupted by an external signal while is waiting on a semaphore.

    [ http://issues.apache.org/jira/browse/HARMONY-2203?page=comments#action_12450395 ] 
            
Gregory Shimansky commented on HARMONY-2203:
--------------------------------------------

I would change the loop to detect only signal interruption like

while (sem_wait (&wakeUpASynchReporter) == -1 && errno == EINTR);

Other than that I agree with the patch. I someone does not know, every step in gdb also interrupts sem_wait calls, so such loops are a common practice when using semaphores.


> Asynchronous signal reporter is interrupted by an external signal while is waiting on a semaphore.
> --------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2203
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2203
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Linux
>            Reporter: Evgueni Brevnov
>            Priority: Minor
>         Attachments: classlib_sem_wait.patch
>
>
> There is a crash when the classlib is running on top of DRLVM with the HARMONY-2149 applied. The problem is that DRLVM generates SIGUSR2 which interrupts the thread waiting on the "wakeUpASynchReporter" semaphore. The proposed solution is to wait on the semaphore until sem_wait completes successfully. The patch is attached.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira