Skip to content

Add timeout to the add_umf_ipc_example function #1054

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

Conversation

ldorau
Copy link
Contributor

@ldorau ldorau commented Jan 23, 2025

Description

Add timeout to the add_umf_ipc_example function.

Checklist

  • Code compiles without errors locally
  • All tests pass locally
  • CI workflows execute properly

@ldorau ldorau requested a review from a team as a code owner January 23, 2025 08:43
@PatKamin
Copy link
Contributor

Why is this timeout needed? What are the causes of very long runs?

@ldorau ldorau force-pushed the Add_timeout_to_the_add_umf_ipc_example_function branch from ac139ed to 041981e Compare January 23, 2025 09:16
@ldorau
Copy link
Contributor Author

ldorau commented Jan 23, 2025

Why is this timeout needed? What are the causes of very long runs?

It is needed exactly like in https://github.com/oneapi-src/unified-memory-framework/blob/main/test/CMakeLists.txt#L520
Those tests are IPC tests with two processes and they can hang for ever if one of those processes fails, like it happens now on WSL:

52: Test command: unified-memory-framework/build/examples/ipc_ipcapi_anon_fd.sh
52: Starting ipc_ipcapi_anon_fd CONSUMER on port 16391 ...
52: Waiting 1 sec ...
52: [PID:15368  TID:15368  INFO  UMF] utils_log_init: Logger enabled (UMF version: 0.11.0-dev1.git3.gf23800b, level: DEBUG, flush: DEBUG, pid: yes, timestamp: no)
52: [PID:15368  TID:15368  DEBUG UMF] umf_ba_create_global: UMF base allocator created
52: [PID:15368  TID:15368  DEBUG UMF] umfMemoryTrackerCreate: tracker created, handle=0x7f684cf39068, segment map=0x7f684cf29008
52: [PID:15368  TID:15368  DEBUG UMF] umfInit: UMF tracker created
52: [PID:15368  TID:15368  DEBUG UMF] umfInit: UMF IPC cache initialized
52: [PID:15368  TID:15368  DEBUG UMF] umfInit: UMF library initialized
52: [PID:15368  TID:15368  INFO  UMF] utils_log_init: Logger enabled (UMF version: 0.11.0-dev1.git3.gf23800b, level: DEBUG, flush: DEBUG, pid: yes, timestamp: no)
52: [PID:15368  TID:15368  INFO  UMF] translate_params: established HWLOC NUMA policy: 0
52: [PID:15368  TID:15368  ERROR UMF] syscall_memfd_secret: memfd_secret() failed: Function not implemented
52: [PID:15368  TID:15368  DEBUG UMF] syscall_memfd_create: anonymous file descriptor created using memfd_create()
52: [PID:15368  TID:15368  DEBUG UMF] utils_set_file_size: set size of a file to 9223372036854775807 bytes
52: [PID:15368  TID:15368  DEBUG UMF] create_fd_for_mmap: size of the anonymous file set to 9223372036854775807
52: [PID:15368  TID:15368  INFO  UMF] os_initialize: OS provider initialized with NUMA nodes:
52: [PID:15368  TID:15368  INFO  UMF] os_initialize: 0
52: [PID:15368  TID:15368  DEBUG UMF] umfTrackingMemoryProviderCreate: upstream=0x7f684cf2b068, tracker=0x7f684cf39068, pool=0x7f684cf2b168, ipcCache=0x7f684cf1f008, hIpcMappedCache=0x7f684cf3c068
52: [PID:15368  TID:15368  INFO  UMF] umfPoolCreateInternal: Memory pool created: 0x7f684cf2b168
52: [consumer] Socket created
52: [consumer] Binding done
52: [consumer] Listening for incoming connections ...
52: Starting ipc_ipcapi_anon_fd PRODUCER on port 16391 ...
52: [PID:15376  TID:15376  INFO  UMF] utils_log_init: Logger enabled (UMF version: 0.11.0-dev1.git3.gf23800b, level: DEBUG, flush: DEBUG, pid: yes, timestamp: no)
52: [PID:15376  TID:15376  DEBUG UMF] umf_ba_create_global: UMF base allocator created
52: [PID:15376  TID:15376  DEBUG UMF] umfMemoryTrackerCreate: tracker created, handle=0x7ff032875068, segment map=0x7ff032865008
52: [PID:15376  TID:15376  DEBUG UMF] umfInit: UMF tracker created
52: [PID:15376  TID:15376  DEBUG UMF] umfInit: UMF IPC cache initialized
52: [PID:15376  TID:15376  DEBUG UMF] umfInit: UMF library initialized
52: [PID:15376  TID:15376  INFO  UMF] utils_log_init: Logger enabled (UMF version: 0.11.0-dev1.git3.gf23800b, level: DEBUG, flush: DEBUG, pid: yes, timestamp: no)
52: PR_SET_PTRACER may be not supported. prctl() call failed: Invalid argument
52: [producer] Shutting down (status ERROR) ...
52: [PID:15376  TID:15376  DEBUG UMF] umfTearDown: UMF tracker destroyed
52: [PID:15376  TID:15376  DEBUG UMF] umfTearDown: UMF base allocator destroyed
52: [PID:15376  TID:15376  DEBUG UMF] umfTearDown: UMF library finalized
[... hangs for ever here ... ]

@bratpiorka bratpiorka merged commit 0e2dab2 into oneapi-src:main Jan 23, 2025
79 checks passed
@ldorau ldorau deleted the Add_timeout_to_the_add_umf_ipc_example_function branch January 23, 2025 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants