Closed EmilLindfors closed 6 months ago
@EmilLindfors Thanks for the report.
This could happen when for whatever reason a process is non-gracefully killed. Could you please go into the directory c:\temp\
and remove the directory iceoryx2
and every file starting with the prefix iox2_
and retry again?
Currently, we are working on a mechanism to detect stale resources and clean them up automatically so that you do not have to do this manually. This should come in 0.3.0 beginning of April.
If this does not work, could you please attach the full log file so that I can dig into this.
Here's the error this time:
Running `target\release\ox_r.exe`
0 [D] FileBuilder { file_path: FilePath { value:
FixedSizeByteString<255> { len: 20, data: "
config/iceoryx2.toml" } }, access_mode: Rea
d, permission: OWNER_READ | OWNER_WRITE | O
WNER_EXEC | OWNER_ALL, has_ownership: false
, owner: None, group: None, truncate_size:
None, creation_mode: None }
| Unable to open file since it does not exi
| st.
1 [D] Config { global: Global { root_path_unix: "
/tmp/iceoryx2/", root_path_windows: "C:\\Wi
ndows\\Temp\\iceoryx2\\", prefix: "iox2_",
service: Service { directory: "services", p
ublisher_data_segment_suffix: ".publisher_d
ata", static_config_storage_suffix: ".servi
ce", dynamic_config_storage_suffix: ".dynam
ic", creation_timeout: 500ms, connection_su
ffix: ".connection" } }, defaults: Defaults
{ publish_subscribe: PublishSubscribe { ma
x_subscribers: 8, max_publishers: 2, subscr
iber_max_buffer_size: 2, subscriber_max_bor
rowed_samples: 2, publisher_max_loaned_samp
les: 2, publisher_history_size: 1, enable_s
afe_overflow: true, unable_to_deliver_strat
egy: Block }, event: Event { max_listeners:
1, max_notifiers: 16 } } }
| Failed to create config since the config
| file could not be opened.
2 [W] "Config::get_global_config()"
| Unable to load default config file, popul
| ate config with default values.
< Win32 API error > C:\Users\emill\.cargo\git\checkouts\iceoryx2-1e1d4490bb91753f\9d8c061\iceoryx2-pal\posix\src\windows\unistd.rs:204 GetFileAttributesA(pathname as *const u8)
[ 3 ] The system cannot find the path specified.
< Win32 API error > C:\Users\emill\.cargo\git\checkouts\iceoryx2-1e1d4490bb91753f\9d8c061\iceoryx2-pal\posix\src\windows\unistd.rs:204 GetFileAttributesA(pathname as *const u8)
[ 3 ] The system cannot find the path specified.
< Win32 API error > C:\Users\emill\.cargo\git\checkouts\iceoryx2-1e1d4490bb91753f\9d8c061\iceoryx2-pal\posix\src\windows\stat.rs:34 GetFileAttributesA(path as *const u8)
[ 3 ] The system cannot find the path specified.
3 [T] Directory { path: Path { value: FixedSizeBy
teString<255> { len: 33, data: "C:\Windows\
Temp\iceoryx2\services" } }, directory_stre
am: 0x1, file_descriptor: FileDescriptor {
value: 0, is_owned: false } }
| created
4 [T] Builder { storage_name: FileName { value: F
ixedSizeByteString<255> { len: 40, data: "8
ac634184541a67f312ed9232f19c58ab4e78041" }
}, has_ownership: false, config: Configurat
ion { path: Path { value: FixedSizeByteStri
ng<255> { len: 33, data: "C:\Windows\Temp\i
ceoryx2\services" } }, suffix: FileName { v
alue: FixedSizeByteString<255> { len: 8, da
ta: ".service" } }, prefix: FileName { valu
e: FixedSizeByteString<255> { len: 5, data:
"iox2_" } } } }
| Created service root directory "C:\Window
| s\Temp\iceoryx2\services" since it did no
| t exist before.
5 [T] FileBuilder { file_path: FilePath { value:
FixedSizeByteString<255> { len: 87, data: "
C:\Windows\Temp\iceoryx2\services\iox2_8ac6
34184541a67f312ed9232f19c58ab4e78041.servic
e" } }, access_mode: ReadWrite, permission:
OWNER_READ | OWNER_WRITE | OWNER_EXEC | OW
NER_ALL, has_ownership: false, owner: None,
group: None, truncate_size: None, creation
_mode: Some(CreateExclusive) }
| created
< Win32 API error > C:\Users\emill\.cargo\git\checkouts\iceoryx2-1e1d4490bb91753f\9d8c061\iceoryx2-pal\posix\src\windows\mman.rs:225 CreateFileA(shm_file_path(name, SHM_STATE_SUFFIX).as_ptr(),
GENERIC_WRITE | GENERIC_READ,
FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
core::ptr::null::<SECURITY_ATTRIBUTES>(), CREATE_NEW,
FILE_ATTRIBUTE_NORMAL, 0)
[ 3 ] The system cannot find the path specified.
6 [D] SharedMemoryBuilder { name: FileName { valu
e: FixedSizeByteString<255> { len: 53, data
: "iox2_8ac634184541a67f312ed9232f19c58ab4e
78041.dynamic" } }, size: 570, is_memory_lo
cked: false, has_ownership: false, permissi
on: OWNER_READ | OWNER_WRITE | OWNER_EXEC |
OWNER_ALL, creation_mode: Some(CreateExclu
sive), zero_memory: false, access_mode: Rea
dWrite, enforce_base_address: None }
| Unable to create shared memory since it a
| lready exists.
7 [D] Builder { storage_name: FileName { value: F
ixedSizeByteString<255> { len: 40, data: "8
ac634184541a67f312ed9232f19c58ab4e78041" }
}, supplementary_size: 370, has_ownership:
false, config: Configuration { suffix: File
Name { value: FixedSizeByteString<255> { le
n: 8, data: ".dynamic" } }, prefix: FileNam
e { value: FixedSizeByteString<255> { len:
5, data: "iox2_" } }, path: Path { value: F
ixedSizeByteString<255> { len: 25, data: "C
:\Windows\Temp\iceoryx2\" } } }, _phantom_d
ata: PhantomData<iceoryx2::service::dynamic
_config::DynamicConfig> }
| Failed to create dynamic_storage::PosixSh
| aredMemory since a shared memory with the
| name already exists.
8 [D] BuilderWithServiceType { service_config: St
aticConfig { uuid: "8ac634184541a67f312ed92
32f19c58ab4e78041", service_name: ServiceNa
me { value: FixedSizeByteString<255> { len:
20, data: "My/Funk/ServiceName2" } }, mess
aging_pattern: PublishSubscribe(StaticConfi
g { max_subscribers: 8, max_publishers: 2,
history_size: 12, subscriber_max_buffer_siz
e: 5, subscriber_max_borrowed_samples: 2, e
nable_safe_overflow: true, type_name: "usiz
e", type_size: 32, type_alignment: 16 }) },
global_config: Config { global: Global { r
oot_path_unix: "/tmp/iceoryx2/", root_path_
windows: "C:\\Windows\\Temp\\iceoryx2\\", p
refix: "iox2_", service: Service { director
y: "services", publisher_data_segment_suffi
x: ".publisher_data", static_config_storage
_suffix: ".service", dynamic_config_storage
_suffix: ".dynamic", creation_timeout: 500m
s, connection_suffix: ".connection" } }, de
faults: Defaults { publish_subscribe: Publi
shSubscribe { max_subscribers: 8, max_publi
shers: 2, subscriber_max_buffer_size: 2, su
bscriber_max_borrowed_samples: 2, publisher
_max_loaned_samples: 2, publisher_history_s
ize: 1, enable_safe_overflow: true, unable_
to_deliver_strategy: Block }, event: Event
{ max_listeners: 1, max_notifiers: 16 } } }
, _phantom_data: PhantomData<iceoryx2::serv
ice::zero_copy::Service> }
| Failed to create dynamic storage for serv
| ice.
9 [D] Builder { base: BuilderWithServiceType { se
rvice_config: StaticConfig { uuid: "8ac6341
84541a67f312ed9232f19c58ab4e78041", service
_name: ServiceName { value: FixedSizeByteSt
ring<255> { len: 20, data: "My/Funk/Service
Name2" } }, messaging_pattern: PublishSubsc
ribe(StaticConfig { max_subscribers: 8, max
_publishers: 2, history_size: 12, subscribe
r_max_buffer_size: 5, subscriber_max_borrow
ed_samples: 2, enable_safe_overflow: true,
type_name: "usize", type_size: 32, type_ali
gnment: 16 }) }, global_config: Config { gl
obal: Global { root_path_unix: "/tmp/iceory
x2/", root_path_windows: "C:\\Windows\\Temp
\\iceoryx2\\", prefix: "iox2_", service: Se
rvice { directory: "services", publisher_da
ta_segment_suffix: ".publisher_data", stati
c_config_storage_suffix: ".service", dynami
c_config_storage_suffix: ".dynamic", creati
on_timeout: 500ms, connection_suffix: ".con
nection" } }, defaults: Defaults { publish_
subscribe: PublishSubscribe { max_subscribe
rs: 8, max_publishers: 2, subscriber_max_bu
ffer_size: 2, subscriber_max_borrowed_sampl
es: 2, publisher_max_loaned_samples: 2, pub
lisher_history_size: 1, enable_safe_overflo
w: true, unable_to_deliver_strategy: Block
}, event: Event { max_listeners: 1, max_not
ifiers: 16 } } }, _phantom_data: PhantomDat
a<iceoryx2::service::zero_copy::Service> },
verify_number_of_subscribers: false, verif
y_number_of_publishers: false, verify_subsc
riber_max_buffer_size: true, verify_subscri
ber_max_borrowed_samples: false, verify_pub
lisher_history_size: true, verify_enable_sa
fe_overflow: true }
| Unable to create publish subscribe servic
| e since the dynamic service segment could
| not be created.
@EmilLindfors Ah I see what the problem is. The default temp dir entry in the toml
file is pointing to C:\Temp\iceoryx2
but when the toml file is not found the default value is C:\Windows\Temp\iceoryx2
I merged a PR to fix this: #152
When you check out the newest commit in main
branch, the real default temp directory is used and everything is stored in C:\Temp\iceoryx2
. So when you delete everything in C:\Temp\iceoryx2
and C:\Temp\iox2_*
the example should be running.
Great, that seems to have solved the issue - thanks!
Required information
Operating system: Win 11 Microsoft Windows [Version 10.0.22631.3235]
Rust version: rustc 1.78.0-nightly
Cargo version: Output of:
cargo --version
iceoryx2 version: main
Observed result or behaviour: Im getting this error, seems like the creation process hangs:
Expected result or behaviour: That it would run without any modifications
Conditions where it occurred / Performed steps: ran the two binary pub sub example in README in both debug and release. Also tried changing the config to change the root path, did not help.