Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 04 Apr 2007 11:12:00 +0300
From:      Danny Braniss <danny@cs.huji.ac.il>
To:        Scott Long <scottl@samsco.org>
Cc:        freebsd-scsi@freebsd.org, freebsd-current@freebsd.org
Subject:   Re: targclose doesn't return 
Message-ID:  <E1HZ0b2-000C6b-Uq@cs1.cs.huji.ac.il>
In-Reply-To: Your message of Tue, 03 Apr 2007 16:26:36 -0600 .

next in thread | raw e-mail | index | archive | help
I stumbled on the same problem when porting iSCSI to current,
calling dev_destroy() hangs because si_threadcount is not zero,
Tai-hwa Liang <avatar@mmlab.cse.yzu.edu.tw> came up with a patch, which fixes 
the close(), but causes panics when rebooting.
	danny


> Actually, I think it's a wildly incorrect use of the clone API.  I'll
> take a look at in the in next few days and try to commit something that
> works.
> 
> Scott
> 
> 
> Scott Long wrote:
> > My guess is that the kninit() in targopen isn't being cleaned up from in
> > targclose.  I'm not terribly familiar in how the knote API works,
> > though.
> > 
> > Scott
> > 
> > 
> > Matthew Jacob wrote:
> >> Yeah- I've seen this too.
> >>
> >> On 4/3/07, Alex Dupre <ale@freebsd.org> wrote:
> >>> Scott Long wrote:
> >>> > Are there any other console messages from the targ driver?  Can you
> >>> > turn on CAMDEBUG and send us the trace of what is going on?
> >>>
> >>> CAMDEBUG is already on, but simply opening/closing the targ device,
> >>> without sending any ioctl to enable it, shouldn't produce any CAM
> >>> message. I traced the kernel thread and I found that it doesn't return
> >>> from the destroy_devl() function: csw->d_purge is NULL and
> >>> dev->si_threadcount is '1'. The thread enters the following block
> >>> (kern_conf.c, row 690) and never exits.
> >>>
> >>>
> >>>        while (dev->si_threadcount != 0) {
> >>>                /* Use unique dummy wait ident */
> >>>                msleep(&csw, &devmtx, PRIBIO, "devdrn", hz / 10);
> >>>        }
> >>>
> >>>
> >>> -- 
> >>> Alex Dupre
> >>> _______________________________________________
> >>> freebsd-scsi@freebsd.org mailing list
> >>> http://lists.freebsd.org/mailman/listinfo/freebsd-scsi
> >>> To unsubscribe, send any mail to "freebsd-scsi-unsubscribe@freebsd.org"
> >>>
> > 
> > _______________________________________________
> > freebsd-scsi@freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-scsi
> > To unsubscribe, send any mail to "freebsd-scsi-unsubscribe@freebsd.org"
> 
> _______________________________________________
> freebsd-scsi@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-scsi
> To unsubscribe, send any mail to "freebsd-scsi-unsubscribe@freebsd.org"
> 





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1HZ0b2-000C6b-Uq>