Mantis - Resin
|
|||||
Viewing Issue Advanced Details | |||||
|
|||||
ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
5627 | major | always | 01-03-14 13:16 | 09-12-14 10:50 | |
|
|||||
Reporter: | bean | Platform: | |||
Assigned To: | ferg | OS: | |||
Priority: | normal | OS Version: | |||
Status: | closed | Product Version: | 4.0.38 | ||
Product Build: | Resolution: | fixed | |||
Projection: | none | ||||
ETA: | none | Fixed in Version: | 4.0.41 | ||
|
|||||
Summary: | 0005627: data corruption due to improper handing of EINTR | ||||
Description: |
several JNI methods do not handle an errno of EINTR. The result is corrupted data. EINTR is the status return of a syscall that was interrupted in order to deliver a signal to the thread. In general, the user process should just restart the syscall. The problem is most likely to occur when resin is sitting on a recv() waiting to get data and the recv syscall gets interrupted by a signal. The bad methods are: common/streams.c: std_read(), std_write(), cse_fill_buffer() resin_os/std.c: std_read(), std_read_nonblock(), std_write(), std_write_nonblock() |
||||
Steps To Reproduce: | |||||
Additional Information: |
(1) The Azul JVM, Zing, can sometimes have a high signal rate, which has then hit this problem. (2) I've uploaded a fixed version of std.c, with the code ifdef'd by #ifdef FIX_EINTR, to illustrate the correct behavior. |
||||
Relationships | |||||
Attached Files: |
std.c [^] (11,818 bytes) 01-03-14 13:16 std.c.2 [^] (11,855 bytes) 01-15-14 08:30 |
Notes | |||||
|
|||||
|
|