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

ConfigFile() at config_file.cpp:50: Failure #2445

Open
MaikVermeulen opened this issue Aug 18, 2024 · 3 comments
Open

ConfigFile() at config_file.cpp:50: Failure #2445

MaikVermeulen opened this issue Aug 18, 2024 · 3 comments

Comments

@MaikVermeulen
Copy link

Describe the issue

We're using the Yocto Scarthgap ot-br-posix recipe to include it in our image. It references commit a35cc682305bb2201c314472adf06a4960536750 from this repository.

It builds successfully but does not run unfortunately:

systemd[1]: Started OpenThread Border Router Agent.
otbr-agent[2680]: 49d.17:17:20.280 [C] Platform------: ConfigFile() at config_file.cpp:50: Failure
systemd[1]: otbr-agent.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: otbr-agent.service: Failed with result 'exit-code'.

Which I believe tracks here, however I'm not sure what's causing the issue. We also tried running gdb, but no luck:

(gdb) run
Starting program: /usr/sbin/otbr-agent -I wpan0 -B eth0 spinel+hdlc+uart:///dev/ttyACM0
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".
[Inferior 1 (process 1587) exited with code 01]
(gdb) backtrace
No stack.

Any ideas to solve this 🙂? Are we just not using it correctly?

@zhanglongxia
Copy link
Contributor

It because the length of the config file path exceed kFileNameMaxSize. There are two options to resolve this issue: <1> Try to reduce the length of the config file path. <2> Change the code to update the kFileNameMaxSize to a larger value.

@MaikVermeulen
Copy link
Author

Thanks @zhanglongxia, with your patch indeed it starts up just fine.

For clarity, which config file(s) does this apply to? A quick google search mainly shows compile/build-time files, but I assume the issue we faced here is runtime?

@zhanglongxia
Copy link
Contributor

The configuration file is mainly used to configure the Thread radio power calibration parameters. Users should prepare a configuration file and set the OPENTHREAD_POSIX_CONFIG_FACTORY_CONFIG_FILE and OPENTHREAD_POSIX_CONFIG_PRODUCT_CONFIG_FILE to the path of the configuration file before running the otbr-agent. OpenThread uses the configuration file openthread.conf.example by default. If users do not need to configure power calibration parameters, they can just set the OPENTHREAD_POSIX_CONFIG_CONFIGURATION_FILE_ENABLE to 0 to disable using the configuration file.

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

No branches or pull requests

2 participants