Skip to content

Make tox-bootstrapd free memory on SIGINT and SIGTERM#1221

Merged
iphydf merged 2 commits into
TokTok:masterfrom
nurupo:bootstrap-free-on-signal
Oct 17, 2018
Merged

Make tox-bootstrapd free memory on SIGINT and SIGTERM#1221
iphydf merged 2 commits into
TokTok:masterfrom
nurupo:bootstrap-free-on-signal

Conversation

@nurupo

@nurupo nurupo commented Oct 4, 2018

Copy link
Copy Markdown
Member

Useful for using memory analyzing tools.

Closes #1220

sed -i 's/DMIN_LOGGER_LEVEL/DMIN_LOGGER_LEVEL_IGNORE/' CMakeLists.txt
mkdir _build
cd _build
cmake -DBOOTSTRAP_DAEMON=ON \
      -DBUILD_TOXAV=OFF \
      -DENABLE_STATIC=ON \
      -DENABLE_SHARED=OFF \
      -DCMAKE_BUILD_TYPE=Debug \
      ..
make
cp ../other/bootstrap_daemon/tox-bootstrapd.conf .
sed -i "s|/var/lib/tox-bootstrapd|${PWD}|" tox-bootstrapd.conf
sed -i "s|/var/run/tox-bootstrapd|${PWD}|" tox-bootstrapd.conf
sed -i '/^bootstrap_nodes = /,$d' tox-bootstrapd.conf
python3 ../other/bootstrap_daemon/docker/get-nodes.py >> tox-bootstrapd.conf
valgrind --leak-check=full --show-leak-kinds=all \
         ./tox-bootstrapd --foreground --config tox-bootstrapd.conf
==13673== Memcheck, a memory error detector
==13673== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==13673== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==13673== Command: ./tox-bootstrapd --foreground --config tox-bootstrapd.conf
==13673== 
^C==13673== 
==13673== HEAP SUMMARY:
==13673==     in use at exit: 0 bytes in 0 blocks
==13673==   total heap usage: 2,801 allocs, 2,801 frees, 9,422,380 bytes allocated
==13673== 
==13673== All heap blocks were freed -- no leaks are possible
==13673== 
==13673== For counts of detected and suppressed errors, rerun with: -v
==13673== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

This change is Reviewable

@CLAassistant

CLAassistant commented Oct 4, 2018

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@nurupo
nurupo force-pushed the bootstrap-free-on-signal branch 5 times, most recently from 9820a84 to 19f84ae Compare October 4, 2018 07:11
@nurupo
nurupo force-pushed the bootstrap-free-on-signal branch from 19f84ae to 217855f Compare October 4, 2018 09:06
@codecov

codecov Bot commented Oct 4, 2018

Copy link
Copy Markdown

Codecov Report

Merging #1221 into master will decrease coverage by 0.2%.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           master   #1221     +/-   ##
========================================
- Coverage    83.1%   82.8%   -0.3%     
========================================
  Files          82      82             
  Lines       14692   14647     -45     
========================================
- Hits        12214   12137     -77     
- Misses       2478    2510     +32
Impacted Files Coverage Δ
toxcore/TCP_server.c 75.9% <0%> (-4.4%) ⬇️
toxcore/LAN_discovery.c 83% <0%> (-2.9%) ⬇️
toxcore/friend_connection.c 93.6% <0%> (-0.9%) ⬇️
toxcore/Messenger.c 86.5% <0%> (-0.7%) ⬇️
toxcore/DHT.c 76.6% <0%> (-0.2%) ⬇️
toxcore/onion_client.c 95.9% <0%> (-0.1%) ⬇️
toxcore/net_crypto.c 94.7% <0%> (ø) ⬆️
auto_tests/save_load_test.c 98.6% <0%> (+0.5%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 700accb...f45bf68. Read the comment docs.

@iphydf iphydf modified the milestones: v0.2.8, v0.2.x Oct 7, 2018
@iphydf
iphydf self-requested a review October 7, 2018 22:52
@iphydf

iphydf commented Oct 8, 2018

Copy link
Copy Markdown
Member

@nurupo this needs rebase. Tests should pass now.

@nurupo
nurupo force-pushed the bootstrap-free-on-signal branch from 217855f to b1014fa Compare October 11, 2018 22:44
@nurupo

nurupo commented Oct 11, 2018

Copy link
Copy Markdown
Member Author

Rebased.

@iphydf

iphydf commented Oct 16, 2018

Copy link
Copy Markdown
Member

@nurupo again - appveyor was sad that day.

@nurupo
nurupo force-pushed the bootstrap-free-on-signal branch from b1014fa to f45bf68 Compare October 17, 2018 01:36
@nurupo

nurupo commented Oct 17, 2018

Copy link
Copy Markdown
Member Author

Sure, rebased.

@iphydf
iphydf merged commit f45bf68 into TokTok:master Oct 17, 2018
@robinlinden robinlinden modified the milestones: v0.2.x, v0.2.9 Jan 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants