Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Mar 2011 14:50:47 +0100
From:      Alexander Leidinger <Alexander@Leidinger.net>
To:        Alexander Leidinger <Alexander@Leidinger.net>
Cc:        hackers@freebsd.org, Andriy Gapon <avg@freebsd.org>
Subject:   Re: dtrace sdt problem: my fault or a generic problem (SYSINIT not working as expected for modules)?
Message-ID:  <20110325145047.13886kra3kep90w8@webmail.leidinger.net>
In-Reply-To: <20110325141449.175625s5pqmtbrk0@webmail.leidinger.net>
References:  <20110325105213.53217afxpg1kj7s4@webmail.leidinger.net> <4D8C74F8.4010303@freebsd.org> <20110325141449.175625s5pqmtbrk0@webmail.leidinger.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Quoting Alexander Leidinger <Alexander@Leidinger.net> (from Fri, 25  
Mar 2011 14:14:49 +0100):

> Quoting Andriy Gapon <avg@freebsd.org> (from Fri, 25 Mar 2011  
> 12:56:56 +0200):
>
>> on 25/03/2011 11:52 Alexander Leidinger said the following:
>>> As I read it, it looks a little bit like the SYSINIT of the SDT  
>>> probes didn't
>>> work as expected for my new probes (does this work in modules?  
>>> fxr.watson.org
>>> AFAICS only lists SDT probes in kernel-code, not in module-code),  
>>> a hit with the
>>> clue-bat is welcome.
>>
>> My reading of the code is that all modules with SDT  
>> proivders/probes should be
>> loaded before sdt module itself.
>> SYSINIT in your module(s) works as expect, but dtrace_register() is  
>> not called
>> on your SDT provider.  See sys/cddl/dev/sdt/sdt.c for details:  
>> sdt_modevent ->
>> sdt_load -> sdt_provider_listall(sdt_provider_reg_callback) ->  
>> dtrace_register.
>
> So if I load linux.ko before sdt.ko, or if I unload sdt.ko and  
> reload it, it should work? I'm going to try this after sending this  
> mail.

Unloading sdt.ko was a bad idea... currently I'm waiting the machine  
recovers from this rude action.

It seems there are some modunload checks missing to prevent a kernel  
panic by unloading sdt.ko when it is not safe.

Do we have a place where we can document the current state of afairs,  
or shall I just add something to the wiki pages (the unload problem to  
the DTrace page and the load the module with SDT probes before the  
sdt.ko in the DTrace/HowToAddSDTProbes page)?

Bye,
Alexander.

-- 
BOFH excuse #378:

Operators killed by year 2000 bug bite

http://www.Leidinger.net    Alexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org       netchild @ FreeBSD.org  : PGP ID = 72077137



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