v0.1.21 - Fix segfault in nostr_http_request by copying CURLINFO_CONTENT_TYPE before curl cleanup and update debug deploy script to deploy *_debug binary for symbolized coredumps
This commit is contained in:
@@ -121,7 +121,7 @@ RUN NOSTR_LIB=$(ls /build/nostr_core_lib/libnostr_core_*.a 2>/dev/null | head -1
|
|||||||
src/tools/tool_nostr_query.c src/tools/tool_nostr_my_events.c src/tools/tool_nostr_identity.c src/tools/tool_nostr_social.c \
|
src/tools/tool_nostr_query.c src/tools/tool_nostr_my_events.c src/tools/tool_nostr_identity.c src/tools/tool_nostr_social.c \
|
||||||
src/tools/tool_nostr_relay.c src/tools/tool_nostr_dm.c src/tools/tool_admin.c \
|
src/tools/tool_nostr_relay.c src/tools/tool_nostr_dm.c src/tools/tool_admin.c \
|
||||||
src/tools/tool_task.c src/tools/tool_nostr_list.c src/tools/tool_nostr_block.c src/tools/tool_local.c \
|
src/tools/tool_task.c src/tools/tool_nostr_list.c src/tools/tool_nostr_block.c src/tools/tool_local.c \
|
||||||
src/tools/tool_skill.c src/tools/tool_nostr_post.c src/tools/tool_memory.c src/tools/tool_config.c src/tools/tool_cashu_wallet.c src/trigger_manager.c \
|
src/tools/tool_skill.c src/tools/tool_nostr_post.c src/tools/tool_memory.c src/tools/tool_config.c src/tools/tool_cashu_wallet.c src/tools/tool_blossom.c src/trigger_manager.c \
|
||||||
src/cashu_wallet.c src/nostr_block_list.c src/prompt_template.c src/http_api.c src/setup_wizard.c src/mongoose.c src/debug.c \
|
src/cashu_wallet.c src/nostr_block_list.c src/prompt_template.c src/http_api.c src/setup_wizard.c src/mongoose.c src/debug.c \
|
||||||
-o /build/didactyl_static \
|
-o /build/didactyl_static \
|
||||||
$NOSTR_LIB \
|
$NOSTR_LIB \
|
||||||
|
|||||||
@@ -55,11 +55,11 @@ Skills compose by adoption-list order (`10123`) and trigger tags carry runtime e
|
|||||||
|
|
||||||
Didactyl will support local inference, which is very privacy preserving. Remote inference does however have it's advantages, and in those cases Didactyl supports using Bitcoin Lightning and eCash inference providers.
|
Didactyl will support local inference, which is very privacy preserving. Remote inference does however have it's advantages, and in those cases Didactyl supports using Bitcoin Lightning and eCash inference providers.
|
||||||
|
|
||||||
## Current Status — v0.1.20
|
## Current Status — v0.1.21
|
||||||
|
|
||||||
**Active build — this project is barely working. Experiment at your own risk.**
|
**Active build — this project is barely working. Experiment at your own risk.**
|
||||||
|
|
||||||
> Last release update: v0.1.20 — Complete Blossom hardening and validation: HTTPS-only Blossom tools, config-driven upload/download limits, overwrite protection, CA bundle unification via nostr_http, and comprehensive live+mock nostr_http/blossom test coverage
|
> Last release update: v0.1.21 — Fix segfault in nostr_http_request by copying CURLINFO_CONTENT_TYPE before curl cleanup and update debug deploy script to deploy *_debug binary for symbolized coredumps
|
||||||
|
|
||||||
- Connects to configured relays with auto-reconnect and relay state transition logging
|
- Connects to configured relays with auto-reconnect and relay state transition logging
|
||||||
- Publishes configured startup events per relay as each relay becomes connected
|
- Publishes configured startup events per relay as each relay becomes connected
|
||||||
|
|||||||
109
deploy_lt_debug.sh
Executable file
109
deploy_lt_debug.sh
Executable file
@@ -0,0 +1,109 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Debug variant of deploy_lt.sh
|
||||||
|
# Builds with debug symbols, deploys, enables core dumps, and restarts services.
|
||||||
|
# After a crash, run on the server:
|
||||||
|
# coredumpctl list
|
||||||
|
# coredumpctl gdb simon.service
|
||||||
|
# (gdb) bt full
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
SOURCE_BINARY_DEBUG="$SCRIPT_DIR/didactyl_static_x86_64_debug"
|
||||||
|
SOURCE_BINARY_FALLBACK="$SCRIPT_DIR/didactyl_static_x86_64"
|
||||||
|
SOURCE_BINARY=""
|
||||||
|
REMOTE_HOST="ubuntu@laantungir.net"
|
||||||
|
REMOTE_TARGETS=(
|
||||||
|
"/home/simon/didactyl"
|
||||||
|
"/home/didactyl/didactyl"
|
||||||
|
)
|
||||||
|
REMOTE_SERVICES=(
|
||||||
|
"simon.service"
|
||||||
|
"didactyl.service"
|
||||||
|
)
|
||||||
|
|
||||||
|
if ! command -v rsync >/dev/null 2>&1; then
|
||||||
|
echo "ERROR: rsync is not installed or not in PATH"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! command -v ssh >/dev/null 2>&1; then
|
||||||
|
echo "ERROR: ssh is not installed or not in PATH"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "=========================================="
|
||||||
|
echo " DEBUG BUILD + DEPLOY"
|
||||||
|
echo "=========================================="
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
echo "Building DEBUG static binary (symbols preserved)..."
|
||||||
|
"$SCRIPT_DIR/build_static.sh" --debug
|
||||||
|
|
||||||
|
if [ -f "$SOURCE_BINARY_DEBUG" ]; then
|
||||||
|
SOURCE_BINARY="$SOURCE_BINARY_DEBUG"
|
||||||
|
elif [ -f "$SOURCE_BINARY_FALLBACK" ]; then
|
||||||
|
SOURCE_BINARY="$SOURCE_BINARY_FALLBACK"
|
||||||
|
else
|
||||||
|
echo "ERROR: Build completed but no binary found (expected $SOURCE_BINARY_DEBUG or $SOURCE_BINARY_FALLBACK)"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "Binary info:"
|
||||||
|
file "$SOURCE_BINARY"
|
||||||
|
ls -lh "$SOURCE_BINARY"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
REMOTE_STAGE="/tmp/didactyl_static_x86_64"
|
||||||
|
|
||||||
|
echo "Uploading debug binary to $REMOTE_HOST:$REMOTE_STAGE"
|
||||||
|
rsync -avz --progress "$SOURCE_BINARY" "$REMOTE_HOST:$REMOTE_STAGE"
|
||||||
|
|
||||||
|
for target in "${REMOTE_TARGETS[@]}"; do
|
||||||
|
echo "Installing staged binary to $target via sudo"
|
||||||
|
ssh "$REMOTE_HOST" "sudo install -m 0755 '$REMOTE_STAGE' '$target'"
|
||||||
|
done
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "Enabling core dumps on remote..."
|
||||||
|
ssh "$REMOTE_HOST" "
|
||||||
|
# Ensure systemd stores core dumps via coredumpctl
|
||||||
|
sudo mkdir -p /etc/systemd/coredump.conf.d
|
||||||
|
echo '[Coredump]
|
||||||
|
Storage=external
|
||||||
|
ProcessSizeMax=512M
|
||||||
|
ExternalSizeMax=512M' | sudo tee /etc/systemd/coredump.conf.d/debug.conf > /dev/null
|
||||||
|
sudo systemctl daemon-reload
|
||||||
|
|
||||||
|
# Remove any ulimit restrictions for the services
|
||||||
|
for svc in ${REMOTE_SERVICES[*]}; do
|
||||||
|
OVERRIDE_DIR=\"/etc/systemd/system/\${svc}.d\"
|
||||||
|
sudo mkdir -p \"\$OVERRIDE_DIR\"
|
||||||
|
echo '[Service]
|
||||||
|
LimitCORE=infinity' | sudo tee \"\$OVERRIDE_DIR/coredump.conf\" > /dev/null
|
||||||
|
done
|
||||||
|
sudo systemctl daemon-reload
|
||||||
|
"
|
||||||
|
|
||||||
|
echo "Restarting services on $REMOTE_HOST: ${REMOTE_SERVICES[*]}"
|
||||||
|
ssh "$REMOTE_HOST" "sudo systemctl restart ${REMOTE_SERVICES[*]}"
|
||||||
|
|
||||||
|
echo "Cleaning up remote staging file $REMOTE_STAGE"
|
||||||
|
ssh "$REMOTE_HOST" "rm -f '$REMOTE_STAGE'"
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "=========================================="
|
||||||
|
echo " DEBUG DEPLOYMENT COMPLETE"
|
||||||
|
echo "=========================================="
|
||||||
|
echo ""
|
||||||
|
echo "After reproducing the crash, run on the server:"
|
||||||
|
echo " ssh $REMOTE_HOST"
|
||||||
|
echo " sudo coredumpctl list"
|
||||||
|
echo " sudo coredumpctl gdb simon.service"
|
||||||
|
echo " (gdb) bt full"
|
||||||
|
echo " (gdb) info threads"
|
||||||
|
echo " (gdb) thread apply all bt"
|
||||||
|
echo ""
|
||||||
|
echo "Then paste the backtrace here."
|
||||||
@@ -12,8 +12,8 @@
|
|||||||
// Using DIDACTYL_ prefix to avoid conflicts with nostr_core_lib VERSION macros
|
// Using DIDACTYL_ prefix to avoid conflicts with nostr_core_lib VERSION macros
|
||||||
#define DIDACTYL_VERSION_MAJOR 0
|
#define DIDACTYL_VERSION_MAJOR 0
|
||||||
#define DIDACTYL_VERSION_MINOR 1
|
#define DIDACTYL_VERSION_MINOR 1
|
||||||
#define DIDACTYL_VERSION_PATCH 20
|
#define DIDACTYL_VERSION_PATCH 21
|
||||||
#define DIDACTYL_VERSION "v0.1.20"
|
#define DIDACTYL_VERSION "v0.1.21"
|
||||||
|
|
||||||
// Agent metadata
|
// Agent metadata
|
||||||
#define DIDACTYL_NAME "Didactyl"
|
#define DIDACTYL_NAME "Didactyl"
|
||||||
|
|||||||
Reference in New Issue
Block a user