This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/24016] fflush thread always can't get the fp lock, it will be got by the read thread for arm arch.


https://sourceware.org/bugzilla/show_bug.cgi?id=24016

--- Comment #4 from ZhixiongChi <zhixiong.chi at windriver dot com> ---
(In reply to Florian Weimer from comment #3)
> What's the actual bug you are reporting?  Does the test fail?  Or does it
> pass, but the expected output is missing?  Thanks.

The test failed, and the expected output of main thread is minssing.

The main thread will hang, it doesn't print anything on the console like "info:
%s: fork=%zu read=%zu"
Since it will wait the list_all_lock but now this lock is got by the fflush
thread.
At the same time the fflush is acquiring the fp lock(fp->_lock) which is always
got by the read thread.

fflush thread:
  lock list_all_lock

    for(list) -> lock every fp lock of the open file in this process

  unlock list_all_lock

when the fflush thread got the list_all_lock, it will unlock the global lock
until 
it got every fp lock one time in the list. Unfortunately it can't got every fp
lock in the list one cycle.

Thanks.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]