public inbox for cygwin-apps-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jon TURNEY <jturney@sourceware.org>
To: cygwin-apps-cvs@sourceware.org
Subject: [setup - the official Cygwin setup program] branch topic/logging-race-fix, created. release_2.910-3-g217aada7
Date: Sun,  5 Dec 2021 15:15:44 +0000 (GMT)	[thread overview]
Message-ID: <20211205151544.54A673858C60@sourceware.org> (raw)

        at  217aada741347db9b3d9cbd7ca5752e0541e67c5 (commit)


https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=217aada741347db9b3d9cbd7ca5752e0541e67c5

commit 217aada741347db9b3d9cbd7ca5752e0541e67c5
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Sun Dec 5 14:34:41 2021 +0000

    Fix format() returning a std::string containing a terminating null

https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=a596f6224e1472a106292b8856d9bfe94098cac9

commit a596f6224e1472a106292b8856d9bfe94098cac9
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Fri Dec 3 14:27:12 2021 +0000

    Send postinstall thread complete message last in that thread
    
    Addresses: https://cygwin.com/pipermail/cygwin/2021-November/250084.html
    
    After some staring at the code, it looks like it's possible that the
    cause of this report is the linked list containing log entries to be
    damaged if multiple threads call endLog() simultaneously.
    
    Currently 'Changing gid to Administrators' is logged by the call to
    nt_sec.setAdminGroup() just after the WM_APP_POSTINSTALL_THREAD_COMPLETE
    message is been sent.
    
    'Ending cygwin install' is logged just before main exits.
    
    Make sending the WM_APP_POSTINSTLL_THREAD_COMPLETE message the last
    thing that the postinstall thread does  This should avoid the potential
    for endLog() becing called by multiple threads simultaenously.
    
    Logging is still lousy with race conditions as the std::stringbuf all
    threads are writing to is global (leading to messages from multiple
    threads being concatenated here), and appending to the linked list isn't
    thread-safe, but this should at least avoid this particular infinite
    loop.

https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=fca9a8b72ba94bca826dbbe39d1980f538f57f05

commit fca9a8b72ba94bca826dbbe39d1980f538f57f05
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Wed Dec 1 15:06:20 2021 +0000

    Drop some cruft in logging
    
    The 'hack' referred to in endEntry() was removed in c8356810, but the
    comment wasn't updated.





                 reply	other threads:[~2021-12-05 15:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211205151544.54A673858C60@sourceware.org \
    --to=jturney@sourceware.org \
    --cc=cygwin-apps-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).