strace causes panic: sleeping thread
Dag-Erling Smørgrav
des at des.no
Tue May 1 10:25:23 UTC 2007
Kostik Belousov <kostikbel at gmail.com> writes:
> This is changed by rev. 1.62 of the fs/pseudofs/pseudofs_vnops.c, before it
> process was held during pn_ioctl() call instead of being locked. Also, this
> change seems to also take place for getextattr().
Yes. These changes were intentional.
> With the following patch, I was able to successfully strace ls.
The patch is incorrect. It circumvents the pn_ioctl() wrapper, which
documents and enforces certain locking assumptions.
procfs_ioctl() needs the process to be locked; pn_ioctl() verifies
that this is the case before calling it. The correct fix is not to
unlock the process before calling procfs_ioctl(), but to remove the
latter's redundant PROC_LOCK() / PROC_UNLOCK() calls.
As for pfs_getextattr(), there is no reason to modify it unless you
can demonstrate (and I can guarantee that you can't) that an existing
pseudofs consumer has a getextattr() callback which expects the
process to be held but not locked.
> As a side note, it seems that procfs ABI changed, strace built on
> RELENG_6 cannot run on CURRENT.
I am not aware of any ABI change. Please provide more details.
DES
--
Dag-Erling Smørgrav - des at des.no
More information about the freebsd-current
mailing list