Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGP1gyP22ut+033jQAJPFjAiSMmLmnw3wackTZzTX9iiMEo6Ww@mail.gmail.com>
Date: Thu, 5 Oct 2023 14:52:35 -0400
From: Carl Chave <online@...ve.us>
To: musl@...ts.openwall.com
Subject: Re: 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

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.