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/24963] New: deadlock between freopen and fclose


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

            Bug ID: 24963
           Summary: deadlock between freopen and fclose
           Product: glibc
           Version: unspecified
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: yisheng.xys@alibaba-inc.com
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

we find a deadlock between fclose and freopen as following:
CPU0                                          CPU1
freopen                                       fclose
  _IO_acquire_lock (fp)                         _IO_un_link
  _IO_file_close_it                              _IO_lock_lock (list_all_lock);
    _IO_un_link  
      _IO_lock_lock (list_all_lock)<-wait here
                                                 _IO_flockfile ((_IO_FILE *)
fp); <-- wait here

-- 
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]