io:kernel::done invalid address (0x0) in predicate on FreeBSD 10.1
Lacey Powers
lacey.leanne at gmail.com
Thu Apr 16 01:31:04 UTC 2015
On 04/15/2015 01:18 PM, Eric Badger wrote:
>
> On 04/15/15 14:06, Lacey Powers wrote:
>> Hello Everyone,
>>
>> I was trying to port a script from Illumos to FreeBSD 10.1, from this
>> blog post, here:
>>
>> http://dtrace.org/blogs/ahl/2014/08/31/openzfs-tuning/
>>
>> The rw.d script specifically. I wished to use it forsome ZFS tuning and
>> testing I have been doing on my workstation.
>>
>> Here is the script I came up with:
>>
>> https://gist.github.com/kassandry/219596d7f17e5b128e68
>>
>> The version I have mostly seems to work, aside from a single error,
>> repeated a very large number of times during a run.=(
>>
>> Example:
>>
>> dtrace: error on enabled probe ID 3 (ID 58515: io:kernel::done): invalid
>> address (0x0) in predicate at DIF offset 60
>> dtrace: error on enabled probe ID 3 (ID 58515: io:kernel::done): invalid
>> address (0x0) in predicate at DIF offset 60
>>
>> Despite adding
>>
>> args[0] != NULL
>>
>> to the predicate for io:::done, it still comes up.
>
> I can't claim expertise here, but it seems that the 'io:::done' probe
> can receive a 'struct bio' where 'bio_disk' is NULL. So a first
> thought would be to have a predicate like:
>
> /args[0] && args[0]->bio_disk && ts[...]/
>
> I don't know under what circumstances bio_disk is NULL; would require
> some digging to find out. Someone more familiar with this area may
> have a better suggestion.
>
> Eric
Hello Eric,
Thank you for your reply. =)
That certainly helped me figure out why the probe was giving me
errors.Much appreciated.
From the help I got on #freebsd and #bsddev on IRC, it seems that in
sys/sys/bio.h
struct disk *bio_disk; /* Valid below geom_disk.c only */
It is noted that the struct bio disk may only be populated below
geom_disk.c
It seems that each IO action can go through a long queue of functions,
which may or may not actually add a valid struct disk to the struct bio
in question, which is why it is occasionally NULL.
At least, as far as I understood from the code and asking questions on IRC.
Still lots of neat stuff to learn. =)
Again, thank you for your help.
Regards,
Lacey
More information about the freebsd-dtrace
mailing list