From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C2A893858400; Sat, 11 Sep 2021 10:35:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C2A893858400 From: "xujing99 at huawei dot com" To: glibc-bugs@sourceware.org Subject: [Bug admin/28331] New: Multi-threaded exec pthread_create and dlopen may cause deadlock Date: Sat, 11 Sep 2021 10:35:42 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: admin X-Bugzilla-Version: 2.35 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: xujing99 at huawei dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: glibc-bugs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-bugs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Sep 2021 10:35:42 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28331 Bug ID: 28331 Summary: Multi-threaded exec pthread_create and dlopen may cause deadlock Product: glibc Version: 2.35 Status: UNCONFIRMED Severity: normal Priority: P2 Component: admin Assignee: unassigned at sourceware dot org Reporter: xujing99 at huawei dot com CC: carlos at redhat dot com Target Milestone: --- after merge commit 1387ad6225c2222f027790e3f460e31aa5dd2c54, multi-threaded exec pthread_create and dlopen may cause deadlock. thread1=EF=BC=9Adlopen hold dl_load_lock and then load a dynamic library wh= ich will hold ACE_lock(defined by my self) thread2=EF=BC=9Aa program hold ACE_lock and then call pthread_create=3D>_dl_allocate_tls_init will hold dlopen dl_load_lock in this case, it will cause deadlock. for example: thread1=EF=BC=9Adlopen =3D> hold dl_load_lock =3D> spawn_n =3D> wait for ho= ld ACE_lock thread2=EF=BC=9Aspawn_n =3D> hold ACE_lock =3D> pthread_create =3D> _dl_all= ocate_tls_init =3D> wait for hold dl_load_lock (spawn_n is my own function) --=20 You are receiving this mail because: You are on the CC list for the bug.=