3rd party geom module on 10-STABLE cause panics in biodone()
Lev Serebryakov
lev at FreeBSD.org
Wed Feb 26 07:05:52 UTC 2014
Hello, Alexander.
You wrote 26 февраля 2014 г., 2:16:32:
>> 3561 if ((bp->bio_flags & BIO_TRANSIENT_MAPPING) != 0) {
>> 3562 bp->bio_flags &= ~BIO_TRANSIENT_MAPPING;
>> 3563 bp->bio_flags |= BIO_UNMAPPED;
>> 3564 start = trunc_page((vm_offset_t)bp->bio_data);
>> 3565 end = round_page((vm_offset_t)bp->bio_data + bp->bio_length);
>> 3566 pmap_qremove(start, OFF_TO_IDX(end - start));
>> 3567 vmem_free(transient_arena, start, end - start);
>> 3568 atomic_add_int(&inflight_transient_maps, -1);
>> 3569 }
>>
>> And these crashes are very bad: 9 of 10 times system could not make
>> crashdump or reboot and 8 out of 10 times it shuts down video output (!).
>>
>> I was lucky to get one crashdump to find this line...
>>
>> What could I do wrong in my module?
AM> IIRC I had problem with that part of code during my GEOM direct dispatch
AM> work when some requests were unmapped twice. At that time I've added
AM> restoring the flags at lines 3562-3563, and it helped in my case. Make
AM> sure that you are not have some unexpected requests reuse, etc, that may
AM> cause incorrect combination of BIO flags and addresses.
It is impossible to debug this on real hardware and now I'm trying to
reproduce this on VirtualBox. My plan is to print out EVERY bio which is
freed here and every processed bio in my module and to find exact path of
failing bio though my module...
--
// Black Lion AKA Lev Serebryakov <lev at FreeBSD.org>
More information about the freebsd-geom
mailing list