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

Modernize CMake code #734

Draft
wants to merge 24 commits into
base: vsomeip_3.5.3
Choose a base branch
from
Draft

Commits on Nov 18, 2024

  1. Reverting failing changes

    Revert Fix compile issue with pthreads in android commit
    Revert Force abort hanging detached threads commit
    
    The commits related to the shutdown cause crashes.
    Ana Rodrigues authored and Duarte Fonseca committed Nov 18, 2024
    Configuration menu
    Copy the full SHA
    4fe258d View commit details
    Browse the repository at this point in the history
  2. Remove dead code path

    Duarte Fonseca authored and Duarte Fonseca committed Nov 18, 2024
    Configuration menu
    Copy the full SHA
    8ecfe90 View commit details
    Browse the repository at this point in the history
  3. NO-TICKET: Update wireshark dissector (COVESA#711)

    Summary
    Adds parsing to the routing_info command wireshark dissector
    Details
    The wireshark vsomeip dissector will now also parse the payload
    of the routing_info command entries.
    It will display the information of the subcommands:
    add_client, del_client, add_service and del_service.
    Adds also parsing for the request service and fixes the assign client name.
    Rui Graça authored and Duarte Fonseca committed Nov 18, 2024
    Configuration menu
    Copy the full SHA
    adf175e View commit details
    Browse the repository at this point in the history
  4. fix race condition on boost async operations

    Summary
    Fix race condition when boost async operations are executed
    joaofesilva authored and Duarte Fonseca committed Nov 18, 2024
    Configuration menu
    Copy the full SHA
    540c092 View commit details
    Browse the repository at this point in the history
  5. Fix core dump back traces

    Summary
    Fix core dump back traces.
    Melquíades Maciel authored and Duarte Fonseca committed Nov 18, 2024
    Configuration menu
    Copy the full SHA
    0562476 View commit details
    Browse the repository at this point in the history
  6. Enabled initial event tests

    Added some improves in initial event test client.
    
    Details
    Issue with initial_event_stop_service: The application tries to send a message,
    and then starts the deregister process.
    The issue occurs when the routing manager received the deregister request
    before forwarding the message sent by the application. The issue was solved
    with a small sleep after the application sent the message.
    joaodfsantos authored and Duarte Fonseca committed Nov 18, 2024
    Configuration menu
    Copy the full SHA
    4cd20f6 View commit details
    Browse the repository at this point in the history
  7. Add vsomeip config parsing

    Summary
    Adds the VSOMEIP_CONFIG command payload parsing.
    Details
    The wireshark vsomeip dissector will now also parse the payload
    of the VSOMEIP_CONFIG command.
    It will display the information of the key and value.
    Additionally, a hint is added in the documentation referring to the
    magical number prologue and epilogue contained in vsomeip packet payload.
    joelpinto authored and Duarte Fonseca committed Nov 18, 2024
    Configuration menu
    Copy the full SHA
    a133e89 View commit details
    Browse the repository at this point in the history
  8. Whitelist initial events tests

    joaodfsantos authored and Duarte Fonseca committed Nov 18, 2024
    Configuration menu
    Copy the full SHA
    aefdc56 View commit details
    Browse the repository at this point in the history
  9. Adds on_register_application_ack

    Summary
    REGISTER_APPLICATION_ACK command will now validate past requests.
    Local tcp connections are now limited to 2 retries instead of being unlimited.
    Details
    After receiving the REGISTER_APPLICATION_ACK command the routing
    host will now check if the client has previously request services.
    This will be specially needed in cases where, after/during a suspend,
    a local tcp client loses its connection. When re registering successfully,
    the host will check the requests.
    The host will send new routing infos with the services to notify the client
    of its availabilities/unavailabilities.
    the local_tcp endpoints will now follow a similiar logic of the local_uds
    endpoints on re connect attempts.
    Before this was unlimited, and the client endpoints could be stuck in a
    forever loop trying to reconnect to applications that would never return.
    Now they will have 2 re attemps before closing.
    The only exception is the connection between client to routing host,
    this one still needs to keep on retrying.
    Rui Graça authored and Duarte Fonseca committed Nov 18, 2024
    Configuration menu
    Copy the full SHA
    f3dcc44 View commit details
    Browse the repository at this point in the history
  10. Suspend resume tests fix

    Summary
    Suspend resume tests now starts "runner" thread after app->init
    Details
    The goal of the changes in this PR is to move the start of the "runner"
    thread in which the app->start runs from the initialization list of the
    suspend_resume_test_service and only start the thread after the app init.
    The problem that lead to this change was that for some reason, the "runner"
    thread although it should start when the test starts, very often it only started
    after the "start" function of the test that runs the app->init. This is a problem
    since when the "runner" thread starts, it locks a mutex and waits a condition
    variable to be notified to then run the app->start, and the "start" function is
    the one that notifies the condition variable after running the app->init. What
    was happening was that the "runner" thread did not start at the beginning of
    the test, the "start" function would notify the condition variable and only then
    the "runner" thread would start and wait for the condition variable to be
    notified, which never happened since the condition variable was notified
    before the "runner" thread started, leading to a timeout.
    To fix this issue, I removed the initialization of the "runner" thread away
    from the initialization list and only initialized it after the app->init was run,,
    without using condition variables to guarantee that the app->start happens
    after the app->init. Before this fix the issue would occur very frequently
    (>50% of runs) on a VM with roughly the same resources as zuul, and with
    this fix it never failed again locally.
    andrefesilva authored and Duarte Fonseca committed Nov 18, 2024
    Configuration menu
    Copy the full SHA
    7964c4e View commit details
    Browse the repository at this point in the history
  11. add service and method ids to the clients_ array

    Summary
    Add service and method to the clients_ array so it is possible to process 2 requests with the same client and session
    Details
    Add service and method to the clients_ array so it is possible to process 2 requests with the same client and session
    andrefesilva authored and Duarte Fonseca committed Nov 18, 2024
    Configuration menu
    Copy the full SHA
    dbb3846 View commit details
    Browse the repository at this point in the history
  12. Protects receiver_ and lock to routing stop function

    Summary
    Protects member variable receiver_, adds nullptr checks and locker to routing stop function
    Details
    New mutex is created for receiver_ member variable (as we have done with sender_). The receiver_ is now thread safe.
    Adds extra nullptr checks and new lock for the routing stop function for proper synchronization among the threads.
    The routing_stop_mutex_ is created to prevent other actions from occurring while ::stop() is being executed.
    For example, this prevents actions like network changes or assigning the client during the stop operation.
    You will observe this mutex being used in ::on_net_state_change and ::on_message.
    Specifically, it is utilized in the ASSIGN_CLIENT_ACK_ID condition to ensure proper sync during these operations.
    Jorge Saraiva authored and Duarte Fonseca committed Nov 18, 2024
    Configuration menu
    Copy the full SHA
    b449a4b View commit details
    Browse the repository at this point in the history
  13. Add include unordered map

    Summary
    Add include of unordered map
    Details
    To fix a problem in a previous PR where unordered map
    was used without including unordered map, unordered map
    was now included in the appropriate file
    andrefesilva authored and Duarte Fonseca committed Nov 18, 2024
    Configuration menu
    Copy the full SHA
    5e4bce6 View commit details
    Browse the repository at this point in the history
  14. Add remove local in deregistration(rmi)

    joaodfsantos authored and Duarte Fonseca committed Nov 18, 2024
    Configuration menu
    Copy the full SHA
    73fe77f View commit details
    Browse the repository at this point in the history
  15. protect deserialization from malicious input

    Summary
    Fixes possible DOS.
    Details
    Prevent vector allocation with invalid length during option deserialization.
    Return early if the user-supplied length value is zero to avoid exceptions.
    Victor Carvalho authored and Duarte Fonseca committed Nov 18, 2024
    Configuration menu
    Copy the full SHA
    94e60e0 View commit details
    Browse the repository at this point in the history
  16. Ignore send_cbk if the socket is not connected

    Summary
    Ignore send_cbk if the socket is not connected
    Details
    Possible race condition during connect_cbk and send_cbk,
    causes the endpoint to stop attempting to reconnect.
    In the case where the socket is not yet connected, or connecting,
    the send_cbk should do nothing.
    Rui Graça authored and Duarte Fonseca committed Nov 18, 2024
    Configuration menu
    Copy the full SHA
    c23fc17 View commit details
    Browse the repository at this point in the history
  17. Move suspend/resume of endpoints

    Summary
    Move suspend/resume of endpoints
    Details
    
    Suspend endpoints as the last action when suspending
    Resume endpoints as the first action when resuming
    Check the target state of the endpoints after suspending/resuming them
    lutzbichler authored and Duarte Fonseca committed Nov 18, 2024
    Configuration menu
    Copy the full SHA
    9edb76d View commit details
    Browse the repository at this point in the history
  18. Change handling of availabilities for wildcasts

    Summary
    Change handling of availabilities for wildcasts (ANY_SERVICE, ANY_INSTANCE)
    Details
    Do _NOT report the state of the wildcard (there cannot be any consistent state),
    but report the available instances instead.
    anarodrigues authored and Duarte Fonseca committed Nov 18, 2024
    Configuration menu
    Copy the full SHA
    73040f6 View commit details
    Browse the repository at this point in the history
  19. Allow to configure the initial routing state

    Summary
    Allow to configure the initial routing state to allow suspended startup
    Details
    Add a configuration parameter service-discovery.initial_state to allow the configuration of the behavior
    on startup. Additionally, ensure that new endpoints that are created while the routing is suspended are
    not started. This will happen on the next resume.
    lutzbichler authored and Duarte Fonseca committed Nov 18, 2024
    Configuration menu
    Copy the full SHA
    9f0f97f View commit details
    Browse the repository at this point in the history
  20. vSomeIP-Lib 3.5.3

    Changes:
    Revert fix compile issue with pthreads in android commit
    Revert Force abort hanging detached threads commit
    Remove dead code path
    Update wireshark dissector
    fix race condition on boost async operations
    Enabled initial event tests
    Add vsomeip config parsing
    Whitelist initial events tests
    Adds on_register_application_ack
    Suspend resume tests fix
    add service and method ids to the clients_ array
    Fix capturing references to stack variables
    Protects receiver_ and lock to routing stop function
    Add include unordered map
    Add remove local in deregistration(rmi)
    protect deserialization from malicious input
    Ignore send_cbk if the socket is not connected
    Move suspend/resume of endpoints
    Change handling of availabilities for wildcasts
    Allow to configure the initial routing state
    Duarte Fonseca authored and Duarte Fonseca committed Nov 18, 2024
    Configuration menu
    Copy the full SHA
    01fedac View commit details
    Browse the repository at this point in the history

Commits on Nov 25, 2024

  1. Ran cmake-format

    Included a .cmake-format file, and ran applied it to the main CMakeList files in this project.
    kheaactua committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    974e38e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f36b98e View commit details
    Browse the repository at this point in the history

Commits on Nov 26, 2024

  1. General CMakeLists improvements - cmake v2→v3

    - Use literal target names instead of variables
    - Write internal.hpp to build directory instead of source to prevent needless rebuilds
      - Fixed how this file is includes in source files
    - Remove hard coded CMAKE_VERBOSE_MAKEFILE
    - Ran cmake-format
    - "wrap"ing (ld's --wrap option) the "socket" symbol, see wrappers.cpp
    - Added install directive to vsomeip/example/hello_world and
      vsomeip_ctrl
    - Platform conditional socket lib linkage
    - hello_world code uses ENABLE_SIGNALS, but its setting was missing in CMake
    - Improve setup for boost stacktrace, really only helps on Linux and
      requires the backtrace.h file
    - Added QNX platform section, though the credential code changes for QNX
      are not included in this commit.
    - Use a CACHE variable for VSOMEIP_BASE_PATH.  Upstream defaults this to
      /var for QNX which is a very bad choice.
    - Followed the 3.5.x example and remove the dependency on routingmanager
      in the tests, as it's not available on Windows
    kheaactua committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    91a8e2d View commit details
    Browse the repository at this point in the history
  2. Updating Hello World example CMakeLists

    Co-authored-by: "Duarte Fonseca" <[email protected]>
    Co-authored-by: "Matthew Russell" <[email protected]>
    kheaactua and "Duarte Fonseca" committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    38c935a View commit details
    Browse the repository at this point in the history