From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 25395 invoked from network); 5 Oct 2023 02:15:52 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 5 Oct 2023 02:15:52 -0000 Received: (qmail 7196 invoked by uid 550); 5 Oct 2023 02:15:49 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 6117 invoked from network); 5 Oct 2023 02:15:47 -0000 Date: Wed, 4 Oct 2023 22:15:39 -0400 From: Rich Felker To: Carl Chave Cc: musl@lists.openwall.com Message-ID: <20231005021539.GG4163@brightrain.aerifal.cx> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [musl] Hung processes with althttpd web server On Wed, Oct 04, 2023 at 09:41:41PM -0400, Carl Chave wrote: > Hello, I'm running the althttpd web server on Alpine Linux using a Ramnode VPS. > > I've been having issues for quite a while with "hung" processes. There > is a long lived parent process and then a short lived forked process > for each http request. What I've been seeing is that the forked > processes will sometimes get stuck: > > sod01:/srv/www/log$ sudo strace -p 11329 > strace: Process 11329 attached > futex(0x7f5bdcd77900, FUTEX_WAIT_PRIVATE, 4294967295, NULL > > Please see this forum thread for additional information: > https://sqlite.org/althttpd/forumpost/4dc31619341ce947 > > That thread is kind of all over the place though as I banged around > trying to figure out how to troubleshoot the issue. The last thing I > tried was to statically build althttpd in a glibc based Void Linux > chroot. I ran that on the Alpine VPS for 37 days without issue. I > switched back to the musl dynamically linked build and 14 hours later > got a hung process. > > Can you give me any tips on how to troubleshoot this further? 1. What Alpine/musl version are you using? If it's older, it might be something that would be different in current versions. 2. Can you attach gdb to the hung process and identify what lock object it's waiting on? 3. Is this stock althttpd from sqlite? 4. Is the process multithreaded? I don't see where althttpd is doing anything with threads but there could be library code I'm not aware of.