#
7fe0d7e1 |
| 14-Apr-2012 |
kettenis <kettenis@openbsd.org> |
If single threading is active, drirect the SIGKILL signal we send to orphaned traced processes to the active thread, otherwise we will deadlock resulting in an unkillable stopped process.
ok guenthe
If single threading is active, drirect the SIGKILL signal we send to orphaned traced processes to the active thread, otherwise we will deadlock resulting in an unkillable stopped process.
ok guenther@
show more ...
|
#
261e1fab |
| 13-Apr-2012 |
kettenis <kettenis@openbsd.org> |
Backout a tiny part of the previous commit. Decrementing ps_singlecount in exit1() is wrong, since single_thread_check() already decrements it and may call exit1() after that. I can't reproduce the
Backout a tiny part of the previous commit. Decrementing ps_singlecount in exit1() is wrong, since single_thread_check() already decrements it and may call exit1() after that. I can't reproduce the hang that this was supposed to fix anyway.
show more ...
|
#
4ec19540 |
| 13-Apr-2012 |
kettenis <kettenis@openbsd.org> |
First stab at making ptrace(2) usable for debugging multi-threaded programs. It implements a full-stop model where all threads are stopped before handing over control to the debugger. Events are rep
First stab at making ptrace(2) usable for debugging multi-threaded programs. It implements a full-stop model where all threads are stopped before handing over control to the debugger. Events are reported as before through wait(2); you will have to call ptrace(PT_GET_PROCESS_STATE, ...) to find out which thread hit the event. Since this changes the size of struct ptrace_state, you will have to recompile gdb.
ok guenther@
show more ...
|
#
8247badb |
| 11-Apr-2012 |
kettenis <kettenis@openbsd.org> |
Move the P_WAITED flag from struct proc to struct process.
ok guenther@
|
#
e6fd2ff8 |
| 10-Apr-2012 |
guenther <guenther@openbsd.org> |
Make the KERN_NPROCS and KERN_MAXPROC sysctl()s and the RLIMIT_NPROC rlimit count processes instead of threads. New sysctl()s KERN_NTHREADS and KERN_MAXTHREAD count and limit threads. The nprocs an
Make the KERN_NPROCS and KERN_MAXPROC sysctl()s and the RLIMIT_NPROC rlimit count processes instead of threads. New sysctl()s KERN_NTHREADS and KERN_MAXTHREAD count and limit threads. The nprocs and maxproc kernel variables are replaced by nprocess, maxprocess, nthreads, and maxthread.
ok tedu@ mikeb@
show more ...
|
#
d803ad6e |
| 06-Apr-2012 |
guenther <guenther@openbsd.org> |
ruadd() does the summing of system and user times, so doing so again results in bogus total times, as reported by numerous ports people.
ok miod@
|
#
8f15e6a4 |
| 23-Mar-2012 |
guenther <guenther@openbsd.org> |
Make rusage totals, itimers, and profile settings per-process instead of per-rthread. Handling of per-thread tick and runtime counters inspired by how FreeBSD does it.
ok kettenis@
|
#
762d41ba |
| 10-Mar-2012 |
guenther <guenther@openbsd.org> |
Add PS_EXITING to better differentiate between the process exiting and the main thread exiting. c.f. regress/sys/kern/main-thread-exited/
|
#
6b6f3ef9 |
| 20-Feb-2012 |
guenther <guenther@openbsd.org> |
First steps for making ptrace work with rthreads: - move the P_TRACED and P_INEXEC flags, and p_oppid, p_ptmask, and p_ptstat member from struct proc to struct process - sort the PT_* requests i
First steps for making ptrace work with rthreads: - move the P_TRACED and P_INEXEC flags, and p_oppid, p_ptmask, and p_ptstat member from struct proc to struct process - sort the PT_* requests into those that take a PID vs those that can also take a TID - stub in PT_GET_THREAD_FIRST and PT_GET_THREAD_NEXT
ok kettenis@
show more ...
|
#
2aa8ea07 |
| 17-Jan-2012 |
guenther <guenther@openbsd.org> |
Reimplement mutexes, condvars, and rwlocks to eliminate bugs, particularly the "consume the signal you just sent" hang, and putting the wait queues in userspace.
Do cancellation handling in pthread_
Reimplement mutexes, condvars, and rwlocks to eliminate bugs, particularly the "consume the signal you just sent" hang, and putting the wait queues in userspace.
Do cancellation handling in pthread_cond_*wait(), pthread_join(), and sem_wait().
Add __ prefix to thr{sleep,wakeup,exit,sigdivert}() syscalls; add 'abort" argument to thrsleep to close cancellation race; make thr{sleep,wakeup} return errno values via *retval to avoid touching userspace errno.
show more ...
|
#
a2e04e14 |
| 14-Dec-2011 |
guenther <guenther@openbsd.org> |
Handle rthreads consistently in ktrace by moving the flags and vnode into struct process; KTRFAC_ACTIVE becomes P_INKTR. Also, save the credentials used to open the file in sys_ktrace() and use them
Handle rthreads consistently in ktrace by moving the flags and vnode into struct process; KTRFAC_ACTIVE becomes P_INKTR. Also, save the credentials used to open the file in sys_ktrace() and use them for all writes to the vnode.
much feedback and ok jsing@
show more ...
|
#
2ea51a70 |
| 11-Dec-2011 |
guenther <guenther@openbsd.org> |
Suspend other rthreads before dumping core or execing; make them exit when exec succeeds.
ok jsing@
|
#
caf4a42f |
| 25-Jul-2011 |
tedu <tedu@openbsd.org> |
sys_wait4 properly returns int. ok deraadt
|
#
971e1bb6 |
| 06-Jul-2011 |
art <art@openbsd.org> |
Clean up after P_BIGLOCK removal. KERNEL_PROC_LOCK -> KERNEL_LOCK KERNEL_PROC_UNLOCK -> KERNEL_UNLOCK
oga@ ok
|
#
2725dadd |
| 05-Jul-2011 |
guenther <guenther@openbsd.org> |
Recommit the reverted sigacts change now that the NFS use-after-free problem has been tracked down. This fixes the sharing of the signal handling state: shared bits go in sigacts, per-rthread bits g
Recommit the reverted sigacts change now that the NFS use-after-free problem has been tracked down. This fixes the sharing of the signal handling state: shared bits go in sigacts, per-rthread bits goes in struct proc.
ok deraadt@
show more ...
|
#
80b87c50 |
| 18-Apr-2011 |
guenther <guenther@openbsd.org> |
Revert the sigacts diff: NFS can apparently retain pointers to processes until they're zombies and then send them signals (for intr mounts). Until that is untangled, the sigacts change is unsafe. s
Revert the sigacts diff: NFS can apparently retain pointers to processes until they're zombies and then send them signals (for intr mounts). Until that is untangled, the sigacts change is unsafe. sthen@ was the victim for this one
show more ...
|
#
4dec2d3c |
| 15-Apr-2011 |
guenther <guenther@openbsd.org> |
Correct the sharing of the signal handling state: stuff that should be shared (p_sigignore, p_sigcatch, P_NOCLDSTOP, P_NOCLDWAIT) moves to struct sigacts, wihle stuff that should be per rthread (ps_o
Correct the sharing of the signal handling state: stuff that should be shared (p_sigignore, p_sigcatch, P_NOCLDSTOP, P_NOCLDWAIT) moves to struct sigacts, wihle stuff that should be per rthread (ps_oldmask, SAS_OLDMASK, ps_sigstk) moves to struct proc. Treat the coredumping state bits (ps_sig, ps_code, ps_type, ps_sigval) as per-rthread until our locking around coredumping is better.
Oh, and remove the old SunOS-compat ps_usertramp member.
"I like the sound of this" tedu@
show more ...
|
#
c0ce47d9 |
| 03-Apr-2011 |
guenther <guenther@openbsd.org> |
Move PPWAIT flag from struct proc to process, so that rthreads in a vforked child behave correctly. Have the parent in a vfork() wait on a (different) flag in *its* process instead of the child to p
Move PPWAIT flag from struct proc to process, so that rthreads in a vforked child behave correctly. Have the parent in a vfork() wait on a (different) flag in *its* process instead of the child to prevent a possible use-after-free. When ktracing the child return from a fork, call it rfork if an rthread was created.
ok blambert@
show more ...
|
#
458bf05c |
| 02-Aug-2010 |
guenther <guenther@openbsd.org> |
Fix knote handling for exiting processes: when triggering a NOTE_EXIT knote, remove it from the process's klist; after handling those, remove and drop any remaining knotes from the process's klist.
Fix knote handling for exiting processes: when triggering a NOTE_EXIT knote, remove it from the process's klist; after handling those, remove and drop any remaining knotes from the process's klist. Ban attaching knotes to processes that have started exiting or attaching them via the pid of a thread other than the main thread.
ok tedu@, deraadt@
show more ...
|
#
207e4b38 |
| 26-Jul-2010 |
guenther <guenther@openbsd.org> |
Correct the links between threads, processes, pgrps, and sessions, so that the process-level stuff is to/from struct process and not struct proc. This fixes a bunch of problem cases in rthreads. Bas
Correct the links between threads, processes, pgrps, and sessions, so that the process-level stuff is to/from struct process and not struct proc. This fixes a bunch of problem cases in rthreads. Based on earlier work by blambert and myself, but mostly written at c2k10.
Tested by many: deraadt, sthen, krw, ray, and in snapshots
show more ...
|
#
7c5b0101 |
| 19-Jul-2010 |
guenther <guenther@openbsd.org> |
Rollback the allproclk and fileheadlk addition. When grabbing an rwlock, the thread will release biglock if it sleeps, means that atomicity from before the rw_enter() to after it is not guaranteed.
Rollback the allproclk and fileheadlk addition. When grabbing an rwlock, the thread will release biglock if it sleeps, means that atomicity from before the rw_enter() to after it is not guaranteed. The change didn't address those, so pulling it until it does.
"go for it" tedu@
show more ...
|
#
14e540af |
| 29-Jun-2010 |
guenther <guenther@openbsd.org> |
We always copy struct pcred when creating a new process, so the reference count was always one. That's pointless, so remove the member and the code. ok tedu@
|
#
351c20c5 |
| 29-Jun-2010 |
tedu <tedu@openbsd.org> |
Eliminate RTHREADS kernel option in favor of a sysctl. The actual status (not done) hasn't changed, but now it's less work to test things. ok art deraadt
|
#
13625d76 |
| 26-May-2010 |
oga <oga@openbsd.org> |
Bad tedu, no cookie.
Don't set SDEAD on the process in exit1 untile we have grabbed the allproclk. allproclk is a rwlock and thus we may sleep to grab hold of it. This is a big of a bugger when we
Bad tedu, no cookie.
Don't set SDEAD on the process in exit1 untile we have grabbed the allproclk. allproclk is a rwlock and thus we may sleep to grab hold of it. This is a big of a bugger when we just set a flag that means we panic if we sleep.
ok art@. turns Tom Murphy's fstat panic into a deadlock instead *sigh*, this is being looked into.
show more ...
|
#
ce0272ab |
| 18-May-2010 |
tedu <tedu@openbsd.org> |
move knote list to struct process. ok guenther
|