Menu

#3 tcp-server accepting logic non thread-safe in same applications

v1.0_(example)
closed-fixed
None
3
2015-08-02
2014-06-14
ksotik
No

In my client-server application I use libevent for a heavily accepting and manipulating with client connections (video streaming application). In your library you are using select() with precalculated max_sock identifier for non-blocking accept new connection, and in some time it can happens situation, when a system generated sock identifier in other program threads can match with your max_sock and then program state will be non consistent. In my patch I replace select() logic to poll() logic without using self generated sock identifier and problem has gone.

1 Attachments

Discussion

  • Sebastien Vincent

    Thank you for the report.

    Yes select() has some limitations, so change to poll() is a good idea.

    In your patch, it misses the poll() for the TCP client socket descriptor. But anyway I will definitely replace the select() stuff by poll().

     
  • Sebastien Vincent

    • status: open --> accepted
    • assigned_to: Sebastien Vincent
    • Priority: 5 --> 3
     
  • Sebastien Vincent

    • status: accepted --> closed-fixed
     
  • Sebastien Vincent

    Available in 0.6 release.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.