Hi,
I am using armdbg in Unix environment to debug the hardware in the shell scripts. I noticed that armdbg creates log files in /tmp/armdbg_support_log_files even if the log_file is explicitly defined for it. The problem is that if there are multiple users sharing the environment the created folder has the first user as the owner and second user can not run the tool and gets the following error:
[date,time] main ERROR FileManager (/tmp/armdbg_support_log_files/armdbg_support_log_file_<date,time>.log) java.io.FileNotFoundException: /tmp/armdbg_support_log_files/armdbg_support_log_file_<date,time>.log (Permission denied) java.io.FileNotFoundException: /tmp/armdbg_support_log_files/armdbg_support_log_file_<date,time>.log (Permission denied) at java.base/java.io.FileOutputStream.open0(Native Method) at java.base/java.io.FileOutputStream.open(FileOutputStream.java:289) at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:230) at org.apache.logging.log4j.core.appender.FileManager$FileManagerFactory.createManager(FileManager.java:438) at org.apache.logging.log4j.core.appender.FileManager$FileManagerFactory.createManager(FileManager.java:422) at org.apache.logging.log4j.core.appender.AbstractManager.getManager(AbstractManager.java:114) at org.apache.logging.log4j.core.appender.OutputStreamManager.getManager(OutputStreamManager.java:100) at org.apache.logging.log4j.core.appender.FileManager.getFileManager(FileManager.java:182) at org.apache.logging.log4j.core.appender.FileAppender$Builder.build(FileAppender.java:96) at com.arm.debug.logging.LogFactory.createSupportLogFile(LogFactory.java:389) at com.arm.debug.cli.Launcher.run(Launcher.java:1195) at com.arm.debug.cli.Launcher.main(Launcher.java:696) at com.arm.debug.launcher.EclipseRunner.run(EclipseRunner.java:89) at com.arm.debug.launcher.EclipseRunner.start(EclipseRunner.java:96) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:208) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:402) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) at java.base/java.lang.reflect.Method.invoke(Method.java:580) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:651) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:588) at org.eclipse.equinox.launcher.Main.run(Main.java:1459) at org.eclipse.equinox.launcher.Main.main(Main.java:1432)Is there any way to change the log files destination location?RegardsAmir
HiMy name is Stephen and I work at Arm.Sorry to hear that you've hit this issue, but thanks for reporting it. We are investigating.Unfortunately, there is no way to change the log files destination location.A workaround is to make that single folder accessible to everyone. Please could the first user run the command:chmod -R 777 /tmp/armdbg_support_log_filesDo let me know if that helps.Stephen
Hi Stephan,
Thank you for your response. Yes it works and I've been using it as a workaround.
Kind regards
Amir
Thanks Amir, for confirming.
The log file should normally only be generated if some other error such as an uncaught NullPointerException occurs.
Are you seeing any of those too?
Stephen
My pleasure.
The log that is attached in my initial post is the full log that is being printed in the shell.
If it helps:
armdbg --versionArm Debugger [6.1.2+10]Copyright (C) 2008-2024 Arm Limited (or its affiliates). All rights reserved.
The command I am using:
armdbg --cdb-root <my_custom_cdb_location>/ExtensionDB/ --cdb-entry "<My_Hardware_Platform>::Bare Metal Debug::Bare Metal Debug::Cortex-M33_0::DSTREAM-ST" --cdb-entry-param Connection="TCP:<DSTREAM_IP>" --cdb-entry-param dtsl_options_file=my.dtslprops --script=my_debug_script.ds --log_file=/home/amir/debug_log.txt --log_config=info
Also there multiple environment variables that I am defining that are being used as paths inside the debug scirpt.
Hope this helps.
Just to make sure I made my self clear the log that is being created is the debug log, not the application log itself.
It has the debug commands I wrote in the script and results. Like:
>info cores Number | Name | State | Location -------------------------------------------------------- * 1 | Cortex-M33_0 | stopped | foo() at foo_house.c:31
Understood - thanks!
This all looks good to me. I'm pleased you are finding the armdbg functionality useful :)
Yes indeed :)Many thanksAmir
Hi again,
I'm pleased to let you know that the log folder permissions problem in Arm DS 2024.0 is now fixed in the Arm DS 2024.0-1 patch release, which you can download from:
https://developer.arm.com/Tools%20and%20Software/Arm%20Development%20Studio#Software-Download