This is the mail archive of the gdb-patches@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]

[patch] Fix hang on the thread leader exit


Hi,

if the thread group leader exits there are two problems:

* We would lock up by WAITPID as it waits on all it the threads of the whole
  process while WAIT_LWP intends to wait only on the specific task.

* nptl_db expects being able to transfer memory just by specifying PID.
  After the thread group leader exists the Linux kernel turns the task
  into zombie no longer permitting accesses to its memory neither
  by `/proc/PID/mem' not PTRACE_PEEK*.
  Transfer the memory from an arbitrary LWP_LIST entry in such case.
  I do not like this solution but it looks correct from the kernel side.

Testcase also provided.


Regards,
Jan

Attachment: gdb-cvs-thread-group-leader-exit.patch
Description: Text document


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