Skip to content

[libnl3] Fix runtime dependencies for libnl-genl-3 and libnl-route-3#1440

Merged
jleveque merged 1 commit intosonic-net:masterfrom
jleveque:fix_libnl_rdepends
Mar 2, 2018
Merged

[libnl3] Fix runtime dependencies for libnl-genl-3 and libnl-route-3#1440
jleveque merged 1 commit intosonic-net:masterfrom
jleveque:fix_libnl_rdepends

Conversation

@jleveque
Copy link
Contributor

@jleveque jleveque commented Mar 1, 2018

Previously, libnl-genl-3 and libnl-route-3 did not specify libnl-3 as a runtime dependency. However, libnl-nf-3 specified libnl-route-3 as a dependency and libnl-cli-3 specified libnl-genl-3, libnl-nf-3 and libnl-route-3 as dependencies. When passed through the expand function in rules/functions, this would cause libnl-genl-3, libnl-nf-3 and libnl-route-3 to be specified before libnl-3, which would cause libnl-genl-3, libnl-nf-3 and libnl-route-3 packages to fail to install.

Here's the previous (incorrect) output from a Jinja2 template-generated Dockerfile which specified libswsscommon as a dependency. This would present failures:

COPY debs/libnl-route-3-200_3.2.27-1_amd64.deb /debs/
COPY debs/libnl-genl-3-200_3.2.27-1_amd64.deb /debs/
COPY debs/libnl-nf-3-200_3.2.27-1_amd64.deb /debs/
COPY debs/libhiredis0.13_0.13.3-2_amd64.deb /debs/
COPY debs/libnl-3-200_3.2.27-1_amd64.deb /debs/
COPY debs/libnl-cli-3-200_3.2.27-1_amd64.deb /debs/
COPY debs/libswsscommon_1.0.0_amd64.deb /debs/

And here's the output from the same generated Dockerfile after this change is applied. Note the correct ordering of the dependencies:

COPY debs/libnl-3-200_3.2.27-1_amd64.deb /debs/
COPY debs/libnl-route-3-200_3.2.27-1_amd64.deb /debs/
COPY debs/libnl-genl-3-200_3.2.27-1_amd64.deb /debs/
COPY debs/libnl-nf-3-200_3.2.27-1_amd64.deb /debs/
COPY debs/libhiredis0.13_0.13.3-2_amd64.deb /debs/
COPY debs/libnl-cli-3-200_3.2.27-1_amd64.deb /debs/
COPY debs/libswsscommon_1.0.0_amd64.deb /debs/

@jleveque jleveque self-assigned this Mar 1, 2018
@jleveque jleveque merged commit eaea792 into sonic-net:master Mar 2, 2018
@jleveque jleveque deleted the fix_libnl_rdepends branch March 2, 2018 19:05
daall added a commit that referenced this pull request Oct 16, 2020
[swss]
[acl] Replace IP_PROTOCOL with NEXT_HEADER for IPv6 ACL tables (#1458)
[acl] Refactor port OID retrieval into aclorch (#1462)
Fix issue #5157 by identifying the dependency among objects and avoiding releasing an object still being referenced (#1440)
[mock tests] Update MockDBConnector to match new swsscommon interface (#1465)

[swss-common]
netlink: Setting nl_socket buffer size to 3M from 2M (#391)
Added support in Swig file to cast Selectable object to Subscriber Table object (#394)
[warm reboot] Warm Reboot Support for EVPN VXLAN (#350)
Implement DBInterface/SonicV2Connector in C++ (#387)
Fix memory leak if a RedisCommand object were to be reused (#392)

Signed-off-by: Danny Allen <daall@microsoft.com>
santhosh-kt pushed a commit to santhosh-kt/sonic-buildimage that referenced this pull request Feb 25, 2021
[swss]
[acl] Replace IP_PROTOCOL with NEXT_HEADER for IPv6 ACL tables (sonic-net#1458)
[acl] Refactor port OID retrieval into aclorch (sonic-net#1462)
Fix issue sonic-net#5157 by identifying the dependency among objects and avoiding releasing an object still being referenced (sonic-net#1440)
[mock tests] Update MockDBConnector to match new swsscommon interface (sonic-net#1465)

[swss-common]
netlink: Setting nl_socket buffer size to 3M from 2M (sonic-net#391)
Added support in Swig file to cast Selectable object to Subscriber Table object (sonic-net#394)
[warm reboot] Warm Reboot Support for EVPN VXLAN (sonic-net#350)
Implement DBInterface/SonicV2Connector in C++ (sonic-net#387)
Fix memory leak if a RedisCommand object were to be reused (sonic-net#392)

Signed-off-by: Danny Allen <daall@microsoft.com>
stepanblyschak pushed a commit to stepanblyschak/sonic-buildimage that referenced this pull request May 10, 2021
As per latest update in DPB DOC, fixed this bug

previously we had string value in "breakout_modes" key so it was not matching the whole string, But after the update via, now "breakout_modes" contain a dictionary where key is the breakout_mode and value is the alias. So we can easily check whether the key is present or not.

Signed-off-by: Sangita Maity <samaity@linkedin.com>
Co-authored-by: Guohan Lu <lguohan@gmail.com>
theasianpianist pushed a commit to theasianpianist/sonic-buildimage that referenced this pull request Feb 5, 2022
…and avoiding releasing an object still being referenced (sonic-net#1440)

* Fix issue sonic-net#5157 by identifying the dependency among objects and avoiding releasing an object still being referenced

The issue is caused by the OA receives notification in an different order in which they were sent.
OA doesn't have any dependency check try notifying sai-redis to release an object which is still being referenced,
which causes sai-redis complain and the object leaks.

The idea is to introduce a mechanism to identify the dependency thus preventing a referenced object from being released.

1. Introduce a new type representing the dependency among variant type of objects, including the following fields:
  - m_objsDependingOnMe, a set representing the objects that references the current object.
    eg. BUFFER_PROFILE.ingress_lossless_profile references BUFFER_POOL.ingress_lossless_pool
  - m_objsReferencingByMe, a map from a field of the current object's to the object name it references.
2. When a field of an object A has been updated with referencing another object B,
  - obj[A.m_objsReferencingByMe[field name]].m_objsDependingOnMe.remove(A)
  - A.m_objsReferencingByMe[field name] = B
3. When a an object A is about to be removed,
  - if obj.m_objsDependingOnMe isn't empty set, return task_need_retry else execute the normal remove flow.

Signed-off-by: Stephen Sun <stephens@nvidia.com>
mssonicbld added a commit that referenced this pull request Oct 31, 2024
…tically (#20540)

#### Why I did it
src/sonic-sairedis
```
* e394ced7 - (HEAD -> master, origin/master, origin/HEAD) Fix compilation on Buster (#1449) (11 hours ago) [Saikrishna Arcot]
* 4d504ff8 - Rename file name to fit case insensitive file system. (#1444) (2 days ago) [Liu Shilong]
* fe650bb7 - [syncd] Add workaround for port error status notification (#1430) (6 days ago) [Kamil Cudnik]
* cd2773a3 - [syncd] Fix inspect asic command (#1434) (7 days ago) [Kamil Cudnik]
* 2d873766 - [syncd] Make sure notification queue release memory when drained (#1427) (8 days ago) [Kamil Cudnik]
* b8a8856a - Fix adding flex counter to wrong context (#1421) (8 days ago) [byu343]
* 40979e0b - [fastboot] Notify SAI that fastboot is done (#1396) (8 days ago) [Junchao-Mellanox]
* 952ee406 - [codeql] Change pull_request_target to pull_request (#1442) (9 days ago) [Kamil Cudnik]
* 697d86b5 - [syncd] Create neighbor entries before next hop (#1432) (9 days ago) [Kamil Cudnik]
* fa76ca13 - [codeql] Remove git ancestry (#1441) (10 days ago) [Kamil Cudnik]
* 3838d7ee - [codeql] Show git ancestry graph (#1440) (10 days ago) [Kamil Cudnik]
* 2e7d946b - [codeql] Show gcc version before compile (#1438) (10 days ago) [Kamil Cudnik]
* a1e93f58 - [submodule] Update SAI to latest master (#1431) (2 weeks ago) [Kamil Cudnik]
```
#### How I did it
#### How to verify it
#### Description for the changelog
tshalvi pushed a commit to tshalvi/sonic-buildimage that referenced this pull request Aug 25, 2025
…HEAD automatically (sonic-net#1440)

#### Why I did it
src/sonic-swss-common
```
* fdda1ec - (HEAD -> 202412, origin/HEAD, origin/202412) [trim]: Add Packet Trimming Drop Counters DB schema (sonic-net#48) (2 hours ago) [mssonicbld]
```
#### How I did it
#### How to verify it
#### Description for the changelog
vmittal-msft pushed a commit to vmittal-msft/sonic-buildimage that referenced this pull request Oct 20, 2025
…HEAD automatically (sonic-net#1440)

src/sonic-swss-common
```
* fdda1ec - (HEAD -> 202412, origin/HEAD, origin/202412) [trim]: Add Packet Trimming Drop Counters DB schema (sonic-net#48) (2 hours ago) [mssonicbld]
```
vmittal-msft pushed a commit to vmittal-msft/sonic-buildimage that referenced this pull request Oct 20, 2025
sonic-net#1514)

…HEAD automatically (sonic-net#1440)

src/sonic-swss-common
```
* fdda1ec - (HEAD -> 202412, origin/HEAD, origin/202412) [trim]: Add Packet Trimming Drop Counters DB schema (sonic-net#48) (2 hours ago) [mssonicbld]
```

<!--
Please make sure you've read and understood our contributing guidelines:
     https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md

** Make sure all your commits include a signature generated with `git
commit -s` **

If this is a bug fix, make sure your description includes "fixes #xxxx",
or
     "closes #xxxx" or "resolves #xxxx"

     Please provide the following information:
-->

#### Why I did it

##### Work item tracking
- Microsoft ADO **(number only)**:

#### How I did it

#### How to verify it

<!--
If PR needs to be backported, then the PR must be tested against the
base branch and the earliest backport release branch and provide tested
image version on these two branches. For example, if the PR is requested
for master, 202211 and 202012, then the requester needs to provide test
results on master and 202012.
-->

#### Which release branch to backport (provide reason below if selected)

<!--
- Note we only backport fixes to a release branch, *not* features!
- Please also provide a reason for the backporting below.
- e.g.
- [x] 202006
-->

- [ ] 201811
- [ ] 201911
- [ ] 202006
- [ ] 202012
- [ ] 202106
- [ ] 202111
- [ ] 202205
- [ ] 202211

#### Tested branch (Please provide the tested image version)

<!--
- Please provide tested image version
- e.g.
- [x] 20201231.100
-->

- [ ] <!-- image version 1 -->
- [ ] <!-- image version 2 -->

#### Description for the changelog
<!--
Write a short (one line) summary that describes the changes in this
pull request for inclusion in the changelog:
-->

<!--
Ensure to add label/tag for the feature raised. example - PR#2174 under
sonic-utilities repo. where, Generic Config and Update feature has been
labelled as GCU.
-->

#### Link to config_db schema for YANG module changes
<!--
Provide a link to config_db schema for the table for which YANG model
is defined
Link should point to correct section on
https://github.com/Azure/sonic-buildimage/blob/master/src/sonic-yang-models/doc/Configuration.md
-->

#### A picture of a cute animal (not mandatory but encouraged)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants