Opened 11 years ago

Last modified 6 years ago

#210 reopened defect


Reported by: Silvan Scherrer Owned by: bird
Priority: normal Milestone:
Component: libc-backend Version:
Severity: normal Keywords:


setting the O_NonBlock flag seems to work, but clearing the flag seems not to work. we found this problem in samba. as samba after clearing the flag still produced EAGAIN. now we changed the fcntl() with os2_ioctl() and the flags are set properly.

Change History (11)

comment:1 Changed 10 years ago by bird

Component: baselayoutlibc-backend
Milestone: libc-0.6.4

comment:2 Changed 9 years ago by Yuri Dario

it seems that os/2 ioctl FIONBIO reversed data parameter, e.g. data==0 set non-blocking status.

comment:3 Changed 9 years ago by bird

(In [3708]) nonblock-1.c: extended the testcase. References #210.

comment:4 Changed 9 years ago by bird

Resolution: worksforme
Status: newclosed

Not able to reproduce the behavior with the testcase using either method: source:trunk/libc/tests/libc/smoketests/nonblock-1.c

comment:5 Changed 9 years ago by bird

I've verified the correctness of the testcase on mac os x. So, it's either some more complicated thing or a bug in the samba port.

comment:6 Changed 9 years ago by Yuri Dario

I had to add similar code to exim, courier-imap and tcl to get sockets working correctly.

comment:7 Changed 9 years ago by Silvan Scherrer

i guess it's more complicated, as also in samba it did not happen every time. and usually it happened after some hours/days of samba running.

comment:8 Changed 9 years ago by Silvan Scherrer

Resolution: worksforme
Status: closedreopened

i just found another evidence, that fcntl() is not clearing the O_NONBLOCK right. in samba the socket flags where retrieved with fcntl(), set to nonblocking and later is restored the saved flags with fcntl(). now when the client wanted to send some stuff larger than around 33kb we got a WOULDBLOCK back and not all bytes where sent with writev(). after setting the socket with ioctl() to nonblocking all worked as it should. so i guess with small chunks of date it always works, but with larger the problem can be seen. at least in samba we could reproduce the same behaviour on different installations.

comment:9 Changed 9 years ago by Silvan Scherrer

Milestone: libc-0.6.4libc-0.6.5

comment:10 Changed 9 years ago by Silvan Scherrer

comment:11 Changed 6 years ago by Yuri Dario

Milestone: libc-0.6.6
Note: See TracTickets for help on using tickets.