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.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,WEIRD_QUOTING autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 2765 invoked from network); 5 Oct 2023 18:53:02 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 5 Oct 2023 18:53:02 -0000 Received: (qmail 3224 invoked by uid 550); 5 Oct 2023 18:52:59 -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 3192 invoked from network); 5 Oct 2023 18:52:59 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chave-us.20230601.gappssmtp.com; s=20230601; t=1696531967; x=1697136767; darn=lists.openwall.com; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=9pmnCjRUPW79QSW8LK4vGcydT11TSnI3jdnqcGbWAOk=; b=2YalJ3/LKtcAAX94Pl2g6pjJq411orhLmEmfSGzEpZk1WleDTPL2p0vU4qF/SQlGpf U6wJm6JQIm412JgD5wKrZuS+k9YhzNIh/s/gU/EXxnXxGVvUsl/m6EmwI2Kiu76EU07y IjSszXAxSCanx04bcSZhRp+JXFLWgKk+7V84XV1EcULehMddvHMvRA/94Abg7n1KF6Zu CeOvUH+LHMcz4VfBx+DogUp4lhNbxrZHGDOMtmAY7Byw+fKKdH1SE5bUgQck+L3gaG2h ZCv2TcAZKNbUVJ44k3MXyS5T6F2sl3jw9v8xju6r+dDERhjVszUyefLYWJ1jv8raLzxn q49A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696531967; x=1697136767; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=9pmnCjRUPW79QSW8LK4vGcydT11TSnI3jdnqcGbWAOk=; b=nTgvNkudyVqCnD1WSW41NqnfMbygeQcqUXL9hZ+uAjnN4sFlBHEH2U1ojnbF3gWH4X oEdzvxFt00z2hAWgyYK64vL0/9DLfXGg5ow5R9Q/SrEjsOYwu+mGT2frG0W0uZiDQtVl ZtcGYP1V+/5G/fGC3MCVI2BvjS8PdR208QJzq7knk/+Oo6JagWbulQgEGdlyCW0l0yXs cry4lyK8DLFsjigBJVW9YVJ60UCeK9qp3xZtxkLYnx3hG9hntT39z/PD+QtruO+N5Tsv OBLgJsdS8ubZH5FxmM2lm95QcicrLxzhJBOrdXZqFHESRJb1YW9STz/Fq5yOSuiV9jCE XX0g== X-Gm-Message-State: AOJu0YxS40LCH6zCLciWq11+gLngUiTTMqFI4CjjjE1q0XKs8s2PswPR iH7wrtsh1KqCwSCmrML4kW6qasLCUZwtLKRFu7AoiiDkf09hLzRib4Q= X-Google-Smtp-Source: AGHT+IHI28B/9C9VVtOYGfD5PTKvYbu/IOkDmm4Yb+4I5Qh+dmfAqmjg2Z0kZOuT2wKR22YHEyUlU9oYmd2kjEsC7go= X-Received: by 2002:aa7:d3cb:0:b0:522:4764:8baa with SMTP id o11-20020aa7d3cb000000b0052247648baamr3380389edr.12.1696531966979; Thu, 05 Oct 2023 11:52:46 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Carl Chave Date: Thu, 5 Oct 2023 14:52:35 -0400 Message-ID: To: musl@lists.openwall.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [musl] Hung processes with althttpd web server Markus, > 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. One of the patches I applied adds the pid to the end of the logfile entry so I could better track the type of requests that were triggering the hang. In this case, the hung pid is 9780. The logfile entry for 9780 is: 2023-10-04 10:32:19,174.138.61.44,"http://","",400,3,180,258,0,0,0,47,1,"","",7,200,9780 The 400 response code is handled here: https://sqlite.org/althttpd/file?ci=tip&name=althttpd.c&ln=2686-2693 The signal handler section: https://sqlite.org/althttpd/file?ci=tip&name=althttpd.c&ln=1229-1261 Looks like it's supposed to log a line with 131, 132, 133, or 139 (or nTimeoutLine though I'm not exactly sure what value to look for on that) in the second to last log field and I'm not seeing any of those. Not arguing with your analysis but I'm trying to figure out how to verify it. I could try running with: --debug BOOLEAN Disables input timeouts. This is useful for debugging when inputs are being typed in manually. Though I'm not sure if that would help or cause more problems. Carl