GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Conversation

Notices

  1. Embed this notice
    Stefan Eissing (icing@chaos.social)'s status on Sunday, 14-Sep-2025 02:10:58 JST Stefan Eissing Stefan Eissing

    RIP pthread_cancel() in curl. It was an interesting adventure.
    #curl

    https://eissing.org/icing/posts/rip_pthread_cancel/

    In conversation about a year ago from chaos.social permalink

    Attachments

    1. Domain not in remote thumbnail source whitelist: eissing.org
      RIP pthread_cancel
      I posted about adding pthread_cancel use in curl about three weeks ago, we released this in curl 8.16.0 and it blew up right in our faces. Now, with #18540 we are ripping it out again. What happened? short recap pthreads define “Cancelation points”, a list of POSIX functions where a pthread may be cancelled. In addition, there is also a list of functions that may be cancelation points, among those getaddrinfo(). getaddrinfo() is exactly what we are interested in for libcurl. It blocks until it has resolved a name. That may hang for a long time and libcurl is unable to do anything else. Meh. So, we start a pthread and let that call getaddrinfo(). libcurl can do other things while that thread runs.
    • Embed this notice
      Rich Felker (dalias@hachyderm.io)'s status on Sunday, 14-Sep-2025 02:16:28 JST Rich Felker Rich Felker
      in reply to

      @icing I don't think you should drop it so easily. This is a bug in glibc that they hopefully will fix.

      "May be a cancellation point" is not a license for the implementation to just leave cancellation enabled to randomly happen at any point. It's a requirement on the implementation to either block cancellation internally around the whole operation, or arrange for it to happen in a safe and controlled manner where, if cancellation is acted upon, there are no side effects.

      Of course you will, if you keep it, need an option at build time to only enable use on systems where it's not buggy.

      In conversation about a year ago permalink

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.