Project

General

Profile

Bug #3225

osmo-pcu: runtime error: left shift of negative value in gprs_rlcmac_rssi

Added by pespin over 1 year ago. Updated over 1 year ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
-
Start date:
05/02/2018
Due date:
% Done:

0%

Spec Reference:

Description

In job run in https://jenkins.osmocom.org/jenkins/job/master-osmo-pcu/FIRMWARE_VERSION=master,label=osmocom-master-debian9,with_dsp=none,with_vty=False/424/console

## ----------------------------------- ##
## osmo-pcu 0.4.0.114-33c5 test suite. ##
## ----------------------------------- ##

Regression tests

  1: rlcmac                                          ok
  2: multi_slot                                      ok
  3: ts_alloc                                        ok
  4: tbf                                             FAILED (testsuite.at:29)
  5: bitcomp                                         ok
  6: edge                                            ok
  7: types                                           ok
  8: ms                                              ok
  9: llc                                             ok
 10: llist                                           ok
 11: codel                                           ok
 12: fn                                              ok

## ------------- ##
## Test results. ##
## ------------- ##

ERROR: All 12 tests were run,
1 failed unexpectedly.
## -------------------------- ##
## testsuite.log was created. ##
## -------------------------- ##

Please send `tests/testsuite.log' and all information you think might help:

   To: <osmocom-net-gprs@lists.osmocom.org>
   Subject: [osmo-pcu 0.4.0.114-33c5] testsuite: 4 failed

You may investigate any problem if you feel able to do so, in which
case the test suite provides a good starting point.  Its output may
be found below `tests/testsuite.dir'.

Makefile:1265: recipe for target 'installcheck-local' failed
make[2]: *** [installcheck-local] Error 1
make[2]: Leaving directory '/home/osmocom-build/jenkins/workspace/master-osmo-pcu/FIRMWARE_VERSION/master/label/osmocom-master-debian9/with_dsp/none/with_vty/False/osmo-pcu-0.4.0.114-33c5/_build/sub/tests'
Makefile:461: recipe for target 'installcheck-recursive' failed
make[1]: *** [installcheck-recursive] Error 1
make[1]: Leaving directory '/home/osmocom-build/jenkins/workspace/master-osmo-pcu/FIRMWARE_VERSION/master/label/osmocom-master-debian9/with_dsp/none/with_vty/False/osmo-pcu-0.4.0.114-33c5/_build/sub'
Makefile:666: recipe for target 'distcheck' failed
make: *** [distcheck] Error 1
+ cat-testlogs.sh

======================== ./osmo-pcu-0.4.0.114-33c5/_build/sub/tests/testsuite.dir/04/testsuite.log

#                             -*- compilation -*-
4. testsuite.at:25: testing tbf ...
../../../tests/testsuite.at:29: $OSMO_QEMU $abs_top_builddir/tests/tbf/TbfTest
--- experr    2018-04-30 00:14:42.929397776 +0000
+++ /home/osmocom-build/jenkins/workspace/master-osmo-pcu/FIRMWARE_VERSION/master/label/osmocom-master-debian9/with_dsp/none/with_vty/False/osmo-pcu-0.4.0.114-33c5/_build/sub/tests/testsuite.dir/at-groups/4/stderr    2018-04-30 00:14:43.001397283 +0000
@@ -6804,6 +6804,7 @@
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 
 Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) UL DATA TFI=0 received (V(Q)=1 .. V(R)=127)
+../../../src/gprs_rlcmac_meas.cpp:82:42: runtime error: left shift of negative value -998385
 max_cs_ul cannot be derived (current UL CS: UNKNOWN)
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec, cur_fn=0
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) Got MCS-4 RLC data block: CV=10, BSN=128, SPB=0, PI=0, E=1, TI=0, bitoffs=33
4. testsuite.at:25: 4. tbf (testsuite.at:25): FAILED (testsuite.at:29)
Build step 'Execute shell' marked build as failure
[WARNINGS] Skipping publisher since build result is FAILURE
Sending e-mails to: gerrit-log@lists.osmocom.org
Finished: FAILURE

Runtime error:
../../../src/gprs_rlcmac_meas.cpp:82:42: runtime error: left shift of negative value -998385

So something in this calculation in gprs_rlcmac_rssi is wrong:

    gettimeofday(&now_tv, NULL);
    elapsed = ((now_tv.tv_sec - rssi_tv->tv_sec) << 7)
        + ((now_tv.tv_usec - rssi_tv->tv_usec) << 7) / 1000000;


Related issues

Has duplicate OsmoPCU - Bug #3290: osmo-pcu runtime errors due to clock drift in gprs_rlcmac_meas.cppClosed05/25/2018

History

#2 Updated by pespin over 1 year ago

  • Has duplicate Bug #3290: osmo-pcu runtime errors due to clock drift in gprs_rlcmac_meas.cpp added

#4 Updated by pespin over 1 year ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Merged, closing.

#5 Updated by pespin over 1 year ago

  • Status changed from Resolved to New
  • Assignee changed from pespin to stsp
  • % Done changed from 100 to 0

It seems that patch didn't fix the issue, it happened again in https://jenkins.osmocom.org/jenkins/job/master-osmo-pcu/FIRMWARE_VERSION=master,label=osmocom-master-debian9,with_dsp=none,with_vty=False/517/console

That run is using already the patch merged above.

+../../../src/gprs_rlcmac_meas.cpp:134:49: runtime error: left shift of negative value -999173

I think next step is to investigate further the code in there and log the original values from which this negative value is calculated. I suspect some rounding issues may be involved.

I reopen the issue for now.

#6 Updated by stsp over 1 year ago

  • Status changed from New to In Progress

#7 Updated by stsp over 1 year ago

Let's complain in the log when this happens and show the values: https://gerrit.osmocom.org/#/c/osmo-pcu/+/9395/

#9 Updated by stsp over 1 year ago

  • Status changed from In Progress to Resolved

Above fix has been merged. Closing this issue again.

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)