Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Nov 2006 15:45:03 +0200
From:      Nikos Vassiliadis <nvass@teledomenet.gr>
To:        freebsd-stable@freebsd.org
Cc:        Kostik Belousov <kostikbel@gmail.com>, Oleg Dambaev <perl@ipchains.ru>
Subject:   Re: trussing a non existing file causes misbehavior
Message-ID:  <200611161545.04188.nvass@teledomenet.gr>
In-Reply-To: <20061116121413.GA1841@deviant.kiev.zoral.com.ua>
References:  <200611161109.02430.nvass@teledomenet.gr> <455C2EC8.7030107@ipchains.ru> <20061116121413.GA1841@deviant.kiev.zoral.com.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday 16 November 2006 14:14, Kostik Belousov wrote:
> On Thu, Nov 16, 2006 at 12:26:32PM +0300, Oleg Dambaev wrote:
> > Nikos Vassiliadis wrote:
> > >Hello,
> > >
> > >In my 6.2-PRERELEASE(one month old approximately) truss gets stuck exiting
> > >when trying to truss a non existing file. I think the problem is not in 
> > >truss itself.
> > >But I have not the skills to find it. So, will a build with updated 
> > >sources help?
> > >Is there anybody else with the same problem?
> > >
> > >nik:0:~$ truss /nothing
> > >truss: execvp /nothing: No such file or directory
> > >load: 1.04  cmd: truss 70662 [exithold] 0.00u 0.00s 0% 700k
> > >
> > >Thanks in advance, Nikos
> > >  
> > Never seen any dumbest thing.
> > Re-read truss(1) man page and find out what truss must do.
> 
> I think that rude response is always wrong.

I think too, but it's a public list and everyone finds expression in
his/hers own personal way. So no harm done, one can ignore
an insulting response. I can. That's not the case for everybody,
though.

> There, Nikos reported real, although cosmetic problem since the parent truss
> process sleeps interruptible. The following change shall take care:
> 
> Index: fs/procfs/procfs_ioctl.c
> ===================================================================
> RCS file: /usr/local/arch/ncvs/src/sys/fs/procfs/procfs_ioctl.c,v
> retrieving revision 1.14
> diff -u -r1.14 procfs_ioctl.c
> --- fs/procfs/procfs_ioctl.c	6 Nov 2006 13:41:57 -0000	1.14
> +++ fs/procfs/procfs_ioctl.c	16 Nov 2006 12:13:45 -0000
> @@ -124,7 +124,7 @@
>  		*(unsigned int *)data = p->p_pfsflags;
>  		break;
>  	case PIOCWAIT:
> -		while (p->p_step == 0) {
> +		while (p->p_step == 0 && (p->p_flag & P_WEXIT) == 0) {
>  			/* sleep until p stops */
>  			error = msleep(&p->p_stype, &p->p_mtx,
>  			    PWAIT|PCATCH, "pioctl", 0);
> @@ -142,7 +142,7 @@
>  		break;
>  #ifdef COMPAT_IA32
>  	case PIOCWAIT32:
> -		while (p->p_step == 0) {
> +		while (p->p_step == 0 && (p->p_flag & P_WEXIT) == 0) {
>  			/* sleep until p stops */
>  			error = msleep(&p->p_stype, &p->p_mtx,
>  			    PWAIT|PCATCH, "pioctl", 0);
> 

Could you commit this to HEAD? to be eventually MFC'ed?

Thanks Kostik.

Nikos



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200611161545.04188.nvass>