[so] [Tema4][Linux] Memcheck failed

Rares Folea raresfolea97 at gmail.com
Tue Apr 23 21:10:21 EEST 2019


Buna seara!

Ma confrunt cu urmatoarele probleme referitoare la testele de memorie:

La rularea pe masina virtuala cu valgrind a testelor 15 si 19 (14 si 18 pe vmchecker), obtin 2 erori similare:

==4684== 288 bytes in 1 blocks are possibly lost in loss record 2 of 2
==4684==    at 0x4C3204A: calloc (vg_replace_malloc.c:762)
==4684==    by 0x40134A6: allocate_dtv (dl-tls.c:286)
==4684==    by 0x40134A6: _dl_allocate_tls (dl-tls.c:530)
==4684==    by 0x5049227: allocate_stack (allocatestack.c:627)
==4684==    by 0x5049227: pthread_create@@GLIBC_2.2.5 (pthread_create.c:644)
==4684==    by 0x4E3E65B: so_fork (in /home/student/l3-so-assignments/4-scheduler/checker-lin/libscheduler.so)
==4684==    by 0x10ABDE: test_sched_handler_15 (test_exec.c:282)
==4684==    by 0x4E3E47E: start_thread (in /home/student/l3-so-assignments/4-scheduler/checker-lin/libscheduler.so)
==4684==    by 0x50486DA: start_thread (pthread_create.c:463)
==4684==    by 0x538188E: clone (clone.S:95)

==4684==      possibly lost: 576 bytes in 2 blocks
==4684== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)

Nu reusesc sa-mi dau seama de la ce ar putea fi cele doua erori si de ce se manifesta doar la aceste doua teste.
Mentionez ca astept terminarea thread-urilor cu pthread_join, care ar trebui sa efectueze eliberarea resurselor din structura pthread_t.
In plus, la testul 16 (15 vmchecker), se pare ca valgrind ocupa mult prea multa memorie locala, iar ca urmare este omorat.

student at vagrant:~/l3-so-assignments/4-scheduler/checker-lin$ LD_LIBRARY_PATH=. valgrind --tool=memcheck --track-origins=yes --leak-check=full _test/run_test 16
==4693== Memcheck, a memory error detector
==4693== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==4693== Using Valgrind-3.15.0.GIT and LibVEX; rerun with -h for copyright info
==4693== Command: _test/run_test 16
==4693== 
Killed 

Multumesc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cursuri.cs.pub.ro/pipermail/so/attachments/20190423/b3322013/attachment.html>


More information about the so mailing list