unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Andreas Schwab <schwab@suse.de>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH] Always do locking when accessing streams (bug 15142)
Date: Thu, 21 Nov 2019 14:20:40 +0100	[thread overview]
Message-ID: <87wobtmklz.fsf@oldenburg2.str.redhat.com> (raw)
In-Reply-To: <mvm4kyxe5hv.fsf@suse.de> (Andreas Schwab's message of "Thu, 21 Nov 2019 14:14:20 +0100")

* Andreas Schwab:

> On Nov 21 2019, Florian Weimer wrote:
>
>> * Andreas Schwab:
>>
>>> During exit, skip files that are currently locked to avoid deadlock.
>>
>> Which locks are taken during the deadlock?
>
> Presumably any FILE locks, if there are other threads still running.

Okay, so the problem is simply lack of progress after calling exit?

>> Does this fix or re-open bug 15142?
>
> Why re-open?

Lack of flushing of streams on process exit.

>>> +  /* We want to skip locked streams.  Some threads might use streams but
>>> +     that is their problem, we don't flush those.  */
>>> +  int result = _IO_flush_all_lockp (true);
>>
>> Is this still conforming to POSIX?
>
> Are deadlocks conforming to POSIX?

I think the last time we discussed this, the conclusion was that lack of
progress was conforming to POSIX (actually required by it).

What has changed since then?

Thanks,
Florian


  reply	other threads:[~2019-11-21 13:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-13 11:21 [PATCH] Always do locking when accessing streams (bug 15142) Andreas Schwab
2019-11-21 12:25 ` Florian Weimer
2019-11-21 13:14   ` Andreas Schwab
2019-11-21 13:20     ` Florian Weimer [this message]
2019-11-21 13:27       ` Andreas Schwab
2019-11-25 13:30         ` Florian Weimer
2019-11-25 13:34           ` Andreas Schwab
2019-11-25 13:35             ` Florian Weimer
  -- strict thread matches above, loose matches on Subject: below --
2018-01-30 16:58 Andreas Schwab

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

  List information: https://www.gnu.org/software/libc/involved.html

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

  git send-email \
    --in-reply-to=87wobtmklz.fsf@oldenburg2.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.org \
    --cc=schwab@suse.de \
    /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).