Skip to content

Added debug symbols to many debug dockers.#3098

Merged
lguohan merged 5 commits intosonic-net:masterfrom
renukamanavalan:dbgsym
Jul 4, 2019
Merged

Added debug symbols to many debug dockers.#3098
lguohan merged 5 commits intosonic-net:masterfrom
renukamanavalan:dbgsym

Conversation

@renukamanavalan
Copy link
Copy Markdown
Contributor

@renukamanavalan renukamanavalan commented Jun 28, 2019

- What I did
Many of the debug dockers were not loaded with required debug packages.
Identified the required debug packages and made the changes to enable their install into debug docker images.

For debug images only:

  1. Archive source files into debug image
  2. Archived source is copied into /src
  3. Created an empty dir /debug
  4. Mount both /src as ro & /debug as rw into every docker
  5. Login banner will give some details on /src & /debug
  6. Devs can copy core file into /debug and view it from inside a container.
  7. Dev may create all gdb logs and other data directly into /debug.

To debug:
Install required version of debug image in Switch or VM.
Copy core file into /debug of host
Get into Docker
gdb /usr/bin/<daemon> -c /debug/<your core file>
set directory /src/... <-- inside gdb to get the source

For non-in-depth debugging:

  1. Download corresponding debug Docker image (docker-...-dbg.gz) to your VM
  2. Load the image
  3. Run image with entrypoint as 'bash' with dir containing core mapped in.
  4. Run gdb on the core.

- How I did it

- How to verify it

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

1) Archive source files into debug image
2) Archived source is copied into /src
3) Created an empty dir /debug
4) Mount both /src as ro & /debug as rw into every docker
5) Login banner will give some details on /src & /debug
6) Devs can copy core file into /debug and view it from inside a container.
7) Dev may create all gdb logs and other data directly into /debug.
Copy link
Copy Markdown
Collaborator

@lguohan lguohan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please move source file directory into each make file to reduce the maintenance efforts.

@renukamanavalan
Copy link
Copy Markdown
Contributor Author

Yes, source file dirs are moved into individual Makefiles.

2) Src directories to archive are now collected from individual Makefiles.
3) Added few more debug symbols
4) Added few more debug dockers.

Here after no more changes except per review comments.
@renukamanavalan
Copy link
Copy Markdown
Contributor Author

retest this please

@renukamanavalan
Copy link
Copy Markdown
Contributor Author

retest this please.

@lguohan lguohan merged commit 76bf5a0 into sonic-net:master Jul 4, 2019
@lguohan
Copy link
Copy Markdown
Collaborator

lguohan commented Jul 4, 2019

one more comments, can you update README.buildsystem.md to explain those dbg build targets?

@renukamanavalan renukamanavalan deleted the dbgsym branch July 4, 2019 17:51
REDIS_SERVER = redis-server_$(REDIS_VERSION)_amd64.deb
$(eval $(call add_derived_package,$(REDIS_TOOLS),$(REDIS_SERVER)))

REDIS_SERVER_DBG = redis-server-dbgsym_$(REDIS_VERSION)_amd64.deb
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In recent builds, redis-server-dbgsym package is NOT found.

dpkg-deb: building package 'redis' in '../redis_5.0.3-3~bpo9+2_all.deb'.
dpkg-deb: building package 'redis-tools-dbgsym' in '../redis-tools-dbgsym_5.0.3-3~bpo9+2_amd64.deb'.
dpkg-deb: building package 'redis-tools' in '../redis-tools_5.0.3-3~bpo9+2_amd64.deb'.
dpkg-deb: building package 'redis-sentinel' in '../redis-sentinel_5.0.3-3~bpo9+2_amd64.deb'.
dpkg-deb: building package 'redis-server' in '../redis-server_5.0.3-3~bpo9+2_amd64.deb'.
make[2]: Leaving directory '/sonic/src/redis/redis_build/redis-5.0.3'
 dpkg-genbuildinfo --build=binary
 dpkg-genchanges --build=binary >../redis_5.0.3-3~bpo9+2_amd64.changes
dpkg-genchanges: info: binary-only upload (no source code included)
 dpkg-source --after-build redis-5.0.3
dpkg-source: info: using options from redis-5.0.3/debian/source/options: --extend-diff-ignore=^\.travis\.yml$
dpkg-buildpackage: info: binary-only upload (no source included)
/sonic/src/redis/redis_build /sonic/src/redis
mv: cannot stat 'redis-server-dbgsym_5.0.3-3~bpo9+2_amd64.deb': No such file or directory
Makefile:14: recipe for target '/sonic/target/debs/stretch/redis-server_5.0.3-3~bpo9+2_amd64.deb' failed

mssonicbld added a commit that referenced this pull request Apr 4, 2024
…lly (#18560)

#### Why I did it
src/sonic-swss
```
* 9ee794f4 - (HEAD -> 202305, origin/202305) Revert "[acl] Add IN_PORTS qualifier for L3 table (#3078)" (#3092) (#3098) (16 hours ago) [mssonicbld]
```
#### How I did it
#### How to verify it
#### Description for the changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants