Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[select] break the select loop if interrupt_on_signal flag is set #624

Merged
merged 7 commits into from
Jun 30, 2022

Conversation

stepanblyschak
Copy link
Contributor

Signed-off-by: Stepan Blyschak stepanb@nvidia.com

Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
@stepanblyschak stepanblyschak marked this pull request as draft May 27, 2022 11:27
Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
@stepanblyschak
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@stepanblyschak
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@stepanblyschak
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@stepanblyschak
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@kcudnik
Copy link
Contributor

kcudnik commented May 31, 2022

what is actual motivation for this change?

@stepanblyschak
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@stepanblyschak
Copy link
Contributor Author

@kcudnik This is to fix #603

@stepanblyschak
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@stepanblyschak
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@liat-grozovik
Copy link
Collaborator

@qiluo-msft could you please help to review or suggest a reviewer ?

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@stepanblyschak
Copy link
Contributor Author

stepanblyschak commented Jun 27, 2022

Looks like the built VS image is broken:

root@r-sonic-vs-006:~# docker ps
CONTAINER ID   IMAGE                                                COMMAND                  CREATED         STATUS         PORTS     NAMES
254b190e0e7d   docker-sonic-vs:Azure.sonic-swss-common.20220627.4   "/usr/local/bin/supe…"   4 minutes ago   Up 4 minutes             vs
277ed3813ef0   debian                                               "bash"                   5 minutes ago   Up 5 minutes             sw
root@r-sonic-vs-006:~# docker exec -it vs bash
root@277ed3813ef0:/# cat /etc/sonic/sonic_version.yml
---
build_version: ''
asic_type: vs
commit_id: '9d5ca72b8'
branch: 'master'
release: 'none'
build_date: Sun Jun 26 15:08:01 UTC 2022
build_number: 114767
built_by: AzDevOps@sonic-build-workers-001OP8
root@277ed3813ef0:/# tail /var/log/syslog
Jun 27 13:54:08.190264 277ed3813ef0 INFO #/supervisord: redis-server 104:M 27 Jun 2022 13:54:08.190 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
Jun 27 13:54:08.190582 277ed3813ef0 INFO #/supervisord: redis-server 104:M 27 Jun 2022 13:54:08.190 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
Jun 27 13:54:08.191206 277ed3813ef0 INFO #/supervisord: redis-server 104:M 27 Jun 2022 13:54:08.191 * Ready to accept connections
Jun 27 13:54:08.191534 277ed3813ef0 INFO #/supervisord: redis-server 104:M 27 Jun 2022 13:54:08.191 * The server is now ready to accept connections at /var/run/redis/redis.sock
Jun 27 13:54:09.195817 277ed3813ef0 INFO #supervisord 2022-06-27 13:54:09,193 INFO success: redis-server entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
Jun 27 13:54:09.197087 277ed3813ef0 INFO #/supervisord: start.sh redis-server: started
Jun 27 13:54:09.824316 277ed3813ef0 INFO #/update_chassisdb_config: remove chassis_db from config file /var/run/redis/sonic-db/database_config.json.tmp
Jun 27 13:54:09.836892 277ed3813ef0 INFO #/supervisord: start.sh /usr/bin/configdb-load.sh: line 4: sonic-db-cli: command not found
Jun 27 13:58:17.722624 277ed3813ef0 INFO #supervisord 2022-06-27 13:58:17,721 INFO reaped unknown pid 164 (terminated by SIGTERM)
Jun 27 13:58:17.725611 277ed3813ef0 INFO #supervisord 2022-06-27 13:58:17,724 INFO reaped unknown pid 358 (terminated by SIGTERM)

@qiluo-msft Looks like every PR in sonic-swss-common has this problem

@stepanblyschak
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@stepanblyschak
Copy link
Contributor Author

Didn't change the logic in last update, just merged the master without conflicts and now sairedis build is not passing:

[  FAILED  ] 2 tests, listed below:
[  FAILED  ] LegacyFdbEntry.fdb_entry_get
[  FAILED  ] Legacy.switch_get

@stepanblyschak
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@stepanblyschak
Copy link
Contributor Author

Now it is the other way around, VS tests are failing but SAIRedis for some reason passed, retrying

@stepanblyschak
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@stepanblyschak
Copy link
Contributor Author

These two tests are failing now:

test_drop_counters.py::TestDropCounters::test_add_remove_port FAILED     [ 20%]
test_drop_counters.py::TestDropCounters::test_createAndDeleteMultipleCounters FAILED [ 20%]

However they pass locally on the same Azure.sonic-swss-common.20220629.6:

root@r-sonic-vs-005:~/sonic-swss/tests# py.test test_drop_counters.py -v --imgname=docker-sonic-vs:Azure.sonic-swss-common.20220629.6                                                                                                      ================================================ test session starts =================================================                                                                                                                     platform linux -- Python 3.8.10, pytest-6.2.4, py-1.10.0, pluggy-0.13.1 -- /usr/bin/python3                                                                                                                                                cachedir: .pytest_cache                                                                                                                                                                                                                    rootdir: /root/sonic-swss/tests                                                                                                                                                                                                            plugins: flaky-3.7.0                                                                                                                                                                                                                       collected 17 items                                                                                                                                                                                                                                                                                                                                                                                                                                                                    test_drop_counters.py::TestDropCounters::test_deviceCapabilitiesTablePopulated PASSED                          [  5%]                                                                                                                      test_drop_counters.py::TestDropCounters::test_flexCounterGroupInitialized PASSED                               [ 11%]                                                                                                                      test_drop_counters.py::TestDropCounters::test_createAndRemoveDropCounterBasic PASSED                           [ 17%]                                                                                                                      test_drop_counters.py::TestDropCounters::test_createAndRemoveDropCounterReversed PASSED                        [ 23%]                                                                                                                      test_drop_counters.py::TestDropCounters::test_createCounterWithInvalidCounterType PASSED                       [ 29%]                                                                                                                      test_drop_counters.py::TestDropCounters::test_createCounterWithInvalidDropReason PASSED                        [ 35%]                                                                                                                      test_drop_counters.py::TestDropCounters::test_addReasonToInitializedCounter PASSED                             [ 41%]                                                                                                                      test_drop_counters.py::TestDropCounters::test_removeReasonFromInitializedCounter PASSED                        [ 47%]                                                                                                                      test_drop_counters.py::TestDropCounters::test_removeAllDropReasons PASSED                                      [ 52%]                                                                                                                      test_drop_counters.py::TestDropCounters::test_addDropReasonMultipleTimes PASSED                                [ 58%]
test_drop_counters.py::TestDropCounters::test_addInvalidDropReason PASSED                                      [ 64%]
test_drop_counters.py::TestDropCounters::test_removeDropReasonMultipleTimes PASSED                             [ 70%]
test_drop_counters.py::TestDropCounters::test_removeNonexistentDropReason PASSED                               [ 76%]
test_drop_counters.py::TestDropCounters::test_removeInvalidDropReason PASSED                                   [ 82%]
test_drop_counters.py::TestDropCounters::test_add_remove_port PASSED                                           [ 88%]
test_drop_counters.py::TestDropCounters::test_createAndDeleteMultipleCounters PASSED                           [ 94%]
test_drop_counters.py::test_nonflaky_dummy PASSED                                                              [100%]

Looks like they are not stable. Will retry.

@stepanblyschak
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@qiluo-msft qiluo-msft merged commit 10cd834 into sonic-net:master Jun 30, 2022
@stepanblyschak
Copy link
Contributor Author

Request to cherry-pick to 202205 branch

stepanblyschak pushed a commit to stepanblyschak/sonic-swss-common that referenced this pull request Jul 1, 2022
…s set (sonic-net#624)

Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
liat-grozovik pushed a commit that referenced this pull request Jul 1, 2022
…s set (#624) (#642)

Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>

Co-authored-by: Hua Liu <58683130+liuh-80@users.noreply.github.com>
itamar-talmon pushed a commit to itamar-talmon/sonic-swss-common that referenced this pull request Jul 19, 2022
@Junchao-Mellanox
Copy link
Collaborator

Hi @qiluo-msft , could you help cherry pick to 202205?

@qiluo-msft
Copy link
Contributor

@yxieca will be the right picker for 202205.

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.

8 participants