[DRBD-user] drbd_bm_total_weight: (!b->bm_pages) in drbd_bitmap.c:638

Maros Timko timkom at gmail.com
Tue Jul 7 15:38:40 CEST 2009

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


Hi all,

running 8.3.0 on CentOS 5.2 (2.6.18-92.1.22.el5xen) I am "sometimes"
experiencing Out of memory error on DRBD. Sometimes here really means that
it is not reproducible and it is more surprising then expected occurrence.
Problem is that once it happens, there is no real way to resolve it, just
reboot the machine.

Trying to search on this issue I have found following Ubuntu link that
includes flaws check of DRBD:
http://people.ubuntu.com/~kees/bogosec/intrepid-main/drbd8/flawfinder.log

There may be other security vulnerabilities; review your code!
Flawfinder version 1.27, (C) 2001-2004 David A. Wheeler.
Number of dangerous functions in C/C++ ruleset: 160
/tmp/bogosec.temp_target.X0yWUA/src/drbd/drbd_bitmap.c:385:  [2]
(buffer) memcpy: Does not check for buffer overflows when copying to
destination. Make sure destination can always hold the source data.
/tmp/bogosec.temp_target.X0yWUA/src/drbd/drbd_bitmap.c:638:  [2]
(buffer) char: Statically-sized arrays can be overflowed. Perform
bounds checking, use functions that limit length, or ensure that the
size is larger than the maximum possible length.

Is anybody aware if I can do anything to prevent this Out of memory states?
top still shows enough of free memory (more than 125MB).
Would there possibly be some fix in 8.3.2 already?
Or, can I somehow destroy such device? drbd commands are blocked in such
situation. Killing of processes does not help and shutdown of DRBD network
interface neither.

Syslog output:
Jul  7 13:11:30 vsp9 kernel: drbd4: disk( Diskless -> Attaching )
Jul  7 13:11:30 vsp9 kernel: drbd4: Starting worker thread (from cqueue/1
[168])
Jul  7 13:11:30 vsp9 kernel: drbd4: ASSERT( mdev->state.disk == Diskless &&
mdev->state.conn == StandAlone ) in
/root/rpmbuild/BUILD/drbd-8.3.0/_kmod_build_xen/drbd/drbd_worker.c:1505
Jul  7 13:11:30 vsp9 kernel: drbd4: drbd_bm_resize called with capacity == 0
Jul  7 13:11:30 vsp9 kernel: drbd4: worker terminated
Jul  7 13:11:30 vsp9 kernel: drbd4: Terminating worker thread
Jul  7 13:11:30 vsp9 kernel: drbd4: No usable activity log found.
Jul  7 13:11:30 vsp9 kernel: drbd4: Method to ensure write ordering: barrier
Jul  7 13:11:30 vsp9 kernel: drbd4: max_segment_size ( = BIO size ) = 32768
Jul  7 13:11:30 vsp9 kernel: drbd4: drbd_bm_resize: (!b) in
/root/rpmbuild/BUILD/drbd-8.3.0/_kmod_build_xen/drbd/drbd_bitmap.c:521
Jul  7 13:11:30 vsp9 kernel: drbd4: drbd_bm_capacity: (!mdev->bitmap) in
/root/rpmbuild/BUILD/drbd-8.3.0/_kmod_build_xen/drbd/drbd_bitmap.c:339
Jul  7 13:11:30 vsp9 kernel: drbd4: OUT OF MEMORY! Could not allocate
bitmap! <6>drbd4: size = 0 KB (0 KB)
Jul  7 13:11:30 vsp9 kernel: drbd4: disk( Attaching -> Diskless )
Jul  7 13:11:30 vsp9 kernel: drbd4: conn( StandAlone -> Unconnected )
Jul  7 13:11:30 vsp9 kernel: drbd4: Starting worker thread (from cqueue/4
[171])
Jul  7 13:11:30 vsp9 kernel: drbd4: Starting receiver thread (from
drbd4_worker [11421])
Jul  7 13:11:30 vsp9 kernel: drbd4: ASSERT( mdev->state.disk == Diskless &&
mdev->state.conn == StandAlone ) in
/root/rpmbuild/BUILD/drbd-8.3.0/_kmod_build_xen/drbd/drbd_worker.c:1505
Jul  7 13:11:30 vsp9 kernel: drbd4: receiver (re)started
Jul  7 13:11:30 vsp9 kernel: drbd4: conn( Unconnected -> WFConnection )
Jul  7 13:11:30 vsp9 kernel: drbd4: drbd_bm_total_weight: (!b->bm_pages) in
/root/rpmbuild/BUILD/drbd-8.3.0/_kmod_build_xen/drbd/drbd_bitmap.c:638
Jul  7 13:12:01 vsp9 last message repeated 31 times
Jul  7 13:13:02 vsp9 last message repeated 61 times
...
Jul  7 14:18:38 vsp9 kernel: drbd4: aftr_isp( 1 -> 0 )
Jul  7 14:18:38 vsp9 kernel: drbd4: drbd_bm_total_weight: (!b->bm_pages) in
/root/rpmbuild/BUILD/drbd-8.3.0/_kmod_build_xen/drbd/drbd_bitmap.c:638
Jul  7 14:19:09 vsp9 last message repeated 33 times
Jul  7 14:19:35 vsp9 last message repeated 26 times


Thanks,

Tino
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linbit.com/pipermail/drbd-user/attachments/20090707/8a033bd6/attachment.htm>


More information about the drbd-user mailing list