https://tracker.ceph.com/https://tracker.ceph.com/favicon.ico2014-08-08T19:31:06ZCeph Ceph - Bug #9052: ceph-mon crashes with *** Caught signal (Floating point exception) **https://tracker.ceph.com/issues/9052?journal_id=391042014-08-08T19:31:06ZDan Mickdmick@redhat.com
<ul><li><strong>Category</strong> set to <i>Monitor</i></li><li><strong>Priority</strong> changed from <i>Normal</i> to <i>High</i></li><li><strong>Target version</strong> set to <i>0.84</i></li><li><strong>Source</strong> changed from <i>other</i> to <i>Community (user)</i></li><li><strong>Backport</strong> set to <i>firefly</i></li></ul> Ceph - Bug #9052: ceph-mon crashes with *** Caught signal (Floating point exception) **https://tracker.ceph.com/issues/9052?journal_id=391052014-08-08T19:36:37ZDan Mickdmick@redhat.com
<ul></ul><p>With no OSDs in the cluster, the calculations for <code>pgs_per_osd</code> can divide by zero (integer, but that still causes the FPE).</p>
<pre>
int expected_osds = MIN(p.get_pg_num(), osdmap.get_num_osds());
int64_t new_pgs = n - p.get_pg_num();
int64_t pgs_per_osd = new_pgs / expected_osds;
</pre>
<p><code>expected_osds</code> can be zero.</p>
<p>Looking briefly, there are a few other places in OSDMonitor where /0 looks possible:</p>
<pre>
float up_ratio = (float)up / (float)osdmap.get_num_osds();
</pre><br /><pre>
float in_ratio = (float)in / (float)osdmap.get_num_osds();
</pre>
<p>two instances of:</p>
<pre>
double halflife = (double)g_conf->mon_osd_laggy_halflife;
double decay_k = ::log(.5) / halflife;
</pre>
<p>It might be good to review Coverity and maybe increase the priority of such warnings.</p> Ceph - Bug #9052: ceph-mon crashes with *** Caught signal (Floating point exception) **https://tracker.ceph.com/issues/9052?journal_id=392822014-08-12T13:18:05ZSage Weilsage@newdream.net
<ul><li><strong>Priority</strong> changed from <i>High</i> to <i>Urgent</i></li></ul> Ceph - Bug #9052: ceph-mon crashes with *** Caught signal (Floating point exception) **https://tracker.ceph.com/issues/9052?journal_id=394122014-08-13T10:46:52ZSage Weilsage@newdream.net
<ul><li><strong>Assignee</strong> set to <i>Sage Weil</i></li></ul> Ceph - Bug #9052: ceph-mon crashes with *** Caught signal (Floating point exception) **https://tracker.ceph.com/issues/9052?journal_id=394272014-08-13T13:30:01ZSage Weilsage@newdream.net
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Resolved</i></li></ul>