[Mono-bugs] [Bug 470951] New: Most functions in io-portability.c and io.c does not handle EINTR correctly.

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Jan 30 07:02:35 EST 2009


https://bugzilla.novell.com/show_bug.cgi?id=470951


           Summary: Most functions in io-portability.c and io.c does not
                    handle EINTR correctly.
    Classification: Mono
           Product: Mono: Runtime
           Version: 2.2.x
          Platform: 32bit
        OS/Version: Solaris 10
            Status: NEW
          Severity: Minor
          Priority: P5 - None
         Component: io-layer
        AssignedTo: dick at novell.com
        ReportedBy: burkhard.linke at CeBiTec.Uni-Bielefeld.DE
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Most functions in the io-layer does not handle EINTR correctly if syscalls
return and indicate and error.

EINTR indicates that the syscall was interrupted by a signal. Since I'm working
with networked filesystems file operation may take some time if the nfs server
is under high load, raising the probability that signals may occur while being
blocked in the syscall.

The result are irreproducible errors. Since EINTR is not handled in the
indented way (restarting the syscalls), the error is propagated to the upper
layers, resulting in IOExceptions.

The attached patches add wrappers to most syscalls in mono/io-layer/io.c and
mono/io-layer/io-portability.c that restart syscalls if they were interrupted
by a signal.

According to the Solaris manpages "lseek" is one of the few syscalls used in
the files that does not return EINTR; so the calls to lseek are not patched.

You should check the files afterwards in case I've missed some syscalls.

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list