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

Solaris test t5500 race condition

From
PEPeter Eriksen <s022018@student.dtu.dk>
Date
Apr 14, 2006, 03:17 UTC
Message-ID
<20060414031759.GA9524@bohr.gbar.dtu.dk>
Hello,

I've found a race in t5500-fetch-pack.sh. The problem is the way the number of unpacked objects are counted:

    pack_count=$(grep Unpacking log.txt|tr -dc "0-9")

It just concatenates all the digits on the line with "Unpacking" in it. This is the output I get on Solaris:

    Generating pack...
    Done counting 3 objects.
    Deltifying 3 objects.
      33% (1/3) done^M  66% (2/3) done^M 100% (3/3) done
    Total 3Unpacking , written 33 objects          <------------
     (delta 0), reused 0 (delta 0)
    11fa2f0cb58ed7f02dbd5ac75ed82a53fae62a7b refs/heads/A

The marked line is written as a joyful duet between these two functions:

    unpack-objects.c:   fprintf(stderr, "Unpacking %d objects\n",
                                nr_objects);
    pack-objects.c:     fprintf(stderr, "Total %d, written %d 
                                (delta %d), reused %d (delta %d)\n",
I can't think of a good solution right now.
Regards,
Peter
Next: Jason Riedy
Message 1 of 5 in “Solaris test t5500 race condition”
  1. Peter EriksenApr 14, 2006
  2. Jason RiedyApr 14, 2006
  3. Junio C HamanoApr 14, 2006
  4. Peter EriksenApr 14, 2006
  5. Jason RiedyApr 14, 2006

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.