Next: GNU Free Documentation License, Previous: Troubleshooting, Up: Top [Contents][Index]
To report bugs or suggest enhancements for Mediatex, please send electronic mail to nroche@narval.fr.eu.org.
For bug reports, please include enough information for the maintainers to reproduce the problem. Generally speaking, that means:
configure
other than specifying
installation directories.
When in doubt whether something is needed or not, include it. It’s better to include too much than to leave out something important.
Patches are welcome; if possible, please make them with ‘diff -c’. Please follow the existing coding style.
srcdir
variable. For instance :
srcdir=/usr/share/mediatex/scripts MDTX_MDTXUSER=serv1 \ /usr/share/mediatex/scripts/audit.sh hello \ audit_20160204-002128_395972467d4e582287143a094dd14c10:nroche \ 022a34b2f9b893fba5774237e1aa80ea 24075 0
rsyslog
so as not to drop messages
$ cat /etc/rsyslog.conf $ModLoad imuxsock $SystemLogRateLimitInterval 0 $SystemLogRateLimitBurst 0
# apt-get install libtool-bin $ libtool --mode=execute valgrind ./BINARY ARGS $ libtool --mode=execute gdb BINARY
# chmod -s /usr/bin/mediatex # valgrind mediatex ls coll
gdb
using emacs:
# xhost local:mdtx # su mdtx $ export DISPLAY=:0.0 $ emacs23 > M-x gdb > Run gdb (like this): gdb --annotate=3 mediatexd (gdb) set args -sinfo -ffile (gdb) b extractRecord (gdb) r
gdb
attachin daemon:
$ cat /var/run/mediatex/mdtx.pid PID $ gdb > attach PID
gdb
using core dump:
# echo 1 > /proc/sys/fs/suid_dumpable # echo '/var/tmp/core.%p' > /proc/sys/kernel/core_pattern # ulimit -c unlimited // (into /etc/init.d/mediatexd) # /etc/init.d/mediatexd start # kill -SIGABRT PID // (to simulate coredump) # su mdtx $ gdb mediatexd > core-file /var/tmp/core > bt > frame #Number > set args ...
valgrind
to detect memory leaks
# su mdtx $ valgrind \ --leak-check=full --show-reachable=yes --track-origins=yes mediatexd … # mediatex srv notify # kill -SIGTERM PID
gprof
: need to compile using the static library
src/Makefile.am
<<< mediatex_LDADD = client/libclient.a libmediatex.la --- mediatex_LDADD = client/libclient.a libmediatex.a <<<
$ make CFLAGS="-g -p" # make install # mediatex upload $ ls gmon.out $ gprof /usr/bin/mediatex > gprof.txt
kcachegrind
: profiling that include system calls
# apt-get install kcachegrind # chmod u-s /usr/bin/mediatex # valgrind --tool=callgrind mediatex upload $ kcachegrind callgrind.out.nnn
in a new buffer use the M-x org-mode : info:/home/user/git/mediatex/doc/mediatex.info info:/usr/share/info/mediatex.info place cursor on a line and type C-c C-o
$ QUERY -A -sdebug:alloc 2>&1 | sed 's/:.*]/:/' \ | cut -d" " -f2,3 | grep malloc | sort | uniq -c $ QUERY -A -sdebug:alloc 2>&1 | sed 's/:.*]/:/' \ | cut -d" " -f2,3 | grep free | sort | uniq -c
Otherwise, you need to drop setuid bit on binary and to run it as root, as seen previously.
$ ps -e -ovsz -orss,args= | sort -b -k1,1n | grep mediatex
massif
to detect memory hogs
$ pmap PID # su mdtx $ cd /tmp $ valgrind --tool=massif mediatexd mediatexd -sdebug … # mediatex srv notify # kill -SIGTERM PID $ ms_print massif.out.PID | less
gcov
to display code coverage
$ find -type f \( -name "*.gcda" -o -name "*.gcno" \) -delete $ make clean $ make CFLAGS="-fprofile-arcs -ftest-coverage …" $ make CFLAGS="-fprofile-arcs -ftest-coverage …" check # apt-get install gcovr $ cd src $ gcovr -r . -e "parser/.*\.c" TOTAL 14908 11262 75% $ rm cov.* $ gcovr -r . -e "parser/.*\.c" --html --html-details -o cov.html
Next: GNU Free Documentation License, Previous: Troubleshooting, Up: Top [Contents][Index]