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
    hanno (hanno@mastodon.social)'s status on Tuesday, 13-Jan-2026 20:47:17 JST hanno hanno

    Mysterious bug from hell: I noticed that a Docker container running an Apache web server was sometimes shutting down for no apparent reason, but rarely enough that it was difficult to reproduce. After adding some debugging (given this shuts down the container there was no way to access the logs afterwards easily) and waiting for the issue to show up again.

    🧵

    In conversation about 9 months ago from mastodon.social permalink
    • Embed this notice
      hanno (hanno@mastodon.social)'s status on Tuesday, 13-Jan-2026 20:47:14 JST hanno hanno
      in reply to

      Reported: https://github.com/docker-library/httpd/issues/280

      In conversation about 9 months ago permalink

      Attachments

      1. Domain not in remote thumbnail source whitelist: opengraph.githubassets.com
        httpd container unexpectedly stops when resizing terminal window · Issue #280 · docker-library/httpd
        When one starts the container and resizes the terminal window, it suddenly stops. To reproduce: docker run httpd:latest [...] [resizing window] [Tue Jan 13 11:25:11.623227 2026] [core:notice] [pid ...
    • Embed this notice
      Rich Felker (dalias@hachyderm.io)'s status on Tuesday, 13-Jan-2026 20:47:14 JST Rich Felker Rich Felker
      in reply to

      @hanno Unless they actively unignore/unblock it, you could use the fact that signal mask and disposition are inherited by child processes (or exec) to work around this - start it via a wraper that ignores or blocks SIGWINCH.

      In conversation about 9 months ago permalink
    • Embed this notice
      hanno (hanno@mastodon.social)'s status on Tuesday, 13-Jan-2026 20:47:15 JST hanno hanno
      in reply to

      For what it's worth: this also happens with the official Dockerhub httpd image...
      So I guess they haven't found a workaround yet either...

      In conversation about 9 months ago permalink
    • Embed this notice
      hanno (hanno@mastodon.social)'s status on Tuesday, 13-Jan-2026 20:47:16 JST hanno hanno
      in reply to

      I mean, why does apache, A WEB SERVER THAT SHOULD NOT DISPLAY MUCH ON THE TERMINAL AND CERTAINLY HAS NO GUI TO REDRAW, care when I resize my terminal?
      Turns out, as you can read here https://stackoverflow.com/a/787509/3780436 or in their bug tracker (however, they locked down their bugtracker and you cannot even read it without registration) that, apparently, apache decided to reuse the SIGWINCH signal as you usually don't run apache in the foreground...

      In conversation about 9 months ago permalink

      Attachments


    • Embed this notice
      hanno (hanno@mastodon.social)'s status on Tuesday, 13-Jan-2026 20:47:16 JST hanno hanno
      in reply to

      I guess there's some way to workaround this... just have to figure out how.

      But... certainly unexpected, and given that "run thing in the foreground in your container" is pretty common stuff these days, maybe Apache should reconsider that decision...

      In conversation about 9 months ago permalink
    • Embed this notice
      hanno (hanno@mastodon.social)'s status on Tuesday, 13-Jan-2026 20:47:17 JST hanno hanno
      in reply to

      Today, the issue showed up again, this time with my debugging code showing me the logfiles before shuttiing down the container:
      "AH00170: caught SIGWINCH, shutting down gracefully"

      What is SIGWINCH? It is a signal for "window change", aka, I resized the terminal window. Ok... that makes some sense that I would observe this occasionally, but not reproducibly, and resizing a terminal is certainly not something I had expected as the cause. But... why?

      In conversation about 9 months ago permalink
    • Embed this notice
      Rich Felker (dalias@hachyderm.io)'s status on Tuesday, 13-Jan-2026 21:11:09 JST Rich Felker Rich Felker
      in reply to

      @hanno I don't think shell can block but it can set to ignore with trap command and "" as action. See if that works.

      In conversation about 9 months ago permalink
    • Embed this notice
      hanno (hanno@mastodon.social)'s status on Tuesday, 13-Jan-2026 21:11:10 JST hanno hanno
      in reply to
      • Rich Felker

      @dalias how would I do that practically? can you block a signal in a shell script or does that have to be a c wrapper or something alike?

      In conversation about 9 months ago permalink
    • Embed this notice
      Rich Felker (dalias@hachyderm.io)'s status on Tuesday, 13-Jan-2026 21:12:09 JST Rich Felker Rich Felker
      in reply to
      • dwagenk

      @dwagenk @hanno Need "" around $@ or it's same as $*

      In conversation about 9 months ago permalink
    • Embed this notice
      dwagenk (dwagenk@chaos.social)'s status on Tuesday, 13-Jan-2026 21:12:18 JST dwagenk dwagenk
      in reply to
      • Rich Felker

      @hanno @dalias

      shell script should work:

      ```
      #!/bin/sh

      trap "" SIGWINCH

      exec $@
      ```

      (untested, I am writing this on a phone...)

      In conversation about 9 months ago permalink
    • Embed this notice
      Rich Felker (dalias@hachyderm.io)'s status on Wednesday, 14-Jan-2026 00:02:18 JST Rich Felker Rich Felker
      in reply to

      @hanno strace might show what's going on.

      In conversation about 9 months ago permalink
    • Embed this notice
      hanno (hanno@mastodon.social)'s status on Wednesday, 14-Jan-2026 00:02:19 JST hanno hanno
      in reply to
      • Rich Felker

      @dalias for what it's worth, I couldn't get this to work. But it seems there's some subtlety, trap command having different usage depending on shell, etc.
      For now, it appears putting apache in the back and having "sleep inf" as the main command seems the most pragmatic solution (in case I'm not missing some downside I haven't yet learned about).

      In conversation about 9 months 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.