<matrixBuild _class='hudson.matrix.MatrixBuild'><action _class='hudson.model.CauseAction'><cause _class='hudson.triggers.SCMTrigger$SCMTriggerCause'><shortDescription>Started by an SCM change</shortDescription></cause></action><action></action><action _class='hudson.model.ParametersAction'><parameter _class='hudson.model.StringParameterValue'><name>BRANCH</name><value>master</value></parameter><parameter _class='hudson.model.StringParameterValue'><name>EMAIL_NOTIFICATIONS</name><value>jenkins-notifications@lists.osmocom.org laforge@gnumonks.org</value></parameter></action><action _class='jenkins.metrics.impl.TimeInQueueAction'><blockedDurationMillis>0</blockedDurationMillis><blockedTimeMillis>0</blockedTimeMillis><buildableDurationMillis>0</buildableDurationMillis><buildableTimeMillis>0</buildableTimeMillis><buildingDurationMillis>287033</buildingDurationMillis><executingTimeMillis>287033</executingTimeMillis><executorUtilization>1.0</executorUtilization><queuingDurationMillis>6506</queuingDurationMillis><queuingTimeMillis>6506</queuingTimeMillis><subTaskCount>0</subTaskCount><totalDurationMillis>293539</totalDurationMillis><waitingDurationMillis>6504</waitingDurationMillis><waitingTimeMillis>6504</waitingTimeMillis></action><action></action><action _class='hudson.plugins.git.util.BuildData'><buildsByBranchName><originmaster _class='hudson.plugins.git.util.Build'><buildNumber>11643</buildNumber><marked><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><branch><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><name>origin/master</name></branch></marked><revision><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><branch><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><name>origin/master</name></branch></revision></originmaster><refsremotesoriginosmithwip _class='hudson.plugins.git.util.Build'><buildNumber>11003</buildNumber><marked><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><branch><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><name>refs/remotes/origin/osmith/wip</name></branch></marked><revision><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><branch><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><name>refs/remotes/origin/osmith/wip</name></branch></revision></refsremotesoriginosmithwip><refsremotesoriginmaster _class='hudson.plugins.git.util.Build'><buildNumber>7614</buildNumber><marked><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><branch><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><name>refs/remotes/origin/master</name></branch></marked><revision><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><branch><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><name>refs/remotes/origin/master</name></branch></revision></refsremotesoriginmaster></buildsByBranchName><lastBuiltRevision><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><branch><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><name>origin/master</name></branch></lastBuiltRevision><remoteUrl>https://gerrit.osmocom.org/osmo-bts</remoteUrl><scmName></scmName></action><action></action><action></action><action></action><action _class='org.jenkinsci.plugins.displayurlapi.actions.RunDisplayAction'><artifactsUrl>https://jenkins.osmocom.org/jenkins/view/DAHDI/job/master-osmo-bts/11643/artifact</artifactsUrl><changesUrl>https://jenkins.osmocom.org/jenkins/view/DAHDI/job/master-osmo-bts/changes</changesUrl><displayUrl>https://jenkins.osmocom.org/jenkins/view/DAHDI/job/master-osmo-bts/11643/</displayUrl><testsUrl>https://jenkins.osmocom.org/jenkins/view/DAHDI/job/master-osmo-bts/11643/testReport</testsUrl></action><building>false</building><displayName>#11643</displayName><duration>287033</duration><estimatedDuration>247394</estimatedDuration><fullDisplayName>master-osmo-bts #11643</fullDisplayName><id>11643</id><inProgress>false</inProgress><keepLog>false</keepLog><number>11643</number><queueId>179762</queueId><result>SUCCESS</result><timestamp>1785172387053</timestamp><url>https://jenkins.osmocom.org/jenkins/view/DAHDI/job/master-osmo-bts/11643/</url><builtOn></builtOn><changeSet _class='hudson.plugins.git.GitChangeSetList'><item _class='hudson.plugins.git.GitChangeSet'><affectedPath>tests/meas/meas_test.c</affectedPath><affectedPath>include/osmo-bts/lchan.h</affectedPath><affectedPath>src/common/measurement.c</affectedPath><affectedPath>src/common/l1sap.c</affectedPath><commitId>66a3617b7f8c448ed1f01fa9052b56158f3718c4</commitId><timestamp>1782832648000</timestamp><author><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><fullName>Vadim Yanitskiy</fullName></author><authorEmail>vyanitskiy@sysmocom.de</authorEmail><comment>common: stop buffering UL measurements when SACCH is deactivated

When the BSC sends RSL DEACT SACCH, the per-SACCH UL measurement drain
stops (it runs on SACCH timing), but the producer in lchan_new_ul_meas()
keeps appending the measurement contributions from every received
TCH/SDCCH burst.  After one SACCH period (104 frames) the 104-slot
uplink measurement buffer fills up, yielding a flood of:

  NOTICE measurement.c:336 no space for uplink measurement, num_ul_meas=104

Add a bool sacch_active flag to gsm_lchan, set to true in the common
l1sap_chan_act() and clear in l1sap_chan_deact_sacch().  Guard
lchan_new_ul_meas() with this flag so that measurements are silently
discarded while SACCH is inactive - there is nothing to drain the
buffer and no SACCH channel on which to report the results to the BSC.

Change-Id: I3943c788cab5d2411b06ac681d4d412852bac0a7
AI-Assisted: yes (Claude)
</comment><date>2026-06-30 22:17:28 +0700</date><id>66a3617b7f8c448ed1f01fa9052b56158f3718c4</id><msg>common: stop buffering UL measurements when SACCH is deactivated</msg><path><editType>edit</editType><file>include/osmo-bts/lchan.h</file></path><path><editType>edit</editType><file>src/common/l1sap.c</file></path><path><editType>edit</editType><file>tests/meas/meas_test.c</file></path><path><editType>edit</editType><file>src/common/measurement.c</file></path></item><item _class='hudson.plugins.git.GitChangeSet'><affectedPath>src/common/lchan.c</affectedPath><commitId>66010d4cbaaae8b84550d02589a2e0fad11f33a5</commitId><timestamp>1782833107000</timestamp><author><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><fullName>Vadim Yanitskiy</fullName></author><authorEmail>vyanitskiy@sysmocom.de</authorEmail><comment>common: reset lchan meas state in gsm_lchan_release()

lchan-&gt;meas (including interf_meas_num and num_ul_meas) is normally
only reset by lchan_meas_reset() called from rsl_tx_chan_act_ack() on
RSL CHANNEL ACTIVATION.  Idle logical channels are never RSL-activated,
so their measurement state is never reset via that path.

On an OML link re-establishment, osmo-bts does not exit: abis.c tears
down the signalling links, the bts_shutdown FSM powers down all TRXs,
and then waits for reconnect.  The gsm_bts/trx/ts/lchan structures
remain in memory, so stale interf_meas_num survives the reconnect.

This is why we're seeing these ERRORs while running ttcn3-bts-test:

(bts=0,trx=2,ts=4,ss=6) Not enough room to store interference report (0dBm)

Add a lchan_meas_reset() call to gsm_lchan_release(), which is called
from gsm_ts_release() when the nm_channel_fsm enters state
NM_CHAN_ST_OP_DISABLED_NOTINSTALLED.  This is exactly the right
moment: the radio is fully stopped, so no new samples arrive.

Change-Id: I18dc9d30417b0c5b2e579660d4a087d93445f956
AI-Assisted: yes (Claude)
</comment><date>2026-06-30 22:25:07 +0700</date><id>66010d4cbaaae8b84550d02589a2e0fad11f33a5</id><msg>common: reset lchan meas state in gsm_lchan_release()</msg><path><editType>edit</editType><file>src/common/lchan.c</file></path></item><kind>git</kind></changeSet><culprit><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><description></description><fullName>Vadim Yanitskiy</fullName><id>fixeria</id></culprit><run><action _class='hudson.matrix.MatrixChildParametersAction'><parameter _class='hudson.model.StringParameterValue'><name>BRANCH</name><value>master</value></parameter><parameter _class='hudson.model.StringParameterValue'><name>EMAIL_NOTIFICATIONS</name><value>jenkins-notifications@lists.osmocom.org laforge@gnumonks.org</value></parameter></action><action></action><action _class='hudson.model.CauseAction'><cause _class='hudson.model.Cause$UpstreamCause'><shortDescription>Started by upstream project "master-osmo-bts" build number 11,643</shortDescription><upstreamBuild>11643</upstreamBuild><upstreamProject>master-osmo-bts</upstreamProject><upstreamUrl>job/master-osmo-bts/</upstreamUrl></cause></action><action _class='jenkins.metrics.impl.TimeInQueueAction'><blockedDurationMillis>0</blockedDurationMillis><blockedTimeMillis>0</blockedTimeMillis><buildableDurationMillis>0</buildableDurationMillis><buildableTimeMillis>0</buildableTimeMillis><buildingDurationMillis>107216</buildingDurationMillis><executingTimeMillis>107216</executingTimeMillis><executorUtilization>1.0</executorUtilization><subTaskCount>0</subTaskCount><waitingDurationMillis>0</waitingDurationMillis><waitingTimeMillis>0</waitingTimeMillis></action><action></action><action _class='hudson.plugins.git.util.BuildData'><buildsByBranchName><originmaster _class='hudson.plugins.git.util.Build'><buildNumber>11643</buildNumber><marked><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><branch><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><name>origin/master</name></branch></marked><revision><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><branch><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><name>origin/master</name></branch></revision></originmaster><refsremotesoriginosmithwip _class='hudson.plugins.git.util.Build'><buildNumber>11003</buildNumber><marked><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><branch><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><name>refs/remotes/origin/osmith/wip</name></branch></marked><revision><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><branch><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><name>refs/remotes/origin/osmith/wip</name></branch></revision></refsremotesoriginosmithwip><refsremotesoriginmaster _class='hudson.plugins.git.util.Build'><buildNumber>7614</buildNumber><marked><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><branch><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><name>refs/remotes/origin/master</name></branch></marked><revision><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><branch><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><name>refs/remotes/origin/master</name></branch></revision></refsremotesoriginmaster></buildsByBranchName><lastBuiltRevision><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><branch><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><name>origin/master</name></branch></lastBuiltRevision><remoteUrl>https://gerrit.osmocom.org/osmo-bts</remoteUrl><scmName></scmName></action><action></action><action></action><action _class='org.jenkinsci.plugins.displayurlapi.actions.RunDisplayAction'></action><building>false</building><displayName>#11643</displayName><duration>107216</duration><estimatedDuration>110058</estimatedDuration><fullDisplayName>master-osmo-bts » lc15,master,1,default,osmocom-master #11643</fullDisplayName><id>11643</id><inProgress>false</inProgress><keepLog>false</keepLog><number>11643</number><queueId>179765</queueId><result>SUCCESS</result><timestamp>1785172387053</timestamp><url>https://jenkins.osmocom.org/jenkins/view/DAHDI/job/master-osmo-bts/BTS_MODEL=lc15,FIRMWARE_VERSION=master,WITH_MANUALS=1,a4=default,label=osmocom-master/11643/</url><builtOn>build4-deb12build-ansible</builtOn><changeSet _class='hudson.plugins.git.GitChangeSetList'><item _class='hudson.plugins.git.GitChangeSet'><affectedPath>tests/meas/meas_test.c</affectedPath><affectedPath>include/osmo-bts/lchan.h</affectedPath><affectedPath>src/common/measurement.c</affectedPath><affectedPath>src/common/l1sap.c</affectedPath><commitId>66a3617b7f8c448ed1f01fa9052b56158f3718c4</commitId><timestamp>1782832648000</timestamp><author><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><fullName>Vadim Yanitskiy</fullName></author><authorEmail>vyanitskiy@sysmocom.de</authorEmail><comment>common: stop buffering UL measurements when SACCH is deactivated

When the BSC sends RSL DEACT SACCH, the per-SACCH UL measurement drain
stops (it runs on SACCH timing), but the producer in lchan_new_ul_meas()
keeps appending the measurement contributions from every received
TCH/SDCCH burst.  After one SACCH period (104 frames) the 104-slot
uplink measurement buffer fills up, yielding a flood of:

  NOTICE measurement.c:336 no space for uplink measurement, num_ul_meas=104

Add a bool sacch_active flag to gsm_lchan, set to true in the common
l1sap_chan_act() and clear in l1sap_chan_deact_sacch().  Guard
lchan_new_ul_meas() with this flag so that measurements are silently
discarded while SACCH is inactive - there is nothing to drain the
buffer and no SACCH channel on which to report the results to the BSC.

Change-Id: I3943c788cab5d2411b06ac681d4d412852bac0a7
AI-Assisted: yes (Claude)
</comment><date>2026-06-30 22:17:28 +0700</date><id>66a3617b7f8c448ed1f01fa9052b56158f3718c4</id><msg>common: stop buffering UL measurements when SACCH is deactivated</msg><path><editType>edit</editType><file>include/osmo-bts/lchan.h</file></path><path><editType>edit</editType><file>src/common/l1sap.c</file></path><path><editType>edit</editType><file>tests/meas/meas_test.c</file></path><path><editType>edit</editType><file>src/common/measurement.c</file></path></item><item _class='hudson.plugins.git.GitChangeSet'><affectedPath>src/common/lchan.c</affectedPath><commitId>66010d4cbaaae8b84550d02589a2e0fad11f33a5</commitId><timestamp>1782833107000</timestamp><author><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><fullName>Vadim Yanitskiy</fullName></author><authorEmail>vyanitskiy@sysmocom.de</authorEmail><comment>common: reset lchan meas state in gsm_lchan_release()

lchan-&gt;meas (including interf_meas_num and num_ul_meas) is normally
only reset by lchan_meas_reset() called from rsl_tx_chan_act_ack() on
RSL CHANNEL ACTIVATION.  Idle logical channels are never RSL-activated,
so their measurement state is never reset via that path.

On an OML link re-establishment, osmo-bts does not exit: abis.c tears
down the signalling links, the bts_shutdown FSM powers down all TRXs,
and then waits for reconnect.  The gsm_bts/trx/ts/lchan structures
remain in memory, so stale interf_meas_num survives the reconnect.

This is why we're seeing these ERRORs while running ttcn3-bts-test:

(bts=0,trx=2,ts=4,ss=6) Not enough room to store interference report (0dBm)

Add a lchan_meas_reset() call to gsm_lchan_release(), which is called
from gsm_ts_release() when the nm_channel_fsm enters state
NM_CHAN_ST_OP_DISABLED_NOTINSTALLED.  This is exactly the right
moment: the radio is fully stopped, so no new samples arrive.

Change-Id: I18dc9d30417b0c5b2e579660d4a087d93445f956
AI-Assisted: yes (Claude)
</comment><date>2026-06-30 22:25:07 +0700</date><id>66010d4cbaaae8b84550d02589a2e0fad11f33a5</id><msg>common: reset lchan meas state in gsm_lchan_release()</msg><path><editType>edit</editType><file>src/common/lchan.c</file></path></item><kind>git</kind></changeSet><culprit><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><fullName>Vadim Yanitskiy</fullName></culprit></run><run><action _class='hudson.matrix.MatrixChildParametersAction'><parameter _class='hudson.model.StringParameterValue'><name>BRANCH</name><value>master</value></parameter><parameter _class='hudson.model.StringParameterValue'><name>EMAIL_NOTIFICATIONS</name><value>jenkins-notifications@lists.osmocom.org laforge@gnumonks.org</value></parameter></action><action></action><action _class='hudson.model.CauseAction'><cause _class='hudson.model.Cause$UpstreamCause'><shortDescription>Started by upstream project "master-osmo-bts" build number 11,643</shortDescription><upstreamBuild>11643</upstreamBuild><upstreamProject>master-osmo-bts</upstreamProject><upstreamUrl>job/master-osmo-bts/</upstreamUrl></cause></action><action _class='jenkins.metrics.impl.TimeInQueueAction'><blockedDurationMillis>0</blockedDurationMillis><blockedTimeMillis>0</blockedTimeMillis><buildableDurationMillis>0</buildableDurationMillis><buildableTimeMillis>0</buildableTimeMillis><buildingDurationMillis>77898</buildingDurationMillis><executingTimeMillis>77898</executingTimeMillis><executorUtilization>1.0</executorUtilization><subTaskCount>0</subTaskCount><waitingDurationMillis>0</waitingDurationMillis><waitingTimeMillis>0</waitingTimeMillis></action><action></action><action _class='hudson.plugins.git.util.BuildData'><buildsByBranchName><originmaster _class='hudson.plugins.git.util.Build'><buildNumber>11643</buildNumber><marked><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><branch><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><name>origin/master</name></branch></marked><revision><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><branch><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><name>origin/master</name></branch></revision></originmaster><refsremotesoriginosmithwip _class='hudson.plugins.git.util.Build'><buildNumber>11003</buildNumber><marked><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><branch><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><name>refs/remotes/origin/osmith/wip</name></branch></marked><revision><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><branch><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><name>refs/remotes/origin/osmith/wip</name></branch></revision></refsremotesoriginosmithwip><refsremotesoriginmaster _class='hudson.plugins.git.util.Build'><buildNumber>7614</buildNumber><marked><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><branch><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><name>refs/remotes/origin/master</name></branch></marked><revision><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><branch><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><name>refs/remotes/origin/master</name></branch></revision></refsremotesoriginmaster></buildsByBranchName><lastBuiltRevision><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><branch><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><name>origin/master</name></branch></lastBuiltRevision><remoteUrl>https://gerrit.osmocom.org/osmo-bts</remoteUrl><scmName></scmName></action><action></action><action></action><action _class='org.jenkinsci.plugins.displayurlapi.actions.RunDisplayAction'></action><building>false</building><displayName>#11643</displayName><duration>77898</duration><estimatedDuration>74691</estimatedDuration><fullDisplayName>master-osmo-bts » lc15,origin/nrw/litecell15,0,default,osmocom-master #11643</fullDisplayName><id>11643</id><inProgress>false</inProgress><keepLog>false</keepLog><number>11643</number><queueId>179767</queueId><result>SUCCESS</result><timestamp>1785172387053</timestamp><url>https://jenkins.osmocom.org/jenkins/view/DAHDI/job/master-osmo-bts/BTS_MODEL=lc15,FIRMWARE_VERSION=origin%2Fnrw%2Flitecell15,WITH_MANUALS=0,a4=default,label=osmocom-master/11643/</url><builtOn>build4-deb12build-ansible</builtOn><changeSet _class='hudson.plugins.git.GitChangeSetList'><item _class='hudson.plugins.git.GitChangeSet'><affectedPath>tests/meas/meas_test.c</affectedPath><affectedPath>include/osmo-bts/lchan.h</affectedPath><affectedPath>src/common/measurement.c</affectedPath><affectedPath>src/common/l1sap.c</affectedPath><commitId>66a3617b7f8c448ed1f01fa9052b56158f3718c4</commitId><timestamp>1782832648000</timestamp><author><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><fullName>Vadim Yanitskiy</fullName></author><authorEmail>vyanitskiy@sysmocom.de</authorEmail><comment>common: stop buffering UL measurements when SACCH is deactivated

When the BSC sends RSL DEACT SACCH, the per-SACCH UL measurement drain
stops (it runs on SACCH timing), but the producer in lchan_new_ul_meas()
keeps appending the measurement contributions from every received
TCH/SDCCH burst.  After one SACCH period (104 frames) the 104-slot
uplink measurement buffer fills up, yielding a flood of:

  NOTICE measurement.c:336 no space for uplink measurement, num_ul_meas=104

Add a bool sacch_active flag to gsm_lchan, set to true in the common
l1sap_chan_act() and clear in l1sap_chan_deact_sacch().  Guard
lchan_new_ul_meas() with this flag so that measurements are silently
discarded while SACCH is inactive - there is nothing to drain the
buffer and no SACCH channel on which to report the results to the BSC.

Change-Id: I3943c788cab5d2411b06ac681d4d412852bac0a7
AI-Assisted: yes (Claude)
</comment><date>2026-06-30 22:17:28 +0700</date><id>66a3617b7f8c448ed1f01fa9052b56158f3718c4</id><msg>common: stop buffering UL measurements when SACCH is deactivated</msg><path><editType>edit</editType><file>include/osmo-bts/lchan.h</file></path><path><editType>edit</editType><file>src/common/l1sap.c</file></path><path><editType>edit</editType><file>tests/meas/meas_test.c</file></path><path><editType>edit</editType><file>src/common/measurement.c</file></path></item><item _class='hudson.plugins.git.GitChangeSet'><affectedPath>src/common/lchan.c</affectedPath><commitId>66010d4cbaaae8b84550d02589a2e0fad11f33a5</commitId><timestamp>1782833107000</timestamp><author><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><fullName>Vadim Yanitskiy</fullName></author><authorEmail>vyanitskiy@sysmocom.de</authorEmail><comment>common: reset lchan meas state in gsm_lchan_release()

lchan-&gt;meas (including interf_meas_num and num_ul_meas) is normally
only reset by lchan_meas_reset() called from rsl_tx_chan_act_ack() on
RSL CHANNEL ACTIVATION.  Idle logical channels are never RSL-activated,
so their measurement state is never reset via that path.

On an OML link re-establishment, osmo-bts does not exit: abis.c tears
down the signalling links, the bts_shutdown FSM powers down all TRXs,
and then waits for reconnect.  The gsm_bts/trx/ts/lchan structures
remain in memory, so stale interf_meas_num survives the reconnect.

This is why we're seeing these ERRORs while running ttcn3-bts-test:

(bts=0,trx=2,ts=4,ss=6) Not enough room to store interference report (0dBm)

Add a lchan_meas_reset() call to gsm_lchan_release(), which is called
from gsm_ts_release() when the nm_channel_fsm enters state
NM_CHAN_ST_OP_DISABLED_NOTINSTALLED.  This is exactly the right
moment: the radio is fully stopped, so no new samples arrive.

Change-Id: I18dc9d30417b0c5b2e579660d4a087d93445f956
AI-Assisted: yes (Claude)
</comment><date>2026-06-30 22:25:07 +0700</date><id>66010d4cbaaae8b84550d02589a2e0fad11f33a5</id><msg>common: reset lchan meas state in gsm_lchan_release()</msg><path><editType>edit</editType><file>src/common/lchan.c</file></path></item><kind>git</kind></changeSet><culprit><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><fullName>Vadim Yanitskiy</fullName></culprit></run><run><action _class='hudson.matrix.MatrixChildParametersAction'><parameter _class='hudson.model.StringParameterValue'><name>BRANCH</name><value>master</value></parameter><parameter _class='hudson.model.StringParameterValue'><name>EMAIL_NOTIFICATIONS</name><value>jenkins-notifications@lists.osmocom.org laforge@gnumonks.org</value></parameter></action><action></action><action _class='hudson.model.CauseAction'><cause _class='hudson.model.Cause$UpstreamCause'><shortDescription>Started by upstream project "master-osmo-bts" build number 11,643</shortDescription><upstreamBuild>11643</upstreamBuild><upstreamProject>master-osmo-bts</upstreamProject><upstreamUrl>job/master-osmo-bts/</upstreamUrl></cause></action><action _class='jenkins.metrics.impl.TimeInQueueAction'><blockedDurationMillis>0</blockedDurationMillis><blockedTimeMillis>0</blockedTimeMillis><buildableDurationMillis>0</buildableDurationMillis><buildableTimeMillis>0</buildableTimeMillis><buildingDurationMillis>79297</buildingDurationMillis><executingTimeMillis>79297</executingTimeMillis><executorUtilization>1.0</executorUtilization><subTaskCount>0</subTaskCount><waitingDurationMillis>0</waitingDurationMillis><waitingTimeMillis>0</waitingTimeMillis></action><action></action><action _class='hudson.plugins.git.util.BuildData'><buildsByBranchName><originmaster _class='hudson.plugins.git.util.Build'><buildNumber>11643</buildNumber><marked><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><branch><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><name>origin/master</name></branch></marked><revision><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><branch><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><name>origin/master</name></branch></revision></originmaster><refsremotesoriginosmithwip _class='hudson.plugins.git.util.Build'><buildNumber>11003</buildNumber><marked><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><branch><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><name>refs/remotes/origin/osmith/wip</name></branch></marked><revision><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><branch><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><name>refs/remotes/origin/osmith/wip</name></branch></revision></refsremotesoriginosmithwip><refsremotesoriginmaster _class='hudson.plugins.git.util.Build'><buildNumber>7614</buildNumber><marked><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><branch><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><name>refs/remotes/origin/master</name></branch></marked><revision><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><branch><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><name>refs/remotes/origin/master</name></branch></revision></refsremotesoriginmaster></buildsByBranchName><lastBuiltRevision><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><branch><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><name>origin/master</name></branch></lastBuiltRevision><remoteUrl>https://gerrit.osmocom.org/osmo-bts</remoteUrl><scmName></scmName></action><action></action><action></action><action _class='org.jenkinsci.plugins.displayurlapi.actions.RunDisplayAction'></action><building>false</building><displayName>#11643</displayName><duration>79297</duration><estimatedDuration>76563</estimatedDuration><fullDisplayName>master-osmo-bts » lc15,v2017.01,0,default,osmocom-master #11643</fullDisplayName><id>11643</id><inProgress>false</inProgress><keepLog>false</keepLog><number>11643</number><queueId>179768</queueId><result>SUCCESS</result><timestamp>1785172387053</timestamp><url>https://jenkins.osmocom.org/jenkins/view/DAHDI/job/master-osmo-bts/BTS_MODEL=lc15,FIRMWARE_VERSION=v2017.01,WITH_MANUALS=0,a4=default,label=osmocom-master/11643/</url><builtOn>build5-deb12build-ansible</builtOn><changeSet _class='hudson.plugins.git.GitChangeSetList'><item _class='hudson.plugins.git.GitChangeSet'><affectedPath>tests/meas/meas_test.c</affectedPath><affectedPath>include/osmo-bts/lchan.h</affectedPath><affectedPath>src/common/measurement.c</affectedPath><affectedPath>src/common/l1sap.c</affectedPath><commitId>66a3617b7f8c448ed1f01fa9052b56158f3718c4</commitId><timestamp>1782832648000</timestamp><author><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><fullName>Vadim Yanitskiy</fullName></author><authorEmail>vyanitskiy@sysmocom.de</authorEmail><comment>common: stop buffering UL measurements when SACCH is deactivated

When the BSC sends RSL DEACT SACCH, the per-SACCH UL measurement drain
stops (it runs on SACCH timing), but the producer in lchan_new_ul_meas()
keeps appending the measurement contributions from every received
TCH/SDCCH burst.  After one SACCH period (104 frames) the 104-slot
uplink measurement buffer fills up, yielding a flood of:

  NOTICE measurement.c:336 no space for uplink measurement, num_ul_meas=104

Add a bool sacch_active flag to gsm_lchan, set to true in the common
l1sap_chan_act() and clear in l1sap_chan_deact_sacch().  Guard
lchan_new_ul_meas() with this flag so that measurements are silently
discarded while SACCH is inactive - there is nothing to drain the
buffer and no SACCH channel on which to report the results to the BSC.

Change-Id: I3943c788cab5d2411b06ac681d4d412852bac0a7
AI-Assisted: yes (Claude)
</comment><date>2026-06-30 22:17:28 +0700</date><id>66a3617b7f8c448ed1f01fa9052b56158f3718c4</id><msg>common: stop buffering UL measurements when SACCH is deactivated</msg><path><editType>edit</editType><file>include/osmo-bts/lchan.h</file></path><path><editType>edit</editType><file>src/common/l1sap.c</file></path><path><editType>edit</editType><file>src/common/measurement.c</file></path><path><editType>edit</editType><file>tests/meas/meas_test.c</file></path></item><item _class='hudson.plugins.git.GitChangeSet'><affectedPath>src/common/lchan.c</affectedPath><commitId>66010d4cbaaae8b84550d02589a2e0fad11f33a5</commitId><timestamp>1782833107000</timestamp><author><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><fullName>Vadim Yanitskiy</fullName></author><authorEmail>vyanitskiy@sysmocom.de</authorEmail><comment>common: reset lchan meas state in gsm_lchan_release()

lchan-&gt;meas (including interf_meas_num and num_ul_meas) is normally
only reset by lchan_meas_reset() called from rsl_tx_chan_act_ack() on
RSL CHANNEL ACTIVATION.  Idle logical channels are never RSL-activated,
so their measurement state is never reset via that path.

On an OML link re-establishment, osmo-bts does not exit: abis.c tears
down the signalling links, the bts_shutdown FSM powers down all TRXs,
and then waits for reconnect.  The gsm_bts/trx/ts/lchan structures
remain in memory, so stale interf_meas_num survives the reconnect.

This is why we're seeing these ERRORs while running ttcn3-bts-test:

(bts=0,trx=2,ts=4,ss=6) Not enough room to store interference report (0dBm)

Add a lchan_meas_reset() call to gsm_lchan_release(), which is called
from gsm_ts_release() when the nm_channel_fsm enters state
NM_CHAN_ST_OP_DISABLED_NOTINSTALLED.  This is exactly the right
moment: the radio is fully stopped, so no new samples arrive.

Change-Id: I18dc9d30417b0c5b2e579660d4a087d93445f956
AI-Assisted: yes (Claude)
</comment><date>2026-06-30 22:25:07 +0700</date><id>66010d4cbaaae8b84550d02589a2e0fad11f33a5</id><msg>common: reset lchan meas state in gsm_lchan_release()</msg><path><editType>edit</editType><file>src/common/lchan.c</file></path></item><kind>git</kind></changeSet><culprit><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><fullName>Vadim Yanitskiy</fullName></culprit></run><run><action _class='hudson.matrix.MatrixChildParametersAction'><parameter _class='hudson.model.StringParameterValue'><name>BRANCH</name><value>master</value></parameter><parameter _class='hudson.model.StringParameterValue'><name>EMAIL_NOTIFICATIONS</name><value>jenkins-notifications@lists.osmocom.org laforge@gnumonks.org</value></parameter></action><action></action><action _class='hudson.model.CauseAction'><cause _class='hudson.model.Cause$UpstreamCause'><shortDescription>Started by upstream project "master-osmo-bts" build number 11,643</shortDescription><upstreamBuild>11643</upstreamBuild><upstreamProject>master-osmo-bts</upstreamProject><upstreamUrl>job/master-osmo-bts/</upstreamUrl></cause></action><action _class='jenkins.metrics.impl.TimeInQueueAction'><blockedDurationMillis>0</blockedDurationMillis><blockedTimeMillis>0</blockedTimeMillis><buildableDurationMillis>0</buildableDurationMillis><buildableTimeMillis>0</buildableTimeMillis><buildingDurationMillis>114129</buildingDurationMillis><executingTimeMillis>114129</executingTimeMillis><executorUtilization>1.0</executorUtilization><subTaskCount>0</subTaskCount><waitingDurationMillis>0</waitingDurationMillis><waitingTimeMillis>0</waitingTimeMillis></action><action></action><action _class='hudson.plugins.git.util.BuildData'><buildsByBranchName><originmaster _class='hudson.plugins.git.util.Build'><buildNumber>11643</buildNumber><marked><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><branch><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><name>origin/master</name></branch></marked><revision><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><branch><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><name>origin/master</name></branch></revision></originmaster><refsremotesoriginosmithwip _class='hudson.plugins.git.util.Build'><buildNumber>11003</buildNumber><marked><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><branch><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><name>refs/remotes/origin/osmith/wip</name></branch></marked><revision><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><branch><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><name>refs/remotes/origin/osmith/wip</name></branch></revision></refsremotesoriginosmithwip><refsremotesoriginmaster _class='hudson.plugins.git.util.Build'><buildNumber>7614</buildNumber><marked><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><branch><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><name>refs/remotes/origin/master</name></branch></marked><revision><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><branch><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><name>refs/remotes/origin/master</name></branch></revision></refsremotesoriginmaster></buildsByBranchName><lastBuiltRevision><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><branch><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><name>origin/master</name></branch></lastBuiltRevision><remoteUrl>https://gerrit.osmocom.org/osmo-bts</remoteUrl><scmName></scmName></action><action></action><action></action><action _class='org.jenkinsci.plugins.displayurlapi.actions.RunDisplayAction'></action><building>false</building><displayName>#11643</displayName><duration>114129</duration><estimatedDuration>115608</estimatedDuration><fullDisplayName>master-osmo-bts » oc2g,master,1,default,osmocom-master #11643</fullDisplayName><id>11643</id><inProgress>false</inProgress><keepLog>false</keepLog><number>11643</number><queueId>179764</queueId><result>SUCCESS</result><timestamp>1785172387053</timestamp><url>https://jenkins.osmocom.org/jenkins/view/DAHDI/job/master-osmo-bts/BTS_MODEL=oc2g,FIRMWARE_VERSION=master,WITH_MANUALS=1,a4=default,label=osmocom-master/11643/</url><builtOn>build5-deb12build-ansible</builtOn><changeSet _class='hudson.plugins.git.GitChangeSetList'><item _class='hudson.plugins.git.GitChangeSet'><affectedPath>tests/meas/meas_test.c</affectedPath><affectedPath>include/osmo-bts/lchan.h</affectedPath><affectedPath>src/common/measurement.c</affectedPath><affectedPath>src/common/l1sap.c</affectedPath><commitId>66a3617b7f8c448ed1f01fa9052b56158f3718c4</commitId><timestamp>1782832648000</timestamp><author><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><fullName>Vadim Yanitskiy</fullName></author><authorEmail>vyanitskiy@sysmocom.de</authorEmail><comment>common: stop buffering UL measurements when SACCH is deactivated

When the BSC sends RSL DEACT SACCH, the per-SACCH UL measurement drain
stops (it runs on SACCH timing), but the producer in lchan_new_ul_meas()
keeps appending the measurement contributions from every received
TCH/SDCCH burst.  After one SACCH period (104 frames) the 104-slot
uplink measurement buffer fills up, yielding a flood of:

  NOTICE measurement.c:336 no space for uplink measurement, num_ul_meas=104

Add a bool sacch_active flag to gsm_lchan, set to true in the common
l1sap_chan_act() and clear in l1sap_chan_deact_sacch().  Guard
lchan_new_ul_meas() with this flag so that measurements are silently
discarded while SACCH is inactive - there is nothing to drain the
buffer and no SACCH channel on which to report the results to the BSC.

Change-Id: I3943c788cab5d2411b06ac681d4d412852bac0a7
AI-Assisted: yes (Claude)
</comment><date>2026-06-30 22:17:28 +0700</date><id>66a3617b7f8c448ed1f01fa9052b56158f3718c4</id><msg>common: stop buffering UL measurements when SACCH is deactivated</msg><path><editType>edit</editType><file>tests/meas/meas_test.c</file></path><path><editType>edit</editType><file>include/osmo-bts/lchan.h</file></path><path><editType>edit</editType><file>src/common/measurement.c</file></path><path><editType>edit</editType><file>src/common/l1sap.c</file></path></item><item _class='hudson.plugins.git.GitChangeSet'><affectedPath>src/common/lchan.c</affectedPath><commitId>66010d4cbaaae8b84550d02589a2e0fad11f33a5</commitId><timestamp>1782833107000</timestamp><author><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><fullName>Vadim Yanitskiy</fullName></author><authorEmail>vyanitskiy@sysmocom.de</authorEmail><comment>common: reset lchan meas state in gsm_lchan_release()

lchan-&gt;meas (including interf_meas_num and num_ul_meas) is normally
only reset by lchan_meas_reset() called from rsl_tx_chan_act_ack() on
RSL CHANNEL ACTIVATION.  Idle logical channels are never RSL-activated,
so their measurement state is never reset via that path.

On an OML link re-establishment, osmo-bts does not exit: abis.c tears
down the signalling links, the bts_shutdown FSM powers down all TRXs,
and then waits for reconnect.  The gsm_bts/trx/ts/lchan structures
remain in memory, so stale interf_meas_num survives the reconnect.

This is why we're seeing these ERRORs while running ttcn3-bts-test:

(bts=0,trx=2,ts=4,ss=6) Not enough room to store interference report (0dBm)

Add a lchan_meas_reset() call to gsm_lchan_release(), which is called
from gsm_ts_release() when the nm_channel_fsm enters state
NM_CHAN_ST_OP_DISABLED_NOTINSTALLED.  This is exactly the right
moment: the radio is fully stopped, so no new samples arrive.

Change-Id: I18dc9d30417b0c5b2e579660d4a087d93445f956
AI-Assisted: yes (Claude)
</comment><date>2026-06-30 22:25:07 +0700</date><id>66010d4cbaaae8b84550d02589a2e0fad11f33a5</id><msg>common: reset lchan meas state in gsm_lchan_release()</msg><path><editType>edit</editType><file>src/common/lchan.c</file></path></item><kind>git</kind></changeSet><culprit><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><fullName>Vadim Yanitskiy</fullName></culprit></run><run><action _class='hudson.matrix.MatrixChildParametersAction'><parameter _class='hudson.model.StringParameterValue'><name>BRANCH</name><value>master</value></parameter><parameter _class='hudson.model.StringParameterValue'><name>EMAIL_NOTIFICATIONS</name><value>jenkins-notifications@lists.osmocom.org laforge@gnumonks.org</value></parameter></action><action></action><action _class='hudson.model.CauseAction'><cause _class='hudson.model.Cause$UpstreamCause'><shortDescription>Started by upstream project "master-osmo-bts" build number 11,643</shortDescription><upstreamBuild>11643</upstreamBuild><upstreamProject>master-osmo-bts</upstreamProject><upstreamUrl>job/master-osmo-bts/</upstreamUrl></cause></action><action _class='jenkins.metrics.impl.TimeInQueueAction'><blockedDurationMillis>0</blockedDurationMillis><blockedTimeMillis>0</blockedTimeMillis><buildableDurationMillis>115195</buildableDurationMillis><buildableTimeMillis>115195</buildableTimeMillis><buildingDurationMillis>71969</buildingDurationMillis><executingTimeMillis>71969</executingTimeMillis><executorUtilization>1.0</executorUtilization><subTaskCount>0</subTaskCount><waitingDurationMillis>0</waitingDurationMillis><waitingTimeMillis>0</waitingTimeMillis></action><action></action><action _class='hudson.plugins.git.util.BuildData'><buildsByBranchName><originmaster _class='hudson.plugins.git.util.Build'><buildNumber>11643</buildNumber><marked><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><branch><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><name>origin/master</name></branch></marked><revision><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><branch><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><name>origin/master</name></branch></revision></originmaster><refsremotesoriginosmithwip _class='hudson.plugins.git.util.Build'><buildNumber>11003</buildNumber><marked><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><branch><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><name>refs/remotes/origin/osmith/wip</name></branch></marked><revision><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><branch><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><name>refs/remotes/origin/osmith/wip</name></branch></revision></refsremotesoriginosmithwip><refsremotesoriginmaster _class='hudson.plugins.git.util.Build'><buildNumber>7614</buildNumber><marked><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><branch><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><name>refs/remotes/origin/master</name></branch></marked><revision><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><branch><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><name>refs/remotes/origin/master</name></branch></revision></refsremotesoriginmaster></buildsByBranchName><lastBuiltRevision><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><branch><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><name>origin/master</name></branch></lastBuiltRevision><remoteUrl>https://gerrit.osmocom.org/osmo-bts</remoteUrl><scmName></scmName></action><action></action><action></action><action _class='org.jenkinsci.plugins.displayurlapi.actions.RunDisplayAction'></action><building>false</building><displayName>#11643</displayName><duration>71969</duration><estimatedDuration>72987</estimatedDuration><fullDisplayName>master-osmo-bts » oc2g,origin/nrw/oc2g,0,default,osmocom-master #11643</fullDisplayName><id>11643</id><inProgress>false</inProgress><keepLog>false</keepLog><number>11643</number><queueId>179777</queueId><result>SUCCESS</result><timestamp>1785172387053</timestamp><url>https://jenkins.osmocom.org/jenkins/view/DAHDI/job/master-osmo-bts/BTS_MODEL=oc2g,FIRMWARE_VERSION=origin%2Fnrw%2Foc2g,WITH_MANUALS=0,a4=default,label=osmocom-master/11643/</url><builtOn>build5-deb12build-ansible</builtOn><changeSet _class='hudson.plugins.git.GitChangeSetList'><item _class='hudson.plugins.git.GitChangeSet'><affectedPath>tests/meas/meas_test.c</affectedPath><affectedPath>include/osmo-bts/lchan.h</affectedPath><affectedPath>src/common/measurement.c</affectedPath><affectedPath>src/common/l1sap.c</affectedPath><commitId>66a3617b7f8c448ed1f01fa9052b56158f3718c4</commitId><timestamp>1782832648000</timestamp><author><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><fullName>Vadim Yanitskiy</fullName></author><authorEmail>vyanitskiy@sysmocom.de</authorEmail><comment>common: stop buffering UL measurements when SACCH is deactivated

When the BSC sends RSL DEACT SACCH, the per-SACCH UL measurement drain
stops (it runs on SACCH timing), but the producer in lchan_new_ul_meas()
keeps appending the measurement contributions from every received
TCH/SDCCH burst.  After one SACCH period (104 frames) the 104-slot
uplink measurement buffer fills up, yielding a flood of:

  NOTICE measurement.c:336 no space for uplink measurement, num_ul_meas=104

Add a bool sacch_active flag to gsm_lchan, set to true in the common
l1sap_chan_act() and clear in l1sap_chan_deact_sacch().  Guard
lchan_new_ul_meas() with this flag so that measurements are silently
discarded while SACCH is inactive - there is nothing to drain the
buffer and no SACCH channel on which to report the results to the BSC.

Change-Id: I3943c788cab5d2411b06ac681d4d412852bac0a7
AI-Assisted: yes (Claude)
</comment><date>2026-06-30 22:17:28 +0700</date><id>66a3617b7f8c448ed1f01fa9052b56158f3718c4</id><msg>common: stop buffering UL measurements when SACCH is deactivated</msg><path><editType>edit</editType><file>tests/meas/meas_test.c</file></path><path><editType>edit</editType><file>src/common/l1sap.c</file></path><path><editType>edit</editType><file>include/osmo-bts/lchan.h</file></path><path><editType>edit</editType><file>src/common/measurement.c</file></path></item><item _class='hudson.plugins.git.GitChangeSet'><affectedPath>src/common/lchan.c</affectedPath><commitId>66010d4cbaaae8b84550d02589a2e0fad11f33a5</commitId><timestamp>1782833107000</timestamp><author><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><fullName>Vadim Yanitskiy</fullName></author><authorEmail>vyanitskiy@sysmocom.de</authorEmail><comment>common: reset lchan meas state in gsm_lchan_release()

lchan-&gt;meas (including interf_meas_num and num_ul_meas) is normally
only reset by lchan_meas_reset() called from rsl_tx_chan_act_ack() on
RSL CHANNEL ACTIVATION.  Idle logical channels are never RSL-activated,
so their measurement state is never reset via that path.

On an OML link re-establishment, osmo-bts does not exit: abis.c tears
down the signalling links, the bts_shutdown FSM powers down all TRXs,
and then waits for reconnect.  The gsm_bts/trx/ts/lchan structures
remain in memory, so stale interf_meas_num survives the reconnect.

This is why we're seeing these ERRORs while running ttcn3-bts-test:

(bts=0,trx=2,ts=4,ss=6) Not enough room to store interference report (0dBm)

Add a lchan_meas_reset() call to gsm_lchan_release(), which is called
from gsm_ts_release() when the nm_channel_fsm enters state
NM_CHAN_ST_OP_DISABLED_NOTINSTALLED.  This is exactly the right
moment: the radio is fully stopped, so no new samples arrive.

Change-Id: I18dc9d30417b0c5b2e579660d4a087d93445f956
AI-Assisted: yes (Claude)
</comment><date>2026-06-30 22:25:07 +0700</date><id>66010d4cbaaae8b84550d02589a2e0fad11f33a5</id><msg>common: reset lchan meas state in gsm_lchan_release()</msg><path><editType>edit</editType><file>src/common/lchan.c</file></path></item><kind>git</kind></changeSet><culprit><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><fullName>Vadim Yanitskiy</fullName></culprit></run><run><action _class='hudson.matrix.MatrixChildParametersAction'><parameter _class='hudson.model.StringParameterValue'><name>BRANCH</name><value>master</value></parameter><parameter _class='hudson.model.StringParameterValue'><name>EMAIL_NOTIFICATIONS</name><value>jenkins-notifications@lists.osmocom.org laforge@gnumonks.org</value></parameter></action><action></action><action _class='hudson.model.CauseAction'><cause _class='hudson.model.Cause$UpstreamCause'><shortDescription>Started by upstream project "master-osmo-bts" build number 11,643</shortDescription><upstreamBuild>11643</upstreamBuild><upstreamProject>master-osmo-bts</upstreamProject><upstreamUrl>job/master-osmo-bts/</upstreamUrl></cause></action><action _class='jenkins.metrics.impl.TimeInQueueAction'><blockedDurationMillis>0</blockedDurationMillis><blockedTimeMillis>0</blockedTimeMillis><buildableDurationMillis>78959</buildableDurationMillis><buildableTimeMillis>78959</buildableTimeMillis><buildingDurationMillis>111781</buildingDurationMillis><executingTimeMillis>111781</executingTimeMillis><executorUtilization>1.0</executorUtilization><subTaskCount>0</subTaskCount><waitingDurationMillis>0</waitingDurationMillis><waitingTimeMillis>0</waitingTimeMillis></action><action></action><action _class='hudson.plugins.git.util.BuildData'><buildsByBranchName><originmaster _class='hudson.plugins.git.util.Build'><buildNumber>11643</buildNumber><marked><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><branch><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><name>origin/master</name></branch></marked><revision><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><branch><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><name>origin/master</name></branch></revision></originmaster><refsremotesoriginosmithwip _class='hudson.plugins.git.util.Build'><buildNumber>11003</buildNumber><marked><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><branch><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><name>refs/remotes/origin/osmith/wip</name></branch></marked><revision><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><branch><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><name>refs/remotes/origin/osmith/wip</name></branch></revision></refsremotesoriginosmithwip><refsremotesoriginmaster _class='hudson.plugins.git.util.Build'><buildNumber>7614</buildNumber><marked><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><branch><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><name>refs/remotes/origin/master</name></branch></marked><revision><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><branch><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><name>refs/remotes/origin/master</name></branch></revision></refsremotesoriginmaster></buildsByBranchName><lastBuiltRevision><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><branch><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><name>origin/master</name></branch></lastBuiltRevision><remoteUrl>https://gerrit.osmocom.org/osmo-bts</remoteUrl><scmName></scmName></action><action></action><action></action><action _class='org.jenkinsci.plugins.displayurlapi.actions.RunDisplayAction'></action><building>false</building><displayName>#11643</displayName><duration>111781</duration><estimatedDuration>110948</estimatedDuration><fullDisplayName>master-osmo-bts » oct,master,1,default,osmocom-master #11643</fullDisplayName><id>11643</id><inProgress>false</inProgress><keepLog>false</keepLog><number>11643</number><queueId>179772</queueId><result>SUCCESS</result><timestamp>1785172387053</timestamp><url>https://jenkins.osmocom.org/jenkins/view/DAHDI/job/master-osmo-bts/BTS_MODEL=oct,FIRMWARE_VERSION=master,WITH_MANUALS=1,a4=default,label=osmocom-master/11643/</url><builtOn>build5-deb12build-ansible</builtOn><changeSet _class='hudson.plugins.git.GitChangeSetList'><item _class='hudson.plugins.git.GitChangeSet'><affectedPath>tests/meas/meas_test.c</affectedPath><affectedPath>include/osmo-bts/lchan.h</affectedPath><affectedPath>src/common/measurement.c</affectedPath><affectedPath>src/common/l1sap.c</affectedPath><commitId>66a3617b7f8c448ed1f01fa9052b56158f3718c4</commitId><timestamp>1782832648000</timestamp><author><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><fullName>Vadim Yanitskiy</fullName></author><authorEmail>vyanitskiy@sysmocom.de</authorEmail><comment>common: stop buffering UL measurements when SACCH is deactivated

When the BSC sends RSL DEACT SACCH, the per-SACCH UL measurement drain
stops (it runs on SACCH timing), but the producer in lchan_new_ul_meas()
keeps appending the measurement contributions from every received
TCH/SDCCH burst.  After one SACCH period (104 frames) the 104-slot
uplink measurement buffer fills up, yielding a flood of:

  NOTICE measurement.c:336 no space for uplink measurement, num_ul_meas=104

Add a bool sacch_active flag to gsm_lchan, set to true in the common
l1sap_chan_act() and clear in l1sap_chan_deact_sacch().  Guard
lchan_new_ul_meas() with this flag so that measurements are silently
discarded while SACCH is inactive - there is nothing to drain the
buffer and no SACCH channel on which to report the results to the BSC.

Change-Id: I3943c788cab5d2411b06ac681d4d412852bac0a7
AI-Assisted: yes (Claude)
</comment><date>2026-06-30 22:17:28 +0700</date><id>66a3617b7f8c448ed1f01fa9052b56158f3718c4</id><msg>common: stop buffering UL measurements when SACCH is deactivated</msg><path><editType>edit</editType><file>src/common/l1sap.c</file></path><path><editType>edit</editType><file>tests/meas/meas_test.c</file></path><path><editType>edit</editType><file>include/osmo-bts/lchan.h</file></path><path><editType>edit</editType><file>src/common/measurement.c</file></path></item><item _class='hudson.plugins.git.GitChangeSet'><affectedPath>src/common/lchan.c</affectedPath><commitId>66010d4cbaaae8b84550d02589a2e0fad11f33a5</commitId><timestamp>1782833107000</timestamp><author><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><fullName>Vadim Yanitskiy</fullName></author><authorEmail>vyanitskiy@sysmocom.de</authorEmail><comment>common: reset lchan meas state in gsm_lchan_release()

lchan-&gt;meas (including interf_meas_num and num_ul_meas) is normally
only reset by lchan_meas_reset() called from rsl_tx_chan_act_ack() on
RSL CHANNEL ACTIVATION.  Idle logical channels are never RSL-activated,
so their measurement state is never reset via that path.

On an OML link re-establishment, osmo-bts does not exit: abis.c tears
down the signalling links, the bts_shutdown FSM powers down all TRXs,
and then waits for reconnect.  The gsm_bts/trx/ts/lchan structures
remain in memory, so stale interf_meas_num survives the reconnect.

This is why we're seeing these ERRORs while running ttcn3-bts-test:

(bts=0,trx=2,ts=4,ss=6) Not enough room to store interference report (0dBm)

Add a lchan_meas_reset() call to gsm_lchan_release(), which is called
from gsm_ts_release() when the nm_channel_fsm enters state
NM_CHAN_ST_OP_DISABLED_NOTINSTALLED.  This is exactly the right
moment: the radio is fully stopped, so no new samples arrive.

Change-Id: I18dc9d30417b0c5b2e579660d4a087d93445f956
AI-Assisted: yes (Claude)
</comment><date>2026-06-30 22:25:07 +0700</date><id>66010d4cbaaae8b84550d02589a2e0fad11f33a5</id><msg>common: reset lchan meas state in gsm_lchan_release()</msg><path><editType>edit</editType><file>src/common/lchan.c</file></path></item><kind>git</kind></changeSet><culprit><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><fullName>Vadim Yanitskiy</fullName></culprit></run><run><action _class='hudson.matrix.MatrixChildParametersAction'><parameter _class='hudson.model.StringParameterValue'><name>BRANCH</name><value>master</value></parameter><parameter _class='hudson.model.StringParameterValue'><name>EMAIL_NOTIFICATIONS</name><value>jenkins-notifications@lists.osmocom.org laforge@gnumonks.org</value></parameter></action><action></action><action _class='hudson.model.CauseAction'><cause _class='hudson.model.Cause$UpstreamCause'><shortDescription>Started by upstream project "master-osmo-bts" build number 11,643</shortDescription><upstreamBuild>11643</upstreamBuild><upstreamProject>master-osmo-bts</upstreamProject><upstreamUrl>job/master-osmo-bts/</upstreamUrl></cause></action><action _class='jenkins.metrics.impl.TimeInQueueAction'><blockedDurationMillis>0</blockedDurationMillis><blockedTimeMillis>0</blockedTimeMillis><buildableDurationMillis>78172</buildableDurationMillis><buildableTimeMillis>78172</buildableTimeMillis><buildingDurationMillis>111008</buildingDurationMillis><executingTimeMillis>111008</executingTimeMillis><executorUtilization>1.0</executorUtilization><subTaskCount>0</subTaskCount><waitingDurationMillis>0</waitingDurationMillis><waitingTimeMillis>0</waitingTimeMillis></action><action></action><action _class='hudson.plugins.git.util.BuildData'><buildsByBranchName><originmaster _class='hudson.plugins.git.util.Build'><buildNumber>11643</buildNumber><marked><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><branch><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><name>origin/master</name></branch></marked><revision><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><branch><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><name>origin/master</name></branch></revision></originmaster><refsremotesoriginosmithwip _class='hudson.plugins.git.util.Build'><buildNumber>11003</buildNumber><marked><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><branch><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><name>refs/remotes/origin/osmith/wip</name></branch></marked><revision><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><branch><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><name>refs/remotes/origin/osmith/wip</name></branch></revision></refsremotesoriginosmithwip><refsremotesoriginmaster _class='hudson.plugins.git.util.Build'><buildNumber>7614</buildNumber><marked><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><branch><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><name>refs/remotes/origin/master</name></branch></marked><revision><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><branch><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><name>refs/remotes/origin/master</name></branch></revision></refsremotesoriginmaster></buildsByBranchName><lastBuiltRevision><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><branch><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><name>origin/master</name></branch></lastBuiltRevision><remoteUrl>https://gerrit.osmocom.org/osmo-bts</remoteUrl><scmName></scmName></action><action></action><action></action><action _class='org.jenkinsci.plugins.displayurlapi.actions.RunDisplayAction'></action><building>false</building><displayName>#11643</displayName><duration>111008</duration><estimatedDuration>118171</estimatedDuration><fullDisplayName>master-osmo-bts » oct+trx,master,1,default,osmocom-master #11643</fullDisplayName><id>11643</id><inProgress>false</inProgress><keepLog>false</keepLog><number>11643</number><queueId>179771</queueId><result>SUCCESS</result><timestamp>1785172387053</timestamp><url>https://jenkins.osmocom.org/jenkins/view/DAHDI/job/master-osmo-bts/BTS_MODEL=oct+trx,FIRMWARE_VERSION=master,WITH_MANUALS=1,a4=default,label=osmocom-master/11643/</url><builtOn>build4-deb12build-ansible</builtOn><changeSet _class='hudson.plugins.git.GitChangeSetList'><item _class='hudson.plugins.git.GitChangeSet'><affectedPath>tests/meas/meas_test.c</affectedPath><affectedPath>include/osmo-bts/lchan.h</affectedPath><affectedPath>src/common/measurement.c</affectedPath><affectedPath>src/common/l1sap.c</affectedPath><commitId>66a3617b7f8c448ed1f01fa9052b56158f3718c4</commitId><timestamp>1782832648000</timestamp><author><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><fullName>Vadim Yanitskiy</fullName></author><authorEmail>vyanitskiy@sysmocom.de</authorEmail><comment>common: stop buffering UL measurements when SACCH is deactivated

When the BSC sends RSL DEACT SACCH, the per-SACCH UL measurement drain
stops (it runs on SACCH timing), but the producer in lchan_new_ul_meas()
keeps appending the measurement contributions from every received
TCH/SDCCH burst.  After one SACCH period (104 frames) the 104-slot
uplink measurement buffer fills up, yielding a flood of:

  NOTICE measurement.c:336 no space for uplink measurement, num_ul_meas=104

Add a bool sacch_active flag to gsm_lchan, set to true in the common
l1sap_chan_act() and clear in l1sap_chan_deact_sacch().  Guard
lchan_new_ul_meas() with this flag so that measurements are silently
discarded while SACCH is inactive - there is nothing to drain the
buffer and no SACCH channel on which to report the results to the BSC.

Change-Id: I3943c788cab5d2411b06ac681d4d412852bac0a7
AI-Assisted: yes (Claude)
</comment><date>2026-06-30 22:17:28 +0700</date><id>66a3617b7f8c448ed1f01fa9052b56158f3718c4</id><msg>common: stop buffering UL measurements when SACCH is deactivated</msg><path><editType>edit</editType><file>include/osmo-bts/lchan.h</file></path><path><editType>edit</editType><file>src/common/measurement.c</file></path><path><editType>edit</editType><file>tests/meas/meas_test.c</file></path><path><editType>edit</editType><file>src/common/l1sap.c</file></path></item><item _class='hudson.plugins.git.GitChangeSet'><affectedPath>src/common/lchan.c</affectedPath><commitId>66010d4cbaaae8b84550d02589a2e0fad11f33a5</commitId><timestamp>1782833107000</timestamp><author><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><fullName>Vadim Yanitskiy</fullName></author><authorEmail>vyanitskiy@sysmocom.de</authorEmail><comment>common: reset lchan meas state in gsm_lchan_release()

lchan-&gt;meas (including interf_meas_num and num_ul_meas) is normally
only reset by lchan_meas_reset() called from rsl_tx_chan_act_ack() on
RSL CHANNEL ACTIVATION.  Idle logical channels are never RSL-activated,
so their measurement state is never reset via that path.

On an OML link re-establishment, osmo-bts does not exit: abis.c tears
down the signalling links, the bts_shutdown FSM powers down all TRXs,
and then waits for reconnect.  The gsm_bts/trx/ts/lchan structures
remain in memory, so stale interf_meas_num survives the reconnect.

This is why we're seeing these ERRORs while running ttcn3-bts-test:

(bts=0,trx=2,ts=4,ss=6) Not enough room to store interference report (0dBm)

Add a lchan_meas_reset() call to gsm_lchan_release(), which is called
from gsm_ts_release() when the nm_channel_fsm enters state
NM_CHAN_ST_OP_DISABLED_NOTINSTALLED.  This is exactly the right
moment: the radio is fully stopped, so no new samples arrive.

Change-Id: I18dc9d30417b0c5b2e579660d4a087d93445f956
AI-Assisted: yes (Claude)
</comment><date>2026-06-30 22:25:07 +0700</date><id>66010d4cbaaae8b84550d02589a2e0fad11f33a5</id><msg>common: reset lchan meas state in gsm_lchan_release()</msg><path><editType>edit</editType><file>src/common/lchan.c</file></path></item><kind>git</kind></changeSet><culprit><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><fullName>Vadim Yanitskiy</fullName></culprit></run><run><action _class='hudson.matrix.MatrixChildParametersAction'><parameter _class='hudson.model.StringParameterValue'><name>BRANCH</name><value>master</value></parameter><parameter _class='hudson.model.StringParameterValue'><name>EMAIL_NOTIFICATIONS</name><value>jenkins-notifications@lists.osmocom.org laforge@gnumonks.org</value></parameter></action><action></action><action _class='hudson.model.CauseAction'><cause _class='hudson.model.Cause$UpstreamCause'><shortDescription>Started by upstream project "master-osmo-bts" build number 11,643</shortDescription><upstreamBuild>11643</upstreamBuild><upstreamProject>master-osmo-bts</upstreamProject><upstreamUrl>job/master-osmo-bts/</upstreamUrl></cause></action><action _class='jenkins.metrics.impl.TimeInQueueAction'><blockedDurationMillis>0</blockedDurationMillis><blockedTimeMillis>0</blockedTimeMillis><buildableDurationMillis>0</buildableDurationMillis><buildableTimeMillis>0</buildableTimeMillis><buildingDurationMillis>78424</buildingDurationMillis><executingTimeMillis>78424</executingTimeMillis><executorUtilization>1.0</executorUtilization><subTaskCount>0</subTaskCount><waitingDurationMillis>0</waitingDurationMillis><waitingTimeMillis>0</waitingTimeMillis></action><action></action><action _class='hudson.plugins.git.util.BuildData'><buildsByBranchName><originmaster _class='hudson.plugins.git.util.Build'><buildNumber>11643</buildNumber><marked><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><branch><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><name>origin/master</name></branch></marked><revision><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><branch><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><name>origin/master</name></branch></revision></originmaster><refsremotesoriginosmithwip _class='hudson.plugins.git.util.Build'><buildNumber>11003</buildNumber><marked><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><branch><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><name>refs/remotes/origin/osmith/wip</name></branch></marked><revision><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><branch><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><name>refs/remotes/origin/osmith/wip</name></branch></revision></refsremotesoriginosmithwip><refsremotesoriginmaster _class='hudson.plugins.git.util.Build'><buildNumber>7614</buildNumber><marked><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><branch><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><name>refs/remotes/origin/master</name></branch></marked><revision><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><branch><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><name>refs/remotes/origin/master</name></branch></revision></refsremotesoriginmaster></buildsByBranchName><lastBuiltRevision><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><branch><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><name>origin/master</name></branch></lastBuiltRevision><remoteUrl>https://gerrit.osmocom.org/osmo-bts</remoteUrl><scmName></scmName></action><action></action><action></action><action _class='org.jenkinsci.plugins.displayurlapi.actions.RunDisplayAction'></action><building>false</building><displayName>#11643</displayName><duration>78424</duration><estimatedDuration>73974</estimatedDuration><fullDisplayName>master-osmo-bts » sysmo,femtobts_v2.7,0,default,osmocom-master #11643</fullDisplayName><id>11643</id><inProgress>false</inProgress><keepLog>false</keepLog><number>11643</number><queueId>179766</queueId><result>SUCCESS</result><timestamp>1785172387053</timestamp><url>https://jenkins.osmocom.org/jenkins/view/DAHDI/job/master-osmo-bts/BTS_MODEL=sysmo,FIRMWARE_VERSION=femtobts_v2.7,WITH_MANUALS=0,a4=default,label=osmocom-master/11643/</url><builtOn>build5-deb12build-ansible</builtOn><changeSet _class='hudson.plugins.git.GitChangeSetList'><item _class='hudson.plugins.git.GitChangeSet'><affectedPath>tests/meas/meas_test.c</affectedPath><affectedPath>include/osmo-bts/lchan.h</affectedPath><affectedPath>src/common/measurement.c</affectedPath><affectedPath>src/common/l1sap.c</affectedPath><commitId>66a3617b7f8c448ed1f01fa9052b56158f3718c4</commitId><timestamp>1782832648000</timestamp><author><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><fullName>Vadim Yanitskiy</fullName></author><authorEmail>vyanitskiy@sysmocom.de</authorEmail><comment>common: stop buffering UL measurements when SACCH is deactivated

When the BSC sends RSL DEACT SACCH, the per-SACCH UL measurement drain
stops (it runs on SACCH timing), but the producer in lchan_new_ul_meas()
keeps appending the measurement contributions from every received
TCH/SDCCH burst.  After one SACCH period (104 frames) the 104-slot
uplink measurement buffer fills up, yielding a flood of:

  NOTICE measurement.c:336 no space for uplink measurement, num_ul_meas=104

Add a bool sacch_active flag to gsm_lchan, set to true in the common
l1sap_chan_act() and clear in l1sap_chan_deact_sacch().  Guard
lchan_new_ul_meas() with this flag so that measurements are silently
discarded while SACCH is inactive - there is nothing to drain the
buffer and no SACCH channel on which to report the results to the BSC.

Change-Id: I3943c788cab5d2411b06ac681d4d412852bac0a7
AI-Assisted: yes (Claude)
</comment><date>2026-06-30 22:17:28 +0700</date><id>66a3617b7f8c448ed1f01fa9052b56158f3718c4</id><msg>common: stop buffering UL measurements when SACCH is deactivated</msg><path><editType>edit</editType><file>include/osmo-bts/lchan.h</file></path><path><editType>edit</editType><file>src/common/measurement.c</file></path><path><editType>edit</editType><file>src/common/l1sap.c</file></path><path><editType>edit</editType><file>tests/meas/meas_test.c</file></path></item><item _class='hudson.plugins.git.GitChangeSet'><affectedPath>src/common/lchan.c</affectedPath><commitId>66010d4cbaaae8b84550d02589a2e0fad11f33a5</commitId><timestamp>1782833107000</timestamp><author><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><fullName>Vadim Yanitskiy</fullName></author><authorEmail>vyanitskiy@sysmocom.de</authorEmail><comment>common: reset lchan meas state in gsm_lchan_release()

lchan-&gt;meas (including interf_meas_num and num_ul_meas) is normally
only reset by lchan_meas_reset() called from rsl_tx_chan_act_ack() on
RSL CHANNEL ACTIVATION.  Idle logical channels are never RSL-activated,
so their measurement state is never reset via that path.

On an OML link re-establishment, osmo-bts does not exit: abis.c tears
down the signalling links, the bts_shutdown FSM powers down all TRXs,
and then waits for reconnect.  The gsm_bts/trx/ts/lchan structures
remain in memory, so stale interf_meas_num survives the reconnect.

This is why we're seeing these ERRORs while running ttcn3-bts-test:

(bts=0,trx=2,ts=4,ss=6) Not enough room to store interference report (0dBm)

Add a lchan_meas_reset() call to gsm_lchan_release(), which is called
from gsm_ts_release() when the nm_channel_fsm enters state
NM_CHAN_ST_OP_DISABLED_NOTINSTALLED.  This is exactly the right
moment: the radio is fully stopped, so no new samples arrive.

Change-Id: I18dc9d30417b0c5b2e579660d4a087d93445f956
AI-Assisted: yes (Claude)
</comment><date>2026-06-30 22:25:07 +0700</date><id>66010d4cbaaae8b84550d02589a2e0fad11f33a5</id><msg>common: reset lchan meas state in gsm_lchan_release()</msg><path><editType>edit</editType><file>src/common/lchan.c</file></path></item><kind>git</kind></changeSet><culprit><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><fullName>Vadim Yanitskiy</fullName></culprit></run><run><action _class='hudson.matrix.MatrixChildParametersAction'><parameter _class='hudson.model.StringParameterValue'><name>BRANCH</name><value>master</value></parameter><parameter _class='hudson.model.StringParameterValue'><name>EMAIL_NOTIFICATIONS</name><value>jenkins-notifications@lists.osmocom.org laforge@gnumonks.org</value></parameter></action><action></action><action _class='hudson.model.CauseAction'><cause _class='hudson.model.Cause$UpstreamCause'><shortDescription>Started by upstream project "master-osmo-bts" build number 11,643</shortDescription><upstreamBuild>11643</upstreamBuild><upstreamProject>master-osmo-bts</upstreamProject><upstreamUrl>job/master-osmo-bts/</upstreamUrl></cause></action><action _class='jenkins.metrics.impl.TimeInQueueAction'><blockedDurationMillis>0</blockedDurationMillis><blockedTimeMillis>0</blockedTimeMillis><buildableDurationMillis>0</buildableDurationMillis><buildableTimeMillis>0</buildableTimeMillis><buildingDurationMillis>113899</buildingDurationMillis><executingTimeMillis>113899</executingTimeMillis><executorUtilization>1.0</executorUtilization><subTaskCount>0</subTaskCount><waitingDurationMillis>0</waitingDurationMillis><waitingTimeMillis>0</waitingTimeMillis></action><action></action><action _class='hudson.plugins.git.util.BuildData'><buildsByBranchName><originmaster _class='hudson.plugins.git.util.Build'><buildNumber>11643</buildNumber><marked><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><branch><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><name>origin/master</name></branch></marked><revision><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><branch><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><name>origin/master</name></branch></revision></originmaster><refsremotesoriginosmithwip _class='hudson.plugins.git.util.Build'><buildNumber>11003</buildNumber><marked><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><branch><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><name>refs/remotes/origin/osmith/wip</name></branch></marked><revision><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><branch><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><name>refs/remotes/origin/osmith/wip</name></branch></revision></refsremotesoriginosmithwip><refsremotesoriginmaster _class='hudson.plugins.git.util.Build'><buildNumber>7614</buildNumber><marked><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><branch><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><name>refs/remotes/origin/master</name></branch></marked><revision><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><branch><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><name>refs/remotes/origin/master</name></branch></revision></refsremotesoriginmaster></buildsByBranchName><lastBuiltRevision><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><branch><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><name>origin/master</name></branch></lastBuiltRevision><remoteUrl>https://gerrit.osmocom.org/osmo-bts</remoteUrl><scmName></scmName></action><action></action><action></action><action _class='org.jenkinsci.plugins.displayurlapi.actions.RunDisplayAction'></action><building>false</building><displayName>#11643</displayName><duration>113899</duration><estimatedDuration>114655</estimatedDuration><fullDisplayName>master-osmo-bts » sysmo,master,1,default,osmocom-master #11643</fullDisplayName><id>11643</id><inProgress>false</inProgress><keepLog>false</keepLog><number>11643</number><queueId>179769</queueId><result>SUCCESS</result><timestamp>1785172387053</timestamp><url>https://jenkins.osmocom.org/jenkins/view/DAHDI/job/master-osmo-bts/BTS_MODEL=sysmo,FIRMWARE_VERSION=master,WITH_MANUALS=1,a4=default,label=osmocom-master/11643/</url><builtOn>build5-deb12build-ansible</builtOn><changeSet _class='hudson.plugins.git.GitChangeSetList'><item _class='hudson.plugins.git.GitChangeSet'><affectedPath>tests/meas/meas_test.c</affectedPath><affectedPath>include/osmo-bts/lchan.h</affectedPath><affectedPath>src/common/measurement.c</affectedPath><affectedPath>src/common/l1sap.c</affectedPath><commitId>66a3617b7f8c448ed1f01fa9052b56158f3718c4</commitId><timestamp>1782832648000</timestamp><author><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><fullName>Vadim Yanitskiy</fullName></author><authorEmail>vyanitskiy@sysmocom.de</authorEmail><comment>common: stop buffering UL measurements when SACCH is deactivated

When the BSC sends RSL DEACT SACCH, the per-SACCH UL measurement drain
stops (it runs on SACCH timing), but the producer in lchan_new_ul_meas()
keeps appending the measurement contributions from every received
TCH/SDCCH burst.  After one SACCH period (104 frames) the 104-slot
uplink measurement buffer fills up, yielding a flood of:

  NOTICE measurement.c:336 no space for uplink measurement, num_ul_meas=104

Add a bool sacch_active flag to gsm_lchan, set to true in the common
l1sap_chan_act() and clear in l1sap_chan_deact_sacch().  Guard
lchan_new_ul_meas() with this flag so that measurements are silently
discarded while SACCH is inactive - there is nothing to drain the
buffer and no SACCH channel on which to report the results to the BSC.

Change-Id: I3943c788cab5d2411b06ac681d4d412852bac0a7
AI-Assisted: yes (Claude)
</comment><date>2026-06-30 22:17:28 +0700</date><id>66a3617b7f8c448ed1f01fa9052b56158f3718c4</id><msg>common: stop buffering UL measurements when SACCH is deactivated</msg><path><editType>edit</editType><file>src/common/measurement.c</file></path><path><editType>edit</editType><file>include/osmo-bts/lchan.h</file></path><path><editType>edit</editType><file>src/common/l1sap.c</file></path><path><editType>edit</editType><file>tests/meas/meas_test.c</file></path></item><item _class='hudson.plugins.git.GitChangeSet'><affectedPath>src/common/lchan.c</affectedPath><commitId>66010d4cbaaae8b84550d02589a2e0fad11f33a5</commitId><timestamp>1782833107000</timestamp><author><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><fullName>Vadim Yanitskiy</fullName></author><authorEmail>vyanitskiy@sysmocom.de</authorEmail><comment>common: reset lchan meas state in gsm_lchan_release()

lchan-&gt;meas (including interf_meas_num and num_ul_meas) is normally
only reset by lchan_meas_reset() called from rsl_tx_chan_act_ack() on
RSL CHANNEL ACTIVATION.  Idle logical channels are never RSL-activated,
so their measurement state is never reset via that path.

On an OML link re-establishment, osmo-bts does not exit: abis.c tears
down the signalling links, the bts_shutdown FSM powers down all TRXs,
and then waits for reconnect.  The gsm_bts/trx/ts/lchan structures
remain in memory, so stale interf_meas_num survives the reconnect.

This is why we're seeing these ERRORs while running ttcn3-bts-test:

(bts=0,trx=2,ts=4,ss=6) Not enough room to store interference report (0dBm)

Add a lchan_meas_reset() call to gsm_lchan_release(), which is called
from gsm_ts_release() when the nm_channel_fsm enters state
NM_CHAN_ST_OP_DISABLED_NOTINSTALLED.  This is exactly the right
moment: the radio is fully stopped, so no new samples arrive.

Change-Id: I18dc9d30417b0c5b2e579660d4a087d93445f956
AI-Assisted: yes (Claude)
</comment><date>2026-06-30 22:25:07 +0700</date><id>66010d4cbaaae8b84550d02589a2e0fad11f33a5</id><msg>common: reset lchan meas state in gsm_lchan_release()</msg><path><editType>edit</editType><file>src/common/lchan.c</file></path></item><kind>git</kind></changeSet><culprit><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><fullName>Vadim Yanitskiy</fullName></culprit></run><run><action _class='hudson.matrix.MatrixChildParametersAction'><parameter _class='hudson.model.StringParameterValue'><name>BRANCH</name><value>master</value></parameter><parameter _class='hudson.model.StringParameterValue'><name>EMAIL_NOTIFICATIONS</name><value>jenkins-notifications@lists.osmocom.org laforge@gnumonks.org</value></parameter></action><action></action><action _class='hudson.model.CauseAction'><cause _class='hudson.model.Cause$UpstreamCause'><shortDescription>Started by upstream project "master-osmo-bts" build number 11,643</shortDescription><upstreamBuild>11643</upstreamBuild><upstreamProject>master-osmo-bts</upstreamProject><upstreamUrl>job/master-osmo-bts/</upstreamUrl></cause></action><action _class='jenkins.metrics.impl.TimeInQueueAction'><blockedDurationMillis>0</blockedDurationMillis><blockedTimeMillis>0</blockedTimeMillis><buildableDurationMillis>114721</buildableDurationMillis><buildableTimeMillis>114721</buildableTimeMillis><buildingDurationMillis>72108</buildingDurationMillis><executingTimeMillis>72108</executingTimeMillis><executorUtilization>1.0</executorUtilization><subTaskCount>0</subTaskCount><waitingDurationMillis>0</waitingDurationMillis><waitingTimeMillis>0</waitingTimeMillis></action><action></action><action _class='hudson.plugins.git.util.BuildData'><buildsByBranchName><originmaster _class='hudson.plugins.git.util.Build'><buildNumber>11643</buildNumber><marked><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><branch><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><name>origin/master</name></branch></marked><revision><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><branch><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><name>origin/master</name></branch></revision></originmaster><refsremotesoriginosmithwip _class='hudson.plugins.git.util.Build'><buildNumber>11003</buildNumber><marked><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><branch><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><name>refs/remotes/origin/osmith/wip</name></branch></marked><revision><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><branch><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><name>refs/remotes/origin/osmith/wip</name></branch></revision></refsremotesoriginosmithwip><refsremotesoriginmaster _class='hudson.plugins.git.util.Build'><buildNumber>7614</buildNumber><marked><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><branch><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><name>refs/remotes/origin/master</name></branch></marked><revision><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><branch><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><name>refs/remotes/origin/master</name></branch></revision></refsremotesoriginmaster></buildsByBranchName><lastBuiltRevision><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><branch><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><name>origin/master</name></branch></lastBuiltRevision><remoteUrl>https://gerrit.osmocom.org/osmo-bts</remoteUrl><scmName></scmName></action><action></action><action></action><action _class='org.jenkinsci.plugins.displayurlapi.actions.RunDisplayAction'></action><building>false</building><displayName>#11643</displayName><duration>72108</duration><estimatedDuration>77209</estimatedDuration><fullDisplayName>master-osmo-bts » sysmo,superfemto_v2.4,0,default,osmocom-master #11643</fullDisplayName><id>11643</id><inProgress>false</inProgress><keepLog>false</keepLog><number>11643</number><queueId>179776</queueId><result>SUCCESS</result><timestamp>1785172387053</timestamp><url>https://jenkins.osmocom.org/jenkins/view/DAHDI/job/master-osmo-bts/BTS_MODEL=sysmo,FIRMWARE_VERSION=superfemto_v2.4,WITH_MANUALS=0,a4=default,label=osmocom-master/11643/</url><builtOn>build5-deb12build-ansible</builtOn><changeSet _class='hudson.plugins.git.GitChangeSetList'><item _class='hudson.plugins.git.GitChangeSet'><affectedPath>tests/meas/meas_test.c</affectedPath><affectedPath>include/osmo-bts/lchan.h</affectedPath><affectedPath>src/common/measurement.c</affectedPath><affectedPath>src/common/l1sap.c</affectedPath><commitId>66a3617b7f8c448ed1f01fa9052b56158f3718c4</commitId><timestamp>1782832648000</timestamp><author><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><fullName>Vadim Yanitskiy</fullName></author><authorEmail>vyanitskiy@sysmocom.de</authorEmail><comment>common: stop buffering UL measurements when SACCH is deactivated

When the BSC sends RSL DEACT SACCH, the per-SACCH UL measurement drain
stops (it runs on SACCH timing), but the producer in lchan_new_ul_meas()
keeps appending the measurement contributions from every received
TCH/SDCCH burst.  After one SACCH period (104 frames) the 104-slot
uplink measurement buffer fills up, yielding a flood of:

  NOTICE measurement.c:336 no space for uplink measurement, num_ul_meas=104

Add a bool sacch_active flag to gsm_lchan, set to true in the common
l1sap_chan_act() and clear in l1sap_chan_deact_sacch().  Guard
lchan_new_ul_meas() with this flag so that measurements are silently
discarded while SACCH is inactive - there is nothing to drain the
buffer and no SACCH channel on which to report the results to the BSC.

Change-Id: I3943c788cab5d2411b06ac681d4d412852bac0a7
AI-Assisted: yes (Claude)
</comment><date>2026-06-30 22:17:28 +0700</date><id>66a3617b7f8c448ed1f01fa9052b56158f3718c4</id><msg>common: stop buffering UL measurements when SACCH is deactivated</msg><path><editType>edit</editType><file>include/osmo-bts/lchan.h</file></path><path><editType>edit</editType><file>src/common/measurement.c</file></path><path><editType>edit</editType><file>tests/meas/meas_test.c</file></path><path><editType>edit</editType><file>src/common/l1sap.c</file></path></item><item _class='hudson.plugins.git.GitChangeSet'><affectedPath>src/common/lchan.c</affectedPath><commitId>66010d4cbaaae8b84550d02589a2e0fad11f33a5</commitId><timestamp>1782833107000</timestamp><author><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><fullName>Vadim Yanitskiy</fullName></author><authorEmail>vyanitskiy@sysmocom.de</authorEmail><comment>common: reset lchan meas state in gsm_lchan_release()

lchan-&gt;meas (including interf_meas_num and num_ul_meas) is normally
only reset by lchan_meas_reset() called from rsl_tx_chan_act_ack() on
RSL CHANNEL ACTIVATION.  Idle logical channels are never RSL-activated,
so their measurement state is never reset via that path.

On an OML link re-establishment, osmo-bts does not exit: abis.c tears
down the signalling links, the bts_shutdown FSM powers down all TRXs,
and then waits for reconnect.  The gsm_bts/trx/ts/lchan structures
remain in memory, so stale interf_meas_num survives the reconnect.

This is why we're seeing these ERRORs while running ttcn3-bts-test:

(bts=0,trx=2,ts=4,ss=6) Not enough room to store interference report (0dBm)

Add a lchan_meas_reset() call to gsm_lchan_release(), which is called
from gsm_ts_release() when the nm_channel_fsm enters state
NM_CHAN_ST_OP_DISABLED_NOTINSTALLED.  This is exactly the right
moment: the radio is fully stopped, so no new samples arrive.

Change-Id: I18dc9d30417b0c5b2e579660d4a087d93445f956
AI-Assisted: yes (Claude)
</comment><date>2026-06-30 22:25:07 +0700</date><id>66010d4cbaaae8b84550d02589a2e0fad11f33a5</id><msg>common: reset lchan meas state in gsm_lchan_release()</msg><path><editType>edit</editType><file>src/common/lchan.c</file></path></item><kind>git</kind></changeSet><culprit><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><fullName>Vadim Yanitskiy</fullName></culprit></run><run><action _class='hudson.matrix.MatrixChildParametersAction'><parameter _class='hudson.model.StringParameterValue'><name>BRANCH</name><value>master</value></parameter><parameter _class='hudson.model.StringParameterValue'><name>EMAIL_NOTIFICATIONS</name><value>jenkins-notifications@lists.osmocom.org laforge@gnumonks.org</value></parameter></action><action></action><action _class='hudson.model.CauseAction'><cause _class='hudson.model.Cause$UpstreamCause'><shortDescription>Started by upstream project "master-osmo-bts" build number 11,643</shortDescription><upstreamBuild>11643</upstreamBuild><upstreamProject>master-osmo-bts</upstreamProject><upstreamUrl>job/master-osmo-bts/</upstreamUrl></cause></action><action _class='jenkins.metrics.impl.TimeInQueueAction'><blockedDurationMillis>0</blockedDurationMillis><blockedTimeMillis>0</blockedTimeMillis><buildableDurationMillis>107704</buildableDurationMillis><buildableTimeMillis>107704</buildableTimeMillis><buildingDurationMillis>67187</buildingDurationMillis><executingTimeMillis>67187</executingTimeMillis><executorUtilization>1.0</executorUtilization><subTaskCount>0</subTaskCount><waitingDurationMillis>0</waitingDurationMillis><waitingTimeMillis>0</waitingTimeMillis></action><action></action><action _class='hudson.plugins.git.util.BuildData'><buildsByBranchName><originmaster _class='hudson.plugins.git.util.Build'><buildNumber>11643</buildNumber><marked><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><branch><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><name>origin/master</name></branch></marked><revision><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><branch><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><name>origin/master</name></branch></revision></originmaster><refsremotesoriginosmithwip _class='hudson.plugins.git.util.Build'><buildNumber>11003</buildNumber><marked><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><branch><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><name>refs/remotes/origin/osmith/wip</name></branch></marked><revision><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><branch><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><name>refs/remotes/origin/osmith/wip</name></branch></revision></refsremotesoriginosmithwip><refsremotesoriginmaster _class='hudson.plugins.git.util.Build'><buildNumber>7614</buildNumber><marked><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><branch><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><name>refs/remotes/origin/master</name></branch></marked><revision><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><branch><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><name>refs/remotes/origin/master</name></branch></revision></refsremotesoriginmaster></buildsByBranchName><lastBuiltRevision><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><branch><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><name>origin/master</name></branch></lastBuiltRevision><remoteUrl>https://gerrit.osmocom.org/osmo-bts</remoteUrl><scmName></scmName></action><action></action><action></action><action _class='org.jenkinsci.plugins.displayurlapi.actions.RunDisplayAction'></action><building>false</building><displayName>#11643</displayName><duration>67187</duration><estimatedDuration>69753</estimatedDuration><fullDisplayName>master-osmo-bts » sysmo,superfemto_v3.0.1pre,0,default,osmocom-master #11643</fullDisplayName><id>11643</id><inProgress>false</inProgress><keepLog>false</keepLog><number>11643</number><queueId>179774</queueId><result>SUCCESS</result><timestamp>1785172387053</timestamp><url>https://jenkins.osmocom.org/jenkins/view/DAHDI/job/master-osmo-bts/BTS_MODEL=sysmo,FIRMWARE_VERSION=superfemto_v3.0.1pre,WITH_MANUALS=0,a4=default,label=osmocom-master/11643/</url><builtOn>build4-deb12build-ansible</builtOn><changeSet _class='hudson.plugins.git.GitChangeSetList'><item _class='hudson.plugins.git.GitChangeSet'><affectedPath>tests/meas/meas_test.c</affectedPath><affectedPath>include/osmo-bts/lchan.h</affectedPath><affectedPath>src/common/measurement.c</affectedPath><affectedPath>src/common/l1sap.c</affectedPath><commitId>66a3617b7f8c448ed1f01fa9052b56158f3718c4</commitId><timestamp>1782832648000</timestamp><author><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><fullName>Vadim Yanitskiy</fullName></author><authorEmail>vyanitskiy@sysmocom.de</authorEmail><comment>common: stop buffering UL measurements when SACCH is deactivated

When the BSC sends RSL DEACT SACCH, the per-SACCH UL measurement drain
stops (it runs on SACCH timing), but the producer in lchan_new_ul_meas()
keeps appending the measurement contributions from every received
TCH/SDCCH burst.  After one SACCH period (104 frames) the 104-slot
uplink measurement buffer fills up, yielding a flood of:

  NOTICE measurement.c:336 no space for uplink measurement, num_ul_meas=104

Add a bool sacch_active flag to gsm_lchan, set to true in the common
l1sap_chan_act() and clear in l1sap_chan_deact_sacch().  Guard
lchan_new_ul_meas() with this flag so that measurements are silently
discarded while SACCH is inactive - there is nothing to drain the
buffer and no SACCH channel on which to report the results to the BSC.

Change-Id: I3943c788cab5d2411b06ac681d4d412852bac0a7
AI-Assisted: yes (Claude)
</comment><date>2026-06-30 22:17:28 +0700</date><id>66a3617b7f8c448ed1f01fa9052b56158f3718c4</id><msg>common: stop buffering UL measurements when SACCH is deactivated</msg><path><editType>edit</editType><file>src/common/l1sap.c</file></path><path><editType>edit</editType><file>src/common/measurement.c</file></path><path><editType>edit</editType><file>tests/meas/meas_test.c</file></path><path><editType>edit</editType><file>include/osmo-bts/lchan.h</file></path></item><item _class='hudson.plugins.git.GitChangeSet'><affectedPath>src/common/lchan.c</affectedPath><commitId>66010d4cbaaae8b84550d02589a2e0fad11f33a5</commitId><timestamp>1782833107000</timestamp><author><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><fullName>Vadim Yanitskiy</fullName></author><authorEmail>vyanitskiy@sysmocom.de</authorEmail><comment>common: reset lchan meas state in gsm_lchan_release()

lchan-&gt;meas (including interf_meas_num and num_ul_meas) is normally
only reset by lchan_meas_reset() called from rsl_tx_chan_act_ack() on
RSL CHANNEL ACTIVATION.  Idle logical channels are never RSL-activated,
so their measurement state is never reset via that path.

On an OML link re-establishment, osmo-bts does not exit: abis.c tears
down the signalling links, the bts_shutdown FSM powers down all TRXs,
and then waits for reconnect.  The gsm_bts/trx/ts/lchan structures
remain in memory, so stale interf_meas_num survives the reconnect.

This is why we're seeing these ERRORs while running ttcn3-bts-test:

(bts=0,trx=2,ts=4,ss=6) Not enough room to store interference report (0dBm)

Add a lchan_meas_reset() call to gsm_lchan_release(), which is called
from gsm_ts_release() when the nm_channel_fsm enters state
NM_CHAN_ST_OP_DISABLED_NOTINSTALLED.  This is exactly the right
moment: the radio is fully stopped, so no new samples arrive.

Change-Id: I18dc9d30417b0c5b2e579660d4a087d93445f956
AI-Assisted: yes (Claude)
</comment><date>2026-06-30 22:25:07 +0700</date><id>66010d4cbaaae8b84550d02589a2e0fad11f33a5</id><msg>common: reset lchan meas state in gsm_lchan_release()</msg><path><editType>edit</editType><file>src/common/lchan.c</file></path></item><kind>git</kind></changeSet><culprit><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><fullName>Vadim Yanitskiy</fullName></culprit></run><run><action _class='hudson.matrix.MatrixChildParametersAction'><parameter _class='hudson.model.StringParameterValue'><name>BRANCH</name><value>master</value></parameter><parameter _class='hudson.model.StringParameterValue'><name>EMAIL_NOTIFICATIONS</name><value>jenkins-notifications@lists.osmocom.org laforge@gnumonks.org</value></parameter></action><action></action><action _class='hudson.model.CauseAction'><cause _class='hudson.model.Cause$UpstreamCause'><shortDescription>Started by upstream project "master-osmo-bts" build number 11,643</shortDescription><upstreamBuild>11643</upstreamBuild><upstreamProject>master-osmo-bts</upstreamProject><upstreamUrl>job/master-osmo-bts/</upstreamUrl></cause></action><action _class='jenkins.metrics.impl.TimeInQueueAction'><blockedDurationMillis>0</blockedDurationMillis><blockedTimeMillis>0</blockedTimeMillis><buildableDurationMillis>79632</buildableDurationMillis><buildableTimeMillis>79632</buildableTimeMillis><buildingDurationMillis>70285</buildingDurationMillis><executingTimeMillis>70285</executingTimeMillis><executorUtilization>1.0</executorUtilization><subTaskCount>0</subTaskCount><waitingDurationMillis>0</waitingDurationMillis><waitingTimeMillis>0</waitingTimeMillis></action><action></action><action _class='hudson.plugins.git.util.BuildData'><buildsByBranchName><originmaster _class='hudson.plugins.git.util.Build'><buildNumber>11643</buildNumber><marked><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><branch><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><name>origin/master</name></branch></marked><revision><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><branch><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><name>origin/master</name></branch></revision></originmaster><refsremotesoriginosmithwip _class='hudson.plugins.git.util.Build'><buildNumber>11003</buildNumber><marked><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><branch><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><name>refs/remotes/origin/osmith/wip</name></branch></marked><revision><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><branch><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><name>refs/remotes/origin/osmith/wip</name></branch></revision></refsremotesoriginosmithwip><refsremotesoriginmaster _class='hudson.plugins.git.util.Build'><buildNumber>7614</buildNumber><marked><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><branch><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><name>refs/remotes/origin/master</name></branch></marked><revision><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><branch><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><name>refs/remotes/origin/master</name></branch></revision></refsremotesoriginmaster></buildsByBranchName><lastBuiltRevision><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><branch><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><name>origin/master</name></branch></lastBuiltRevision><remoteUrl>https://gerrit.osmocom.org/osmo-bts</remoteUrl><scmName></scmName></action><action></action><action></action><action _class='org.jenkinsci.plugins.displayurlapi.actions.RunDisplayAction'></action><building>false</building><displayName>#11643</displayName><duration>70285</duration><estimatedDuration>72557</estimatedDuration><fullDisplayName>master-osmo-bts » sysmo,superfemto_v3.1,0,default,osmocom-master #11643</fullDisplayName><id>11643</id><inProgress>false</inProgress><keepLog>false</keepLog><number>11643</number><queueId>179773</queueId><result>SUCCESS</result><timestamp>1785172387053</timestamp><url>https://jenkins.osmocom.org/jenkins/view/DAHDI/job/master-osmo-bts/BTS_MODEL=sysmo,FIRMWARE_VERSION=superfemto_v3.1,WITH_MANUALS=0,a4=default,label=osmocom-master/11643/</url><builtOn>build5-deb12build-ansible</builtOn><changeSet _class='hudson.plugins.git.GitChangeSetList'><item _class='hudson.plugins.git.GitChangeSet'><affectedPath>tests/meas/meas_test.c</affectedPath><affectedPath>include/osmo-bts/lchan.h</affectedPath><affectedPath>src/common/measurement.c</affectedPath><affectedPath>src/common/l1sap.c</affectedPath><commitId>66a3617b7f8c448ed1f01fa9052b56158f3718c4</commitId><timestamp>1782832648000</timestamp><author><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><fullName>Vadim Yanitskiy</fullName></author><authorEmail>vyanitskiy@sysmocom.de</authorEmail><comment>common: stop buffering UL measurements when SACCH is deactivated

When the BSC sends RSL DEACT SACCH, the per-SACCH UL measurement drain
stops (it runs on SACCH timing), but the producer in lchan_new_ul_meas()
keeps appending the measurement contributions from every received
TCH/SDCCH burst.  After one SACCH period (104 frames) the 104-slot
uplink measurement buffer fills up, yielding a flood of:

  NOTICE measurement.c:336 no space for uplink measurement, num_ul_meas=104

Add a bool sacch_active flag to gsm_lchan, set to true in the common
l1sap_chan_act() and clear in l1sap_chan_deact_sacch().  Guard
lchan_new_ul_meas() with this flag so that measurements are silently
discarded while SACCH is inactive - there is nothing to drain the
buffer and no SACCH channel on which to report the results to the BSC.

Change-Id: I3943c788cab5d2411b06ac681d4d412852bac0a7
AI-Assisted: yes (Claude)
</comment><date>2026-06-30 22:17:28 +0700</date><id>66a3617b7f8c448ed1f01fa9052b56158f3718c4</id><msg>common: stop buffering UL measurements when SACCH is deactivated</msg><path><editType>edit</editType><file>src/common/l1sap.c</file></path><path><editType>edit</editType><file>include/osmo-bts/lchan.h</file></path><path><editType>edit</editType><file>tests/meas/meas_test.c</file></path><path><editType>edit</editType><file>src/common/measurement.c</file></path></item><item _class='hudson.plugins.git.GitChangeSet'><affectedPath>src/common/lchan.c</affectedPath><commitId>66010d4cbaaae8b84550d02589a2e0fad11f33a5</commitId><timestamp>1782833107000</timestamp><author><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><fullName>Vadim Yanitskiy</fullName></author><authorEmail>vyanitskiy@sysmocom.de</authorEmail><comment>common: reset lchan meas state in gsm_lchan_release()

lchan-&gt;meas (including interf_meas_num and num_ul_meas) is normally
only reset by lchan_meas_reset() called from rsl_tx_chan_act_ack() on
RSL CHANNEL ACTIVATION.  Idle logical channels are never RSL-activated,
so their measurement state is never reset via that path.

On an OML link re-establishment, osmo-bts does not exit: abis.c tears
down the signalling links, the bts_shutdown FSM powers down all TRXs,
and then waits for reconnect.  The gsm_bts/trx/ts/lchan structures
remain in memory, so stale interf_meas_num survives the reconnect.

This is why we're seeing these ERRORs while running ttcn3-bts-test:

(bts=0,trx=2,ts=4,ss=6) Not enough room to store interference report (0dBm)

Add a lchan_meas_reset() call to gsm_lchan_release(), which is called
from gsm_ts_release() when the nm_channel_fsm enters state
NM_CHAN_ST_OP_DISABLED_NOTINSTALLED.  This is exactly the right
moment: the radio is fully stopped, so no new samples arrive.

Change-Id: I18dc9d30417b0c5b2e579660d4a087d93445f956
AI-Assisted: yes (Claude)
</comment><date>2026-06-30 22:25:07 +0700</date><id>66010d4cbaaae8b84550d02589a2e0fad11f33a5</id><msg>common: reset lchan meas state in gsm_lchan_release()</msg><path><editType>edit</editType><file>src/common/lchan.c</file></path></item><kind>git</kind></changeSet><culprit><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><fullName>Vadim Yanitskiy</fullName></culprit></run><run><action _class='hudson.matrix.MatrixChildParametersAction'><parameter _class='hudson.model.StringParameterValue'><name>BRANCH</name><value>master</value></parameter><parameter _class='hudson.model.StringParameterValue'><name>EMAIL_NOTIFICATIONS</name><value>jenkins-notifications@lists.osmocom.org laforge@gnumonks.org</value></parameter></action><action></action><action _class='hudson.model.CauseAction'><cause _class='hudson.model.Cause$UpstreamCause'><shortDescription>Started by upstream project "master-osmo-bts" build number 11,643</shortDescription><upstreamBuild>11643</upstreamBuild><upstreamProject>master-osmo-bts</upstreamProject><upstreamUrl>job/master-osmo-bts/</upstreamUrl></cause></action><action _class='jenkins.metrics.impl.TimeInQueueAction'><blockedDurationMillis>0</blockedDurationMillis><blockedTimeMillis>0</blockedTimeMillis><buildableDurationMillis>107742</buildableDurationMillis><buildableTimeMillis>107742</buildableTimeMillis><buildingDurationMillis>67244</buildingDurationMillis><executingTimeMillis>67244</executingTimeMillis><executorUtilization>1.0</executorUtilization><subTaskCount>0</subTaskCount><waitingDurationMillis>0</waitingDurationMillis><waitingTimeMillis>0</waitingTimeMillis></action><action></action><action _class='hudson.plugins.git.util.BuildData'><buildsByBranchName><originmaster _class='hudson.plugins.git.util.Build'><buildNumber>11643</buildNumber><marked><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><branch><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><name>origin/master</name></branch></marked><revision><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><branch><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><name>origin/master</name></branch></revision></originmaster><refsremotesoriginosmithwip _class='hudson.plugins.git.util.Build'><buildNumber>11003</buildNumber><marked><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><branch><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><name>refs/remotes/origin/osmith/wip</name></branch></marked><revision><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><branch><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><name>refs/remotes/origin/osmith/wip</name></branch></revision></refsremotesoriginosmithwip><refsremotesoriginmaster _class='hudson.plugins.git.util.Build'><buildNumber>7614</buildNumber><marked><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><branch><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><name>refs/remotes/origin/master</name></branch></marked><revision><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><branch><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><name>refs/remotes/origin/master</name></branch></revision></refsremotesoriginmaster></buildsByBranchName><lastBuiltRevision><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><branch><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><name>origin/master</name></branch></lastBuiltRevision><remoteUrl>https://gerrit.osmocom.org/osmo-bts</remoteUrl><scmName></scmName></action><action></action><action></action><action></action><action _class='org.jenkinsci.plugins.displayurlapi.actions.RunDisplayAction'></action><building>false</building><displayName>#11643</displayName><duration>67244</duration><estimatedDuration>71210</estimatedDuration><fullDisplayName>master-osmo-bts » sysmo,superfemto_v5.1,0,default,osmocom-master #11643</fullDisplayName><id>11643</id><inProgress>false</inProgress><keepLog>false</keepLog><number>11643</number><queueId>179775</queueId><result>SUCCESS</result><timestamp>1785172387053</timestamp><url>https://jenkins.osmocom.org/jenkins/view/DAHDI/job/master-osmo-bts/BTS_MODEL=sysmo,FIRMWARE_VERSION=superfemto_v5.1,WITH_MANUALS=0,a4=default,label=osmocom-master/11643/</url><builtOn>build4-deb12build-ansible</builtOn><changeSet _class='hudson.plugins.git.GitChangeSetList'><item _class='hudson.plugins.git.GitChangeSet'><affectedPath>tests/meas/meas_test.c</affectedPath><affectedPath>include/osmo-bts/lchan.h</affectedPath><affectedPath>src/common/measurement.c</affectedPath><affectedPath>src/common/l1sap.c</affectedPath><commitId>66a3617b7f8c448ed1f01fa9052b56158f3718c4</commitId><timestamp>1782832648000</timestamp><author><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><fullName>Vadim Yanitskiy</fullName></author><authorEmail>vyanitskiy@sysmocom.de</authorEmail><comment>common: stop buffering UL measurements when SACCH is deactivated

When the BSC sends RSL DEACT SACCH, the per-SACCH UL measurement drain
stops (it runs on SACCH timing), but the producer in lchan_new_ul_meas()
keeps appending the measurement contributions from every received
TCH/SDCCH burst.  After one SACCH period (104 frames) the 104-slot
uplink measurement buffer fills up, yielding a flood of:

  NOTICE measurement.c:336 no space for uplink measurement, num_ul_meas=104

Add a bool sacch_active flag to gsm_lchan, set to true in the common
l1sap_chan_act() and clear in l1sap_chan_deact_sacch().  Guard
lchan_new_ul_meas() with this flag so that measurements are silently
discarded while SACCH is inactive - there is nothing to drain the
buffer and no SACCH channel on which to report the results to the BSC.

Change-Id: I3943c788cab5d2411b06ac681d4d412852bac0a7
AI-Assisted: yes (Claude)
</comment><date>2026-06-30 22:17:28 +0700</date><id>66a3617b7f8c448ed1f01fa9052b56158f3718c4</id><msg>common: stop buffering UL measurements when SACCH is deactivated</msg><path><editType>edit</editType><file>include/osmo-bts/lchan.h</file></path><path><editType>edit</editType><file>src/common/measurement.c</file></path><path><editType>edit</editType><file>tests/meas/meas_test.c</file></path><path><editType>edit</editType><file>src/common/l1sap.c</file></path></item><item _class='hudson.plugins.git.GitChangeSet'><affectedPath>src/common/lchan.c</affectedPath><commitId>66010d4cbaaae8b84550d02589a2e0fad11f33a5</commitId><timestamp>1782833107000</timestamp><author><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><fullName>Vadim Yanitskiy</fullName></author><authorEmail>vyanitskiy@sysmocom.de</authorEmail><comment>common: reset lchan meas state in gsm_lchan_release()

lchan-&gt;meas (including interf_meas_num and num_ul_meas) is normally
only reset by lchan_meas_reset() called from rsl_tx_chan_act_ack() on
RSL CHANNEL ACTIVATION.  Idle logical channels are never RSL-activated,
so their measurement state is never reset via that path.

On an OML link re-establishment, osmo-bts does not exit: abis.c tears
down the signalling links, the bts_shutdown FSM powers down all TRXs,
and then waits for reconnect.  The gsm_bts/trx/ts/lchan structures
remain in memory, so stale interf_meas_num survives the reconnect.

This is why we're seeing these ERRORs while running ttcn3-bts-test:

(bts=0,trx=2,ts=4,ss=6) Not enough room to store interference report (0dBm)

Add a lchan_meas_reset() call to gsm_lchan_release(), which is called
from gsm_ts_release() when the nm_channel_fsm enters state
NM_CHAN_ST_OP_DISABLED_NOTINSTALLED.  This is exactly the right
moment: the radio is fully stopped, so no new samples arrive.

Change-Id: I18dc9d30417b0c5b2e579660d4a087d93445f956
AI-Assisted: yes (Claude)
</comment><date>2026-06-30 22:25:07 +0700</date><id>66010d4cbaaae8b84550d02589a2e0fad11f33a5</id><msg>common: reset lchan meas state in gsm_lchan_release()</msg><path><editType>edit</editType><file>src/common/lchan.c</file></path></item><kind>git</kind></changeSet><culprit><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><fullName>Vadim Yanitskiy</fullName></culprit></run><run><action _class='hudson.matrix.MatrixChildParametersAction'><parameter _class='hudson.model.StringParameterValue'><name>BRANCH</name><value>master</value></parameter><parameter _class='hudson.model.StringParameterValue'><name>EMAIL_NOTIFICATIONS</name><value>jenkins-notifications@lists.osmocom.org laforge@gnumonks.org</value></parameter></action><action></action><action _class='hudson.model.CauseAction'><cause _class='hudson.model.Cause$UpstreamCause'><shortDescription>Started by upstream project "master-osmo-bts" build number 11,643</shortDescription><upstreamBuild>11643</upstreamBuild><upstreamProject>master-osmo-bts</upstreamProject><upstreamUrl>job/master-osmo-bts/</upstreamUrl></cause></action><action _class='jenkins.metrics.impl.TimeInQueueAction'><blockedDurationMillis>0</blockedDurationMillis><blockedTimeMillis>0</blockedTimeMillis><buildableDurationMillis>0</buildableDurationMillis><buildableTimeMillis>0</buildableTimeMillis><buildingDurationMillis>283548</buildingDurationMillis><executingTimeMillis>283548</executingTimeMillis><executorUtilization>1.0</executorUtilization><subTaskCount>0</subTaskCount><waitingDurationMillis>0</waitingDurationMillis><waitingTimeMillis>0</waitingTimeMillis></action><action></action><action _class='hudson.plugins.git.util.BuildData'><buildsByBranchName><originmaster _class='hudson.plugins.git.util.Build'><buildNumber>11643</buildNumber><marked><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><branch><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><name>origin/master</name></branch></marked><revision><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><branch><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><name>origin/master</name></branch></revision></originmaster><refsremotesoriginosmithwip _class='hudson.plugins.git.util.Build'><buildNumber>11003</buildNumber><marked><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><branch><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><name>refs/remotes/origin/osmith/wip</name></branch></marked><revision><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><branch><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><name>refs/remotes/origin/osmith/wip</name></branch></revision></refsremotesoriginosmithwip></buildsByBranchName><lastBuiltRevision><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><branch><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><name>origin/master</name></branch></lastBuiltRevision><remoteUrl>https://gerrit.osmocom.org/osmo-bts</remoteUrl><scmName></scmName></action><action></action><action></action><action _class='org.jenkinsci.plugins.displayurlapi.actions.RunDisplayAction'></action><building>false</building><displayName>#11643</displayName><duration>283548</duration><estimatedDuration>244524</estimatedDuration><fullDisplayName>master-osmo-bts » trx,master,0,default,raspbian #11643</fullDisplayName><id>11643</id><inProgress>false</inProgress><keepLog>false</keepLog><number>11643</number><queueId>179763</queueId><result>SUCCESS</result><timestamp>1785172387053</timestamp><url>https://jenkins.osmocom.org/jenkins/view/DAHDI/job/master-osmo-bts/BTS_MODEL=trx,FIRMWARE_VERSION=master,WITH_MANUALS=0,a4=default,label=raspbian/11643/</url><builtOn>rpi4-raspbian12build-ansible-3</builtOn><changeSet _class='hudson.plugins.git.GitChangeSetList'><item _class='hudson.plugins.git.GitChangeSet'><affectedPath>tests/meas/meas_test.c</affectedPath><affectedPath>include/osmo-bts/lchan.h</affectedPath><affectedPath>src/common/measurement.c</affectedPath><affectedPath>src/common/l1sap.c</affectedPath><commitId>66a3617b7f8c448ed1f01fa9052b56158f3718c4</commitId><timestamp>1782832648000</timestamp><author><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><fullName>Vadim Yanitskiy</fullName></author><authorEmail>vyanitskiy@sysmocom.de</authorEmail><comment>common: stop buffering UL measurements when SACCH is deactivated

When the BSC sends RSL DEACT SACCH, the per-SACCH UL measurement drain
stops (it runs on SACCH timing), but the producer in lchan_new_ul_meas()
keeps appending the measurement contributions from every received
TCH/SDCCH burst.  After one SACCH period (104 frames) the 104-slot
uplink measurement buffer fills up, yielding a flood of:

  NOTICE measurement.c:336 no space for uplink measurement, num_ul_meas=104

Add a bool sacch_active flag to gsm_lchan, set to true in the common
l1sap_chan_act() and clear in l1sap_chan_deact_sacch().  Guard
lchan_new_ul_meas() with this flag so that measurements are silently
discarded while SACCH is inactive - there is nothing to drain the
buffer and no SACCH channel on which to report the results to the BSC.

Change-Id: I3943c788cab5d2411b06ac681d4d412852bac0a7
AI-Assisted: yes (Claude)
</comment><date>2026-06-30 22:17:28 +0700</date><id>66a3617b7f8c448ed1f01fa9052b56158f3718c4</id><msg>common: stop buffering UL measurements when SACCH is deactivated</msg><path><editType>edit</editType><file>src/common/l1sap.c</file></path><path><editType>edit</editType><file>src/common/measurement.c</file></path><path><editType>edit</editType><file>include/osmo-bts/lchan.h</file></path><path><editType>edit</editType><file>tests/meas/meas_test.c</file></path></item><item _class='hudson.plugins.git.GitChangeSet'><affectedPath>src/common/lchan.c</affectedPath><commitId>66010d4cbaaae8b84550d02589a2e0fad11f33a5</commitId><timestamp>1782833107000</timestamp><author><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><fullName>Vadim Yanitskiy</fullName></author><authorEmail>vyanitskiy@sysmocom.de</authorEmail><comment>common: reset lchan meas state in gsm_lchan_release()

lchan-&gt;meas (including interf_meas_num and num_ul_meas) is normally
only reset by lchan_meas_reset() called from rsl_tx_chan_act_ack() on
RSL CHANNEL ACTIVATION.  Idle logical channels are never RSL-activated,
so their measurement state is never reset via that path.

On an OML link re-establishment, osmo-bts does not exit: abis.c tears
down the signalling links, the bts_shutdown FSM powers down all TRXs,
and then waits for reconnect.  The gsm_bts/trx/ts/lchan structures
remain in memory, so stale interf_meas_num survives the reconnect.

This is why we're seeing these ERRORs while running ttcn3-bts-test:

(bts=0,trx=2,ts=4,ss=6) Not enough room to store interference report (0dBm)

Add a lchan_meas_reset() call to gsm_lchan_release(), which is called
from gsm_ts_release() when the nm_channel_fsm enters state
NM_CHAN_ST_OP_DISABLED_NOTINSTALLED.  This is exactly the right
moment: the radio is fully stopped, so no new samples arrive.

Change-Id: I18dc9d30417b0c5b2e579660d4a087d93445f956
AI-Assisted: yes (Claude)
</comment><date>2026-06-30 22:25:07 +0700</date><id>66010d4cbaaae8b84550d02589a2e0fad11f33a5</id><msg>common: reset lchan meas state in gsm_lchan_release()</msg><path><editType>edit</editType><file>src/common/lchan.c</file></path></item><kind>git</kind></changeSet><culprit><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><fullName>Vadim Yanitskiy</fullName></culprit></run><run><action _class='hudson.matrix.MatrixChildParametersAction'><parameter _class='hudson.model.StringParameterValue'><name>BRANCH</name><value>master</value></parameter><parameter _class='hudson.model.StringParameterValue'><name>EMAIL_NOTIFICATIONS</name><value>jenkins-notifications@lists.osmocom.org laforge@gnumonks.org</value></parameter></action><action></action><action _class='hudson.model.CauseAction'><cause _class='hudson.model.Cause$UpstreamCause'><shortDescription>Started by upstream project "master-osmo-bts" build number 11,643</shortDescription><upstreamBuild>11643</upstreamBuild><upstreamProject>master-osmo-bts</upstreamProject><upstreamUrl>job/master-osmo-bts/</upstreamUrl></cause></action><action _class='jenkins.metrics.impl.TimeInQueueAction'><blockedDurationMillis>0</blockedDurationMillis><blockedTimeMillis>0</blockedTimeMillis><buildableDurationMillis>0</buildableDurationMillis><buildableTimeMillis>0</buildableTimeMillis><buildingDurationMillis>107257</buildingDurationMillis><executingTimeMillis>107257</executingTimeMillis><executorUtilization>1.0</executorUtilization><subTaskCount>0</subTaskCount><waitingDurationMillis>0</waitingDurationMillis><waitingTimeMillis>0</waitingTimeMillis></action><action></action><action _class='hudson.plugins.git.util.BuildData'><buildsByBranchName><originmaster _class='hudson.plugins.git.util.Build'><buildNumber>11643</buildNumber><marked><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><branch><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><name>origin/master</name></branch></marked><revision><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><branch><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><name>origin/master</name></branch></revision></originmaster><refsremotesoriginosmithwip _class='hudson.plugins.git.util.Build'><buildNumber>11003</buildNumber><marked><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><branch><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><name>refs/remotes/origin/osmith/wip</name></branch></marked><revision><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><branch><SHA1>7db79cc39a265a6838206df836d1bee28be1acee</SHA1><name>refs/remotes/origin/osmith/wip</name></branch></revision></refsremotesoriginosmithwip><refsremotesoriginmaster _class='hudson.plugins.git.util.Build'><buildNumber>7614</buildNumber><marked><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><branch><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><name>refs/remotes/origin/master</name></branch></marked><revision><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><branch><SHA1>73773447715c57075ad5acb96a5346ff23d7e91f</SHA1><name>refs/remotes/origin/master</name></branch></revision></refsremotesoriginmaster></buildsByBranchName><lastBuiltRevision><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><branch><SHA1>66010d4cbaaae8b84550d02589a2e0fad11f33a5</SHA1><name>origin/master</name></branch></lastBuiltRevision><remoteUrl>https://gerrit.osmocom.org/osmo-bts</remoteUrl><scmName></scmName></action><action></action><action></action><action _class='org.jenkinsci.plugins.displayurlapi.actions.RunDisplayAction'></action><building>false</building><displayName>#11643</displayName><duration>107257</duration><estimatedDuration>108223</estimatedDuration><fullDisplayName>master-osmo-bts » trx,master,1,default,osmocom-master #11643</fullDisplayName><id>11643</id><inProgress>false</inProgress><keepLog>false</keepLog><number>11643</number><queueId>179770</queueId><result>SUCCESS</result><timestamp>1785172387053</timestamp><url>https://jenkins.osmocom.org/jenkins/view/DAHDI/job/master-osmo-bts/BTS_MODEL=trx,FIRMWARE_VERSION=master,WITH_MANUALS=1,a4=default,label=osmocom-master/11643/</url><builtOn>build4-deb12build-ansible</builtOn><changeSet _class='hudson.plugins.git.GitChangeSetList'><item _class='hudson.plugins.git.GitChangeSet'><affectedPath>tests/meas/meas_test.c</affectedPath><affectedPath>include/osmo-bts/lchan.h</affectedPath><affectedPath>src/common/measurement.c</affectedPath><affectedPath>src/common/l1sap.c</affectedPath><commitId>66a3617b7f8c448ed1f01fa9052b56158f3718c4</commitId><timestamp>1782832648000</timestamp><author><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><fullName>Vadim Yanitskiy</fullName></author><authorEmail>vyanitskiy@sysmocom.de</authorEmail><comment>common: stop buffering UL measurements when SACCH is deactivated

When the BSC sends RSL DEACT SACCH, the per-SACCH UL measurement drain
stops (it runs on SACCH timing), but the producer in lchan_new_ul_meas()
keeps appending the measurement contributions from every received
TCH/SDCCH burst.  After one SACCH period (104 frames) the 104-slot
uplink measurement buffer fills up, yielding a flood of:

  NOTICE measurement.c:336 no space for uplink measurement, num_ul_meas=104

Add a bool sacch_active flag to gsm_lchan, set to true in the common
l1sap_chan_act() and clear in l1sap_chan_deact_sacch().  Guard
lchan_new_ul_meas() with this flag so that measurements are silently
discarded while SACCH is inactive - there is nothing to drain the
buffer and no SACCH channel on which to report the results to the BSC.

Change-Id: I3943c788cab5d2411b06ac681d4d412852bac0a7
AI-Assisted: yes (Claude)
</comment><date>2026-06-30 22:17:28 +0700</date><id>66a3617b7f8c448ed1f01fa9052b56158f3718c4</id><msg>common: stop buffering UL measurements when SACCH is deactivated</msg><path><editType>edit</editType><file>src/common/measurement.c</file></path><path><editType>edit</editType><file>include/osmo-bts/lchan.h</file></path><path><editType>edit</editType><file>src/common/l1sap.c</file></path><path><editType>edit</editType><file>tests/meas/meas_test.c</file></path></item><item _class='hudson.plugins.git.GitChangeSet'><affectedPath>src/common/lchan.c</affectedPath><commitId>66010d4cbaaae8b84550d02589a2e0fad11f33a5</commitId><timestamp>1782833107000</timestamp><author><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><fullName>Vadim Yanitskiy</fullName></author><authorEmail>vyanitskiy@sysmocom.de</authorEmail><comment>common: reset lchan meas state in gsm_lchan_release()

lchan-&gt;meas (including interf_meas_num and num_ul_meas) is normally
only reset by lchan_meas_reset() called from rsl_tx_chan_act_ack() on
RSL CHANNEL ACTIVATION.  Idle logical channels are never RSL-activated,
so their measurement state is never reset via that path.

On an OML link re-establishment, osmo-bts does not exit: abis.c tears
down the signalling links, the bts_shutdown FSM powers down all TRXs,
and then waits for reconnect.  The gsm_bts/trx/ts/lchan structures
remain in memory, so stale interf_meas_num survives the reconnect.

This is why we're seeing these ERRORs while running ttcn3-bts-test:

(bts=0,trx=2,ts=4,ss=6) Not enough room to store interference report (0dBm)

Add a lchan_meas_reset() call to gsm_lchan_release(), which is called
from gsm_ts_release() when the nm_channel_fsm enters state
NM_CHAN_ST_OP_DISABLED_NOTINSTALLED.  This is exactly the right
moment: the radio is fully stopped, so no new samples arrive.

Change-Id: I18dc9d30417b0c5b2e579660d4a087d93445f956
AI-Assisted: yes (Claude)
</comment><date>2026-06-30 22:25:07 +0700</date><id>66010d4cbaaae8b84550d02589a2e0fad11f33a5</id><msg>common: reset lchan meas state in gsm_lchan_release()</msg><path><editType>edit</editType><file>src/common/lchan.c</file></path></item><kind>git</kind></changeSet><culprit><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><fullName>Vadim Yanitskiy</fullName></culprit></run></matrixBuild>