Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005783OCamlOCaml windowspublic2012-10-10 15:572016-04-19 13:27
Assigned To 
PlatformOSOS Version
Product Version4.00.1 
Target Version4.03.1+devFixed in Version 
Summary0005783: returns immediately when waiting for the completion of a non-blocking socket connection
DescriptionThe C function [select_data_dispatch] checks whether the socket is connected, and systematically consider that the socket is ready when it is not connected.

Thus, when this function is involved, there is no way to wait for the completion of a non-blocking socket connection.

Since OCaml 4, there is a fast path when all file descriptors are sockets. Hence, the bug only occurs when we are also selecting file descriptors of a different kind.

The attached piece of code reproduces the bug.
Attached Files? file icon [^] (761 bytes) 2012-10-10 15:57 [Show Content]

- Relationships

-  Notes
vouillon (reporter)
2012-10-10 17:14

Maybe the check in [select_data_dispatch] can just be removed? The consequence would be that a non-connected socket will never be reported as ready by [] (contrary to what happens under Unix). But this is already the case with the Winsock implementation of [select], which is used when [] is called only with sockets...

- Issue History
Date Modified Username Field Change
2012-10-10 15:57 vouillon New Issue
2012-10-10 15:57 vouillon File Added:
2012-10-10 17:14 vouillon Note Added: 0008241
2013-01-03 16:37 doligez Status new => acknowledged
2013-01-03 16:37 doligez Target Version => 4.00.2+dev
2013-07-11 17:59 doligez Target Version 4.00.2+dev => 4.01.0+dev
2013-08-19 15:41 doligez Target Version 4.01.0+dev => 4.01.1+dev
2014-05-25 20:20 doligez Target Version 4.01.1+dev => 4.02.0+dev
2014-07-30 23:02 doligez Tag Attached: patch
2014-07-30 23:02 doligez Target Version 4.02.0+dev => 4.02.1+dev
2014-09-04 00:25 doligez Target Version 4.02.1+dev => undecided
2014-09-24 19:57 doligez Target Version undecided => 4.02.2+dev / +rc1
2015-01-16 22:48 doligez Target Version 4.02.2+dev / +rc1 => 4.03.0+dev / +beta1
2016-04-19 13:27 doligez Target Version 4.03.0+dev / +beta1 => 4.03.1+dev

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker