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.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,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 28772 invoked from network); 5 Oct 2023 03:37:57 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 5 Oct 2023 03:37:57 -0000 Received: (qmail 1929 invoked by uid 550); 5 Oct 2023 03:37:54 -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 1897 invoked from network); 5 Oct 2023 03:37:53 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1696477061; x=1697081861; i=nullplan@gmx.net; bh=QgThvqWDSku47BmMYpZgbtdhbzA66bvQBbEylXnLjjM=; h=X-UI-Sender-Class:Date:From:To:Subject:References:In-Reply-To; b=WRTy9jKLKz0WIGX1o2C/gxnJqXQNJGFCohM5Y44i4hFnN15Fr7YFpwwZG7VLylzhOCnuFO5yof4 axLgoOruBAGQa0ZXmGUW0yzv5qXffvQh6YNDcLgRquYa7C5b0DNq3KUVw0MtuUcXOsj7cr2UpLLFS Zku2HWZPhMJYgX6z+NbHyZCgkCtV7DCwk4mhZpPDCnj9JrzFaRsPRlXywv7D5zhAlyWVP7afuCGx/ qsdDjBXVzPYmBhlpwjXneXsoVRT5QmRWI7TzJILX+uP+iD3WP9QKDeLfAo4wU9DXgTvMjh93ojh7Q 4NMzAy3sIwIPZ3flWt+qLcQKz7kEWHdsSQaQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Date: Thu, 5 Oct 2023 05:37:41 +0200 From: Markus Wichmann To: musl@lists.openwall.com Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Provags-ID: V03:K1:2XWktDbbfWXT0aixiEznRQv3zbWWOtVql3m4LsNGs2QC0GuHKQn /Mtj9BIv7M9a8Mdg9Hvm6cuvrJhpOxRUy1dsCI3cudxX2N4s/V8nzExKruTMqIHBA1SPy0r y5/mr+pgdJI0WXT1iUObInbiTVr+jJuVUCBBr9eamTS81utA5WOO54/fmKi+icvdL1J3f6X KF2BCQ9u2rJSArJuqfpxg== UI-OutboundReport: notjunk:1;M01:P0:WMDDqVp3tSI=;R+cigdaXuZad+cZwPwFu0FiKKBP lGHnWg/KcEw1bReO3APpQV1yO6lLzK/sBvVyKcJS0juqaEX4wQyn5rveET2P/0t6MK4uyctGT pk/2O8BXBzRswgxdQe4Ud8QsAG3yutD3iaxHNFMWEQCoN1c6qjD3PsUQrRyOBajoA5ilFHq6o QleadQWul0vpWqEHGX3oy///FyYrcVN2iPNIyR30FORdueWIJemHWK2gouk34Rktry2/kE+gE V7LsWOhbOnwLp6p4LeZNVpM6Mcrw19c1fMcc7EM8EzpViCpEn11H6hCRqmbkFtzcd3Mf9tepk bdZ1okPm+Yg9Cx79HkGIsycuBl6LAHFYrPO1E1ZEj2CyLn+ohWBoG3Ii/OJvk3bbhuY7aQgZR TMPD2Pz5PfePBbedARp9yjU6j0Fzg8CUuFN6Ad64Zc7l6a6okaY5EirdWhZhp1mG+tszgWZg2 RFGgNyVB1SG/0/T+dgOnpo/1/PAyyNUQXDwkavrLYdDtcgM7ynIjB2f0HrfpXBH2IJzKU6ZyD 4zEe7ucBI/5el0U8HMGp6ulYkrXj3LWrKsno2/QDEK3fmpbV4fPawN68qaMCMV9cyqr7AMUYl QNk6403mm9Mg+c0RYjuMzGs281fqItYTcwvE9CISkznQEiW2WzwDGXyqwQFEImdhmFifj3uM7 iZhk/Plwl6RNcfV+IbBJdovNkmfAKcPlMdB9jqkdA37QsDMNWa/0i74lbq+naaWvYeqjACSTB hfEM7nnS0HNLWK2Qx/YiKM/jIBqyWkk3v7i6V6bMExgaUoK2LIIJfdjGShAHC5supBB5s+IWc HeZX26xSbudzbPbg6x/YWlZcPf/apjGr+nK8ApNn99U6CE1iWw2YndmqbV1UQgHzBb8yjHfsd Df4hz3dCnSwT/nKyQ9j/g7LrcYs5ZwyoNIp0txjchxUVNG5jFguZYZLrauC//CayD6Or+WeS8 v2j9ZKtswF1j5dcq8pHhxmmGw0o= Content-Transfer-Encoding: quoted-printable Subject: Re: [musl] Hung processes with althttpd web server Am Wed, Oct 04, 2023 at 09:41:41PM -0400 schrieb Carl Chave: > Hello, I'm running the althttpd web server on Alpine Linux using a Ramno= de 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 > I often see this system call hung when signal handlers are doing signal-unsafe things. Looking at the source code, that is exactly what happens if the process catches a signal at the wrong time. Try removing all calls to signal(); that should do what the designers intended better (namely quit the process). If you want to log when a process dies of unnatural causes, that's something the parent process can do. The signal handler will call MakeLogEntry(), and that will do signal-unsafe things such as call free(), localtime(), or fopen(). If the main process is currently using malloc() when that happens, you will get precisely this hang. > Please see this forum thread for additional information: > https://sqlite.org/althttpd/forumpost/4dc31619341ce947 > Seems like they haven't yet found the trail of the signal handler. Ciao, Markus