Conversation
Perhaps add a reference to sbcbench later for proper benchmarking
-D was referencing to ix.io which has been dead for years now and nobody complained 7z benchmark was interesting years ago when sbcs weren't as powerful as they are today. Perhaps also here reference to sbcbench for proper results.
📝 WalkthroughWalkthroughAdds a new armbian-debug utility that collects and uploads comprehensive Armbian debug data (with interactive stdout fallback) and trims/deprecates upload-related functionality from armbianmonitor, redirecting support-info upload flows to armbian-debug. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant User
participant armbian-debug
participant curl
participant PasteServer
participant ShellCmds
User->>armbian-debug: run script (interactive)
armbian-debug->>User: 5s prompt to switch to stdout
armbian-debug->>ShellCmds: CollectSupportInfo() (dmesg, hw, lshw, etc.)
ShellCmds-->>armbian-debug: diagnostic payload
armbian-debug->>armbian-debug: sanitize payload (redact IPs)
armbian-debug->>curl: upload to PasteServer A
curl-->>armbian-debug: exit status (PIPESTATUS)
alt success
PasteServer-->>armbian-debug: URL
armbian-debug->>User: success message + URL
else failure
armbian-debug->>curl: try PasteServer B...
alt all attempts fail
armbian-debug->>User: fallback -> print numbered, redacted stdout
end
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@packages/bsp/common/usr/bin/armbian-debug`:
- Around line 57-106: The curl call inside the paste_server upload loop can hang
indefinitely; update the curl invocation in the for paste_server loop (the
pipeline that ends with curl -s --fail --data-binary `@-`
"https://${paste_server}/log") to include connection and overall timeouts (e.g.
--connect-timeout 10 and --max-time 30) so stalled servers fail fast and allow
the script to fall back to stdout; keep the rest of the pipeline and PIPESTATUS
handling unchanged.
| # Collect and process the info | ||
| if [ "$force_stdout" = true ]; then | ||
| # Output to stdout with line numbers | ||
| CollectSupportInfo | | ||
| sed -E 's/([0-9]{1,3}\.)([0-9]{1,3}\.)([0-9]{1,3}\.)([0-9]{1,3})/XXX.XXX.\3\4/g' | | ||
| awk '!NF{$0=" "}1' | nl - | ||
| echo -e "\nPlease upload the ${BOLD}whole output${NC} above to an online pasteboard service\nand provide the URL in the forum where you have been asked for this.\n" | ||
| else | ||
| # Try to upload to paste servers | ||
| upload_success=false | ||
|
|
||
| for paste_server in "${paste_servers[@]}"; do | ||
| echo "Collecting info and sending to ${paste_server}..." | ||
| declare -i counter=0 | ||
| { | ||
| LC_ALL=C date | ||
| echo "-----------------------------------------------------------------------------------------------------------------------------" | ||
| dmesg --color=always | ||
| echo "-----------------------------------------------------------------------------------------------------------------------------" | ||
| CollectSupportInfo || echo "Error collecting support info" | ||
| } | | ||
| sed -E 's/([0-9]{1,3}\.)([0-9]{1,3}\.)([0-9]{1,3}\.)([0-9]{1,3})/XXX.XXX.\3\4/g' | | ||
| curl -s --fail --data-binary @- "https://${paste_server}/log" | ||
|
|
||
| # Save PIPESTATUS before any other command | ||
| pipe_status=("${PIPESTATUS[@]}") | ||
|
|
||
| # Check PIPESTATUS | ||
| for i in "${pipe_status[@]}"; do | ||
| counter=$((counter + 1)) | ||
| if [[ $i -ne 0 ]]; then | ||
| echo "Failed (pipe ${counter} returned ${i})." | ||
| continue 2 | ||
| fi | ||
| done | ||
|
|
||
| # If we get here, upload succeeded | ||
| upload_success=true | ||
| break | ||
| done | ||
|
|
||
| if [ "$upload_success" = true ]; then | ||
| echo -e "\n${BOLD}Upload successful!${NC} Please post the URL at the place where you have been asked for.\n" | ||
| else | ||
| echo -e "\n${BOLD}All upload attempts failed. Outputting to stdout instead:${NC}\n" | ||
| CollectSupportInfo | | ||
| sed -E 's/([0-9]{1,3}\.)([0-9]{1,3}\.)([0-9]{1,3}\.)([0-9]{1,3})/XXX.XXX.\3\4/g' | | ||
| awk '!NF{$0=" "}1' | nl - | ||
| echo -e "\nPlease upload the ${BOLD}whole output${NC} above to an online pasteboard service\nand provide the URL in the forum where you have been asked for this.\n" | ||
| fi |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
curl --help all 2>&1 | grep -E -- '--connect-timeout|--max-time'Repository: armbian/build
Length of output: 207
Add curl timeouts to prevent indefinite hangs on stalled paste servers.
Without connect/transfer timeouts, curl can block indefinitely if a paste server becomes unresponsive, preventing the script from reaching the fallback stdout output. Use --connect-timeout 10 and --max-time 30 to ensure the script remains responsive.
Proposed fix
- curl -s --fail --data-binary `@-` "https://${paste_server}/log"
+ curl -s --fail --connect-timeout 10 --max-time 30 --data-binary `@-` "https://${paste_server}/log"🤖 Prompt for AI Agents
In `@packages/bsp/common/usr/bin/armbian-debug` around lines 57 - 106, The curl
call inside the paste_server upload loop can hang indefinitely; update the curl
invocation in the for paste_server loop (the pipeline that ends with curl -s
--fail --data-binary `@-` "https://${paste_server}/log") to include connection and
overall timeouts (e.g. --connect-timeout 10 and --max-time 30) so stalled
servers fail fast and allow the script to fall back to stdout; keep the rest of
the pipeline and PIPESTATUS handling unchanged.
well...actually has been there for a while..
|
I have no idea where this conflict comes from and how I produced that but nevertheless this is more POC and RFC, so.... |
|
I have very strict orders from my psychiatrist to never look at this |
|
Haha. |
Description
split log upload into dedicated tool
-u/-Uinarmbianmonitorintact but add deprecation noticearmbianmonitor
rpimonitorand dirty binary patch hacksbcbenchlater for proper resultsix.iowhich has been dead for years and nobody ever complained@rpardini you may wanna have a look at this...or not :D
How Has This Been Tested?
Checklist:
Summary by CodeRabbit
New Features
Refactor