[DRBD-user] in-kernel buffer overflow reading /proc/drbd

Stephan Rattai srattai at zmnh.uni-hamburg.de
Fri Aug 20 16:10:47 CEST 2004

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


Am Freitag, 20. August 2004 15:12 schrieb Lars Ellenberg:
> / 2004-08-20 13:47:56 +0200
>
> \ Stephan Rattai:
> > Hi everybody,
> >
> > I got a little problem with drbd 0.7.2 and kernel 2.6.8.1. During a
> > resync I did 'cat /proc/drbd' and got
> >
> > version: 0.7.2 (api:75/proto:74)
> > SVN Revision: 1483:1485 build by pete at bonnie, 2004-08-17 17:17:07
> >  0: cs:SyncSource st:Primary/Secondary ld:Consistent
> >     ns:22933688 nr:0 dw:0 dr:22933688 al:0 bm:1400 lo:0 pe:0 ua:0 ap:0
> >        
> > [>.......................................................................
> >..........................................................................
> >..........................................................................
> >..........................................................................
> >..........................................................................
> >..........................................................................
> >..........................................................................
> >..........................................................................
> >..........................................................................
> >..........................................................................
> >..........................................................................
> >..........................................................................
> >..........................................................................
> >..........................................................................
> >..........................................................................
> >..........................................................................
> >..........................................................................
> >..........................................................................
> >..........................................................................
> >..........................................................................
> >..........................................................................
> >..........................................................................
> >..........................................................................
> >..........................................................................
> >..........................................................................
> >..........................................................................
> >..........................................................................
> >..........................................................................
> >..........................................................................
> >..........................................................................
> >..........................................................................
> >..........................................................................
> >..........................................................................
> >..........................................................................
> >..........................................................................
> >..........................................................................
> >..........................................................................
> >..........................................................................
> >..........................................................................
> >..........................................................................
> >..........................................................................
> >..........................................................................
> >..........................................................................
> >..........................................................................
> >..........................................................................
> >..........................................................................
> >..........................................................................
> >..........................................................................
> >..........................................................................
> >..........................................................................
> >..........................................................................
> >..........................................................................
> >........................
> >
> > each time (I tried several times).
> >
> > A few seconds later the machine wasn't reachable anymore- it decided it
> > would be a good idea to reboot. The last sign of living was:
> >
> > Aug 20 13:14:46 bonnie kernel: drbd0: Resync started as SyncSource (need
> > to sync 11819424 KB [2954856 bits set]).
> > Aug 20 13:23:32 bonnie kernel: drbd0: ASSERT( rs_left < mdev->rs_total )
> > in /root/src/drbd-0.7.2/drbd/drbd_proc.c:70
> > Aug 20 13:23:32 bonnie kernel: proc_file_read: Apparent buffer overflow!
> >
> > The last two messages appeared about 20 times.
>
> hm...
> I replaced that ASSERT with an appropriate if branch in svn now.
> so I prevent the buffer overflow.
> but... this just masks the logic bug that is hidden elsewhere.
> most likely its "only" some race somewhere, two assignments in the
> "wrong" order or some such. We'll investigate.
>
> may I ask some more system details:
>  cpus, storage device size, ...

It's a Xeon machine with just one CPU so far, SMP support (for ht), fdisk -s 
on the partition says:  23053275, so it's about 22 Gig. What else ? 1 Gig. 
RAM, Gbit nic.




More information about the drbd-user mailing list