[DRBD-user] Bug in drbdadm?

Lars Ellenberg Lars.Ellenberg at linbit.com
Sun Mar 26 21:21:54 CEST 2006

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


/ 2006-03-26 20:35:46 +0200
\ Laurent CARON:
> Luc de Louw wrote:
> >Hi all,
> >I tried to setup yet another cluster with DRBD 0.7.17 and heartbeat.
> >I finaly found out that there is maybe a problem in the drbdadm program.
> >If I fire up drbdadm, see what happens:
> >inst1:~# drbdadm primary r0
> >Child process does not terminate!
> >Exiting.
> >inst1:~#
> >Exit code is 20
> >drbdsetup /dev/drbd0 primary works just fine. So I wonder what I made wrong in my setup.
> >Distribution: Debian Sarge
> >Kernel: 2.6.16
> >DRBD: 0.7.17
> >See the attached drbd.conf and the output of strace -f drbdadm primary r0
> >Thanks for any hints and have a nice sunday
> 
> 
> Same here
> 
> With 2.6.15 i didn't had this error, but had frequent drdb lockups
> 
> With 2.6.16 lockups are gone, but i now ave this error.

very well.
interessting that the kernel version should matter here, because its
just a plain bug introduced by me in revision 1821
(uninitialized variable as argument to alarm())...
sorry for that.

	Lars

Index: drbdadm_main.c
===================================================================
--- drbdadm_main.c	(revision 2124)
+++ drbdadm_main.c	(working copy)
@@ -456,10 +456,13 @@
     int timeout;
     sigaction(SIGALRM,&sa,&so);
     alarm_raised=0;
-    switch(flags) {
+    switch(flags & 0x0f) {
     case SLEEPS_SHORT:     timeout = 5; break;
     case SLEEPS_LONG:      timeout = 120; break;
     case SLEEPS_VERY_LONG: timeout = 600; break;
+    default:
+			   fprintf(stderr,"%s:%u: oops... flags=%02x\n", __FILE__ , __LINE__ , flags);
+			   exit(E_thinko);
     }
     alarm(timeout);
   }


-- 
: Lars Ellenberg                                  Tel +43-1-8178292-0  :
: LINBIT Information Technologies GmbH            Fax +43-1-8178292-82 :
: Schoenbrunner Str. 244, A-1120 Vienna/Europe   http://www.linbit.com :
__
please use the "List-Reply" function of your email client.



More information about the drbd-user mailing list