This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB 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 threads/20291] Set scheduler-locking on doesn't work correctly with pthread_create


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

--- Comment #7 from Martin Galvan <martin.galvan at tallertechnologies dot com> ---
(In reply to Pedro Alves from comment #6)
> > In that case, should this even be considered a bug? Perhaps we could add 
> > something to the documentation so that other users won't trip on this again.
> 
> I'm not sure, haven't made up my mind about it myself.
> 
> The fact that is only worked by chance doesn't mean that we shouldn't fix it
> properly.
> 
> My knee-jerk reaction was that it's a bug, though I'm slightly mildly
> concerned
> about the potential maybe-surprising hangs over pthread_create and similars.
> But maybe not that concerned.  The user did ask for nothing else to be
> scheduled.

That sounds to me like an implementation detail leaking out of glibc through
gdb. If I understood correctly, the parent thread locks a mutex in
__pthread_create_2_1 so that the child will block inside start_thread before it
can jump to its user-provided start routine. IMHO, as a user I shouldn't have
to be aware of such details when using a (seemingly) inocuous command.

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