git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] read-cache: fix division by zero core-dump

From
Ramsay Jones <ramsay@ramsayjones.plus.com>
Date
Sep 28, 2018, 15:31 UTC
Message-ID
<da607bd3-c91b-556d-b342-927cb2f773c7@ramsayjones.plus.com>
In-Reply-To
<8a76234e-fcf8-f435-33e9-1846c3b6ad14@gmail.com>
On 28/09/18 02:20, Ben Peart wrote:
Show 24 quoted lines
> 
> 
> On 9/27/2018 6:24 PM, Ramsay Jones wrote:
>>
>> commit 225df8a468 ("ieot: add Index Entry Offset Table (IEOT)
>> extension", 2018-09-26) added a 'DIV_ROUND_UP(entries, ieot_blocks)
>> expression, where ieot_blocks was set to zero for a single cpu
>> platform. This caused an SIGFPE and a core dump in practically
>> every test in the test-suite, until test t4056-diff-order.sh, which
>> then went into an infinite loop!
>>
>> Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
>> ---
>>
>> Hi Ben,
>>
>> Could you please squash this into the relevant commits on your
>> 'bp/read-cache-parallel' branch. (The first hunk fixes a sparse
>> warning about using an integer as a NULL pointer).
>>
> 
> Absolutely - thanks for the patch.
> 
> I don't know how long it's been since I've been on a single core CPU - I'm sad for you. ;-)

Heh, don't be - whilst I do still have a single cpu laptop about the place _somewhere_, I haven't booted it up in about 15 years! :-D

I used to regularly test git (and other software) on my old 32-bit laptop (windows xp/Linux Mint 17.x, Core2 duo), but just lately I have taken to using a 32-bit VM on my current laptop (4th gen i5) instead. (The git test-suite would take approx 50 min to run on the 32-bit hardware, whereas it only takes 8 min on the VM!).

I have configured the 32-bit VM with a single cpu, because when the VM was configured with two cpus the git test-suite would take longer to run (approx. 8 -> 10 min)! Taking more resources from the host, but increasing the running time, didn't seem like a good return. ;-)

Also, this is not the first time some multi-threaded code in git has 'failed' by assuming more than one cpu, so ...

ATB, Ramsay Jones

Previous: Ben PeartNext: Derrick Stolee
Message 3 of 4 in “read-cache: fix division by zero core-dump”
  1. read-cache: fix division by zero core-dumpRamsay Jones, Sep 27, 2018
  2. Ben PeartSep 28, 2018
  3. Ramsay JonesSep 28, 2018
  4. Derrick StoleeOct 1, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.