panic: mutex Giant not owned at /usr/src/sys/kern/tty_ttydisc.c:1127

Maksim Yevmenkin maksim.yevmenkin at gmail.com
Sat Jan 24 10:47:37 PST 2009


>> > Yes, but you are already dropping an extra reference in ubt_shutdown().
>> > What about that?
>>
>> shutdown method is called as part of ng_rmnode_self() and drop the
>> reference that node was born with. the extra reference before
>> ng_rmnode_self() is to ensure that node pointer is still valid after
>> ng_rmnode_self() returns. otherwise there is a change that node
>> pointer becomes invalid while after ng_rmnode_self() calls shutdown
>> method.
>
> I've now explicitly tested this and found that if I drop the node reference in
> shutdown I end up with a zero node reference in detach! So the
> NG_NODE_UNREF() should not be in the ubt_shutdown !!!
>
> This is maybe the reason why Lars was getting a panic!
>
> http://perforce.freebsd.org/chv.cgi?CH=156600

i think those changes are not correct. Lars's panic has nothing to do
with detach(), imo. i beg you to stop posing your private ng_ubt2
patches for just one sec and let me work on this. right now, i'm
confused because i do not know what code Lars is running and it makes
it very hard to troubleshoot problems.

thanks,
max


More information about the freebsd-current mailing list