Hi Gene, Yes, this is my concern. It actually happens at our software where a license library use its own socket error handling.
Another concern is, the 15 seconds select change the behavior of non-blocking connect call to 15 seconds blocking. Thanks. Nausac. On 2016/1/16 07:27, "Gene Cooperman" <g...@ccs.neu.edu> wrote: >Hi Nausca, > Sorry for the slow response. I'll summarize your e-mail for >Kapil, who is our specialist in this area. > >Kapil, > You had implemented the ipc plugin. Nausca is proposing an >alternative strategy for registering new socket file descriptors >in our SocketConnList.: > Register the socket ID directly in the select/poll function call? > 1. Every time a user calls select, DMTCP can check if the selected id > is already a registered connection within DMTCP. > 2. If it wasn't previously registered, then register it within > the select/poll function call. > >The motivation follows: > There is a DMTCP wrapper for connect(): > src/plugin/ipc/socket/socketwrappers.cpp:connect(sockfdi, ...) >In that wrapper, if real_connect() fails, then it tries again >for 15 seconds:by calling select([sockfd]). If select() >succeeds, then getsockopt() is tried. If that succeeds, >then sockfd is added to the SocketConnList. > Otherwise, we assume that the user tried to connect to a >non-existent socket, and we don't register sockfd. > The problem with this is that the user may have their >own backup strategy using poll() or select(). So, DMTCP may >fail to register sockfd(), and yet later, the user's call to >select() may discover a valid sockfd. > >For this reason, Nausca is proposing to add logic into the DMTCP >wrapper around select() (and poll()) so that if the user discovers >a valid sockfd, DMTCP will also see this, and DMTCP will register >the sockfd in the SocketConnList. > >Nausca, > Did I summarize the issue correctly? >Best, >- Gene > > >On Wed, Jan 13, 2016 at 07:29:39AM +0000, Nausca Hsu wrote: >> Hi, >> I have been reviewing the ipc plugin package. >> I found that in the connect function, >> Dmtcp will select the socket to ensure it is a valid socket or not(by >>select call), >> And then register it as a valid connect in connectlist class >> This behavior is kind of an error handling, >> User application may have their own error handling. >> If the select fail and dmtcp did not register after 15 seconds, >> And user decide to poll or select(by their default error handling), and >>finally get a valid socket ID, >> Then dmtcp will have a missing connection. >> >> Do you consider register the socket ID in select/poll function call? >> Every time user call a select, dmtcp check if the selected id is a >>registered connection, >> If not->register it. >> >> Thanks. >> Nausca. >> > >> >>------------------------------------------------------------------------- >>----- >> Site24x7 APM Insight: Get Deep Visibility into Application Performance >> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month >> Monitor end-to-end web transactions and take corrective actions now >> Troubleshoot faster and improve end-user experience. Signup Now! >> >>https://urldefense.proofpoint.com/v2/url?u=http-3A__pubads.g.doubleclick. >>net_gampad_clk-3Fid-3D267308311-26iu-3D_4140&d=CwIBAg&c=aUq983L2pue2FqKFo >>P6PGHMJQyoJ7kl3s3GZ-_haXqY&r=yTrYtXirB43TLybS8rmjdSEHLuNfd5w_za3LlC3F5ag& >>m=LOETjlHvOHNd4MK3gecBvxbGBIFQlKNd7jKsgbfsWfc&s=HdDrDKD2TIagtY8N8gS_NMODh >>dsAxX3sjsDWlf9xmss&e= > >> _______________________________________________ >> Dmtcp-forum mailing list >> Dmtcp-forum@lists.sourceforge.net >> >>https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.sourceforge.ne >>t_lists_listinfo_dmtcp-2Dforum&d=CwIBAg&c=aUq983L2pue2FqKFoP6PGHMJQyoJ7kl >>3s3GZ-_haXqY&r=yTrYtXirB43TLybS8rmjdSEHLuNfd5w_za3LlC3F5ag&m=LOETjlHvOHNd >>4MK3gecBvxbGBIFQlKNd7jKsgbfsWfc&s=fO4RVFg2SlSh8nX-XaB3LeMwti_3WGC31sBqAQ1 >>4J3w&e= > ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 _______________________________________________ Dmtcp-forum mailing list Dmtcp-forum@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dmtcp-forum